Google Hacking(Google Dorks)並非新鮮事物,但善用其強大檢索語法,能將公開網路資訊轉化為精準滲透情報。本文系統講解核心語法、實戰技巧、真實滲透案例與防禦對策。
| 語法 | 功能 | 範例 |
|---|---|---|
site: | 限定站點/域名 | site:example.com |
inurl: / allinurl: | URL包含關鍵字 | inurl:admin.php |
intitle: / allintitle: | 標題包含關鍵字 | intitle:"index of" |
intext: / allintext: | 正文包含關鍵字 | intext:"password" |
filetype: / ext: | 指定文件類型 | filetype:pdf conf |
link: | 反向鏈接 | link:example.com |
cache: | 查看Google快照 | cache:example.com |
define: | 詞語定義 | define:hacker |
info: | 站點基本信息 | info:example.com |
操作符:+強制包含、-排除、~同義詞、.單字符通配、*多字符通配、""精確匹配。
intitle:"index of" "parent directory" passwd
intitle:"index of" ".bash_history"
filetype:sql inurl:backup
filetype:mdb inurl:database
filetype:inc conn
"# -FrontPage-" inurl:service.pwd
site:target.com inurl:admin
site:target.com intitle:login
site:target.com intext:"管理后台"
site:target.com filetype:asp
site:target.com filetype:php
site:target.com "Powered by Discuz"
site:target.com "X-Powered-By"
site:target.com intext:"ftp://" intext:"@"
site:target.com "mysql_connect" "password"
intext:"ZeroBoard" filetype:php
inurl:outlogin.php?_zb_path= site:.kr
intitle:phpmyadmin intext:"Create new database"
site:univ.edu 發現四個二級域名(a1~a4),Ping確認不同伺服器。site:univ.edu filetype:doc 獲取大量內部文檔。site:univ.edu inurl:login 找到兩個管理後台(ASP.NET + PHP)。site:a2.univ.edu filetype:asp 判斷為IIS+ASP整站+PHP論壇。/sys/uploadfile.asp上傳頁(無權限),SQL注入點多處(DBO權限)。https://www.google.com/remove.html 提交刪除敏感快照。User-Agent: Googlebot返回301導向或空頁,但可能被視為斗篷(Cloaking)違反搜尋引擎指南。Options -Indexes)。site:domain自查,發現洩露即時清理並推送移除請求。Google Hacking本質是公開情報收集(OSINT)的自動化。防禦核心不在於阻擋搜尋引擎,而在於不將敏感資產暴露在公開可索引空間。定期自查、最小權限、認證加密,才是治本之道。