Jamal Darbo// Security PortfolioPortfolio v1
Portfolio Blog
Back to blog

OSINT

Google dorking for defenders

Practical Google searches for reviewing exposed documents, authentication pages, and technical information across your public attack surface.

A glowing magnifying glass revealing public web pages and documents beside a site:example.com search query

Google dorking is the practice of combining search terms and operators to find specific information in Google’s search index. From a defensive perspective, it provides a way to examine what an outsider can discover about your organization and compare that with what you intended to make public.

The useful part is knowing what to search for and how to interpret the answer. A public login page may be entirely expected. An employee-only document available without authentication deserves a different conversation.

Throughout this article, we will use example.com as a placeholder for a fictional organization. Replace it with a domain you own or are authorized to assess. The situations described below are hypothetical examples, rather than findings from a real company

LEGAL AND ETHICAL NOTE

Google search operators are ordinary search features, but finding something in a search result does not automatically authorize you to access, download, use, or share it. Publicly discoverable does not necessarily mean intentionally public.

Use the examples in this article to review domains you own or are authorized to assess. Unauthorized access, bypassing access controls, using exposed credentials, or collecting and sharing personal data can violate applicable laws. Good intentions do not automatically make an action lawful.

Keep any security testing within the agreed scope or the organization’s published vulnerability disclosure policy. If you unexpectedly encounter sensitive information, stop exploring, avoid collecting unnecessary data, and report it privately to the owner through an appropriate disclosure channel.

Laws vary by jurisdiction and circumstances. This article provides educational guidance, not legal advice.

Start with what you expect to be public

Before constructing complicated queries, establish a basic picture of the organization’s public presence. You might expect a company website, a careers page, product documentation, and a customer support portal. Start by asking Google what it can show within the domain:

site:example.com

The site: operator restricts results to the specified domain or URL prefix. A domain-level query can include subdomains, so the results might contain pages from www.example.com, support.example.com, and docs.example.com. This is not an exhaustive list of indexed URLs, so treat it as a starting point for discovery.

Suppose most results come from the main marketing website. You can exclude that hostname to make other results easier to notice:

site:example.com -site:www.example.com

This removes results matching www.example.com. It does not remove pages hosted directly at example.com, and it does not enumerate every subdomain. Its purpose is simply to reduce a familiar source of noise.

Imagine that a result now appears for support-old.example.com. The name suggests an older support environment, but that is only a clue. It could be a maintained archive, a redirect, or an application that someone forgot to retire. Record the hostname and identify its owner before deciding what it represents.

You can then focus on a known part of the organization:

site:support.example.com

Or narrow the search to a particular URL prefix:

site:https://support.example.com/guides/

This is useful when a large website mixes marketing content, customer documentation, and employee instructions. Searching a specific area gives you a more manageable set of results to review.

A few small syntax details help. Keep the operator attached to its value, as in site:example.com, and use quotation marks when you want an exact phrase:

site:example.com "remote access"

You can also exclude a word that repeatedly produces irrelevant results:

site:example.com "remote access" -careers

This gives us a simple working method: begin with a question, inspect the results, and adjust one part of the query at a time.

Follow the documents and technical clues

Public documents are a useful place to continue because they often contain more detail than the website’s main pages. Start with a file type, for example PDF:

site:example.com filetype:pdf

Google’s filetype: operator filters results by file type, determined through the HTTP content type or file extension. You can use it to look for different document formats:

site:example.com filetype:docx
site:example.com filetype:xlsx
site:example.com filetype:pptx

These searches might surface manuals, forms, spreadsheets, or presentations, for example. The file format alone says nothing about sensitivity.

The next step is to ask a more specific question. For example, are any documents carrying an internal classification label publicly discoverable?

site:example.com filetype:pdf "internal use only"
site:example.com filetype:docx "confidential"
site:example.com filetype:pdf "restricted"

