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
noindexwon’t show.robots.txtDisallowis not access control, and a crawl-blocked page whosenoindexthe crawler never saw can still be indexed by URL (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 (Cibergy).
- Syntax drifts: Google officially retired
related:andcache:, andintitle:/inurl:aren’t in Google’s current user docs, so behavior is less predictable. Test an operator before trusting a negative result (Cibergy, 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: Sundowndev cheatsheet, OSINT from Scratch pt.1, Hacking With Google.
Bug bounty dorks (TakSec set)
From 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 (Sundowndev cheatsheet). The Exploit-DB GHDB is the reference library of pre-built dorks, grouped by sensitive files, login pages, vulnerable apps and devices (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 (Cibergy). A real-world instance is dorking indexed university directory listings (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/ (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 (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
(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 (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.
From result to finding (scope-safe workflow)
z7-codes’ advanced-google-dorks library is organised around triage, not payloads. A hit can be a public sample, a patched endpoint still in the index, a blog post, a known issue or a real lead; treat it as a question. Each lead is reduced to four parts: trust boundary (where untrusted input enters), wrong assumption, powerful sink, missing control. Pipeline: scope → dork (keep the query with the lead) → surface (endpoint and parameter family, no sensitive content stored) → context (HTML, attribute, URL, JSON, DB error) → one benign marker → dedupe against Known Issues and public writeups → one-sentence impact → report. SQLi discovery is grouped by parameter family and error family (an error reveals a parser boundary, not a bug). Exposure dorks (site:TARGET filetype:log, site:TARGET intitle:"index of") often outweigh speculative parameters; if a result holds credentials or PII, stop opening results, record only a redacted description and report. The repo deliberately excludes WAF-bypass strings, exploit chains and leaked material, and ships trackers, report templates and a local query generator (z7-codes). Other dork collections: Dorking Toolkit (dorking.app) (osintteam). Address-plus-figure document dorks ("<street>" "<number>" ("80 000" OR "80000") (filetype:pdf OR filetype:xlsx)) find public financial records in OSINT work (Bellingcat #116).
Defenses
- Treat anything indexed as public. Use auth, not
robots.txt, for private content, and servenoindexon pages crawlers can fetch (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
- I Built a Scope-Safe Google Dork Library · original
- OSINT-Related Articles, 20261123 · original
- Bellingcat Challenge #116 Rendered Rendering writeup · original
- Google dork cheatsheet (Sundowndev) · original
- google-dorks-bug-bounty (TakSec) · original
- GitHub dorking for beginners (Intigriti) · original
- How I Found Sensitive Information using GitHub Dorks (Part 3) · original
- Hacking With Google · original
- Google Dorking in Action: Publicly Indexed University Directories · original
- How OSINT investigators search: engines and dorks · original
- OSINT from Scratch Part 1: Search Intelligence, Indexing & Google Dorking · original
- BishopFox/GitGot · original
- Shodan and Censys for beginners (Intigriti) · original