信息收集-谷歌语法
一、web漏洞第一步,信息收集
谷歌语法
site:网址
inurl:
intext:
intitle
findtype
https://www.exploit-db.com/google-hacking-database
二、谷歌浏览器插件
三、
##shodan
https://www.shodan.io/
##3.1##基础用法
city:beijing # 指定城市 country:cn # 指定国家 org:"China Telecom" # 组织机构 net:202.96.0.0/14 # IP段搜索 port:80 # 端口
产品搜索
product:mysql # MySQL数据库 server:nginx # Nginx服务器 os:"windows 10" # 操作系统
漏洞搜索
vuln:cve-2021-44228 # 按CVE编号 ssl:expired # SSL证书过期
组合搜索
apache country:us port:443 # 美国使用Apache且开放443端口的设备
##fofa
https://fofa.info/
##3.2基本用法
domain="qq.com" # 搜索域名 ip="1.1.1.1" # 搜索IP city="北京" # 城市 region="Zhejiang" # 省份/地区 country="CN" # 国家
搜索协议
port="80" # 端口 protocol="http" # 协议 title="后台管理" # 页面标题 server=="Microsoft-IIS/10" # 服务器类型
搜索组件
app="Apache-Tomcat" # 应用程序 banner="mysql" # 横幅信息 service="ssh" # 服务类型
搜索漏洞
vul= # 漏洞 cert="tencent" # SSL证书 header="thinkphp" # HTTP头部
组合搜索
# 查找特定CMS系统 app="WordPress" && country="CN" # 查找摄像头设备 title="摄像头" || title="webcam" # 查找数据库 port="3306" && country="CN" # 管理后台 title="登录" || title="admin" || title="管理" # 特定漏洞 vul="CVE-2021-44228" # Log4j漏洞 body="thinkphp" && title="500" # 微信小程序 body="wx.video" || title="小程序" # 查找腾讯所有资产 domain="tencent.com" || cert="Tencent" # 查找阿里云上的特定服务 cloud="aliyun" && app="Nginx" # 政府网站 title="政府" && domain="gov.cn" # 教育机构 org="大学" && country="CN" # PLC设备 port="502" && country="CN" # 视频监控 title="Hikvision" || app="海康威视" # 路由器 title="路由器" || app="routeros"
高级用法-API
import requests import base64 # FOFA API配置 EMAIL = "your_email" # FOFA账号 KEY = "your_api_key" # API密钥 def fofa_search(query, size=100): """FOFA搜索""" # 对查询语句进行base64编码 qbase64 = base64.b64encode(query.encode()).decode() url = f"https://fofa.info/api/v1/search/all" params = { "email": EMAIL, "key": KEY, "qbase64": qbase64, "size": size, "fields": "ip,port,host,title,domain,country,city" } response = requests.get(url, params=params) return response.json() # 使用示例 results = fofa_search('domain="qq.com" && port="443"') for item in results.get('results', []): print(f"IP: {item[0]}, Port: {item[1]}, Title: {item[3]}")
浏览器插件FOFA Viewe
# 组合示例:查找国内暴露的Redis port="6379" && country="CN" && title="redis" # 组合示例:某企业的测试环境 domain="example.com" && title="测试" && after="2023-01-01"
##钟魁之眼
https://www.zoomeye.org/
##奇安信
https://hunter.qianxin.com/
DNS信息收集,对于有CDN可通过子域名、
浙公网安备 33010602011771号