Google Hacking

Google 駭客技術是指利用 Google 搜尋引擎的高級搜尋功能和特殊語法來尋找網路上敏感資訊或安全漏洞的技術。這個概念最初由安全研究員 Johnny Long 提出。Google Hacking 利用搜尋引擎已經索引的內容可以發現以下:

  • 配置錯誤的網站
  • 意外暴露的敏感檔案
  • 預設密碼的系統
  • 資料庫錯誤訊息
  • 私人資訊洩露

基本語法

邏輯運算

  • AND (預設) ex: apple banana 同時包含 applebanana
  • OR or | ex: apple OR banana 包含 applebanana
  • - (排除) ex: apple -bananaapple 但沒有 banana

限定搜尋範圍

  • site ex: site:example.com login 只在 example.com 搜尋login相關內容
  • intitle ex: intitle:"login page" 頁面標題含「login page」
  • inurl ex: inurl:admin URL 中包含「admin」
  • filetype ex: ext: filetype:pdf 或 ext:sql → 搜尋特定檔案類型
  • intext ex: intext:"confidential" 內文包含「confidential」
  • cache 查看網頁的快取版本

比對技巧

  • " "(精確比對) , ex: "admin login" 精準比對admin login完整的字串
  • * (萬用字元) , ex:"password * gmail" password 後任意字
  • .. (範圍) , ex: site:example.com 2020..2023 搜尋數字區間

ex:
尋找某個域名的所有可能輸入點
用google搜尋login site:vulnweb.com

ex:
尋找demo.testfire.net的輸入點
用google搜尋site:demo.testfire.net inurl:login


尋找攻擊目標

登入

keyword:login, signin, pass, password, user, admin, member, manager, auth

Google Dork:inurl:login | intitle:login | intext:login site: example.com

註冊帳號

keyword:register, signup, join, create-account, new-account, "sign up", "create account"

Google Dork:inurl:register | intitle:register | intext:register site: example.com

上傳頁

keyword: upload, choose file

Google Dork:inurl:upload | intitle:upload | intext:upload site: example.com

Google Dork:"choose file" site:example.com


在URL尋找可能弱點

尋找SQL Injection可能注入點

Google Dork:inurl:id= | inurl:pid= | inurl:category= | inurl:cat= | inurl:action= | inurl:sid= | inurl:dir= inurl:& site:example.com

尋找LFI可能注入點

Google Dork:inurl:include | inurl:dir | inurl:detail= | inurl:file= | inurl:folder= | inurl:inc= | inurl:locate= | inurl:doc= | inurl:conf= inurl:& site:example.com

尋找RCE可能注入點

Google Dork:inurl:cmd | inurl:exec= | inurl:query= | inurl:code= | inurl:do= | inurl:run= | inurl:read= | inurl:ping= inurl:& site:example.com


自動化工具

Dork Scanner

給一組 Dork,會自動查詢 Google 並存結果。

Options

  • -h, --help : show this help message and exit
  • -q QUERY, --query QUERY: Specify the Search Query within ”
  • -e ENGINE, --engine ENGINE: Specify the Search Engine (Google/Bing)
  • -p PAGES, --pages PAGES:Specify the Number of Pages (Default: 1)
  • -P PROCESSES, --processes PROCESSES :Specify the Number of Processes (Default: 2)

Single Dork search

python3 dorkScanner.py --query inurl:wp-content/plugins/wp-jobsearch --engine google --page 3 --process 3

https://github.com/madhavmehndiratta/dorkScanner

https://www.geeksforgeeks.org/linux-unix/dork-scanner-vulnerable-urls-finder-tool-in-linux

DorkEye

Is an automated dorking tool that uses DuckDuckGo to find web resources exposed via OSINT techniques.

Options

  • -d , --dork: Single dork or .txt file with dork
  • -o , --output: Output file name
  • -c , --count: Number of results per dork

Single Dork search

python3 dorkeye.py -d "inurl:admin login" -o admin_panels -c 100

https://github.com/xPloits3c/DorkEye


 Google 對自動化連續查詢非常敏感,常會有以下阻擋

  1. CAPTCHA 驗證(“I’m not a robot” reCAPTCHA) → 如果短時間內送出太多相似查詢,就會跳出驗證。
  2. HTTP 429 Too Many Requests → 直接拒絕連線。
  3. IP 封鎖 / 暫停 → 攻擊者的 IP 在幾小時內完全不能查詢。

常見繞過手法

  • 代理池 (proxy pool):透過大量代理伺服器換 IP。
  • TOR / VPN:切換出口 IP,降低單一 IP 封鎖風險。
  • 延遲 (throttling):查詢之間加隨機 sleep,模仿人類行為。
  • Google Custom Search API (CSE API):用官方 API,但每天有免費額度限制(100 查詢左右)。
  • 改用其他搜尋引擎:Bing、Yandex、DuckDuckGo 容忍度更高,常被當作替代來源。