# Subdomain Discovery

## bbot

A recursive Internet scanner that will find information from various sources, such as Shodan, SecurityTrails, crt and many other solid data repositories.

* <https://github.com/blacklanternsecurity/bbot>

`bbot -t <Base_Domain> -f subdomain-enum | tee output.txt`

bbot can be messy. To clean up the output, use the following command:

`cat /root/.bbot/scans/{scan_name}/output.txt | grep -F '[DNS_NAME]'| awk '{print $2}'`

## SubreconGPT

Find more subdomains with GPT

* [https://github.com/jhaddix/SubreconGPT](<https://github.com/jhaddix/SubreconGPT >)

`chaos -d <URL> | python subrecongpt.py --apikey YOUR_OPENAI_API_KEY`

## Find subdomains in dmarc

Parse subdomains from dmarc.live

* <https://github.com/Tedixx/dmarc-subdomains>

`python dmarc-subdomains.py -domain <URL>`


---

# 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://wiki.pentestlist.com/offensive-security/external-infrastructure/discovery/subdomain-discovery.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.
