Search Engine Dorking (Google Hacking)
Attack Chain Position
graph LR
A[Reconnaissance] --> B[Search Engine Dorking]
B --> C[Identify Attack Surface]
C --> D[Port Scanning]
D --> E[Service Enumeration]
B --> F[Find Exposed Resources]
F --> G[Direct Exploitation]
G --> H[Initial Access]
Search Engine Dorking sits at the very beginning of the attack chain, during the passive reconnaissance phase. It allows you to discover information about a target without directly interacting with the target’s systems, making it stealthy and often overlooked by defenders.
Table of Contents
- What is Google Dorking
- Google Dork Operators
- Critical Dorks for OSCP
- Google Hacking Database (GHDB)
- Bing and DuckDuckGo Dorking
- Advanced Dork Combinations
- Rate Limiting and Anti-Detection
- Building Custom Dork Lists
- Dork-Driven Exploitation Workflow
- OSCP Exam Tips
What is Google Dorking
Definition
Google Dorking (also known as Google Hacking) is the practice of using advanced search operators and specialized search queries to find information that is publicly indexed by search engines but not easily discoverable through normal browsing. It leverages the power of search engine indexing to uncover:
- Exposed administrative interfaces
- Sensitive files and documents
- Configuration files with credentials
- Backup files left on web servers
- Error messages revealing system information
- Directory listings
- Vulnerable applications and services
History
- 2000: The Google Hacking Database (GHDB) was created by David Litchfield, a security researcher at nCircle
- 2003: GHDB was acquired by OffSec (creators of OSCP) and integrated into their training materials
- 2004: Google Hacking became widely recognized as a legitimate reconnaissance technique
- Present: Google Dorking remains a critical skill for penetration testers, security researchers, and bug bounty hunters
Why It Matters for OSCP
In the OSCP exam, targets may have publicly indexed resources that provide:
- Direct paths to exploitation (exposed admin panels, config files)
- Username enumeration (author names in documents, error messages)
- Technology fingerprinting (server headers, application versions)
- Subdomain discovery (indexed pages on subdomains)
- Default credentials (documentation, tutorials referencing the target)
Key Insight: Google Dorking is passive reconnaissance — you are querying Google, not the target directly. This means it won’t trigger IDS/IPS alerts on the target’s network.
Google Dork Operators
Complete Reference Table
| Operator | Syntax | Description | Example |
|---|---|---|---|
site: |
site:domain.com |
Restrict results to a specific domain or subdomain | site:target.com |
inurl: |
inurl:keyword |
Search for keyword in the URL | inurl:admin.php |
intitle: |
intitle:keyword |
Search for keyword in the page title | intitle:"Index of /" |
intext: |
intext:keyword |
Search for keyword in the page body text | intext:"password" |
filetype: |
filetype:ext |
Search for specific file types | filetype:pdf |
ext: |
ext:ext |
Alternative to filetype (same function) | ext:docx |
cache: |
cache:url |
View Google’s cached version of a page | cache:target.com/page |
related: |
related:domain.com |
Find sites similar to the specified domain | related:target.com |
- (minus) |
-keyword |
Exclude results containing the keyword | -www |
* (asterisk) |
keyword1 * keyword2 |
Wildcard — matches any words between terms | password * reset |
.. (range) |
number..number |
Search within a numeric range | 2020..2026 |
"" (quotes) |
"exact phrase" |
Search for exact phrase match | "Index of /" |
OR |
term1 OR term2 |
Search for either term | admin OR login |
+ (plus) |
+keyword |
Force inclusion of a common word | +login |
Detailed Operator Breakdown
site: — Domain Restriction
The most fundamental operator. Restricts search results to a specific domain, subdomain, or TLD.
site:target.com
site:target.com/admin
site:*.target.com
site:target.com inurl:login
site:target.com filetype:pdf
OSCP Applications:
- Enumerate all indexed pages for the target domain
- Find subdomains that are indexed
- Locate specific file types on the target
- Discover admin panels and login pages
# Find all indexed pages
site:target.com
# Find admin pages
site:target.com inurl:admin
# Find PDF documents
site:target.com filetype:pdf
# Find pages with login forms
site:target.com intitle:login
# Find directory listings
site:target.com intitle:"Index of /"
inurl: — URL Keyword Search
Searches for keywords within the URL path or query string.
inurl:admin.php
inurl:wp-admin
inurl:config.php
inurl:backup
inurl:database
inurl:login.aspx
inurl:phpmyadmin
OSCP Applications:
- Find administrative interfaces
- Locate configuration files
- Discover backup files
- Identify specific application paths
# Find PHP admin pages
site:target.com inurl:admin.php
# Find WordPress admin
site:target.com inurl:wp-admin
# Find database management tools
site:target.com inurl:phpmyadmin
# Find backup files
site:target.com inurl:backup
intitle: — Page Title Search
Searches for keywords within the HTML <title> tag of web pages.
intitle:"Index of /"
intitle:"Dashboard"
intitle:"Login"
intitle:"Administration"
intitle:"phpMyAdmin"
intitle:"cPanel"
OSCP Applications:
- Find directory listings (critical for OSCP)
- Locate admin dashboards
- Identify specific applications by their default titles
# Find directory listings — ONE OF THE MOST USEFUL DORKS
site:target.com intitle:"Index of /"
# Find phpMyAdmin instances
site:target.com intitle:"phpMyAdmin"
# Find cPanel instances
site:target.com intitle:"cPanel"
# Find login pages
site:target.com intitle:"Login"
intext: — Page Body Text Search
Searches for keywords within the body text of web pages.
intext:"password"
intext:"username"
intext:"error message"
intext:"database connection"
intext:"server error"
OSCP Applications:
- Find pages containing sensitive information
- Locate error messages with stack traces
- Discover pages with hardcoded credentials
# Find pages with password references
site:target.com intext:"password"
# Find error messages
site:target.com intext:"Fatal error"
# Find database connection strings
site:target.com intext:"connection string"
filetype: / ext: — File Type Search
Searches for specific file extensions. Both operators work identically.
filetype:pdf
filetype:doc
filetype:docx
filetype:xls
filetype:xlsx
filetype:csv
filetype:sql
filetype:log
filetype:conf
filetype:cfg
filetype:ini
filetype:xml
filetype:json
filetype:yaml
filetype:env
filetype:bak
filetype:old
filetype:backup
OSCP Applications:
- Find database dumps (.sql)
- Locate configuration files (.conf, .cfg, .ini)
- Discover backup files (.bak, .old, .backup)
- Find environment files with credentials (.env)
- Locate log files with sensitive data (.log)
# Find SQL dumps
site:target.com filetype:sql
# Find configuration files
site:target.com filetype:conf
# Find backup files
site:target.com filetype:bak
# Find environment files
site:target.com ext:env
# Find log files
site:target.com filetype:log
cache: — Cached Page View
Displays Google’s cached version of a web page. Useful when:
- The original page is no longer accessible
- You want to see a previous version of the page
- The target has taken down sensitive content
cache:target.com/admin/config.php
cache:target.com/backup/database.sql
related: — Similar Sites
Finds websites similar to the specified domain. Useful for:
- Discovering related infrastructure
- Finding sister sites
- Identifying the organization’s full web presence
related:target.com
- (Minus) — Exclusion
Excludes results containing the specified term.
site:target.com -www
site:target.com -inurl:blog
site:target.com intitle:"Index of /" -inurl:public
OSCP Applications:
- Filter out noise from results
- Exclude known safe directories
- Remove irrelevant subdomains
# Exclude www subdomain
site:target.com -site:www.target.com
# Exclude blog content
site:target.com -inurl:blog
# Exclude public-facing content
site:target.com intitle:"Index of /" -inurl:public
* (Asterisk) — Wildcard
Acts as a wildcard, matching any words between specified terms.
password * reset
admin * login * panel
error * database * connection
OSCP Applications:
- Find phrases with variable words in between
- Discover related terms with flexible matching
# Find password reset pages
site:target.com "password * reset"
# Find admin login panels
site:target.com "admin * login * panel"
.. (Range) — Numeric Range
Searches within a numeric range.
2020..2026
page=1..100
id=1..1000
OSCP Applications:
- Find paginated content
- Discover sequential IDs
- Locate content within date ranges
# Find pages with sequential IDs
site:target.com inurl:id=1..1000
# Find content from specific years
site:target.com 2023..2026
"" (Quotes) — Exact Phrase
Searches for an exact phrase match.
"Index of /"
"phpMyAdmin"
"Fatal error"
"Warning: mysql_connect"
OSCP Applications:
- Find exact error messages
- Locate default application titles
- Discover specific vulnerability indicators
# Find directory listings
site:target.com intitle:"Index of /"
# Find PHP errors
site:target.com intext:"Fatal error: Call to undefined function"
# Find MySQL errors
site:target.com intext:"Warning: mysql_connect"
OR — Alternative Terms
Searches for either of the specified terms.
admin OR login
config OR configuration
backup OR bkp
database OR db
OSCP Applications:
- Search for multiple variations at once
- Cast a wider net for discovery
# Find admin or login pages
site:target.com (intitle:admin OR intitle:login)
# Find config or backup files
site:target.com (inurl:config OR inurl:backup)
Critical Dorks for OSCP
Exposed Directories
Directory listings are one of the most valuable findings in OSCP. They reveal the file structure of a web server, potentially exposing sensitive files.
# Basic directory listing
site:target.com intitle:"Index of /"
# Directory listing with specific paths
site:target.com intitle:"Index of /" inurl:/admin
site:target.com intitle:"Index of /" inurl:/backup
site:target.com intitle:"Index of /" inurl:/config
site:target.com intitle:"Index of /" inurl:/database
site:target.com intitle:"Index of /" inurl:/logs
site:target.com intitle:"Index of /" inurl:/tmp
site:target.com intitle:"Index of /" inurl:/var
site:target.com intitle:"Index of /" inurl:/etc
# Directory listing with parent directory access
site:target.com intitle:"Index of /.."
site:target.com intitle:"Index of /../"
What to look for in directory listings:
- Backup files (.bak, .old, .backup, .sql)
- Configuration files (.conf, .cfg, .ini, .env)
- Log files (.log)
- Database dumps (.sql, .db)
- Source code (.php, .py, .js)
- Archive files (.tar, .gz, .zip, .rar)
- Credential files (.htpasswd, .htaccess)
Administrative Interfaces
Finding admin panels gives you a direct entry point for authentication attacks.
# Generic admin pages
site:target.com inurl:admin
site:target.com inurl:administrator
site:target.com inurl:admin.php
site:target.com inurl:admin.html
site:target.com inurl:admin.aspx
# Login pages
site:target.com inurl:login
site:target.com inurl:signin
site:target.com inurl:sign-in
site:target.com inurl:auth
site:target.com inurl:authenticate
# Dashboard pages
site:target.com inurl:dashboard
site:target.com inurl:console
site:target.com inurl:panel
site:target.com inurl:cp
# Specific admin applications
site:target.com inurl:phpmyadmin
site:target.com inurl:adminer
site:target.com inurl:webmin
site:target.com inurl:cpanel
site:target.com inurl:whm
site:target.com inurl:plesk
site:target.com inurl:roundcube
site:target.com inurl:squirrelmail
# CMS admin panels
site:target.com inurl:wp-admin
site:target.com inurl:wp-login
site:target.com inurl:administrator # Joomla
site:target.com inurl:admin.php # Various CMS
Sensitive Information
# Credentials and passwords
site:target.com intext:"password" intext:"username"
site:target.com intext:"passwd"
site:target.com intext:"credentials"
site:target.com intext:"login credentials"
# API keys and tokens
site:target.com intext:"api_key"
site:target.com intext:"api-key"
site:target.com intext:"API Key"
site:target.com intext:"access_token"
site:target.com intext:"bearer"
# Database connection strings
site:target.com intext:"connection string"
site:target.com intext:"Data Source"
site:target.com intext:"Server=" intext:"Database="
site:target.com intext:"mysql_connect"
site:target.com intext:"mysqli_connect"
site:target.com intext:"PDO::"
# Private keys and certificates
site:target.com ext:pem
site:target.com ext:key
site:target.com ext:crt
site:target.com ext:p12
site:target.com ext:pfx
Error Messages
Error messages can reveal system architecture, software versions, and file paths.
# PHP errors
site:target.com intext:"Fatal error"
site:target.com intext:"Warning:" intext:"PHP"
site:target.com intext:"Parse error"
site:target.com intext:"Syntax error"
site:target.com intext:"Undefined variable"
site:target.com intext:"Call to undefined function"
# Database errors
site:target.com intext:"SQL syntax"
site:target.com intext:"mysql_fetch"
site:target.com intext:"ORA-"
site:target.com intext:"Microsoft OLE DB"
site:target.com intext:"PostgreSQL"
# Server errors
site:target.com intext:"500 Internal Server Error"
site:target.com intext:"403 Forbidden"
site:target.com intext:"404 Not Found" intext:"target.com"
# Stack traces
site:target.com intext:"Stack trace"
site:target.com intext:"Traceback"
site:target.com intext:"Exception"
Backup Files
Backup files often contain the same content as the original files, sometimes with additional sensitive data.
# Common backup extensions
site:target.com ext:bak
site:target.com ext:old
site:target.com ext:backup
site:target.com ext:orig
site:target.com ext:save
site:target.com ext:tmp
site:target.com ext:temp
# Backup file names
site:target.com inurl:backup
site:target.com inurl:backups
site:target.com inurl:bkp
site:target.com inurl:archive
site:target.com inurl:archives
# Specific backup files
site:target.com inurl:web.config.bak
site:target.com inurl:config.php.bak
site:target.com inurl:database.sql
site:target.com inurl:db.sql
site:target.com inurl:dump.sql
site:target.com inurl:backup.sql
# Archive files
site:target.com ext:zip
site:target.com ext:tar
site:target.com ext:gz
site:target.com ext:tgz
site:target.com ext:rar
site:target.com ext:7z
Configuration Files
Configuration files often contain credentials, database connections, and system settings.
# Web server configs
site:target.com ext:conf
site:target.com inurl:httpd.conf
site:target.com inurl:apache2.conf
site:target.com inurl:nginx.conf
# Application configs
site:target.com ext:ini
site:target.com ext:cfg
site:target.com ext:config
site:target.com inurl:config.php
site:target.com inurl:configuration.php
site:target.com inurl:config.yml
site:target.com inurl:config.yaml
site:target.com inurl:config.json
# Environment files
site:target.com ext:env
site:target.com inurl:.env
site:target.com inurl:environment
# Database configs
site:target.com inurl:my.cnf
site:target.com inurl:mysql.cnf
site:target.com inurl:pg_hba.conf
# Authentication files
site:target.com inurl:.htpasswd
site:target.com inurl:.htaccess
site:target.com inurl:shadow
site:target.com inurl:passwd
Google Hacking Database (GHDB)
What is GHDB?
The Google Hacking Database (GHDB) is a comprehensive, categorized collection of Google Dorks maintained by OffSec. It contains thousands of pre-built dorks organized by category, making it an invaluable resource for penetration testers.
Access: https://www.exploit-db.com/google-hacking-database
GHDB Categories
| Category | Description | OSCP Relevance |
|---|---|---|
| APLC | Application Compromise | High — Find vulnerable apps |
| ASVI | Administrative/Sensitive Virtual Interfaces | Critical — Admin panels |
| CFEF | Configuration File Exposure Finding | Critical — Config files |
| CICF | Credentials in Clear Text Files | Critical — Credentials |
| CMFI | Common Misconfiguration Finding | High — Misconfigs |
| DEIA | Database Errors Information Assessment | High — DB errors |
| DEIF | Database Entries Information Finding | High — DB entries |
| DFEF | Document/File Exposure Finding | High — Exposed files |
| FCEF | Firmware Configuration Exposure Finding | Medium — Firmware |
| GEIA | Google Earth Information Assessment | Low — Geo data |
| HCEF | Hardware Configuration Exposure Finding | Medium — Hardware |
| ICCF | Insecure Communication Channel Finding | Medium — Comms |
| ICIF | Insecure Controls Information Finding | High — Controls |
| MCEF | Mobile Configuration Exposure Finding | Low — Mobile |
| OSCF | Operating System Configuration Finding | Medium — OS config |
| PEEF | Password/Encryption Exposure Finding | Critical — Passwords |
| PEIF | Personal Information Exposure Finding | Medium — PII |
| SECF | Sensitive Email/Contact Finding | Medium — Contacts |
| SEIF | Sensitive Entry Information Finding | High — Sensitive data |
| SFIF | Sensitive File Information Finding | Critical — Files |
| SMIF | Sensitive Metadata Information Finding | Medium — Metadata |
| TCIF | Technical Code Information Finding | High — Code info |
| UEIF | User Entry Information Finding | Medium — User data |
| VEIF | Vulnerable Entry Information Finding | Critical — Vulns |
How to Use GHDB
- Navigate to GHDB: Visit https://www.exploit-db.com/google-hacking-database
- Browse categories: Click on a category to see related dorks
- Search dorks: Use the search bar to find dorks by keyword
- View dork details: Click on a dork to see:
- The actual dork query
- Description of what it finds
- Number of results
- Date added
- Related vulnerabilities
- Copy and modify: Copy the dork and replace the example domain with your target
OSCP-Relevant GHDB Queries
Here are some of the most useful GHDB queries for OSCP:
# Directory listings
intitle:"Index of /" -inurl:public -inurl:www
# phpMyAdmin instances
intitle:"phpMyAdmin" "Welcome to phpMyAdmin"
# Exposed .git directories
site:target.com inurl:.git
# Exposed .svn directories
site:target.com inurl:.svn
# Exposed .env files
site:target.com ext:env
# SQL dump files
site:target.com ext:sql
# Exposed log files
site:target.com ext:log
# Exposed backup files
site:target.com ext:bak
# WordPress admin
site:target.com inurl:wp-admin
# Exposed robots.txt
site:target.com inurl:robots.txt
# Exposed sitemap.xml
site:target.com inurl:sitemap.xml
# Exposed crossdomain.xml
site:target.com inurl:crossdomain.xml
# Exposed clientaccesspolicy.xml
site:target.com inurl:clientaccesspolicy.xml
Using GHDB with ExploitDB CLI
You can also search GHDB programmatically using the searchsploit tool:
# Search GHDB via searchsploit
searchsploit -g "phpmyadmin"
searchsploit -g "directory listing"
searchsploit -g "exposed config"
# View a specific GHDB entry
searchsploit -g "intitle:phpmyadmin"
Bing and DuckDuckGo Dorking
Bing Dorking
Bing supports most Google dork operators and can be useful when:
- Google has rate-limited your searches
- Bing has indexed content that Google hasn’t
- You want to diversify your search sources
Supported Operators:
| Operator | Bing Support | Example |
|---|---|---|
site: |
Yes | site:target.com |
inurl: |
Yes | inurl:admin |
intitle: |
Yes | intitle:"Index of /" |
intext: |
Yes | intext:"password" |
filetype: |
Yes | filetype:pdf |
ext: |
Yes | ext:docx |
- (minus) |
Yes | -www |
"" (quotes) |
Yes | "exact phrase" |
OR |
Yes | admin OR login |
cache: |
No | N/A |
related: |
No | N/A |
* (asterisk) |
Limited | Limited support |
Bing-Specific Tips:
- Bing often indexes different content than Google
- Use Bing for discovering content in regions where Bing is more popular
- Bing’s indexing may be more recent for some sites
# Bing dork examples
site:target.com intitle:"Index of /"
site:target.com inurl:admin filetype:php
site:target.com intext:"password" ext:txt
DuckDuckGo Dorking
DuckDuckGo supports a subset of Google’s operators and is useful for:
- Privacy-focused searches (no tracking)
- Alternative indexing perspective
- When Google/Bing are rate-limited
Supported Operators:
| Operator | DDG Support | Example |
|---|---|---|
site: |
Yes | site:target.com |
inurl: |
Yes | inurl:admin |
intitle: |
Yes | intitle:"Index of /" |
intext: |
Yes | intext:"password" |
filetype: |
Yes | filetype:pdf |
- (minus) |
Yes | -www |
"" (quotes) |
Yes | "exact phrase" |
OR |
Yes | admin OR login |
ext: |
Limited | Limited support |
# DuckDuckGo dork examples
site:target.com intitle:"Index of /"
site:target.com inurl:config ext:php
site:target.com intext:"database" ext:sql
When to Use Alternative Search Engines
| Scenario | Recommended Engine |
|---|---|
| Primary reconnaissance | |
| Google rate-limited | Bing, then DuckDuckGo |
| Regional content | Local search engines |
| Privacy concerns | DuckDuckGo |
| Comprehensive coverage | All three |
| Fresh content | Google (fastest indexing) |
| Archived content | Google cache, Bing |
Advanced Dork Combinations
Multi-Operator Dorks
Combine multiple operators for precise targeting:
# Find admin login pages with specific file types
site:target.com inurl:admin intitle:login ext:php
# Find exposed config files with credentials
site:target.com ext:conf intext:"password" intext:"username"
# Find directory listings with backup files
site:target.com intitle:"Index of /" inurl:backup
# Find error messages with file paths
site:target.com intext:"Fatal error" intext:"/var/www"
# Find database dumps with specific content
site:target.com ext:sql intext:"CREATE TABLE"
# Find exposed API endpoints
site:target.com inurl:api ext:json intext:"key"
# Find exposed version control
site:target.com inurl:.git/config
site:target.com inurl:.svn/entries
Exclusion Chains
Use multiple exclusions to filter noise:
# Directory listings excluding common noise
site:target.com intitle:"Index of /" -inurl:public -inurl:www -inurl:blog -inurl:docs
# Admin pages excluding documentation
site:target.com inurl:admin -inurl:admin-guide -inurl:admin-docs -inurl:admin-tutorial
# Config files excluding public examples
site:target.com ext:conf -inurl:example -inurl:sample -inurl:template -inurl:github
Boolean Logic
Use OR and parentheses for complex queries:
# Find any admin interface
site:target.com (inurl:admin OR inurl:administrator OR inurl:panel OR inurl:dashboard OR inurl:console)
# Find any database tool
site:target.com (inurl:phpmyadmin OR inurl:adminer OR inurl:heidi OR inurl:sequel)
# Find any backup file type
site:target.com (ext:bak OR ext:old OR ext:backup OR ext:orig OR ext:save)
# Find any config file type
site:target.com (ext:conf OR ext:cfg OR ext:ini OR ext:env OR ext:yml OR ext:yaml)
Time-Based Dorks
Find recently indexed content:
# Google advanced search (use Google's time filter)
site:target.com tbs=qdr:d # Last day
site:target.com tbs=qdr:w # Last week
site:target.com tbs=qdr:m # Last month
site:target.com tbs=qdr:y # Last year
Geographic Dorks
Find content in specific regions:
# Use Google's country-specific domains
# Instead of google.com, use:
# google.co.uk for UK
# google.de for Germany
# google.cn for China
# google.jp for Japan
Rate Limiting and Anti-Detection
Google Rate Limiting
Google will temporarily block your IP if you make too many requests in a short period.
Symptoms:
- “Sorry, there are too many requests from your IP” message
- CAPTCHA challenges
- Empty or limited results
Mitigation Strategies:
| Strategy | Description | Effectiveness |
|---|---|---|
| Slow down | Space out requests (30-60 seconds between searches) | High |
| Use VPN | Rotate IP addresses | High |
| Use proxies | Distribute requests across multiple IPs | High |
| Use alternative engines | Switch to Bing or DuckDuckGo | Medium |
| Use Google Custom Search API | Programmatic access with rate limits | Medium |
| Cache results | Save results to avoid re-searching | High |
Best Practices for Anti-Detection
- Limit searches per session: No more than 10-15 searches per hour per IP
- Vary your queries: Don’t repeat the same dork with minor changes
- Use different browsers: Alternate between browsers to vary user agents
- Clear cookies: Clear cookies between sessions
- Use incognito mode: Avoid personalized results and tracking
- Document results: Save all findings to avoid re-searching
Automated Dorking
Ethical Considerations
Important: Google Dorking is a legal and ethical technique when used on targets you have authorization to test. However:
- Only dork targets included in your scope
- Do not access or download sensitive files you discover
- Report findings through proper channels
- Respect robots.txt and terms of service
- Never use dorking for malicious purposes
Building Custom Dork Lists
Why Build Custom Lists?
Pre-built dorks are great starting points, but custom lists allow you to:
- Target specific technologies used by your target
- Focus on known vulnerabilities in target applications
- Automate repetitive searches
- Maintain a reusable knowledge base
Creating a Dork List Template
# Create a dork list file
cat > dorks.txt << 'EOF'
# Directory Listings
site:TARGET intitle:"Index of /"
site:TARGET intitle:"Index of /" inurl:/admin
site:TARGET intitle:"Index of /" inurl:/backup
site:TARGET intitle:"Index of /" inurl:/config
site:TARGET intitle:"Index of /" inurl:/database
site:TARGET intitle:"Index of /" inurl:/logs
site:TARGET intitle:"Index of /" inurl:/tmp
# Admin Interfaces
site:TARGET inurl:admin
site:TARGET inurl:administrator
site:TARGET inurl:admin.php
site:TARGET inurl:wp-admin
site:TARGET inurl:phpmyadmin
site:TARGET inurl:adminer
# Sensitive Files
site:TARGET ext:env
site:TARGET ext:sql
site:TARGET ext:bak
site:TARGET ext:old
site:TARGET ext:conf
site:TARGET ext:cfg
site:TARGET ext:ini
site:TARGET ext:log
# Error Messages
site:TARGET intext:"Fatal error"
site:TARGET intext:"Warning:" intext:"PHP"
site:TARGET intext:"SQL syntax"
site:TARGET intext:"Stack trace"
# Version Control
site:TARGET inurl:.git
site:TARGET inurl:.svn
site:TARGET inurl:.hg
# Configuration
site:TARGET inurl:config.php
site:TARGET inurl:configuration.php
site:TARGET inurl:web.config
site:TARGET inurl:robots.txt
site:TARGET inurl:sitemap.xml
EOF
Automating Dork Searches
#!/usr/bin/env python3
"""
Automated Google Dork Search Tool
Usage: python3 dork_search.py <target_domain> <dorks_file>
"""
import sys
import time
import webbrowser
from datetime import datetime
def load_dorks(filepath):
"""Load dorks from file,
dorks = []
with open(filepath, 'r') as f:
for line in f:
line = line.strip()
if line and not line.startswith('#'):
dorks.append(line)
return dorks
def search_dork(dork, delay=30):
"""Open dork search in browser with delay."""
url = f"https://www.google.com/search?q={dork}"
print(f"[{datetime.now().strftime('%H:%M:%S')}] Searching: {dork}")
webbrowser.open(url)
print(f"Waiting {delay} seconds before next search...")
time.sleep(delay)
def main():
if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} <target_domain> <dorks_file>")
sys.exit(1)
target = sys.argv[1]
dorks_file = sys.argv[2]
dorks = load_dorks(dorks_file)
print(f"Loaded {len(dorks)} dorks for target: {target}")
print("Press Ctrl+C to stop")
for dork in dorks:
try:
# Replace TARGET placeholder with actual target
dork = dork.replace('TARGET', target)
search_dork(dork)
except KeyboardInterrupt:
print("\nSearch interrupted by user")
break
if __name__ == "__main__":
main()
Dork List Categories for OSCP
# OSCP-Specific Dork Categories
## Web Application Dorks
site:TARGET inurl:wp-admin
site:TARGET inurl:wp-login.php
site:TARGET inurl:administrator # Joomla
site:TARGET inurl:index.php?option=com_ # Joomla components
site:TARGET inurl:bitrix # Bitrix
site:TARGET inurl:jenkins # Jenkins
site:TARGET inurl:swagger # Swagger API
site:TARGET inurl:actuator # Spring Boot Actuator
## Database Dorks
site:TARGET inurl:phpmyadmin
site:TARGET inurl:adminer
site:TARGET inurl:mysql
site:TARGET inurl:mariadb
site:TARGET inurl:postgresql
site:TARGET inurl:mongodb
## File Exposure Dorks
site:TARGET ext:sql
site:TARGET ext:db
site:TARGET ext:sqlite
site:TARGET ext:log
site:TARGET ext:txt intext:"password"
site:TARGET ext:csv intext:"password"
## Infrastructure Dorks
site:TARGET inurl:router
site:TARGET inurl:switch
site:TARGET inurl:firewall
site:TARGET inurl:cisco
site:TARGET inurl:fortinet
Dork-Driven Exploitation Workflow
Complete Workflow Diagram
graph TD
A[Start: Target Domain] --> B[Basic Site Search]
B --> C[Analyze Indexed Content]
C --> D{Findings?}
D -->|Yes| E[Categorize Findings]
D -->|No| F[Try Alternative Engines]
F --> D
E --> G[Priority 1: Credentials/Configs]
E --> H[Priority 2: Admin Interfaces]
E --> I[Priority 3: Directory Listings]
E --> J[Priority 4: Error Messages]
E --> K[Priority 5: Backup Files]
G --> L[Extract Credentials]
H --> M[Test Default Credentials]
I --> N[Download Sensitive Files]
J --> O[Identify Tech Stack]
K --> P[Analyze Backup Content]
L --> Q[Authentication Attacks]
M --> Q
N --> R[File Analysis]
O --> S[Vulnerability Research]
P --> R
Q --> T[Initial Access]
R --> T
S --> T
T --> U[Post-Exploitation]
Step-by-Step Workflow
Step 1: Basic Reconnaissance
# Start with broad searches
site:target.com
site:target.com intitle:"Index of /"
site:target.com inurl:admin
Step 2: Technology Identification
# Identify web technologies
site:target.com intitle:"WordPress"
site:target.com intitle:"Joomla"
site:target.com intitle:"Drupal"
site:target.com intitle:"phpMyAdmin"
site:target.com intitle:"cPanel"
# Identify server technologies
site:target.com intext:"Apache"
site:target.com intext:"Nginx"
site:target.com intext:"IIS"
site:target.com intext:"Tomcat"
Step 3: Sensitive File Discovery
# Search for sensitive files
site:target.com ext:env
site:target.com ext:sql
site:target.com ext:bak
site:target.com ext:conf
site:target.com ext:log
site:target.com ext:txt
# Search for version control
site:target.com inurl:.git
site:target.com inurl:.svn
Step 4: Admin Interface Discovery
# Search for admin panels
site:target.com inurl:admin
site:target.com inurl:login
site:target.com inurl:dashboard
site:target.com inurl:console
# Search for specific admin tools
site:target.com inurl:phpmyadmin
site:target.com inurl:adminer
site:target.com inurl:webmin
Step 5: Error Message Analysis
# Search for error messages
site:target.com intext:"Fatal error"
site:target.com intext:"Warning:"
site:target.com intext:"SQL syntax"
site:target.com intext:"Stack trace"
Step 6: Exploitation
Based on findings:
- Credentials found → Attempt authentication
- Admin panel found → Test default credentials, brute force
- Directory listing found → Download and analyze files
- Error messages found → Identify technology and version, search for exploits
- Backup files found → Download and extract sensitive data
Step 7: Documentation
Document all findings:
Target: target.com
Date: 2026-09-01
Tester: [Your Name]
Findings:
1. Directory Listing Found
- URL: http://target.com/backup/
- Contents: database.sql, config.php.bak
- Risk: Critical
2. Admin Panel Found
- URL: http://target.com/admin/
- Type: phpMyAdmin
- Risk: High
3. Error Messages Found
- URL: http://target.com/vulnerable.php
- Error: PHP Fatal error
- Tech: PHP 7.4, Apache 2.4
- Risk: Medium
Recommendations:
1. Download and analyze backup files
2. Test default credentials on admin panel
3. Research PHP vulnerabilities for identified version
OSCP Exam Tips
Tip 1: Always Start with Google Dorking
Before launching any active scans, spend 5-10 minutes dorking the target. You might find:
- Direct paths to exploitation
- Credentials for authentication
- Subdomains and additional attack surface
- Technology information for targeted attacks
Tip 2: Focus on High-Value Dorks
For OSCP, prioritize these dorks:
site:TARGET intitle:"Index of /"
site:TARGET inurl:admin
site:TARGET ext:env
site:TARGET ext:sql
site:TARGET inurl:phpmyadmin
Tip 3: Document Everything
Save all dork results in your notes:
# Save search results
echo "=== Google Dork Results ===" >> notes.txt
echo "Date: $(date)" >> notes.txt
echo "" >> notes.txt
echo "Dork: site:TARGET intitle:'Index of /'" >> notes.txt
echo "Results: [paste results here]" >> notes.txt
Tip 4: Use GHDB for Inspiration
When stuck, browse GHDB for ideas:
- Look for dorks related to technologies you’ve identified
- Check for new dorks added recently
- Use GHDB categories to ensure comprehensive coverage
Tip 5: Combine with Other Techniques
Google Dorking works best when combined with:
- Subdomain enumeration: Dork each discovered subdomain
- Directory brute-forcing: Use dork findings to guide brute-force
- Vulnerability scanning: Use technology info from dorks to target scans
- Credential stuffing: Use credentials found in dorks for authentication
Tip 6: Don’t Over-Reliance on Dorking
Remember:
- Not all targets will have indexed content
- Dorking is passive — you still need active scanning
- Use dorking as a supplement, not a replacement, for proper reconnaissance
- Some OSCP machines may have minimal web presence
Tip 7: Time Management
Allocate time wisely:
- 5-10 minutes: Initial dorking
- If findings are promising: Spend more time analyzing
- If no findings: Move on to active scanning
- Don’t spend more than 15-20 minutes on dorking unless you’re making progress
Tip 8: Common OSCP Dork Patterns
These patterns frequently appear in OSCP machines:
# WordPress installations
site:TARGET inurl:wp-admin
site:TARGET inurl:wp-login.php
# Exposed directories
site:TARGET intitle:"Index of /"
# phpMyAdmin
site:TARGET inurl:phpmyadmin
# Backup files
site:TARGET ext:bak
site:TARGET ext:sql
# Configuration files
site:TARGET ext:conf
site:TARGET ext:env
Summary
Search Engine Dorking is a powerful passive reconnaissance technique that can reveal:
- Exposed directories and files
- Administrative interfaces
- Sensitive configuration files
- Credentials and passwords
- Error messages with system information
- Backup files with sensitive data
Key Takeaways
- Master the operators:
site:,inurl:,intitle:,intext:,filetype:are essential - Use GHDB: Leverage pre-built dorks for comprehensive coverage
- Combine operators: Multi-operator dorks provide precise targeting
- Document findings: Save all results for later analysis
- Be patient: Rate limiting is real — space out your searches
- Stay ethical: Only dork targets in your scope
- Combine techniques: Dorking works best with other recon methods
Quick Reference Card
┌─────────────────────────────────────────────────────────────┐
│ GOOGLE DORKING QUICK REFERENCE │
├─────────────────────────────────────────────────────────────┤
│ │
│ Essential Operators: │
│ • site:domain.com - Restrict to domain │
│ • inurl:keyword - Search URL │
│ • intitle:keyword - Search title │
│ • intext:keyword - Search body text │
│ • filetype:ext - Search file type │
│ • -keyword - Exclude term │
│ • "exact phrase" - Exact match │
│ │
│ Top OSCP Dorks: │
│ • site:TARGET intitle:"Index of /" │
│ • site:TARGET inurl:admin │
│ • site:TARGET ext:env │
│ • site:TARGET ext:sql │
│ • site:TARGET inurl:phpmyadmin │
│ │
│ Resources: │
│ • GHDB: exploit-db.com/google-hacking-database │
│ │
└─────────────────────────────────────────────────────────────┘
Last Updated: 2026-09-01 Chapter 03: Information Gathering Domain: Information Gathering