Prerequisites
- Target system, dependencies and environment configured.
Usage
Purpose
Search engines index far more than an organisation intends — exposed config files, directory listings, login portals, documents with sensitive data, error pages that leak stack traces. Google dorking (search-operator queries) surfaces exactly those. It's pure passive recon: you're querying a search engine, not touching the target, which makes it safe and quiet. This skill covers the operators worth knowing and how to read what they turn up.
When to use it
Early external recon alongside subdomain enumeration, or as a self-audit ("what has Google indexed about us that shouldn't be public?"). It regularly surfaces the fastest wins — an exposed backup, an admin panel, a document with credentials.
Procedure
- Scope to the target with
site: so you only see the organisation's own footprint:site:example.com
site:example.com -www # subdomains other than www
- Hunt exposed file types — backups, configs, spreadsheets, PDFs that often carry sensitive data:
site:example.com filetype:sql OR filetype:env OR filetype:bak
site:example.com filetype:xlsx OR filetype:pdf confidential
- Find login and admin panels — entry points worth noting for later testing:
site:example.com inurl:admin OR inurl:login OR intitle:"dashboard"
- Find directory listings and exposed paths — open directories leak everything in them:
site:example.com intitle:"index of"
- Look for information disclosure — error pages, config, and keywords that suggest sensitive content:
site:example.com intext:"password" OR intext:"api_key"
site:example.com "sql syntax near" OR "stack trace"
- Broaden beyond the main domain where in scope — third-party sites (paste sites, code hosts, cloud storage) may index the org's data:
"example.com" site:pastebin.com
- Verify manually that a hit is real and sensitive before reporting — search caches go stale, and not every match matters.
Cheatsheet
core operators
site:example.com limit to the target's domain
filetype:pdf specific file types (sql, env, bak, xlsx, log, conf)
inurl:admin term in the URL (login, admin, api, backup)
intitle:"index of" directory listings
intext:"password" term in page body
cache: google's cached copy (see removed content)
-www exclude a subdomain
high-value dorks
site:target filetype:env | filetype:sql | filetype:bak -> configs/backups
site:target intitle:"index of" -> open directories
site:target inurl:admin | inurl:login -> panels
site:target intext:"api_key" | "BEGIN RSA PRIVATE KEY" -> secrets
"target.com" site:pastebin.com | site:github.com -> off-site leaks
reference: the Google Hacking Database (GHDB) at exploit-db.com/google-hacking-database
Reading the output
- An exposed config/backup file (
.env, .sql, .bak) = often a direct credential or data leak — high value, verify and report.
- A directory listing (
index of) = everything in that folder is browsable; check what it exposes.
- A login/admin panel = an entry point for later testing (default creds, auth weaknesses) — note it, don't attack from a dork.
- Error pages / stack traces indexed = information disclosure that aids other attacks (tech stack, paths, sometimes credentials).
- Off-site hits (paste sites, public repos) = leaked data outside the org's control — often the most sensitive finds, and a takedown candidate.
- Stale cache results = a hit may no longer be live; confirm before acting.
The fix (for your own exposed content)
- Remove sensitive files from public paths and rotate any leaked credentials immediately (a dorked secret is public).
- Use
robots.txt and noindex to keep genuinely non-public pages out of indexes — but understand these hide from search engines, not attackers, so don't rely on them for anything sensitive.
- Disable directory listing on web servers.
- Fix information disclosure — no stack traces or config in production responses (ties into the security-headers and error-handling skills).
- Request removal of already-indexed sensitive content via the search engine's removal tools, and address off-site leaks with takedowns.
- Self-dork regularly — run these queries against your own domain to catch exposure before someone else does.
Pitfalls
- Treating dorking as an attack. It's passive search — but acting on what you find (logging into a panel, downloading someone's data) crosses into unauthorised access. Recon only, unless it's your target and in scope.
- Trusting stale results. Caches lag; a hit may be gone or a false positive. Verify.
- Relying on robots.txt to protect data. It tells crawlers not to index — it does nothing to stop a human reading the file. Sensitive content must not be public at all.
- Stopping at the main domain. The worst leaks are often off-site (paste sites, public repos, cloud storage). Broaden the search where scope allows.
References
- Google Hacking Database (GHDB) — exploit-db.com/google-hacking-database
- OWASP WSTG-INFO-01 (Search Engine Discovery / Reconnaissance)
- Google Search operators reference
Inputs
- Relevant source code, logs, network traces, or system specifications.
Outputs
- Analysis findings, security audit report, or generated code artifacts.
1---2name: google-dorking3description: Use when searching for an organisation's exposed files, login panels, and sensitive pages using search-engine operators — passive recon that finds what shouldn't be indexed.4---5678## Prerequisites9- Target system, dependencies and environment configured.1011## Usage12### Purpose1314Search engines index far more than an organisation intends — exposed config files, directory listings, login portals, documents with sensitive data, error pages that leak stack traces. Google dorking (search-operator queries) surfaces exactly those. It's pure passive recon: you're querying a search engine, not touching the target, which makes it safe and quiet. This skill covers the operators worth knowing and how to read what they turn up.1516### When to use it1718Early external recon alongside subdomain enumeration, or as a self-audit ("what has Google indexed about us that shouldn't be public?"). It regularly surfaces the fastest wins — an exposed backup, an admin panel, a document with credentials.1920### Procedure21221. **Scope to the target with `site:`** so you only see the organisation's own footprint:23 ```24 site:example.com25 site:example.com -www # subdomains other than www26 ```272. **Hunt exposed file types** — backups, configs, spreadsheets, PDFs that often carry sensitive data:28 ```29 site:example.com filetype:sql OR filetype:env OR filetype:bak30 site:example.com filetype:xlsx OR filetype:pdf confidential31 ```323. **Find login and admin panels** — entry points worth noting for later testing:33 ```34 site:example.com inurl:admin OR inurl:login OR intitle:"dashboard"35 ```364. **Find directory listings and exposed paths** — open directories leak everything in them:37 ```38 site:example.com intitle:"index of"39 ```405. **Look for information disclosure** — error pages, config, and keywords that suggest sensitive content:41 ```42 site:example.com intext:"password" OR intext:"api_key"43 site:example.com "sql syntax near" OR "stack trace"44 ```456. **Broaden beyond the main domain** where in scope — third-party sites (paste sites, code hosts, cloud storage) may index the org's data:46 ```47 "example.com" site:pastebin.com48 ```497. Verify manually that a hit is real and sensitive before reporting — search caches go stale, and not every match matters.5051### Cheatsheet5253```54core operators55 site:example.com limit to the target's domain56 filetype:pdf specific file types (sql, env, bak, xlsx, log, conf)57 inurl:admin term in the URL (login, admin, api, backup)58 intitle:"index of" directory listings59 intext:"password" term in page body60 cache: google's cached copy (see removed content)61 -www exclude a subdomain6263high-value dorks64 site:target filetype:env | filetype:sql | filetype:bak -> configs/backups65 site:target intitle:"index of" -> open directories66 site:target inurl:admin | inurl:login -> panels67 site:target intext:"api_key" | "BEGIN RSA PRIVATE KEY" -> secrets68 "target.com" site:pastebin.com | site:github.com -> off-site leaks6970reference: the Google Hacking Database (GHDB) at exploit-db.com/google-hacking-database71```7273### Reading the output7475- **An exposed config/backup file** (`.env`, `.sql`, `.bak`) = often a direct credential or data leak — high value, verify and report.76- **A directory listing (`index of`)** = everything in that folder is browsable; check what it exposes.77- **A login/admin panel** = an entry point for later testing (default creds, auth weaknesses) — note it, don't attack from a dork.78- **Error pages / stack traces indexed** = information disclosure that aids other attacks (tech stack, paths, sometimes credentials).79- **Off-site hits** (paste sites, public repos) = leaked data outside the org's control — often the most sensitive finds, and a takedown candidate.80- **Stale cache results** = a hit may no longer be live; confirm before acting.8182### The fix (for your own exposed content)8384- **Remove sensitive files from public paths** and rotate any leaked credentials immediately (a dorked secret is public).85- **Use `robots.txt` and `noindex`** to keep genuinely non-public pages out of indexes — but understand these hide from search engines, not attackers, so don't rely on them for anything sensitive.86- **Disable directory listing** on web servers.87- **Fix information disclosure** — no stack traces or config in production responses (ties into the security-headers and error-handling skills).88- **Request removal** of already-indexed sensitive content via the search engine's removal tools, and address off-site leaks with takedowns.89- **Self-dork regularly** — run these queries against your own domain to catch exposure before someone else does.9091### Pitfalls9293- **Treating dorking as an attack.** It's passive search — but *acting* on what you find (logging into a panel, downloading someone's data) crosses into unauthorised access. Recon only, unless it's your target and in scope.94- **Trusting stale results.** Caches lag; a hit may be gone or a false positive. Verify.95- **Relying on robots.txt to protect data.** It tells crawlers not to index — it does nothing to stop a human reading the file. Sensitive content must not be public at all.96- **Stopping at the main domain.** The worst leaks are often off-site (paste sites, public repos, cloud storage). Broaden the search where scope allows.9798### References99100- Google Hacking Database (GHDB) — exploit-db.com/google-hacking-database101- OWASP WSTG-INFO-01 (Search Engine Discovery / Reconnaissance)102- Google Search operators reference103104## Inputs105- Relevant source code, logs, network traces, or system specifications.106107## Outputs108- Analysis findings, security audit report, or generated code artifacts.