撒旦进阶_搜索

network下的这里就是中间件版本信息

撒旦进阶_microsoft_02

搜索ip如上

使用搜索过滤

如果像前面单纯只使用关键字直接进行搜索,搜索结果可能不尽人意,那么此时我们就需要使用一些特定的命令对搜索结果进行过滤,常见用的过滤命令如下所示:

  • hostname:搜索指定的主机或域名,例如 hostname:"google"
  • port:搜索指定的端口或服务,例如 port:"21"
  • country:搜索指定的国家,例如 country:"CN"
  • city:搜索指定的城市,例如 city:"Hefei"
  • org:搜索指定的组织或公司,例如 org:"google"
  • isp:搜索指定的ISP供应商,例如 isp:"China Telecom"
  • product:搜索指定的操作系统/软件/平台,例如 product:"Apache httpd"
  • version:搜索指定的软件版本,例如 version:"1.6.2"
  • geo:搜索指定的地理位置,参数为经纬度,例如 geo:"31.8639, 117.2808"
  • before/after:搜索指定收录时间前后的数据,格式为dd-mm-yy,例如 before:"11-11-15"
  • net:搜索指定的IP地址或子网,例如 net:"210.45.240.0/24"

示例

撒旦进阶_API_03

搜索中间件

撒旦进阶_API_04

搜索阿帕奇服务及版本

命令行于API使用

  1. kali先安装python环境
  2. 使用pip3 install shodan安装撒旦模块
  3. 安装成功后输入
shodan -h //查看帮助手册,如果可以看到帮助手册就说明已经安装成功可以正常使用了
shodan init <api_key> //输入一个变量
shodan info //查询自己的api接口相关信息
使用浏览器登录撒旦,在我的账户里你就可以看到自己的api密钥
shodan init DWbmFDEyIRtAsB7RiBt1kYlNPCUtgVKC //DWbmFDEyIRtAsB7RiBt1kYlNPCUtgVKC API密钥

导入成功以后输入:

shodan info //查看自己的api信息

撒旦进阶_microsoft_05

有一百条限制

接下来根据-h的手册来看用法

撒旦进阶_microsoft_06

1.查询iis 6.0数量

shodan count microsoft iis 6.0

撒旦进阶_搜索_07

返回结果

2.将结果下载下来

shodan download microsoft-data nicrosoft iis 6.0 //microsoft-data表名

撒旦进阶_搜索_08

解析结果

shodan parse --fields ip str,port,org --separator , Microsoft-data.json.gz //parse关键参数 

shodan host189.201.128.250

shodan search  --fields ip str,port,org,hostnames microsoft iis 6.0

3.vscode打开

vscode shodan search example0l.py
import shodan

SHODAN_API_KEY='撒旦的KEY'
shodan.Shodan(SHODAN_API_KEY)
try:
    #搜索shodan
    results=ap.search('apache')
    #显示结果
    print('Results is:%s' % results['total']
    for result in results['matches']:
       print(result['ip_str'])
       except shodan.APIError as e:
       print('Error:%s' % e')
       shodan.scan(i)

判断网站是否存活

ping -c www.baidu.com


撒旦进阶_搜索_09

撒旦进阶_搜索_10

除了站长之家,微步和阿里云都可以查询

whois

dig

nslookup

dnsenum

robot.tx