萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 電腦基礎知識 >  >> 健康知識

Google Hacking 實戰:駭客如何利用搜尋引擎挖掘企業敏感資料與防禦對策

Google Hacking (Google Dorks) 概述

駭客善用 Google 進階搜尋語法 (Operators),精準定位企業公開暴露的敏感資訊:帳號密碼、金鑰、憑證、內部文件、資料庫備份、伺服器配置、攝影機畫面、印表機管理介面、版控倉庫洩露等。這被稱為「被動資訊蒐集」或「開放源情報 (OSINT)」關鍵手法。

核心搜尋運算子速查表

運算子功能範例
site:限定網域/子網域site:example.com
filetype: / ext:限定檔案類型filetype:pdf ext:sql
inurl:URL 包含關鍵字inurl:admin inurl:login
intitle:標題包含關鍵字intitle:"index of" "parent directory"
intext: / allintext:頁面內文包含關鍵字intext:"confidential" "salary"
cache:檢視 Google 快取頁面cache:example.com
link:反向連結 (已棄用/限制)-
related:相關網站related:competitor.com
| (OR)邏輯或filetype:xls | filetype:csv
- (NOT)排除site:example.com -site:www.example.com (找子網域)
" "精確詞組"internal use only"
*萬用字元 (單詞級)admin * panel

經典 Google Dorks 分類與實戰範例

1. 敏感檔案洩露

# 資料庫備份/匯出
site:target.com filetype:sql | filetype:dump | filetype:bak | filetype:dmp

# 設定檔/憑證/金鑰
site:target.com ext:xml | ext:conf | ext:config | ext:ini | ext:env | ext:yaml | ext:yml intext:password | intext:secret | intext:api_key | intext:private_key

# 文件/試算表含敏感資料
site:target.com filetype:xls | filetype:xlsx | filetype:csv intext:"password" | intext:"ssn" | intext:"credit card"

# 版控/建構產物洩露
site:target.com inurl:".git" | inurl:".svn" | inurl:".hg" | inurl:".bzr"
intitle:"index of" ".git" | ".svn" | "WEB-INF" | "backup"

2. 登入入口與管理介面發現


site:target.com inurl:login | inurl:admin | inurl:wp-admin | inurl:phpmyadmin | inurl:cpanel | inurl:webmail | inurl:owa | inurl:rdweb
intitle:"login" "admin" | "administrator" | "dashboard" | "control panel"

3. 錯誤訊息與除錯資訊洩露


site:target.com intext:"sql syntax" | "mysql_fetch" | "ORA-" | "Microsoft OLE DB" | "ODBC Driver" | "stack trace" | "exception" | "debug" | "traceback"

4. 網路設備與 IoT 設備暴露


# 攝影機/印表機/NAS/路由器管理介面
inurl:"viewerframe?mode=motion" | inurl:"webcam" | inurl:"camera" | inurl:"nvr"
intitle:"webcam" | "IP Camera" | "Network Camera" | "Printer" | "NAS" | "Router" "login"
# Shodan/Censys/ZoomEye 更適合此類資產發現

5. 競爭情報與商業機密


# 專利/財報/策略文件
site:competitor.com filetype:pdf "confidential" | "internal" | "strategic" | "roadmap" | "budget"
# 專利搜尋
site:patents.google.com "competitor name" "keyword"
# 部落格/社群洩露
site:linkedin.com "competitor" "project" | "launch" | "hiring"
site:github.com "competitor" "api_key" | "secret" | "password"

專用 Google 服務的情報價值

服務情報用途風險範例
Google Earth / Maps衛星影像/街景檢視競爭對手工廠佈局、載貨碼頭、數據中心外觀、實體安全設施推斷產能、供應鏈、實體滲透路徑
Google Patent Search檢視競爭對手專利全文,了解技術佈局、研發方向、關鍵參數專利申請過度揭露商業秘密 (製程參數、配方、演算法細節)
Google Blog Search / Blogspot員工部落格可能洩露專案代號、技術棧、內部術語、甚至程式碼片段社交工程素材、技術偵察
Google Alerts設定關鍵字 (公司名、產品代號、高管名字、專利號) 每日郵件推送,即時掌握公開曝光資訊自動化 OSINT 監控、早期洩露發現
Google Drive / Docs / Sheets (公開分享)搜尋 `site:docs.google.com "company name" "confidential"` 發現誤設為公開的雲端文件內部會議紀要、薪資表、客戶名單外洩

企業防禦與應對策略

  1. 定期自查 (Red Teaming/OSINT 審計): 每季執行標準化 Google Dorks 掃描清單,記錄發現、分級風險、追蹤修復。
  2. 移除/限制存取:
    • 敏感檔案:移除公開存取、設定存取控制 (ACL)、移至內部系統。
    • 目錄列舉:Web 伺服器關閉 `Indexes` (Apache: `Options -Indexes`; Nginx: `autoindex off;`; IIS: 目錄瀏覽 = False)。
    • 錯誤頁面:自定義錯誤頁面,隱藏堆疊追蹤、資料庫錯誤、版本資訊。
  3. Robots.txt 與 noindex: 雖不具強制性,但可指引善意爬蟲避開敏感路徑 (`Disallow: /admin/ /backup/ /config/ /*.sql /*.bak`),並加上 ``。
  4. Google 移除工具: Search Console → 移除舊版工具 → 「暫時隱藏網址」或「清除快取」,針對已洩露頁面申請移除搜尋結果 (約 24-48 小時生效)。
  5. 資料分級與外洩防護 (DLP): 郵件/雲端/端點 DLP 規則偵測敏感資料 (信用卡、身分證、專利關鍵字) 外傳,封鎖或加密。
  6. 員工教育: 禁止在公開部落格/社群/代碼倉庫發布內部資訊、專案代號、架構圖、憑證。程式碼提交前掃描 Secrets (GitGuardian, TruffleHog, Gitleaks)。
  7. 監控品牌/關鍵字: 訂閱 Google Alerts、Talkwalker Alerts、Mention、Brand24,即時掌握品牌提及、洩露、負面輿情。

法律與道德邊界

  • Google Hacking 本身屬合法 OSINT 活動,但利用搜尋到的洩露憑證/漏洞進行未授權存取、竊取資料、破壞系統屬違法 (電腦犯罪、資安法、CFAA 等)。
  • 安全研究者應遵循 CVD 流程:發現 → 私下通報廠商/網站管理員 → 給予合理修補時間 → 協調公開。
  • 企業不應起訴善意通報者,應建立漏洞獎勵計畫 (Bug Bounty) 或專責安全信箱 (security@domain.com)。

結語

Google 是駭客最強大的「被動掃描器」,無需發送任何封包即可繪製攻擊面。企業必須建立「持續 OSINT 監控 → 快速修復洩露 → 根因改善 (SDLC/配置管理/權限最小化) → 員工意識提升」的閉環機制,將攻擊面壓縮至最小。記住:被 Google 索引到的資訊,即等於公開資訊。

copyright © 萬盛學電腦網 all rights reserved