搜索引擎是日常工作中用得最多的一款工具,國內常用的搜索引擎包括 Baidu,sougou,bing,以及信息安全從業人員必備的幾款網絡搜索引擎。
Google 搜索引擎
這裡之所以要介紹 google 搜索引擎,是因為它有別於百度、搜狗等內容搜索引擎,其在安全界有著非同一般的地位,甚至專門有一名詞為 google hacking 用來形容 google 與安全非同尋常的關係。
https://www.exploit-db.com/google-hacking-database (需要科學上網)
這裡有很多關於 google-hacking 的用法,有興趣的朋友可以慢慢研究。
我這裡主要來介紹一下它的基本語法:
google 基本語法#
Index of/ 使用它可以直接進入網站首頁下的所有文件和文件夾中。
intext: 將返回所有在網頁正文部分包含關鍵詞的網頁。
intitle: 將返回所有網頁標題中包含關鍵詞的網頁。
cache: 搜索 google 裡關於某些內容的緩存。
define: 搜索某個詞語的定義。
filetype: 搜索指定的文件類型,如:.bak,.mdb,.inc 等。
info: 查找指定站點的一些基本信息。
inurl: 搜索我們指定的字符是否存在於 URL 中。
Link: link.one 可以返回所有和 thief.one 做了鏈接的 URL。
site: site.one 將返回所有和這個站有關的 URL。
+ 把 google 可能忽略的字列如查詢範圍。
- 把某個字忽略,例子:新加 - 坡。
~ 同義詞。
. 單一的通配符。
* 通配符,可代表多個字母。
“” 精確查詢。
搜索不同地域網站#
inurl 台灣
inurl 日本
利用 google 暴庫#
利用 goole 可以搜索到互聯網上可以直接下載到的數據庫文件,語法如下:
inurl/db/inurl/db/inurl/data/inurl/inurl/data/inurl:\boke\datainurl/database/inurl.aspinc/conn.aspServer.mapPath(“.mdb”)allinurl datafiletype inurl:databasefiletype conninurl filetype:mdbintitle:"index of" data
利用 goole 搜索敏感信息#
利用 google 可以搜索一些網站的敏感信息,語法如下:
intitle:"index of" etcintitle:"Index of" .sh_historyintitle:"Index of" .bash_historyintitle:"index of" passwdintitle:"index of" people.lstintitle:"index of" pwd.dbintitle:"index of" etc/shadowintitle:"index of" spwdintitle:"index of" master.passwdintitle:"index of" htpasswdinurl.pwd
利用 google 搜索 C 段服務器信息#
site:218.87.21.*
可通過 google 可獲取 218.87.21.0/24 網絡的服務信息。
shodan 搜索引擎#
shodan 網絡搜索引擎偏向網絡設備以及服務器的搜索,具體內容可上網查閱,這裡給出它的高級搜索語法。
舉個例子搜索chatgpt網站語法如下:title=="chatgpt web "
可以搜索出很多chatgpt的鏡像網站。搜索語法
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: 搜索指定的地理位置,例如 vgeo:”31.8639, 117.2808”`
before/after: 搜索指定收錄時間前後的數據,格式為 dd-mm-yy,例如 `before:”11-11-15”v
net: 搜索指定的 IP 地址或子網,例如 net:”210.45.240.0/24”
censys 搜索引擎#
censys 搜索引擎功能與 shodan 類似,以下幾個文檔信息。
幫助文檔:
https://www.censys.io/certificates/help
注:打開鏈接後末尾 q = 加你要查詢 IP
IP 查詢
域名查詢,用法如上
https://www.censys.io/domain?q=
證書查詢,用法如上
https://www.censys.io/certificates?q=
搜索語法#
默認情況下 censys 支持全文檢索。
23.0.0.0/8 or 8.8.8.0/24 可以使用 and or not
80.http.get.status_code: 200 指定狀態
80.http.get.status_code:[200 TO 300] 200-300 之間的狀態碼
location.country_code: DE 國家
protocols: (“23/telnet” or “21/ftp”) 協議
tags: scada 標籤
80.http.get.headers.server:nginx 服務器類型版本
autonomous_system.description: University 系統描述
正則
鐘馗之眼(國產)#
鐘馗之眼搜索引擎偏向 web 應用層面的搜索。
搜索語法
app 組件名
ver:1.0 版本
os 操作系統
country:”China” 國家
city:”hangzhou” 城市
port:80 端口
vhostname 主機名
`site.onev 網站域名
desc 描述
keywords’blog 關鍵詞
service 服務類型
ip:8.8.8.8 ip 地址
cidr:8.8.8.8/24 ip 地址段
FoFa 搜索引擎(國產)#
FoFa 搜索引擎偏向資產搜索。
搜索語法
title=”abc” 從標題中搜索 abc。例:標題中有北京的網站。
header=”abc” 從 http 頭中搜索 abc。例:jboss 服務器。
body=”abc” 從 html 正文中搜索 abc。例:正文包含 Hacked by。
domain=”qq.com” 搜索根域名帶有 qq.com 的網站。例: 根域名是 qq.com 的網站。
host=”.gov.cn” 從 url 中搜索.gov.cn, 注意搜索要用 host 作為名稱。
port=”443” 查找對應 443 端口的資產。例: 查找對應 443 端口的資產。
ip=”1.1.1.1” 從 ip 中搜索包含 1.1.1.1 的網站,注意搜索要用 ip 作為名稱。
protocol=”https” 搜索制定協議類型 (在開啟端口掃描的情況下有效)。例: 查詢 https 協議資產。
city=”Beijing” 搜索指定城市的資產。例: 搜索指定城市的資產。
region=”Zhejiang” 搜索指定行政區的資產。例: 搜索指定行政區的資產。
country=”CN” 搜索指定國家 (編碼) 的資產。例: 搜索指定國家 (編碼) 的資產。
cert=”google.com” 搜索證書 (https 或者 imaps 等) 中帶有 google.com 的資產。
高級搜索:
title=”powered by” && title!=discuz
title!=”powered by” && body=discuz
(body=”content=\”WordPress” || (header=”X-Pingback” && header=”/xmlrpc.php” && body=”/wp-includes/“)) && host=”gov.cn”
Dnsdb 搜索引擎#
dnsdb 搜索引擎是一款針對 dbs 解析的查詢平台。
搜索語法
DnsDB 查詢語法結構為條件 1 條件 2 條件 3 …., 每個條件以空格間隔,DnsDB 會
把滿足所有查詢條件的結果返回給用戶.
域名查詢條件
域名查詢是指查詢頂級私有域名所有的 DNS 記錄,查詢語法為 domain:.
例如查詢 google.com 的所有 DNS 記錄: domain.com.
域名查詢可以省略 domain:.
主機查詢條件
查詢語法:host:
例如查詢主機地址為http://mp3.example.com 的 DNS 記錄: host:http://map3.example.com
主機查詢條件與域名查詢查詢條件的區別在於,主機查詢匹配的是 DNS 記錄的
Host 值
按 DNS 記錄類型查詢
查詢語法: type:.
使用條件:必須存在 domain: 或者 host: 條件,才可以使用 type: 查詢語法
按 IP 限制
查詢語法: ip:
查詢指定 IP:ip:8.8.8.8, 該查詢與直接輸入 8.8.8.8 進行查詢等效
查詢指定 IP 範圍: ip:8.8.8.8-8.8.255.255
CIDR: ip:8.8.0.0/24
IP 最大範圍限制 65536 個