Interacting with Amass Database (with examples)
1: Listing all performed enumerations in the database
The -list
option in the amass db
command allows you to list all the performed enumerations present in the database directory. This is helpful to keep track of your enumeration history and easily access the results.
Code:
amass db -dir path/to/database_directory -list
Motivation: By listing all the performed enumerations, you can quickly see the previous scans you have conducted and choose the appropriate one for further analysis or review.
Explanation:
-dir path/to/database_directory
: Specifies the directory path where the Amass database is located.-list
: This option tells Amass to list all the performed enumerations in the database.
Example Output:
1. Example Enum 1
2. Example Enum 2
3. Example Enum 3
2: Showing results for a specified enumeration index and domain name
The -show
option in the amass db
command allows you to display the results for a specified enumeration index and domain name. This is useful when you want to review the findings of a specific enumeration.
Code:
amass db -dir path/to/database_directory -d domain_name -enum index_from_list -show
Motivation:
When you have a large number of performed enumerations, it can be time-consuming to manually search for the results of a specific enumeration. Using the -show
option, you can easily retrieve the results for the desired enumeration index and domain name.
Explanation:
-dir path/to/database_directory
: Specifies the directory path where the Amass database is located.-d domain_name
: Specifies the target domain name for which you want to retrieve the results.-enum index_from_list
: Specifies the index number of the enumeration from the previously listed enumerations.-show
: This option tells Amass to display the results for the specified enumeration.
Example Output:
Results for enumeration: Example Enum 1
Subdomain: subdomain1.example.com
Subdomain: subdomain2.example.com
3: Listing all found subdomains of a domain within an enumeration
The -names
option in the amass db
command allows you to list all the found subdomains of a specific domain within an enumeration. This is beneficial when you want to quickly view the subdomains discovered during the enumeration process.
Code:
amass db -dir path/to/database_directory -d domain_name -enum index_from_list -names
Motivation: Listing all the found subdomains helps verify the success of the enumeration and also enables further investigation or testing of specific subdomains.
Explanation:
-dir path/to/database_directory
: Specifies the directory path where the Amass database is located.-d domain_name
: Specifies the target domain name for which you want to list the subdomains.-enum index_from_list
: Specifies the index number of the enumeration from the previously listed enumerations.-names
: This option tells Amass to list all the found subdomains for the specified domain within the enumeration.
Example Output:
Found subdomains for enumeration: Example Enum 1
subdomain1.example.com
subdomain2.example.com
subdomain3.example.com
4: Showing a summary of the found subdomains within an enumeration
The -summary
option in the amass db
command allows you to display a summary of the found subdomains within a specific enumeration. This summary includes the total count of subdomains discovered.
Code:
amass db -dir path/to/database_directory -d domain_name -enum index_from_list -summary
Motivation: Obtaining a summary of the found subdomains provides a quick overview of the enumeration’s effectiveness and can aid in identifying any potential patterns or trends.
Explanation:
-dir path/to/database_directory
: Specifies the directory path where the Amass database is located.-d domain_name
: Specifies the target domain name for which you want to retrieve the summary.-enum index_from_list
: Specifies the index number of the enumeration from the previously listed enumerations.-summary
: This option tells Amass to display a summary of the found subdomains for the specified enumeration.
Example Output:
Summary for enumeration: Example Enum 1
Total subdomains found: 3