本文最后更新于 420 天前,其中的信息可能已经有所发展或是发生改变。
:::info
💘渗透全流程:
信息👣收集 – 漏洞发现 – 漏洞利用 – 权限提升 – 隧道搭建 – 内网渗透 – 横向移动 – 后渗透
:::
Shodan 联动
思路分析:
调用 Shodan API 执行 Shodan 搜索语句,并对搜索到的结果进行处理
SDK 安装:pip install shodan
SDK 地址:https://github.com/achillean/shodan-python
实现步骤:
- 登录 Shodan,获取 API KEY
- 调用 Shodan API 获取搜索结果
- 处理响应体
V1.0
基本功能实现
from shodan import Shodan
api = Shodan('MY API KEY')
# Lookup an IP
ipinfo = api.host('8.8.8.8')
print(ipinfo)
# Search for websites that have been "hacked"
for banner in api.search_cursor('http.title:"hacked by"'):
print(banner)
# Get the total number of industrial control systems services on the Internet
ics_services = api.count('tag:ics')
print('Industrial Control Systems: {}'.format(ics_services['total']))