Google Dorks for reconnaissance external attack: from passive recon to pre-exploitation

Depov

Moderator
Staff member
MODERATOR
ULTIMATE
SUPREME
PREMIUM
MEMBER
Joined
Feb 18, 2025
Messages
646
Reaction score
1,455
On the external pentest, the first critical find took 11 minutes. Not Nmap, not Burp - request site:target.com filetype:env "DB_PASSWORD" returned the file from credentials from the production base. Host ev-payments.target.com did not appear in the scough, because the customer forgot about it. According to the IBM X-Force Thread Intelligence Index 2025, about 6000 fresh-reading records pop up every day on the darknet - and a significant part of them is not the result of complex attacks, but a banal indexation of configs by search engines. Google Dorking is the first tool in the hands of the pentester and at the same time the most underrated: google dorks for reconnaissance allow you to assemble an external surface map before one package touches the infrastructure of the target.
Google Dorking’s place in kill running: MITRE ATT&CK and operational context

In the terminology of MITRE ATT&CK Google Dorking - technology T1593.002 (Search Engines, Reconnaissance). Each query goes to Google servers, not to the target host: in the victim’s access logs zero of the recording. This makes the odorgs a safe start for passive reconnaissance of the external surface of the attack before switching to active scanning.

In the outer pentest chain, google dorking occupies a specific position:
1. Google Dorks + OSINT (passive recon) - determining the boundaries of the attacked surface, detecting forgotten assets
2. Shodan / Censys / crt.sh - confirmation of live hosts, open ports, Certificate Transparency
3. Active scanning (Nmap, httpx) - fingerprinting services on confirmed hosts
4. Vulnerability validation (nuclei, manual testing) - pre-exploitation
5. Exploitation - initial access
Dorks cover several sub-technics Reconnaissance at once according to ATT&CK: Domain Properties (T1590.001) - detection of subdomains and affiliate domains; IP Addresses (T1590.005) - through error pages with the output of internal IP; Software (T1592.002) - technology fingerprinting through indexed headlines, phpinfo() and version strings; Scan Databases (T1596.005) - when looking for ready-made spurts in Google Hacking Database. A separate category - finds of credential exposure, which are mapped on the tactics of Credential Access (T1552.001, Credentials In Files)

When you write a report, each find is attached to ATT&CK technology. Dorks - not "gogged and found", but a documented reconnaissance with a specific TTP-mapping.
Five Operator Families for External Attack Palled Mapping
Scoping - Definition of Intelligence Boundaries
The first step is to understand what is generally indexed at the goal. Request site:target.com returns the total volume of pages in the index. Request site:target.com -www removes the main site and shows subdomains: dev, staging, api, legacy-portals. Operator related:target.com gives affiliate domains - subsidiaries, affiliate portals, purchased brands. According to CybellAngel, this is the foundation of any organization-specific investigation: without a scoping phase, further exploration will be incomplete.

Nuance: related: It does not work for all domains - Google returns results only for sites that he considers quite "large". For small businesses, the operator is useless.
File & Content - Information Discluded
filetype:env site:target.com Looking for .env-exurerable variable files (DB_PASSWORD, API_KEY, SECRET_KEY). Expand on sql, bak, log, conf, yml, json. Dork intitle:"index of" site:target.com detects open directory listings - from them one step to downloading any file from the directory. Google Hacking Database (GHDB, Offensive Security is supported) - a catalog of ready-made dorsons sorted by category: password files, error messages, open directories. GHDB is used as a checklist at footprinting using Google Dorks, not as a ready-made recipe.

But: filetype: works only with extensions that Google can index. Binary formats (.sqlite, .kdbx) do not look for it - here you will have to dig differently.
Authentication surface - login mapping
Operators inurl:login site:target.com, inurl:admin site:target.com, intitle:"VPN" OR intitle:"remote access" site:target.com Identify entry points for checking for default credentials, brute-force protection and known CVE. For WordPress - inurl:"/wp-admin" site:target.com. For 1C-Bitrix (over 30% of the corporate segment in Russia) - inurl:/bitrix/admin/ site:target.ru.
Technology fingerprinting via OSINT
intitle:"phpinfo()" site:target.com gives a PHP configuration as a whole: version, modules, paths. intext:"Powered by" intext:"version" site:target.com - Version strings for verification with NVD. intitle:"Grafana" OR intitle:"Kibana" site:target.com - monitoring platforms, often exhibited without authentication (and this is a classic - stick out in every second project). Technology fingerprinting OSINT through the paths is not an active scan: the data is already in the index, you just need to ask correctly.
Threat intelligence - monitoring leaks on third-party platforms
site:github.com "target.com" password OR secret OR key - the code in which the developers left credentials. site:pastebin.com "target.com" - paste-sites with dumps. "@target.com" site:linkedin.com - listing email addresses for targeted phishing or credential stuffing. These queries go beyond the target infrastructure, but remain completely passive: open source intelligence footprinting does not generate traffic to target servers.
 
Top Bottom