Top Banner
SESSION ID: #RSAC Travis Smith Dreaming of IoCs Adding Time Context to Threat Intelligence AIR-W04 Senior Security Research Engineer Tripwire, Inc. @MrTrav
53

Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

Mar 07, 2018

Download

Documents

phamhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

SESSION ID:

#RSAC

Travis Smith

Dreaming of IoCsAdding Time Context to Threat Intelligence

AIR-W04

Senior Security Research EngineerTripwire, Inc.@MrTrav

Page 2: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav2

THREAT INTELLongitude: -117.9190333Latitide: 33.8120584

Page 3: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

What is an Indicator of Compromise

3

An artifact observed on the network or operating system

Page 4: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Formats

4

Page 5: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

What Is Threat Intelligence

5

“Evidence-based knowledge, including context, mechanisms, indicators, implications and actionable advice about an existing or emerging menace or hazard to assets that can be used to inform decisions regarding the subject’s response to that menace or hazard.”

“Intelligence is information that has been analyzed and refined so that it is useful to policymakers in making decisions.”

Page 6: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

CTI Triad

6

Actionable

Page 7: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav7

THREAT INTELLongitude: -117.9190333Latitude: 33.8120584Culprit: Billy Two ToneAffiliations: SlingersVictims: ElderlyTactics: SlingshotTime: 1949

Page 8: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav8

THREAT INTELLongitude: -117.9190333Latitude: 33.8120584Culprit: Billy Two ToneAffiliations: SlingersVictims: ElderlyTactics: SlingshotTime: 1949

Page 9: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav9

Definition

Page 10: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

TAXII/STIX/CYBOX

10

Data Model• Package• Report• Campaign• Couse of Action• Exploit Target• Incident• Indicator• Threat Actor• TTP

http://stixproject.github.io/data-model/

Page 11: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Sharing is Caring

11

Threat Intelligence / Information SharingAggregators of data sources

Open Source

Sandbox SolutionsWalled Gardens

Closed Source

Page 12: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Aggregators

12

I know this is bad, do I see it?Search logs for hash/IP

I have something, is it bad?

Pros – proactive response

Cons – open source/free providers, questionable sanitization

Page 13: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Walled Gardens

13

I have something, tell me what you think of itFind a file, reference it

See an IP, reference it

Pros – Sanitized and timely data

Cons Can be expensive

Performance - lots of lookups

Page 14: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

Collective Intelligence Framework

Page 15: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Collective Intelligence Framework

15

http://csirtgadgets.org/collective-intelligence-framework

https://github.com/csirtgadgets/massive-octo-spice

Page 16: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Collective Intelligence Framework

16

RequirementsSmall: 16GB/8 cores/250GBLarge: 32GB/16 cores/500GBExtra Large: 64GB/32 cores/500GB

CIFv1 InstallationLots of dependencies, lots of effort

CIFv2 InstallationEasyButton!

Page 17: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Collective Intelligence Framework

17

cif --otype ipv4 --format csvMD5

URL

FQDN

cif --otype ipv4 --format csvCSV

JSON

Page 18: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

Logstash

Page 19: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Intro to Logstash

Page 20: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Intro to Logstash

20

INPUTS

FILTERS

OUTPUTS

FILE SYSLOG EVENTLOG STDIN 40+ More

GROK GEOIP TRANSLATE DATE 30+ More

ElasticSearch SYSLOG EMAIL STDOUT 50+ More

Page 21: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

21

Utilizing Custom Patterns

GROK Message Filtering

Adding Custom Fields

Date Match

Using Translations for Threat Intelligence

Page 22: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

22

