Shodan信息收集

https://www.shodan.io/

点击 Explore ,看网络上其他用户使用最多的搜索
使用搜索过滤
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

Kali中安装 Shodan
Shodan 是由官方提供的 Python 库

安装命令:

git clone https://github.com/achillean/shodan-python.git && cd shodan-python
python setup.py install
Kali中安装 Shodan
Shodan 是由官方提供的 Python 库

安装命令:

git clone https://github.com/achillean/shodan-python.git && cd shodan-python
python setup.py install
Kali中Shodan的使用

Commands:
alert Manage the network alerts for your account # 管理账户的网络提示
convert Convert the given input data file into a… # 转换输入文件
count Returns the number of results for a search # 返回查询结果数量
download Download search results and save them in a… # 下载查询结果到文件
honeyscore Check whether the IP is a honeypot or not. # 检查 IP 是否为蜜罐
host View all available information for an IP… # 显示一个 IP 所有可用的详细信息
info Shows general information about your account # 显示账户的一般信息
init Initialize the Shodan command-line # 初始化命令行
myip Print your external IP address # 输出用户当前公网IP
parse Extract information out of compressed JSON… # 解析提取压缩的JSON信息,即使用download下载的数据
scan Scan an IP/ netblock using Shodan. # 使用 Shodan 扫描一个IP或者网段
search Search the Shodan database # 查询 Shodan 数据库
stats Provide summary information about a search… # 提供搜索结果的概要信息
stream Stream data in real-time. # 实时显示流数据
初始化Shodan:shodan init API_Key

返回查询结果的数量:shodan count SSH

将查询到的结果下载:shodan download microsoft-data microsoft iis 6.0 。将搜索结果下载到 ssh-data 文件中,文件中的每一行都是 JSON 格式存储的目标 banner 信息。默认情况下,该命令只会下载 100 条结果。如果我们想获取更多的结果,需要我们花钱注册,然后下载的时候指定 --limit 参数。

解析下载的数据:shodan parse --fields ip_str,port,org --separator , microsoft-data.json.gz

查看指定主机的相关信息,如地理位置信息,开放端口,甚至是否存在某些漏洞等信息。

shodan search microsoft iis 6.0

search查找,直接将查询结果展示在命令行中,默认情况下只显示IP、端口号、主机名和HTTP数据

当然我们也可以通过使用 –fields 来自定义显示内容,例如,我们只显示IP、端口号、组织名称和主机名:

shodan search --fields ip_str,port,org,hostnames microsoft iis 6.0

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值