amass
amass copied to clipboard
Amass passive for subdomain discovery doesn't work as expected.
Hi !
Since release v4.0.3, amass doesn't work as expected when using passive mode only.
Amass passive
Get subdomains for tesla.com:
amass enum -passive -config ./config.yaml -dir /tmp -d tesla.com -o /tmp/out
Since latest release, amass alerts that output domains are no longer displayed, an that amass db must be used to extract them:
Passive mode does not generate output during the enumeration
Obtain your list of FQDNs using the following command:
amass db -names -d tesla.com
So i tried this command:
amass db -dir /tmp -names -d tesla.com
And got:
No names were discovered
Therefore, if i inspect the contents of amass.sqlite with Sqlite Browser, i can see that assets were correctly gathered.
Temporary workaround:
From now i am using this workaround to get the list of subdomains:
sqlite3 -readonly /tmp/amass.sqlite "select json_extract(content, '$.name') from assets where type='FQDN';" > /tmp/out
But of course, one would expect amass to be able to extract the domains by itself, i think it's a bug.
I have a few thoughts to share in response to your questions:
- Does your
config.yamlinclude anything that could be preventing amass from reaching your database? - I'm so happy to see you accessing the database directly using SQL, since we will eventually discontinue support for the
dbsubcommand and create separate tooling for obtaining/analyzing the collected data. - The names are printed as expected for me using v4.0.3 when
amasscan reach the database containing the collected information.
Same issue here (using Amass within Docker and native on MacOS) without setting -config. Currently the mentioned workaround seems to be the only way to extract the list of subdomains.
Personally, I would have your containerized Amass instances insert the discovered assets into a central PostgreSQL database that can be easily accessed during and after the enumeration process.
This is still an issue. I have had this exact issue for a while. I was told in the discord to update amass to current version and it is still an issue. It seems odd that there can't just be an option to output the data to stdout or a file in passive mode...