filter { grok {

match => { "message" => "%{IP:client} %{WORD:method}

%{URIPATHPARAM:request} %{NUMBER:bytes} %{NUMBER:duration}" }

} }

Page 23: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

23

filter { grok {

patterns_dir => "/opt/logstash/custom_patterns"match => {

message => "%{123456}"}

} }

Page 24: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

24

Page 25: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Remove Capture Groups

Logstash Filtering

25

filter {if [message] =~ /^(([^,]+),([^,]+),([^,]+),([^,]+),...)/ {

grok { patterns_dir => "/opt/logstash/custom_patterns"match => {

message => "%{123456}"}

} }

}

(?<node_name>[^,]+),(?<node_type>[^,]+),(?<rule_name>[^,]+),(?<element_name>[^,]+),…

Page 26: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

26

filter { if [message] =~ /^(([^,]+),([^,]+),([^,]+),([^,]+),...)/ {

grok { patterns_dir => "/opt/logstash/custom_patterns"match => {

message => "%{291001}“} add_field => [ "rule_id", “123456" ]add_field => [ "Device Type", “FIM" ]add_field => [ "Object", “File" ]add_field => [ "Action", “Modified" ]add_field => [ "Status", “Success" ]

} }

}

Page 27: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

27

filter { ....all normalization code above here .... date {

match => [ "change_time", "M/d/YY h:m a" ]}

}

change_time: 3/2/16 10:20 AM

Page 28: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

28

filter { ....all normalization code above here….translate {

field => “md5"destination => “maliciousMD5"dictionary_path => /opt/logstash/maliciousMD5.yaml'

}}

• Logstash will check the YAML for updates every 300 seconds• Configurable by adding refresh_interval => numSeconds

Page 29: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Yet Another Python Script

29

cif –otype md5 --format csv

https://github.com/travisfsmith/iocdreaming

Page 30: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Intro to Logstash

30

INPUTS

FILTERS

OUTPUTS

FILE SYSLOG EVENTLOG STDIN 40+ More

GROK GEOIP TRANSLATE DATE 30+ More

ElasticSearch SYSLOG EMAIL STDOUT 50+ More

Page 31: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

31

Custom Fields:"Device Type" => "FIMDevice""Object" => "File""Action" => "Added""Status" => "Success"

Threat Intel Translations: "maliciousMD5" => "YES"

Date Matching: "change_time" => "3/2/16 10:20 AM""timestamp" => “2016-03-02T18:20:00.000Z"

Page 32: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Logstash Filtering

32

1. Collect intelligence feeds

2. Update security tools with intel

3. Monitor observable which doesn’t match any feed

4. Feeds updated with observable previously already inspected….

Page 33: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

TARDIS

Page 34: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

TARDIS

Threat Analysis, Reconnaissance, & Data Intelligence System

Historical Exploit/IOC Detection

Time Lord of Forensic Log Data

Available at: https://github.com/tripwire/tardis

Page 35: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Yet Another Python Script

35

cif –otype md5 --format csv

https://github.com/travisfsmith/iocdreaming

Page 36: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

TARDIS

36

https://github.com/Tripwire/tardis

Page 37: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

TARDIS

37

1. Collect intelligence feeds

2. Update security tools with intel

3. Monitor observable which doesn’t match any feed

4. Feeds updated with observable previously already inspected….

5. Search repository for observable

Page 38: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Architecture

maliciousMD5.yaml

Page 39: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

Kibana Reporting

39

Page 40: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Kibana

The ELK Stack

Search, Visualize, Dashboard

Zoom In & Out

Page 41: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Kibana Searches

41

Page 42: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav42

Page 43: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Kibana Visualizations

43

Page 44: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Area Chart

44

Page 45: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Line Chart

45

Page 46: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Pie Chart

46

Page 47: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Geo Location

47

Page 48: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Kibana Dashboard

48

Page 49: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav49

Page 50: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

Live Demo

50

Page 51: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Notable Resources

https://github.com/tripwire/tardis

https://github.com/travisfsmith/iocdreaming

http://www.elastic.co

http://csirtgadgets.org/collective-intelligence-framework/

Page 52: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

#RSAC

@MrTrav

Next Steps

52

0-3 MonthsIdentify Security Components

Which currently don’t integrate with Threat Intel?Which capture valuable observables?

3-6 MonthsIntegrate security tools with actionable threat intelligence

6+ MonthsFine tune workflows

Page 53: Dreaming of IoCs Adding Time Context to Threat Intelligence · PDF fileAdding Time Context to Threat Intelligence. ... Logstash Filtering. 21. ... Dreaming of IoCs Adding Time Context

SESSION ID:

#RSAC

Travis Smith

Dreaming of IoCsAdding Time Context to Threat Intelligence

AIR-W04

Senior Security Research EngineerTripwire, Inc.@MrTrav