32
What Will You Investigate Today? RMLL 2013 - Xavier Mertens - Brussels

What Will You Investigate Today?

Embed Size (px)

Citation preview

Page 1: What Will You Investigate Today?

What Will You Investigate Today?

RMLL 2013 - Xavier Mertens - Brussels

Page 2: What Will You Investigate Today?

TrueSec

$ whoami

• Xavier Mertens (@xme)

• Consultant @ day

• Blogger @ night

• BruCON co-organizer2

Page 3: What Will You Investigate Today?

TrueSec

$ cat disclaimer.txt

“The opinions expressed in this presentation are those of the speaker and do not necessarily reflect those of past, present employers, partners or customers.”

3

Page 4: What Will You Investigate Today?

TrueSec

Agenda

• Introduction

• Interesting protocols

• Public resources

• Toolbox

4

Page 5: What Will You Investigate Today?

TrueSec

Feeling This?

5

Page 6: What Will You Investigate Today?

TrueSec

Me? Breached?

6

• In 66% of investigated incidents, detection was a matter of months or even more

• 69% of data breaches are discovered by third parties

(Source: Verizon DBIR 2012)

Page 7: What Will You Investigate Today?

TrueSec

“Grepping” for Gold

7

• Tracking users

• Suspicious traffic

• Out-of-business

• Compliance

• Exfiltration

• “Below the radar”

Page 8: What Will You Investigate Today?

TrueSec

Sources

8

• OS / Applications Events

• Network protection(FW, ID(P)S, Proxies, etc)

• Users Credentials

• IP, Domains, URLs

• Digests (MD5, SHA1)

• Metadata

Page 9: What Will You Investigate Today?

TrueSec

Multiple Sources

• Automatic (logfiles, events)

• Online repositories

• Internal resources

• Developers!

9

Page 10: What Will You Investigate Today?

TrueSec

“Active” Lists

10

• Temporary or suspicious information to track and dynamically updated

• Examples:Contractors, Admins, Terminated Accounts, Countries (GeoIP)

• If grep(/$USER/, @ADMINS) { ... }

Page 11: What Will You Investigate Today?

TrueSec

Correlation

11

YourRecipes

Evidences

Page 12: What Will You Investigate Today?

TrueSec

Visibility!

12

Page 13: What Will You Investigate Today?

TrueSec

Agenda

• Introduction

• Interesting protocols

• Public resources

• Toolbox

13

Page 14: What Will You Investigate Today?

TrueSec

DNS

• No DNS, no Internet!

• Can help to detect data exfiltration, communications with C&C (malwares)

• Alert on any traffic to untrusted DNS

• Allow only local DNS as resolvers

• Investigate for suspicious domains

14

Page 15: What Will You Investigate Today?

TrueSec

HTTP

• HTTP is the new TCP

• Investigate for suspicious domains

• Inspect HTTPS (Check with your legal dept!)

• Search for interesting hashes

15

Page 16: What Will You Investigate Today?

TrueSec

SMTP

• Track outgoing emails

• Investigate for suspicious domains

16

Page 17: What Will You Investigate Today?

TrueSec

Netflow

• Analyze network flows

• Src Port

• Src IP

• Dst Port

• Dst IP

• Timestamp

17

Page 18: What Will You Investigate Today?

TrueSec

Agenda

• Introduction

• Interesting protocols

• Public resources

• Toolbox

18

Page 19: What Will You Investigate Today?

TrueSec

IP Addresses

• http://www.malwaredomainlist.com/hostslist/ip.txt

• Correlate your firewall logs

• GeoIP

19

Page 20: What Will You Investigate Today?

TrueSec

Domains

• DNS-BH (malwaredomains.com)http://mirror1.malwaredomains.com/files/domains.txt

http://mirror1.malwaredomains.com/files/spywaredomains.zoneshttp://www.malwaredomainlist.com/hostslist/hosts.txt

• Correlate your resolver logs

20

Page 21: What Will You Investigate Today?

TrueSec

URLs

• http://malwareurls.joxeankoret.com/normal.txt

• Google SafeBrowsinguse Net::Google::SafeBrowsing2;use Net::Google::SafeBrowsing2:::Sqlite;my gsb = Net::Google::SafeBrowsing2->new(key => “xxx”,storage => Net::Google::SafeBrowsing2::Sqlite->new(file => “google.db”));$gsb->update();my $match = $gsb->lookup(url => “http://evil.com”);if ($match eq MALWARE) { ... }

21

Page 22: What Will You Investigate Today?

TrueSec

$ cat disclaimer2.txt

22

“Data are provided for ‘free’ but the right to us can be restricted to specific conditions (ex: cannot be re-used for commercial applications). Always read carefull the terms of use. Some services require prior registration and use of APIs”

Page 23: What Will You Investigate Today?

TrueSec

OSINT“Set of techniques to conduct regular reviews and/or continuous monitoring over multiple sources, including search engines, social networks, blogs, comments, underground forums, blacklists/whitelistsand so on. “

23

Page 24: What Will You Investigate Today?

TrueSec

OSINT

24

• Think “out of the box”!

• What identify you on the Internet?

• Domain names

• IP addresses

• Brand

Page 25: What Will You Investigate Today?

TrueSec

Agenda

• Introduction

• Interesting protocols

• Public resources

• Toolbox

25

Page 26: What Will You Investigate Today?

TrueSec

pastebin.com• A gold mine for exfiltrated data!

• Tool: pastemon.pl

• https://github.com/xme/pastemon

26

Page 27: What Will You Investigate Today?

TrueSec

Data Parsers

• d3.js Javascript library

• Example of implementation: malcom(Malware Communications Analyzer)

• https://github.com/tomchop/malcom

27

Page 28: What Will You Investigate Today?

TrueSec

Data Parser

28

Page 29: What Will You Investigate Today?

TrueSec

The Conductor

• OSSEC

• Log Management

• Active-Response

• Powerful alerts engine

29

Page 30: What Will You Investigate Today?

TrueSec

Online Tools• http://urlquery.net

• http://www.scumware.org/index.scumware

• http://bgpranking.circl.lu/

• https://malwr.com/

• http://www.informatica64.com/foca.aspx

• http://virustotal.com

30

Page 31: What Will You Investigate Today?

TrueSec

Conclusions

• Know your environment

• You have plenty of useful (big)data

• Free software can help you (but the project is not free)

31

Page 32: What Will You Investigate Today?

TrueSec

Questions?

@xme

[email protected]

http://blog.rootshell.be

https://www.truesec.be

32