amass icon indicating copy to clipboard operation
amass copied to clipboard

SQLite database unusable: malformed database schema (idx_fqdn_content_name)

Open nil0x42 opened this issue 2 years ago • 5 comments

Hi ! I have not used amass for 3 weeks, so it might be related the the latest release v4.2.0 (which i am using now)

After running an amass scan, the resulting sqlite files seems invalid: sqlite3 -readonly amass.sqlite 'select * from assets'

Error: in prepare, malformed database schema (idx_fqdn_content_name) - near ">>": syntax error (11)

I also tried sqlitebrowser, and it cannot access the database too. I am using ubuntu 22.04 & sqlite3 v3.37.2

nil0x42 avatar Sep 26 '23 09:09 nil0x42

Update: I downgraded to v4.1.0, and this version works fine

nil0x42 avatar Sep 26 '23 11:09 nil0x42

Thanks for the report, including the versions of your dependencies! The amass 4.2 release will automatically create database indexes designed to improve query performance in situations where amass generates a significant number of findings. We found that as more data was written, performance could degrade in certain circumstances.

From discussion on Discord, we received similar reports from users who had v3.37.2 of SQLite. it appears that the syntax used in Amass 4.2 (specifically the ->>) to add the fqdn_content_name index is not compatible with sqlite3 less than v3.38.

SQL version 3.38 and higher support the use of -> and ->>.

rynmrtn avatar Sep 26 '23 20:09 rynmrtn

Thanks for the report, including the versions of your dependencies! The amass 4.2 release will automatically create database indexes designed to improve query performance in situations where amass generates a significant number of findings. We found that as more data was written, performance could degrade in certain circumstances.

From discussion on Discord, we received similar reports from users who had v3.37.2 of SQLite. it appears that the syntax used in Amass 4.2 (specifically the ->>) to add the fqdn_content_name index is not compatible with sqlite3 less than v3.38.

SQL version 3.38 and higher support the use of -> and ->>.

Any tips on upgrading sqlite to 3.38? Ubuntu 22.04 doesn't seem to think there are any upgrades available for it.

prisoner881 avatar Nov 23 '23 04:11 prisoner881

This is still an issue, as some distributions (like Mint) don't have newer version of sqlite3

nrathaus avatar Mar 12 '24 16:03 nrathaus

As well as ubuntu 22.04 :(

nil0x42 avatar Mar 29 '24 12:03 nil0x42