malware analysis on a shoestring budget

41
Malware Analysis on a shoe- string budget Michael Boman - Security Consultant/Researcher, Father of 5

Upload: michael-boman

Post on 09-Jun-2015

1.798 views

Category:

Technology


0 download

DESCRIPTION

How can you build a infrastructure using mainly free and open source software to analyze potential malicious code. How you can leverage free public services together with in-house systems to compete against expensive commercial solutions which makes it cost-prohibible for many researchers.

TRANSCRIPT

Page 1: Malware Analysis on a Shoestring Budget

Malware Analysis on a shoe-string budget

Michael Boman - Security Consultant/Researcher, Father of 5

Page 2: Malware Analysis on a Shoestring Budget

Why the strange hobby?

Page 3: Malware Analysis on a Shoestring Budget

The manual way

Start virtual environment

Start logging facilities

Execute sample

Stop logging facilities

Analyze logs

Page 4: Malware Analysis on a Shoestring Budget

Drawbacks •  Time consuming •  Boring in the long run

•  not all malware are created equal

Page 5: Malware Analysis on a Shoestring Budget

I don’t have time for this…

I need a (better) system!

Page 6: Malware Analysis on a Shoestring Budget

Choose any two….

Cheap

Fast Good

Page 7: Malware Analysis on a Shoestring Budget

Choose any two? Why not all of them?

I can do it cheaply (hardware and license cost-wise) - Human time not included. I can do it quickly (I spend up to 3 hours a day doing this, at average even less). An analysis is done in less then 5 minutes… I get pretty good results (quality). Where the system lacks I can compensate for its shortcomings.

Cheap

Fast Good

Page 8: Malware Analysis on a Shoestring Budget

Automate Engineer yourself out of the workflow

Automate everything!

Page 9: Malware Analysis on a Shoestring Budget

Birth of the MART Project

Malware Analyst Research Toolkit

Page 10: Malware Analysis on a Shoestring Budget

Components

Page 11: Malware Analysis on a Shoestring Budget
Page 12: Malware Analysis on a Shoestring Budget

Sample Acquisition •  Public & Private Collections

•  Clean MX •  Malware.lu •  Etc.

•  Exchange with other malware analysts

•  You know who you are •  Finding and collecting

malware yourself •  Download files from the web •  Grab attachments from email •  Feed BrowserSpider with links

from your SPAM-folder

Page 13: Malware Analysis on a Shoestring Budget

BrowserSpider •  Written in Python •  Using the Selenium framework to control REAL browsers

•  Flash, PDFs, Java applets etc. executes as per normal •  All the browser bugs exists for real

•  Spiders and follows all links seen

Page 14: Malware Analysis on a Shoestring Budget

Sample Analysis •  Cuckoo Sandbox •  VirusTotal

Page 15: Malware Analysis on a Shoestring Budget

DEMO: Submit sample for analysis

Page 16: Malware Analysis on a Shoestring Budget

A days work for a Cuckoo Fetch a task

Prepare the analysis

Launch analyzer in virtual machine

Execute an analysis package

Complete the analysis

Store the result

Process and create reports

Page 17: Malware Analysis on a Shoestring Budget
Page 18: Malware Analysis on a Shoestring Budget

Sample Reporting Results are stored in MongoDB (optional, highly recommended) Accessed using a analyst GUI

Page 19: Malware Analysis on a Shoestring Budget
Page 20: Malware Analysis on a Shoestring Budget
Page 21: Malware Analysis on a Shoestring Budget
Page 22: Malware Analysis on a Shoestring Budget

Data Mining

Page 23: Malware Analysis on a Shoestring Budget

Malware attribution Black Hat USA 2010: Greg Hoglund: Malware attribution and fingerprinting

Page 24: Malware Analysis on a Shoestring Budget

Where Virtual Machine analysis fails

And what to do about it

Page 25: Malware Analysis on a Shoestring Budget

Problems •  User-detection •  Sleeping malware •  Multi-stage attacks

Page 26: Malware Analysis on a Shoestring Budget

Problems •  VM or Sandbox detection •  The guest OS might not be

sufficient enough

Page 27: Malware Analysis on a Shoestring Budget

Iterating automatiation

Sort out clearly non-malicious and obviosly malicious

samples

Devide the samples into categories

Do brief static analysis

Known Good

Known Bad

Unknown

Page 28: Malware Analysis on a Shoestring Budget

Iterating automatiation

Sort out clearly non-malicious and obviosly malicious

samples

Devide the samples into categories

Do brief static analysis

•  Does not do anything •  Detects environment •  Encrypted segments •  Failed execution

Page 29: Malware Analysis on a Shoestring Budget

Iterating automatiation

Sort out clearly non-malicious and obviosly malicious

samples

Devide the samples into categories

Do brief static analysis

•  Run longer •  Envirnoment customization

Page 30: Malware Analysis on a Shoestring Budget
Page 31: Malware Analysis on a Shoestring Budget

Budget •  Computer: €520 •  MSDN License: €800 (€590 renewal) •  Year 1 (2012): €1320 •  Year N (2013…): €590 •  Money saved from stopped smoking (yearly): €2040

Page 32: Malware Analysis on a Shoestring Budget

Malware Lab

Page 33: Malware Analysis on a Shoestring Budget

MART Hardware (overview)

Page 34: Malware Analysis on a Shoestring Budget

MART Hardware (mounts)

Page 35: Malware Analysis on a Shoestring Budget

The need for speed •  Original setup couldn’t run more then 2 virtual machines

simultaneously •  Disk I/O couldn’t keep up

Page 36: Malware Analysis on a Shoestring Budget

MART Hardware (HDD) Transfer speed: 72-144 Mb/s Access time: 13.6 ms

Page 37: Malware Analysis on a Shoestring Budget

MART Hardware (SSD) Transfer speed: 270-280 Mb/s Access time: 0.2 ms Running 3-4 machines simultaneously

2x

68x

Page 38: Malware Analysis on a Shoestring Budget

Next steps 1.  Barebone on-the-iron malware

analysis 2.  Android platform support 3.  OSX platform support 4.  iOS patform support

Page 39: Malware Analysis on a Shoestring Budget

Existing barebone implementations •  BareBox

•  BareBox: Efficient Malware Analysis on Bare-Metal •  Dhilung Kirat, Giovanni Vigna, Christopher Kruegel •  ACSAC 2011 •  No code has been released

•  NVMTrace •  Entrapment: Tricking Malware with Transparent,

Scalable Malware Analysis •  Paul Royal •  Blackhat 2012 EUROPE •  Requires special hardware (Intelligent Platform

Management Interface [IPMI])

Page 40: Malware Analysis on a Shoestring Budget

Proof of Concept hardware

Arduino Duemilanove

Ethernet Shield

Prototype Shield

Arduino 4-Channel Relay Shield

300 SEK (€~30)

Page 41: Malware Analysis on a Shoestring Budget

Questions? Michael Boman

[email protected] http://michaelboman.org

@mboman

Michael Boman [email protected] http://www.2secure.se