Skip to content

Commit

Permalink
162 add docs for the new providers (#163)
Browse files Browse the repository at this point in the history
* feat: added docs for new providers
  • Loading branch information
VKotwicki authored Jul 21, 2023
1 parent a325e2d commit 87a1d43
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 12 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ providers:
> cloudflare - Scan multiple domains by fetching them from Cloudflare
> digitalocean - Scan multiple domains by fetching them from Digital Ocean
> file - Read domains from a file (or folder of files), one per line
> godaddy - Scan multiple domains by fetching them from GoDaddy
> googlecloud - Scan multiple domains by fetching them from Google Cloud. Requires GOOGLE_APPLICATION_CREDENTIALS environment variable.
> projectdiscovery - Scan multiple domains by fetching them from ProjectDiscovery
> securitytrails - Scan multiple domains by fetching them from Security Trails
> godaddy - Scan multiple domains by fetching them from GoDaddy
> single - Scan a single domain by providing a domain on the commandline
> zonetransfer - Scan multiple domains by fetching records via DNS zone transfer
positional arguments:
{aws,azure,bind,cloudflare,digitalocean,file,projectdiscovery,securitytrails,single,zonetransfer}
{aws,azure,bind,cloudflare,digitalocean,file,godaddy,googlecloud,projectdiscovery,securitytrails,single,zonetransfer}
options:
-h, --help Show this help message and exit
Expand Down Expand Up @@ -174,15 +175,6 @@ projectdiscovery:
--pd-domains PD_DOMAINS
Required
googlecloud:
Scan multiple domains by fetching them from Google Cloud
Requires user to already be authenticated.
--gc-api-key PD_API_KEY
Required
--gc-domains PD_DOMAINS
Required
godaddy:
Scan multiple domains by fetching them from GoDaddy
Expand All @@ -193,6 +185,20 @@ godaddy:
--gd-domains GD_DOMAINS
Optional
googlecloud:
Scan multiple domains by fetching them from Google Cloud. Requires GOOGLE_APPLICATION_CREDENTIALS environment variable.
--project-id PROJECT_ID
Required
projectdiscovery:
Scan multiple domains by fetching them from ProjectDiscovery
--pd-api-key PD_API_KEY
Required
--pd-domains PD_DOMAINS
Required
securitytrails:
Scan multiple domains by fetching them from Security Trails
Expand Down
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
- [BIND](bind.md)
- [CloudFlare](cloudflare.md)
- [Digital Ocean](digitalocean.md)
- [GoDaddy](godaddy.md)
- [Google Cloud](googlecloud.md)
- [SecurityTrails](securitytrails.md)
- [Project Discovery](projectdiscovery.md)
- [Zone Transfer](zonetransfer.md)
2 changes: 1 addition & 1 deletion docs/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ control panel (click API in the sidebar, or [here for a direct link](https://clo

The API key should be limited to read-only access.

The `--do-domains` option is used to limit the domains that are being scanned. Multiple can be provided by separating
The `--do-domains` option is used to limit the domains that are being scanned. Multiple domains can be provided by separating
each domain with a comma, eg:
`--do-domains first.domain.example,second.domain.example`
27 changes: 27 additions & 0 deletions docs/godaddy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# GoDaddy

## Description
The GoDaddy provider connects to the GoDaddy API and retrieves domains and records.

It can enumerate all available domains, or alternatively you can supply a comma-separated list of domains to limit
the scope to.

## Create a GoDaddy API Key and Secret
To get started creating an API Key and Secret,

1. Log in to your GoDaddy account
2. Navigate to `https://developer.godaddy.com/`
3. Select API Keys
4. Click the **Create New API key button**
5. Give the API Key a name (if required) and under `Environment`, select an appropriate option. If you are unsure, select `Production`
6. Make a note of the `API Key` and `API Secret`. **The secret is only viewable once, so make sure the note it down**

## Usage
The `--gd-api-key` option is used to provide your GoDaddy API Key. API keys are available from the GoDaddy
developer console ([click here for a direct link](https://developer.godaddy.com/keys)).

The `--gd-api-secret` option is used to provide your GoDaddy API Secret.

The `--gd-domains` option is used to limit the domains that are being scanned. Multiple domains can be provided by separating
each domain with a comma, eg:
`--gd-domains first.domain.example,second.domain.example`
79 changes: 79 additions & 0 deletions docs/googlecloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Google Cloud

## Description
The Google Cloud provider connects to Google Cloud and retrieves all records associated with a domain.

To enumerate a domain's subdomains, you need to provide a valid project ID and set the `GOOGLE_APPLICATION_CREDENTIALS` to your JSON credential file's full path.

## Create Google Cloud Private Key
To to get the Private key:

1. Navigate to https://cloud.google.com/ and select **Go to console**, or [click here](https://console.cloud.google.com/)
1. Make sure the correct project by checking the drop down at top left of the page. If the project needs to be changed, click the drop down and select the correct project from the popup
1. Select on `API & Services` under Quick Access
1. On the side bar, select `Enabled APIs & services`
1. At the top of the page, select **+ Enable APIs and Services**
1. In the search bar, search for `Cloud DNS API`, and select `Cloud DNS API`
1. On the `Cloud DNS API`, select **Enable**.
1. Then, on the `Cloud DNS API` page, select the `Credentials` tab
1. Below the `Credentials compatible with this API` section, go to `Service Accounts`, and click on the `Manage service accounts`
1. At the top of the page, select **+ Create Service Account**
1. Give the service a `Service account ID`
1. Click **Create and Continue**
1. Click the `Select a role` dropdown, scroll down to `DNS`, then select `DNS Reader`
1. Then, click **Done**
1. Back on the Service Account page, select the service account you just made
1. Select the `Keys` tab at the top
1. Click the `Add Key` dropdown and select `Create new key`
1. Ensure the type `JSON` is selected and click `Create`
1. This will download a JSON file to your computer, which can be moved to a suitable location
1. Copy down the full path of the credential file's location, including the file's name and extension
1. Save the file path to the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
a. On Linux or MacOS:
```
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/json/file.json"
```

b. On Windows:
Powershell
```
$ENV:GOOGLE_APPLICATION_CREDENTIALS="C:\\path\\to\\file\\file.json"
```

CMD
```
set GOOGLE_APPLICATION_CREDENTIALS="C:\\path\\to\\file\\file.json"
```

To get the project id:

1. Navigate to https://cloud.google.com/ and select **Go to console**, or [click here](https://console.cloud.google.com/)
2. The project idea will be shown on the `Welcome page`. If the correct project isn't selected, click on the dropdown at the top left of the page. From here, you can search for your project and copy the project id under the ID column.

## Usage
The `--project-id` option is used to provide your Google Cloud project's ID.

The `GOOGLE_APPLICATION_CREDENTIALS` is an environment variable used to tell DNSReaper the location of your JSON credential file.

## Docker Usage
To set up Google Cloud with docker, you will need to mount the JSON credential file.

To mount the file:
On Windows:
```
docker run -v C:\file\path\containing\credentials.json:/app/credentials.json
```
On Linux and MacOS
```
docker run -v /local/path/to/credentials.json:/app/credentials.json
```

To pass the environment variable:
```
-e GOOGLE_APPLICATION_CREDENTIALS='/app/credentials.json'
```

The full command would look like this:
```
docker run punksecurity/dnsreaper -v /local/path/to/credentials.json:/app/credentials.json -e GOOGLE_APPLICATION_CREDENTIALS='/app/credentials.json'
```
23 changes: 23 additions & 0 deletions docs/projectdiscovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Project Discovery

## Description
The Project Discovery provider connects to the Project Discovery API and retrieves subdomains associated with a domain.

To enumerate a domain's subdomains, you need to provide a valid API key.

## Acquire a Project Discovery API Key
To get a Project Discovery API Key,

1. Navigate to the [Project Discovery](https://projectdiscovery.io/) webpage
2. Scrolling down to the `Chaos` section
3. Click the **Request key** button
4. Complete the form
5. If they grant you access, an email containing your API key will be sent to your email.


## Usage
The `--pd-api-key` option is used to provide you Project Discovery API Key. An API keys can be acquired by visiting the Project Discovery webpage and requesting one.

The `--pd-domains` option is used to list the domains that are to be scanned. Multiple domains can be provided by separating each domain with a comma, e.g:

`--pd-domains first.domain.example,second.domain.example`

0 comments on commit 87a1d43

Please sign in to comment.