48
1

Razorback slides-1.1

Embed Size (px)

Citation preview

Page 1: Razorback slides-1.1

1

Page 2: Razorback slides-1.1

OverviewWhat is Razorback?

Page 3: Razorback slides-1.1

3

Razorback Is…

● An Open Source framework (GPLv2) to enable advanced processing of data and detection of events

● Able to get data as it traverses the network● Able to get data after it’s received by a server● Able to perform advanced event correlation

● …Our answer to an evolving threat landscape

Page 4: Razorback slides-1.1

4

The Challenge is Different

● Attacks have switched from server attacks to client attacks

● Common attack vectors are easily obfuscated▸ Scripting languages are infinitely variable▸ Compression obscures attack signatures▸ And more!

● File formats are made by insane people● Back-channel systems are increasingly difficult

to detect

Page 5: Razorback slides-1.1

5

The Problem With Real-Time

● Inline systems must emulate the processing of thousands of desktops

● Detection of many backchannels is most successful with statistical evaluation of network traffic

● Deep file inspection requires too much time to process!

Page 6: Razorback slides-1.1

6

Fill the Gap

● A system is needed that can handle varied detection needs

● A system is needed that extensible, open and scalable

● A system is needed that facilitates incident response, not just triggers it

Page 7: Razorback slides-1.1

ArchitectureWhat makes it tick?

Page 8: Razorback slides-1.1

8

Framework Goals

Provide entry for any arbitrary data type Provide routing of input data to any number of

relevant data processors Provide alerting to any framework-capable

system Provide verbose, detailed logging Make intelligent use of all data

Page 9: Razorback slides-1.1

9

Razorback is comprised of…

● A collection of elements working together● Each element performs a discrete task● Elements are tied together via the Dispatcher● Nugget types:

Correlation Defense Update Workstation

Data Collection Data Detection/Analysis Output Intelligence

Page 10: Razorback slides-1.1

10

The System

Dispatcher

Collection Nugget Detection

NuggetDetection NuggetDetection

Nuggets

Database

Output NuggetOutput Nugget

Output Nuggets

Collection NuggetCollection

Nuggets

Other Types of Nuggets

Page 11: Razorback slides-1.1

11

The Dispatcher

Handles all communication between nuggets Handles database interactions Database driven APIs are available for easy nugget

development

Page 12: Razorback slides-1.1

12

Database

● Configuration information● Event information● Contextual information● Metadata● Provides a wealth of information for correlating

events and activities

Page 13: Razorback slides-1.1

13

General Nugget Functionality

● Dispatcher Registration▸ Types of data handled▸ Types of output generated

● UUIDs▸ Identifier of nuggets▸ Type of nugget▸ Types of data handled and/or provided▸ Allows for easy addition and removal of elements

Page 14: Razorback slides-1.1

14

Collection Nugget

● Capture data▸ From the network▸ From a network device directly▸ From log files

● Contact dispatcher for handling▸ Has this data been evaluated before?▸ Send the data to the Dispatcher

Page 15: Razorback slides-1.1

15

Detection Nugget

● Handles incoming data from Collection Nuggets● Splits incoming data into logical sub-blocks

▸ Requests additional processing of sub-blocks

● Provides alerting feedback to the Dispatcher

Page 16: Razorback slides-1.1

16

Output Nugget

● Receives alert notification from Dispatcher● If alert is of a handled type, additional

information is requested:▸ Short Data▸ Long Data▸ Complete Data Block▸ Normalized Data Block

● Sends output data to relevant system

Page 17: Razorback slides-1.1

17

Intelligence Nugget

● Does not generate “alerts” per se● Generates data that could potentially be used

later for trending or event correlation

Page 18: Razorback slides-1.1

18

Correlation Nugget

● Interacts with the database directly● Provides ability to:

▸ Detect trending data▸ Identify “hosts of interest”▸ Track intrusions through the network▸ Initiate defense updates

Page 19: Razorback slides-1.1

19

Defense Update Nugget

● Receives update instructions from dispatcher● Performs dynamic updates of network

device(s)● Update multiple devices● Update multiple devices of different types!● Notifies dispatcher of defense update actions

Page 20: Razorback slides-1.1

20

Workstation Nugget

● Authenticates on a per-analyst basis● Provides analyst with ability to:

▸ Manage nugget components▸ Manage alerts and events

● Consolidate events● Add custom notes● Set review flags● Delete events

▸ Review system logs

Page 21: Razorback slides-1.1

Concept of OperationsHow do they work together?

Page 22: Razorback slides-1.1

22

Registration Phase

● Nuggets are brought online● Nuggets register with the dispatcher:

▸ Their existence ▸ The data types they handle▸ How many threads they can run at once

● Dispatcher tracks via routing table● Dispatcher hands back a unique “nugget id”

Page 23: Razorback slides-1.1

23

Hi! I exist!

Dispatcher

Detection Nugget

Detection Nugget

Collection Nugget

Output Nugget

registerNugget()

registerNugget()

registerNugget()

registerNugget()

Page 24: Razorback slides-1.1

24

Traffic comes in…

Data Collector

Dispatcher

DatabaseWeb traffic

SMTP traffic

API

Query DatabaseLocal Cache

Check cache

Data/Metadata

Threads out

COLLECTOR1

2

3 4

5

6

Page 25: Razorback slides-1.1

25

Dispatcher farms out detection…

Dispatcher

Detection Nugget

Javascript Analysis

PDF Analysis

Database

Alert/Event data

Collected data

Detection resultsEmbedded sub-component data

Embedded sub-component dataDetection results

1

2

4

3Detection Nugget

Page 26: Razorback slides-1.1

26

Output nuggets are informed…

Dispatcher

Output Nugget

Output Nugget