A matching phrase is a reason to review the document. It is not sufficient evidence of a leak. The result could be anything, from a blank template to a document that was deliberately released with an old footer still attached.

Suppose, instead, that the result is an employee onboarding guide. It contains instructions for accessing the company’s remote working environment, screenshots of the login process, and an internal support contact. You now have a concrete question for the document owner: was this version intended for unrestricted public access?

You can explore that topic with more focused searches:

site:example.com filetype:pdf "VPN"
site:example.com filetype:pdf "remote access"
site:example.com "password reset"

Consider a hypothetical guide explaining that employees sign in at access.example.com, use a particular username format, and contact a named team for account recovery. None of those details necessarily grants access. Together, however, they describe a recognizable workflow. A defender reviewing this same guide can assess whether those details are necessary for its public audience and whether the recovery process remains secure even when its steps are known.

The question is what the information enables someone to understand or do.

Document searches can also identify content that has outlived its purpose:

site:example.com filetype:pdf "migration"
site:example.com filetype:pdf "legacy"

Imagine finding a migration guide that tells employees to use an old portal during a transition. The migration may have finished years ago, but the guide could still send readers toward that service.

Google also supports date filters:

site:example.com filetype:pdf "remote access" before:2024-01-01

This can help focus a review on older material. Google describes before: and after: in terms of document update dates.

Pages and applications provide another line of investigation. The inurl: and intitle: operators let you focus on words in URLs and page titles, respectively. They are also described in OWASP’s guidance on search engine reconnaissance (OWASP: search engine reconnaissance).

For authentication-related pages, try these searches individually:

site:example.com inurl:login
site:example.com intitle:"sign in"
site:example.com inurl:signin
site:example.com inurl:auth
site:example.com inurl:sso
site:example.com inurl:oauth
site:example.com inurl:admin
site:example.com intitle:"admin portal"
site:example.com inurl:forgot-password
site:example.com inurl:reset-password

Different applications use different naming conventions. One might use /login, another /signin, and another a path containing /auth/. Searching for a title can also reveal a page whose URL does not contain an obvious authentication term.

The sso and oauth searches can surface related application paths, integration pages, or documentation. A matching URL does not establish how the application implements authentication. Similarly, forgot-password and reset-password can help locate recovery-related pages, but some results may simply explain the recovery process.

Suppose inurl:signin returns a page on an unfamiliar hostname. Record the application name, the hostname, and any redirect destination you observe during normal browsing. Compare the result with the organization’s application inventory and identify its owner.

A visible login page alone does not demonstrate weak authentication. Useful questions are whether the service is known, whether it is still maintained, and whether public accessibility matches its intended deployment. Determining whether it enforces MFA or has an authentication flaw requires separate verification.

You can extend the search to possible development or test environments:

site:example.com inurl:staging
site:example.com inurl:uat
site:example.com intitle:"test environment"

Here too, the wording is a clue. A URL containing staging could belong to a documentation article rather than a staging application.

Apply the same approach to API documentation:

site:example.com inurl:swagger
site:example.com "API documentation"

Public API documentation may be intentional and valuable. It can still help identify service names, documented endpoints, and references to older API versions that should be reconciled with the current inventory.

For example, documentation might describe an /api/v1/ endpoint while the application owner believes the organization has moved entirely to version 2. Record the discrepancy and verify it with the owner. Documentation can be outdated or incomplete, so its presence does not establish that a particular endpoint is still operational.

Another useful query is:

site:example.com intitle:"index of"

This can surface pages whose titles resemble directory listings. If a result is an actual listing, review what the directory exposes and whether that exposure is intended. A public software download directory may be appropriate. A directory containing internal working documents needs a different assessment.

You can narrow the query around a particular concern:

site:example.com intitle:"index of" "backup"

The result might be a listing mentioning backup files, but inspect the page before reaching that conclusion. If sensitive files are exposed, disabling directory browsing alone may leave those files accessible through their direct URLs.

