ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Getting sample filetype numbers from the database on Malware Analysis Appliances


Article ID: 169039


Updated On:


Malware Analysis Software - MA



Login to the MA appliance via ssh using the g2 user.

sudo -s

Get mysql password
cat /root/
Creates a tab delimited output file (/tmp/sample_magic_types.txt) that can be viewed in excel for better readability:
echo "select magic, resource_magic.magic_id, count(*) as cnt from sample_resources inner join resource_magic on sample_resources.magic_id = resource_magic.magic_id group by resource_magic.magic_id order by cnt desc;" | mysql -p mag2_data > /tmp/sample_magic_types.txt