“I come bearing gifts”

“I come bearing gifts”

“No, thanks”

“Yes, please!”Delicious Alert Data

Page 27: Razorback slides-1.1

27

Cache

● We want to avoid reprocessing files and sub-components we’ve already looked at

● MD5 and size are stored for files and subcomponents both bad and good

● But, after an update to any detection nugget, all known-good entries are thereby declared “tainted”

Page 28: Razorback slides-1.1

28

Why Taint known good?

● Why taint known good?▸ Previously analyzed files may be found to be bad

● Why not just remove those entries?▸ We don’t want to rescan all files▸ If we see an alert for a previously scanned file

matching the same MD5 and size, we can alert retroactively

Page 29: Razorback slides-1.1

Case Study: SMTPWhat happens when an email is received?

Page 30: Razorback slides-1.1

30

Handling SMTP Traffic

● A PDF with a malicious embedded EXE is attached to an email

● How does the system work to tell us about this malicious attachment?

● Components in use● Track the data

Page 31: Razorback slides-1.1

Current CapabilitiesNuggets that are currently available. Many more to come, and you can help!

Page 32: Razorback slides-1.1

32

● Snort-as-a-Collector (SaaC)▸ SMTP mail stream capture▸ Web capture▸ DNS capture

● Custom post-mortem debugger▸ Traps applications as they crash▸ Sends the file that triggered the crash to Dispatcher▸ Sends the metadata of the crash to the Dispatcher

Collection Nuggets

Page 33: Razorback slides-1.1

33

Detection Nuggets

● Zynamics PDF Dissector▸ Deobfuscation and normalization of objects▸ Target known JavaScript attacks

● JavaScript Analyzer (w/ Zynamics)▸ Search for shellcode in unescaped blocks▸ Look for heap spray▸ Look for obvious obfuscation possibilities

www.zynamics.com/dissector.html

Page 34: Razorback slides-1.1

34

Detection Nuggets (cont’d…)

● Shellcode Analyzer (w/ libemu)▸ Detection and execution of shellcode▸ Look for code blocks that unwrap shellcode▸ Win32 api hooking

● Determine the function call● Capture the arguments

▸ Provide alerts that include shellcode action

libemu.carnivore.it

Page 35: Razorback slides-1.1

35

Detection Nuggets (cont’d…)

● Office Cat Nugget▸ Full Office file parsing ▸ Vuln-centric detection against known threats

● SWF Nugget▸ Decompresses and analyzes flash▸ Detects known flash threats

Page 36: Razorback slides-1.1

36

Detection Nuggets (cont’d…)

● ClamAV Nugget▸ Analyze any format▸ Signature- and pattern-based detection▸ Updatable signature DB▸ Can further serve as a collector ▸ Can issue defense updates

Page 37: Razorback slides-1.1

37

Output Nuggets

● Deep Alerting System▸ Provide full logging output of all alerts▸ Write out each component block▸ Include normalized view of documents as well

● Maltego Interface▸ Provide data transformations targeting the

Razorback database

www.paterva.com

Page 38: Razorback slides-1.1

38

Workstation Nuggets

● CLI functionality to query:▸ Alerts, events, and incidents▸ Nugget status▸ Display metadata▸ Run standardized report set

Page 39: Razorback slides-1.1

Programming InterfacesHow are nuggets created?

Page 40: Razorback slides-1.1

40

Custom API

● API provided for easy creation of nuggets● The API provides functionality for:

▸ Registering a new nugget▸ Sending and receiving data▸ Cache and database interaction

● Threading is handled automagically!

Page 41: Razorback slides-1.1

41

General Functions

● registerNugget()▸ Type of nugget▸ Type(s) of data handled▸ Connection information

● registerHandler()▸ Specifies handler function▸ Type(s) of data handled for that function▸ Can register multiple handlers per nugget

Page 42: Razorback slides-1.1

42

Collection and Detection Nuggets

● sendData()▸ Sends captured data to the dispatcher

● sendMetaData()▸ Adds any additional information about the collected

or parsed data

● sendAlert()▸ Specific alert data to be sent to Output Nuggets

Page 43: Razorback slides-1.1

43

Intelligence Nuggets

● Functions provide access to modify database● Types of Intelligence Nuggets supported:

▸ Email▸ Web▸ DNS

● Easy to add new protocols▸ Create database schema▸ Provide function for accessing that schema

Page 44: Razorback slides-1.1

44

What if I don’t like C?

● Nuggets can be written in any language● Wrappers providing interfaces to the API

functions are provided▸ Ruby▸ Python▸ Perl▸ If you can wrap C, you can create an API

Page 45: Razorback slides-1.1

ConclusionLet’s wrap this up!

Page 46: Razorback slides-1.1

46

Razorback Framework…

● Extensible. Open. Modular.● All functions are separated and distributed● Core is written in C, APIs available for other

languages as well● Limitless possibilities!

Page 47: Razorback slides-1.1

47

This is great! How can I help?

● See a need for a nugget? Write one and send it in!

● Full source code available on Sourceforge▸ http://sourceforge.net/projects/razorbacktm▸ http://sourceforge.net/projects/nuggetfarm

● Bug tracking via Sourceforge Trac

Page 48: Razorback slides-1.1

48

Questions??

● Patrick Mullen▸ [email protected]▸ phoogazi on Twitter

● Ryan Pentney▸ [email protected]

● Sourcefire VRT▸ labs.snort.org▸ vrt-sourcefire.blogspot.com▸ VRT_Sourcefire on Twitter

Razorback Team:Alex KambisAlex KirkAlain ZidouembaChristopher McBeeKevin MiklavcicLurene GrenierMatt OlneyMatt WatchinskiNigel HoughtonPatrick MullenRyan PentneySojeong Hong