Technical output provides further search opportunities:

site:example.com "Traceback (most recent call last)"
site:example.com "DB_PASSWORD"

The first query looks for a recognizable Python traceback phrase. The second looks for a common configuration variable name. Both can return legitimate documentation and code examples. Review whether the result contains actual application output or configuration, rather than assuming that a familiar technical string means sensitive information has leaked.

Look beyond the organization’s website

Information about an organization can appear outside its own domain. A supplier might publish a case study, a recruitment platform might host a detailed vacancy, or a contractor might upload a presentation. OWASP includes information published through third-party services within the scope of search engine reconnaissance (OWASP: search engine reconnaissance).

For our fictional organization, a query might look like this:

"Example Services" "remote access" -site:example.com

This searches for the organization and topic while excluding its own domain. Review who published each result and whether it actually concerns the same organization.

If you have identified a distinctive document title, search for it elsewhere:

"Just An Example Services Remote Working Guide" -site:example.com

An exact-title search may locate a copy on a partner website or a reference in a public presentation. Compare the versions and publication context. Removing the original from your own website would not remove someone else’s copy.

You can also search for a hostname mentioned in the guide:

"access.example.com" -site:example.com

In this query, the hostname is a search term. You are looking for other sites mentioning it. A result might connect the portal to a supplier, an integration guide, or a public support discussion.

These connections are also useful to threat actors. MITRE ATT&CK documents search engine reconnaissance as T1593.002, including searches for network details and exposed credentials that may support later targeting: MITRE ATT&CK: Search Engines.

The Google Hacking Database (GHDB), maintained as part of Exploit-DB, provides a categorized collection of search queries designed to uncover potentially sensitive public information. It offers examples of how filenames, page titles, technical phrases, and other patterns can become useful search terms.

The Google Hacking Database showing search queries, categories, dates and authors
Google Hacking Database image.

For a defensive review, select patterns relevant to your environment and adapt them to your scope. Treat the database as a source of search ideas.

For example, you can translate GHDB entries into questions about what your organization exposes. The following queries adapt existing patterns to example.com. Choose the examples that match the technology you actually use.

Check whether diagnostic pages are publicly accessible. GHDB includes a pattern for finding PHP information pages. A scoped version is:

site:example.com inurl:info.php intext:"PHP Version" intitle:"phpinfo()"

You can broaden the search by removing the filename restriction:

site:example.com intitle:"phpinfo()" "PHP Version"

A real phpinfo() page can disclose software versions, loaded modules, configuration settings, and server paths. If one appears, establish whether it is a live diagnostic page or a published example. An operational diagnostic page left behind after troubleshooting is worth reviewing with the application owner.

Look for application logs that have become web content. One GHDB entry searches for log files associated with JBoss. Adapted to your domain, it becomes:

site:example.com inurl:jboss filetype:log

For a broader review, remove the product-specific term:

site:example.com filetype:log

If a result contains operational logs, inspect what they disclose. Depending on the application, this might include internal paths, account names, request details, or error messages.

Search for old configuration copies. GHDB also contains patterns targeting configuration files saved under alternative extensions. A simplified adaptation is:

site:example.com inurl:configuration filetype:bak
site:example.com inurl:configuration filetype:old
site:example.com inurl:configuration filetype:txt

These searches look for indexed files whose URLs contain configuration and whose file types match the specified extensions. They do not establish that the files contain secrets.

The defensive concern is that a configuration file copied or renamed during maintenance may be served differently from the original. If you find an operational copy containing sensitive settings, investigate both the exposed file and the deployment process that placed it there.

Check for published security-tool configurations. Another GHDB entry targets paths associated with Fail2ban configuration files:

site:example.com inurl:"/etc/fail2ban/" filetype:conf

This example is relevant when your organization uses Fail2ban or publishes system configuration material. Review whether a match is an intentional sample or an operational configuration accidentally included in a web-accessible directory

Sources