萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 網路安全 >  >> 病毒防護

Google Hacking實戰指南:從語法精通到目標滲透測試全流程

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

操作符:+強制包含、-排除、~同義詞、.單字符通配、*多字符通配、""精確匹配。

實戰情報收集場景

1. 敏感文件洩露

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

2. 後台/管理入口發現

site:target.com inurl:admin
site:target.com intitle:login
site:target.com intext:"管理后台"

3. 技術棧指紋識別

site:target.com filetype:asp
site:target.com filetype:php
site:target.com "Powered by Discuz"
site:target.com "X-Powered-By"

4. 公開FTP/資料庫/憑證

site:target.com intext:"ftp://" intext:"@"
site:target.com "mysql_connect" "password"

5. 已知漏洞組件定位

intext:"ZeroBoard" filetype:php
inurl:outlogin.php?_zb_path= site:.kr
intitle:phpmyadmin intext:"Create new database"

真實滲透案例復盤(某知名大學)

  1. 資產發現:site:univ.edu 發現四個二級域名(a1~a4),Ping確認不同伺服器。
  2. 文件搜尋:site:univ.edu filetype:doc 獲取大量內部文檔。
  3. 後台定位:site:univ.edu inurl:login 找到兩個管理後台(ASP.NET + PHP)。
  4. 技術棧確認:site:a2.univ.edu filetype:asp 判斷為IIS+ASP整站+PHP論壇。
  5. 漏洞挖掘:發現/sys/uploadfile.asp上傳頁(無權限),SQL注入點多處(DBO權限)。
  6. 密碼爆破:收集域名、郵箱、電話構建字典,跑出管理員弱口令(域名+電話尾碼)。
  7. 後續提權:登入後台,結合上傳/提權鏈獲取系統權限(略)。

防禦與緩解

  1. robots.txt:規範爬蟲行為,但非強制,攻擊者可無視。
  2. Google移除工具:https://www.google.com/remove.html 提交刪除敏感快照。
  3. 欺騙爬蟲(慎用):識別User-Agent: Googlebot返回301導向或空頁,但可能被視為斗篷(Cloaking)違反搜尋引擎指南。
  4. 源頭治理(根本):
    • 敏感目錄/文件認證保護(Basic Auth / IP白名單)。
    • 禁止目錄瀏覽(Options -Indexes)。
    • 錯誤頁面不洩露路徑/版本/堆疊信息。
    • 定期site:domain自查,發現洩露即時清理並推送移除請求。

Google Hacking本質是公開情報收集(OSINT)的自動化。防禦核心不在於阻擋搜尋引擎,而在於不將敏感資產暴露在公開可索引空間。定期自查、最小權限、認證加密,才是治本之道。

copyright © 萬盛學電腦網 all rights reserved