What Is Google Dorking?
Google Dorking (also called Google Hacking) is the practice of using Google's advanced search operators to find information that isn't meant to be public. Attackers use these techniques during the reconnaissance phase to map a target's infrastructure, find exposed files, and gather intelligence before launching an attack.
Google indexes virtually everything it can reach on the public internet. With the right operators, you can filter that massive index down to precisely the data you're looking for — exposed databases, configuration files, login panels, or internal documents that administrators mistakenly left accessible.
This guide teaches you how to think like an attacker so you can defend like one. Every technique here is a real-world tool used by penetration testers and red teams.
Basic Search Operators
Google's search operators are special keywords that refine your search. Here are the core ones every security practitioner must know:
| Operator | Description | Example |
|---|---|---|
| site: | Limit results to a specific domain or subdomain | site:example.com "password" |
| filetype: | Search for specific file extensions | filetype:pdf site:example.com |
| intitle: | Pages with a specific word in the title | intitle:"index of" "config" |
| inurl: | Pages with a specific word in the URL | inurl:admin.php |
| intext: | Pages containing specific text in the body | intext:"sql syntax near" |
| " " | Exact phrase match | "MySQL root password" |
| - | Exclude a term from results | site:example.com -site:blog.example.com |
| + | Force inclusion of a common word | +config +password |
| cache: | View Google's cached version of a page | cache:example.com/admin |
You can chain operators together. The more specific your query, the more targeted your reconnaissance. For example, site:github.com filetype:env "DB_PASSWORD" searches GitHub for .env files containing database passwords.
Reconnaissance Dorks
Reconnaissance is about mapping the target's attack surface. These dorks help you discover subdomains, technologies, and exposed endpoints.
Subdomain Enumeration
site:*.example.com -www.example.comsite:example.com inurl:devsite:example.com inurl:stagingsite:example.com inurl:testTechnology Fingerprinting
site:example.com intitle:"Apache" "server at"site:example.com "powered by WordPress"site:example.com inurl:wp-adminsite:example.com "X-Generator: Drupal"Exposed Admin Panels
site:example.com inurl:adminsite:example.com inurl:loginsite:example.com intitle:"phpMyAdmin"site:example.com inurl:8080Directory Listings
site:example.com intitle:"index of"site:example.com "index of" "parent directory"site:example.com intitle:"index of" "backup"Finding Sensitive Files
Misconfigured servers and careless uploads often leave sensitive files exposed on the public web. These dorks find the gold.
Configuration & Credentials
site:example.com filetype:envsite:example.com filetype:yaml "password"site:example.com "config.json" "password"site:example.com filetype:xml "password"site:example.com filetype:sql "dump"Backup Files
site:example.com filetype:baksite:example.com filetype:oldsite:example.com filetype:zip "backup"site:example.com inurl:backupsite:example.com "backup.sql"Documents with Sensitive Data
site:example.com filetype:pdf "confidential"site:example.com filetype:docx "password"site:example.com filetype:xlsx "email" "password"Log Files
site:example.com filetype:logsite:example.com "error_log"site:example.com "access.log"site:example.com intext:"password" filetype:logInfrastructure Discovery
Understanding a target's infrastructure — IP ranges, cloud providers, and network topology — is critical for planning an engagement.
IP & Network Recon
site:shodan.io "example.com"site:censys.io "example.com"site:github.com "example.com" "docker-compose"site:github.com "example.com" "terraform"Cloud Storage Misconfigurations
site:s3.amazonaws.com "example"site:blob.core.windows.net "example"site:storage.googleapis.com "example"API & Endpoint Discovery
site:example.com inurl:apisite:example.com inurl:swaggersite:example.com inurl:graphqlsite:example.com "api/v1"Defensive Measures
If attackers can use Google Dorking against you, so can you. Here's how to harden your infrastructure against search-based reconnaissance.
1. robots.txt & Meta Tags
Use robots.txt to tell crawlers not to index sensitive paths. Use noindex meta tags on pages that shouldn't appear in search results.
User-agent: *
Disallow: /admin/
Disallow: /api/
Disallow: /backup/⚠️ robots.txt is a suggestion, not a barrier. Malicious crawlers ignore it. Never rely on it for security.
2. Authentication on Everything
Every admin panel, API endpoint, and internal tool should require authentication. No exceptions. Exposed resources without auth are trivial to find with dorks.
3. File Upload Restrictions
Restrict file uploads by type, size, and location. Never allow executable files. Store uploads outside the web root when possible. Scan all uploads for malware.
4. Regular Google Dorking Self-Audits
Run the dorks in this guide against your own domain monthly. If you find exposed files, fix them immediately. Treat every exposed config file as a potential breach.
5. Monitor for Leaks
Set up Google Alerts for your domain combined with sensitive keywords like "password", "secret", "API key", and "config". This catches leaks quickly, sometimes before an attacker finds them.
Legal & Ethical Considerations
Google Dorking is a reconnaissance technique, not an attack. However, how you use the information you find matters legally and ethically.
The Rule
Only use these techniques on systems you own or have explicit written authorization to test. Unauthorized access to computer systems is illegal under laws like the Computer Fraud and Abuse Act (CFAA) in the US and similar legislation worldwide.
When conducting authorized penetration tests or bug bounty programs, document every step. If you find a vulnerability, report it through the proper channel. Never exploit a flaw without permission.
Google Dorking itself is not illegal — Google is a public search engine, and these operators are public features. The line is crossed when you use discovered information to access systems without authorization.
Ready for hands-on training?
Hackshire launches December 2026 with CTF-based labs that teach offensive security through real-world challenges — including live reconnaissance scenarios.
Join the waitlist →