#Why this matters
Search engines and internet-wide scanners continuously crawl the public web and index far more than homepage marketing text. Forgotten spreadsheets, staging subdomains, debug traces and exposed management ports frequently appear in public indexes months before a defender notices them.
Building on the passive OSINT principles from the previous lesson, querying these third-party indexes lets analysts audit an organisation's external footprint without sending a single packet to target servers.
#Precision web search with operators
Standard keyword searches drown useful artefacts in noise. Search dorking uses built-in search operators to narrow results to exact domains, file formats and URL patterns.
| Operator | Purpose | Example for example.test |
|---|---|---|
site: |
Restrict matches to one domain or subdomain | site:example.test |
filetype: |
Match documents by file extension | site:example.test filetype:pdf |
inurl: |
Require text inside the URL path | site:example.test inurl:admin |
intitle: |
Require text inside the HTML page title | site:example.test intitle:"index of" |
- |
Exclude noisy subdomains or keywords | site:example.test -site:www.example.test |
"..." |
Match an exact phrase | site:example.test "confidential" |
Chaining operators works especially well for attack-surface discovery. For example, site:example.test -site:www.example.test (filetype:pdf OR filetype:xlsx) hides the main marketing site and highlights documents hosted on forgotten subdomains such as portal.example.test or dev.example.test.
Remember the OPSEC lesson: reading snippets inside the search engine is passive, whereas clicking a returned link sends your browser directly to the target host.
#Finding exposed services with Shodan
Web search engines focus on HTTP content and documents, leaving non-web services invisible. Shodan fills that gap by scanning IP addresses across common ports and indexing the resulting banners, HTTP response headers and TLS certificate fields.
Useful Shodan filters for authorised perimeter reviews include:
net:192.0.2.0/24to restrict results to an authorised IP range.hostname:example.testorssl:"example.test"to find hosts linked to a domain name or certificate.port:22,3389orport:8080to locate exposed remote-access or alternate web ports.http.title:"Dashboard"to surface admin interfaces by page title.org:"Example Org"to pivot on registered network ownership.
$ shodan count "net:192.0.2.0/24"
4
$ shodan search --fields ip_str,port,product "net:192.0.2.0/24"
192.0.2.10 22 OpenSSH
192.0.2.10 443 nginx
192.0.2.25 8080 Apache httpdBecause Shodan returns previously collected scan banners, you learn which ports and software products are exposed on 192.0.2.0/24 without running an active Nmap scan against the live hosts.
#Looking back in time with the Wayback Machine
Deleting a file or retiring an old API path removes it from the live server, not from history. The Wayback Machine archives timestamped snapshots of public webpages, allowing analysts to inspect how a domain evolved over years.
Investigators check archived captures to:
- Recover paths from historical
robots.txtfiles or sitemaps that were later edited. - Inspect older JavaScript bundles for retired API routes or legacy subdomain names.
- Verify when an exposed page first appeared and whether an asset belongs to an earlier brand.
One crucial discipline applies: an archive proves a resource existed at a past timestamp, not that it remains reachable today. Treat archived paths as leads to report or verify within scope, never as guaranteed live targets.
#Defending against passive exposure
- Never treat
robots.txtas security:robots.txtis publicly readable and acts like a signpost pointing analysts toward/admin/or/backups/. Protect sensitive paths with real authentication and IP allow-lists. - Prevent indexing explicitly: Send the
X-Robots-Tag: noindexHTTP header or an HTMLrobotsmeta tag set tonoindexon non-public pages, and request search-cache removal after deleting an accidentally exposed file. - Audit your own perimeter: Run scheduled dorks and Shodan checks against your owned domains and CIDR blocks so you spot misconfigurations before external actors do.
#Common mistakes
- Assuming
Disallow:entries inrobots.txtblock human users or malicious crawlers from fetching those URLs. - Searching only
site:www.example.testand missing forgotten subdomains. - Clicking dork results directly from a personal browser instead of reading cached snippets or isolating the session.
- Treating a years-old Wayback Machine snapshot as live evidence without checking scope and current status.
#Summary
Google Dorks, Shodan and the Wayback Machine let defenders and analysts map files, exposed services and historical endpoints completely passively. Operators like site:, filetype: and - isolate forgotten subdomains and documents, while Shodan filters reveal open ports and service banners across authorised IP ranges. True prevention requires authentication, access controls, noindex headers and regular self-audits rather than relying on robots.txt.