# Google Dorking
> Passive recon by chaining search-engine operators (Google, GitHub code search, Shodan/Censys) into precise queries that surface indexed subdomains, files, endpoints, secrets and exposed hosts belonging to a target, without sending a packet to it.
## How it works
- A search engine only returns what its crawler fetched, rendered and indexed. A page that exists is not the same as a page in the index: content behind login, behind JS/API calls the crawler can't reach, or under `noindex` won't show. `robots.txt` `Disallow` is not access control, and a crawl-blocked page whose `noindex` the crawler never saw can still be indexed by URL ([[raw/medium.com/osint-from-scratch-part-1-search-intelligence-indexing-google-dorking-14798|OSINT from Scratch pt.1]]).
- Engines don't share an index. Bing surfaces pages Google drops; Yandex and Baidu cover RU/CN content. Re-run a dork on 3–4 engines ([[raw/cibergy.com/how-osint-investigators-search-engines-and-dorks-14062|Cibergy]]).
- Syntax drifts: Google officially retired `related:` and `cache:`, and `intitle:`/`inurl:` aren't in Google's current user docs, so behavior is less predictable. Test an operator before trusting a negative result ([[raw/cibergy.com/how-osint-investigators-search-engines-and-dorks-14062|Cibergy]], [[raw/medium.com/osint-from-scratch-part-1-search-intelligence-indexing-google-dorking-14798|OSINT from Scratch pt.1]]).
## Techniques / payloads
### Operator reference (Google)
| Operator | Use |
|---|---|
| `site:` | domain, wildcard host or URL prefix (`site:*.example.com`) |
| `inurl:` / `allinurl:` | string(s) in URL |
| `intitle:` / `allintitle:` | string(s) in title |
| `intext:` / `allintext:` | string(s) in body |
| `filetype:` / `ext:` | extension |
| `-term`, `-site:` | exclude |
| `\|` / `OR`, `&`, `( )` | boolean grouping |
| `*`, `~` | wildcard, synonyms |
| `before:` / `after:` | date window: `"x" after:2025-01-01 before:2026-01-01` |
| `numrange:` / `..` | numeric ranges |
Sources: [[raw/gist.github.com/google-dork-cheatsheet-5182|Sundowndev cheatsheet]], [[raw/medium.com/osint-from-scratch-part-1-search-intelligence-indexing-google-dorking-14798|OSINT from Scratch pt.1]], [[raw/infosecwriteups.com/hacking-with-google-9997|Hacking With Google]].
### Bug bounty dorks (TakSec set)
From [[raw/github.com/google-dorks-bug-bounty-taksec-github-4451|TakSec google-dorks-bug-bounty]]:
```
# Subdomains: iteratively subtract what you already have
site:example.com -www -shop -share -ir -mfa
site:*.example.com -www -careers
# Exposed files / config / backups
site:example.com ext:log | ext:txt | ext:conf | ext:cnf | ext:ini | ext:env | ext:sh | ext:bak | ext:backup | ext:swp | ext:old | ext:~ | ext:git | ext:svn | ext:htpasswd | ext:htaccess | ext:json
# Error / stack-trace leakage
inurl:"error" | intitle:"exception" | "database error" | "SQL syntax" | "undefined index" | "unhandled exception" | "stack trace" site:example.com
# Parameter mining by bug class
inurl:url= | inurl:return= | inurl:next= | inurl:redirect= | inurl:redir= | inurl:ret= | inurl:r2= | inurl:page= inurl:& inurl:http site:example.com # open redirect / SSRF
inurl:include | inurl:file= | inurl:folder= | inurl:inc= | inurl:locate= | inurl:doc= | inurl:conf= inurl:& site:example.com # LFI
inurl:cmd | inurl:exec= | inurl:query= | inurl:code= | inurl:do= | inurl:run= | inurl:read= | inurl:ping= inurl:& site:example.com # RCE
inurl:id= | inurl:pid= | inurl:category= | inurl:cat= | inurl:action= | inurl:sid= | inurl:dir= inurl:& site:example.com # SQLi/IDOR
# API docs, uploads, non-prod
inurl:apidocs | inurl:api-docs | inurl:swagger | inurl:api-explorer | inurl:redoc | inurl:openapi | intitle:"Swagger UI" site:example.com
site:example.com intext:"choose file" | intext:"select file" | intext:"upload PDF"
inurl:test | inurl:env | inurl:dev | inurl:staging | inurl:sandbox | inurl:debug | inurl:internal | inurl:demo site:example.com
# AEM fingerprint paths
inurl:/content/dam | inurl:/jcr:content | inurl:/libs/granite | inurl:/etc/clientlibs | inurl:/bin/wcm | inurl:/crx/de site:example.com
# Third-party leakage of the target's name
site:pastebin.com | site:jsfiddle.net | site:codepen.io | site:codebeautify.org | site:groups.google.com "example.com"
site:s3.amazonaws.com | site:blob.core.windows.net | site:googleapis.com | site:digitaloceanspaces.com | site:firebaseio.com | site:jfrog.io "example.com"
site:docs.google.com inurl:"/d/" | site:drive.google.com | site:sharepoint.com | site:onedrive.live.com | site:dev.azure.com "example.com"
site:openbugbounty.org inurl:reports intext:"example.com"
# Program discovery
site:*/security.txt "bounty"
"submit vulnerability report" | "powered by bugcrowd" | "powered by hackerone"
```
Also: `intext:"index of /"` / `intitle:"index.of" "parent directory"` for open directory listings, and `filetype:config inurl:web.config` ([[raw/gist.github.com/google-dork-cheatsheet-5182|Sundowndev cheatsheet]]). The Exploit-DB **GHDB** is the reference library of pre-built dorks, grouped by sensitive files, login pages, vulnerable apps and devices ([[raw/infosecwriteups.com/hacking-with-google-9997|Hacking With Google]]). Version strings from an Nmap or httpx banner (`vsftpd 2.3.4 exploit`) go straight back into search to find CVEs, Metasploit modules and NSE scripts (same source).
Document hunting: `filetype:` across xls/xlsx/ods (staff lists), ppt/pptx (internal decks), kml/kmz, then pull metadata (author, software version, creation date) from what you download ([[raw/cibergy.com/how-osint-investigators-search-engines-and-dorks-14062|Cibergy]]). A real-world instance is dorking indexed university directory listings ([[raw/medium.com/google-dorking-in-action-discovering-publicly-indexed-university-direc-13221|Google Dorking in Action]], excerpt only).
### GitHub code-search dorks
Operators: `org:`, `user:`, `filename:`, `extension:`, `language:`, `path:`, `pushed:`/`created:`, `archived:`, `AND`/`OR`/`NOT`, and `/regex/` ([[raw/intigriti.com/github-dorking-for-beginners-find-more-vulnerabilities-intigriti-4450|Intigriti GitHub dorking]]).
```
org:"example" (AWS_ACCESS_KEY_ID OR AWS_ACCESS_SECRET_KEY)
org:"example" ("sk_live_" OR "pk_live_") # Stripe
org:"example" /"sk-[a-zA-Z0-9]{20,50}"/ # OpenAI
org:"example" (ANTHROPIC_API_KEY OR SENDGRID_API_KEY OR SLACK_BOT_TOKEN OR GITHUB_TOKEN OR CF_API_TOKEN OR AZURE_CLIENT_SECRET)
org:"example" ("mongodb://" OR "mongodb+srv://" OR "mysql://")
org:"example" ("jwt_secret" OR "JWT_SECRET" OR "jwtSecret")
org:"example" (extension:pem OR extension:key OR extension:p12 OR extension:pfx)
org:"example" (filename:.env OR filename:.env.local OR filename:travis.yml OR filename:Dockerfile OR filename:docker-compose.yaml OR filename:web.config OR filename:settings.py)
org:"example" /http(s)?:\/\// # hard-coded URLs -> new hosts/params
org:"example" /\/\/(.*\.)?(amazonaws|firebaseio)\.com/
org:"example" extension:json NOT "dev.example.com"
"example.com" user:<employee> auth_token | api_key | password
extension:sql mysql dump
```
Employee accounts (`user:`) leak as often as the org itself ([[raw/mukibas37.medium.com/how-i-found-sensitive-information-using-github-dorks-part-3-4452|mukibas37 GitHub dorks pt.3]]).
**GitGot** (Bishop Fox) puts a human in the loop on top of the GitHub search API: you triage each hit and blacklist by repo, user, filename or ssdeep fuzzy hash of the content, and saved `.state` blacklists carry over to related queries. It needs a no-scope token.
```
./gitgot.py -q '"example.com"' # exact string (default tokenizes: also hits com.example)
./gitgot.py --gist -q CompanyName
./gitgot.py -q example.com -u https://git.example.com # self-hosted GHE
./gitgot.py -q "Example Org" -r example.com.state # reuse blacklists
```
([[raw/github.com/bishopfox-gitgot-semi-automated-feedback-driven-tool-to-rapidly-search-1091|GitGot]]). For verifying and triaging hits at scale see [[Secret Scanning]] and [[Secrets in Git History]].
### Shodan / Censys dorks
Same idea over indexed services, not web pages ([[raw/intigriti.com/shodan-and-censys-for-beginners-how-to-find-more-vulnerabilities-4869|Intigriti Shodan & Censys]]):
| Goal | Shodan | Censys |
|---|---|---|
| Org / ASN | `org:"X"` · `asn:AS1234` | `autonomous_system.organization:"X"` · `autonomous_system.asn:AS1234` |
| Subdomains via certs | `ssl.cert.subject.CN:"example.com"` | `services.tls.certificate.names:"example.com"` |
| Related assets by favicon | `http.favicon.hash:<mmh3>` | `services.http.response.favicons.hashes:<hash>` |
| Unique body string (GTM ID, copyright) | `http.html:"© copyright X"` | `services.http.response.body:"..."` |
| Forgotten hosts | `org:X ssl.cert.expired:true` | `...validity_period.not_after:<date>` |
| Login panels | `org:X http.title:Login,Sign in,Register` | `services.http.response.html_title:{...}` |
| Dir listing | `org:X http.title:"Index of"` | `html_title:"Index of *"` |
| Non-standard HTTP | `org:X http.status:200,404 -port:80 -port:443 -port:8080 -port:8443` | `services:(service_name:HTTP and not port:{80,443,8080,8443})` |
| Product | `org:X product:jenkins` (or header `X-Jenkins`) | `services.software.vendor:jenkins` |
Org/ASN attribution in these engines is often wrong, so confirm ownership and scope before testing. Favicon and CT pivots are covered in [[Asset Discovery]].
## Defenses
- Treat anything indexed as public. Use auth, not `robots.txt`, for private content, and serve `noindex` on pages crawlers *can* fetch ([[raw/medium.com/osint-from-scratch-part-1-search-intelligence-indexing-google-dorking-14798|OSINT from Scratch pt.1]]).
- Run the TakSec and GitHub dork sets against your own org on a schedule. Rotate, don't just delete, any key found in public code ([[Secret Scanning]]).
## Related
- [[Reconnaissance]] (hub)
- [[Subdomain Enumeration]] · [[Asset Discovery]] · [[Content Discovery]] · [[JavaScript Analysis]] · [[API Discovery]]
- [[Secret Scanning]] · [[Secrets in Git History]] · [[Hardcoded Secrets]] · [[Leaked Cloud Credentials]]
- [[OSINT]] · [[OSINT Tools]] · [[Domain and Infrastructure OSINT]]
- [[Bug Bounty Methodology]]
## Sources
- [[raw/gist.github.com/google-dork-cheatsheet-5182|Google dork cheatsheet (Sundowndev)]]
- [[raw/github.com/google-dorks-bug-bounty-taksec-github-4451|google-dorks-bug-bounty (TakSec)]]
- [[raw/intigriti.com/github-dorking-for-beginners-find-more-vulnerabilities-intigriti-4450|GitHub dorking for beginners (Intigriti)]]
- [[raw/mukibas37.medium.com/how-i-found-sensitive-information-using-github-dorks-part-3-4452|How I Found Sensitive Information using GitHub Dorks (Part 3)]]
- [[raw/infosecwriteups.com/hacking-with-google-9997|Hacking With Google]]
- [[raw/medium.com/google-dorking-in-action-discovering-publicly-indexed-university-direc-13221|Google Dorking in Action: Publicly Indexed University Directories]]
- [[raw/cibergy.com/how-osint-investigators-search-engines-and-dorks-14062|How OSINT investigators search: engines and dorks]]
- [[raw/medium.com/osint-from-scratch-part-1-search-intelligence-indexing-google-dorking-14798|OSINT from Scratch Part 1: Search Intelligence, Indexing & Google Dorking]]
- [[raw/github.com/bishopfox-gitgot-semi-automated-feedback-driven-tool-to-rapidly-search-1091|BishopFox/GitGot]]
- [[raw/intigriti.com/shodan-and-censys-for-beginners-how-to-find-more-vulnerabilities-4869|Shodan and Censys for beginners (Intigriti)]]