· Cybersecurity news

Penetration testing check: are your files exposed to attackers?

Google dorking is one of the oldest tricks in the attacker's book: using advanced search queries to find files you never meant to publish — configuration files with database passwords, backup archives, open directory listings, private documents. It has been catalogued publicly since 2004. The uncomfortable truth: if a search engine can find it, so can an attacker. This page is the defensive guide — how to check whether your files are exposed and how to close the gap. It contains no attack instructions.

What is Google dorking?

Google dorking is the practice of using a search engine's advanced operators to surface files and pages that were accidentally left public. Security researcher Johnny Long popularized the concept and began cataloguing these searches in the Google Hacking Database (GHDB) in 2004; it has been maintained by Offensive Security since 2010 and now holds more than 3,500 catalogued exposure patterns across 14 categories. The key point defenders must internalize: dorking finds misconfigurations, not vulnerabilities in Google. The search engine is doing exactly what it was built to do — indexing public content. The fault is the file being public in the first place.

What attackers look for (file classes, not how-tos)

Attackers browsing the GHDB's categories are hunting for classes of exposure, not specific targets. The recurring classes are: environment and configuration files containing database passwords or API keys left in web-accessible directories; database backups and SQL dumps uploaded to public folders; open directory listings that enumerate every file on a server; private documents — spreadsheets, PDFs, scanned IDs — stored under guessable paths; and exposed administrative login pages. Every one of these is a deployment failure. None of them requires the attacker to breach anything — the front door was left open and indexed.

Honest scope: this page deliberately teaches nothing about constructing dork queries or using dorking tools. Describing the risk classes is enough to defend against them. If you arrived hoping for attack techniques, you are in the wrong place.

Run this penetration testing check on your own exposure

The legitimate, defensive use of this knowledge is auditing your own property. The steps: verify your site in Google Search Console and review the indexed pages and files under your domain — the Coverage report shows what Google has actually indexed. Run searches restricted to your own domain to see what a stranger sees. Check for the classic exposures: files with secrets in web roots, backup files with predictable names, directory listings, and staging or development subdomains that were never locked down. Do this quarterly, and after every deployment. Finding your own exposure before an attacker does is the entire game.

How to fix exposure

When you find something exposed, work in this order. First, remove it from the web root — delete the file, move secrets into environment variables or a secrets manager, and put anything sensitive behind authentication. Second, hide it from search fast: Google Search Console's Removals tool hides a URL from results within about a day, but it is temporary — roughly six months — so it buys time, not a fix. Third, make the removal permanent: let the URL return a 404 or 410, add a noindex directive, or keep it password-protected. Fourth, rotate every credential the file contained — assume it was already copied. A password that was ever public is burned.

Why robots.txt is not protection

The most common false fix is adding the sensitive path to robots.txt. This does almost nothing defensively. The file is publicly readable — anyone can open your robots.txt and read the list of paths you wanted hidden, which makes it a roadmap, not a lock. It does not prevent a URL from being indexed (Google can index a URL it was told not to crawl if other pages link to it), and crawlers that do not respect the convention ignore it entirely. robots.txt manages crawler politeness. Access control — authentication, proper permissions, keeping secrets out of the web root — is what protects files.

A trap worth knowing: many of the "password lists" and "hacking tools" that dorking turns up are themselves malware, seeded by criminals to infect whoever downloads them. Treat anything you find this way as hostile. If your own data is exposed, remove it and rotate the credentials — do not download and inspect strangers' files.

BreachHunter — Ingenious AI's attack-surface platform — is built for exactly this exposure class: finding the files, subdomains, and misconfigurations you didn't know were public before attackers do. Get early access on WhatsApp.

Quiz: is your site dork-proof?

1. What does Google dorking find?

2. Why is robots.txt not protection against dorking?

3. What is the legitimate defensive use of dorking knowledge?

4. You find a config file with database passwords indexed. First step?

5. Google Search Console's Removals tool:

Frequently asked questions

What is Google dorking?

Google dorking is the practice of using advanced search operators to find files and pages that were never meant to be public — exposed configuration files, database backups, directory listings, private documents. Security researcher Johnny Long catalogued the technique in 2004 in the Google Hacking Database (GHDB), maintained since 2010 by Offensive Security. It finds misconfigurations, not flaws in the search engine.

How do I check if my own files are exposed?

Verify your site in Google Search Console and review what is indexed under your domain — the Coverage report shows indexed pages and files. You can also run site-restricted searches limited to your own domain to see what a stranger can find. Auditing your own property this way is legitimate defensive practice.

Does robots.txt protect my files from Google dorking?

No. robots.txt is a publicly readable file that only asks compliant crawlers not to fetch certain paths. It does not prevent a URL from being indexed, non-compliant crawlers ignore it, and listing a sensitive path in robots.txt advertises its existence to anyone who reads the file. It is a crawler courtesy, not access control.

How do I remove an exposed file from Google search?

First remove the file from your web server or put it behind authentication. Then use Google Search Console's Removals tool to hide the URL quickly — this lasts about six months and is temporary. For permanence, make the URL return a 404/410, add a noindex directive, or keep it password-protected, and rotate any credentials the file contained.

Are the password lists attackers find real?

Often not. Criminals seed fake 'password lists' and 'hacking tools' that are themselves malware — downloading them infects the downloader. This is a documented trap: the files dorking turns up should be treated as hostile, and the safest response to finding your own data exposed is to remove it and rotate the credentials, not to download and inspect strangers' files.