autopsy icon indicating copy to clipboard operation
autopsy copied to clipboard

Hash Set

Open ben4361 opened this issue 8 years ago • 7 comments

How do I create a hash set to use in future investigations from a master image?

ben4361 avatar Aug 08 '18 16:08 ben4361

The Autopsy report generation capability allows you export the MD5 hashes of tagged files to a hash set that can be used for hash lookup during subsequent ingests of other data sources. It is also possible to add individual file hashes to a hash set using the context (right click) menu in the results view (upper right). Finally, you can create hash sets via Tools => Options => Hash Sets => New Hash Set and then push the Add Hashes to Hash Set button to copy and paste in hashes.

If by create a hash set from a master image you mean push a button and add every file in the image to the hash set, there is currently no such button. However, if you are indeed looking to make a hash set of all the files in an image, and if the image is small or you are very patient and determined, you could perhaps work through all of the files in the image, multi-selecting in the results view and using the context menu item Add Files to Hash Set described above to build up the hash set.

rcordovano avatar Aug 08 '18 21:08 rcordovano

Here's one more idea, if you have the ability and inclination to write a file ingest module in either Python or Java...

The module could create a hash set during start up, and as each file in the master image passed through the module, your implementation of the process method could add the hash to the hash set.

If you are interested in this, we could take a look at the available APIs, or at the very least the simple schema of the SQLite hash set databases that Autopsy can use for hash lookup.

rcordovano avatar Aug 08 '18 21:08 rcordovano

Another option - download the Sleuth Kit (if you don't have it already) so you can use its command line tools.

http://sleuthkit.org/sleuthkit/

Then you can run tsk_gettimes.exe with the -m option to produce a body file with the MD5 hashes.

$ ./tsk_gettimes.exe -m cr_test3.vhd
370c7502c76a41a25fdec1306d5d03e4|vol2/web folders/Firefox/cookies.sqlite ($FILE_NAME)|44-48-2|r/rrwxrwxrwx|0|0|94|1498759172|1498759172|1498759172|1498759172
370c7502c76a41a25fdec1306d5d03e4|vol2/web folders/Firefox/cookies.sqlite|44-128-1|r/rrwxrwxrwx|0|0|524288|1498759172|1497980443|1498759172|1498759172
3188383914b4bfc7a8d660253a8b445c|vol2/web folders/Firefox/places.sqlite ($FILE_NAME)|45-48-2|r/rrwxrwxrwx|0|0|92|1498759172|1498759172|1498759172|1498759172
3188383914b4bfc7a8d660253a8b445c|vol2/web folders/Firefox/places.sqlite|45-128-1|r/rrwxrwxrwx|0|0|10485760|1498759172|1497979995|1498759172|1498759172
...

You'll need to get that into a slightly different form to import into Autopsy. First replace all '|' characters with spaces. Then it appears that there's a small bug in our indexing, so you'll need to manually delete any row with an all-zero hash. For example, this line would need to be deleted:

00000000000000000000000000000000 vol2/$Extend/$ObjId ($FILE_NAME) 25-48-1 r/rr-xr-xr-x 0 0 78 1498759153 1498759153 1498759153 1498759153

Now you can import your hash list into Autopsy. http://sleuthkit.org/autopsy/docs/user-docs/4.8.0/hash_db_page.html#adding_hashsets

APriestman avatar Aug 09 '18 12:08 APriestman

tsk_hdb_open error determining hash database type e:\hashlist.txt

ben4361 avatar Aug 09 '18 18:08 ben4361

Got it thank you

ben4361 avatar Aug 09 '18 18:08 ben4361

If you still need the ability to create a hashset from a datasource that you have already calculated the hashs for you can try this Autopsy Python plugin. https://github.com/markmckinnon/Autopsy-Plugins/tree/master/Create_Datasource_Hashset It will create a text file of the md5 hashs and filename that can then be imported into the hashsets. The file to import will be in the export directory of the case with the datasource name _hashset.txt. If you have any questions let me know.

markmckinnon avatar Feb 07 '19 18:02 markmckinnon

Closing as answered. If this is still an issue feel free to reopen.

markmckinnon avatar Dec 13 '22 15:12 markmckinnon