# Google Dorks

## Theory

Google dorking is a technique of using the Google search engine to search for vulnerabilities or to retrieve sensitive data. This technique relies on the results of the exploration and indexation of websites by the Googlebot. We can perform advanced search queries using various operators that allow us to reach our goal.

<figure><img src="/files/ZP7VgqdfwODzvCX86oJW" alt=""><figcaption></figcaption></figure>

## Practice

Here are some operators that might be useful

```bash
# Specify the filetype "pdf" and search the term "email address".
filetype:pdf "email address"

# Search all URLs containing the word "edu" and search the term "login" in the urls.
inurl:edu "login"

# Searches keywords contained in the page title.
intitle:pentesting

# Search the term "DB_USER" contained in the given site "github.com".
site:github.com "DB_USER"
site:github.com "DB_PASSWORD"

# Views cached content
cache:example.com
```

### Google Hacking Database (GHDB)

[The Google Hacking Database(GHDB)](https://www.exploit-db.com/google-hacking-database) is a database of search queries (dorks) used to find sensitive publicly available information or vulnerabilities. This is hosted by [exploit-db](https://www.exploit-db.com/)

### Useful dorks

{% tabs %}
{% tab title="Subdomains" %}
You can use this google dorks to enum subdomains of a website

```bash
#Search for subdomains 
site:*.domain.com

#Search for subdomains with 'admin' in title
site:*.domain.com intitle:admin
```

{% endtab %}

{% tab title="Directory Listing" %}
You can use this google dorks to enum websites with directory listing enabled

```bash
intitle:"Directory Listing For"
intitle:"index of"
```

{% endtab %}
{% endtabs %}

## Ressource

{% embed url="<https://www.exploit-db.com/google-hacking-database>" %}

{% embed url="<https://exploit-notes.hdks.org/exploit/reconnaissance/google-dorks/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://red.infiltr8.io/redteam/recon/google-dorks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
