+ All Categories
Home > Documents > Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned....

Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned....

Date post: 13-Jun-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
60
Killing RATs with an Incident Response Framework Robinson Delaugerre Adrien Chevalier
Transcript
Page 1: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Killing RATs

with an Incident Response Framework

Robinson Delaugerre Adrien Chevalier

Page 2: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Introduction

Robinson

@Rob_OEM

Adrien

@00_ach

May 17th 2013 NoSuchCon 2

IT Security consultants @Conix_Security

IT Forensics and Incident response

(among other things)

Pretty cool guys (according to our

Page 3: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Introduction

Robinson

@Rob_OEM

Adrien

@00_ach

May 17th 2013 NoSuchCon 3

Page 4: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

forget

First ti[m]e speaking, please be gentle

May 17th 2013 NoSuchCon 4

Page 5: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

IT Forensics

Study of traces of activity left on computer systems and infrastructure

May 17th 2013 NoSuchCon 5

Page 6: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

IT Forensics

Retrieval of traces erased by malicious

May 17th 2013 NoSuchCon 6

Page 7: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

Fuck it, do it live!

May 17th 2013 NoSuchCon 7

Page 8: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

May 17th 2013 NoSuchCon 8

Page 9: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

May 17th 2013 NoSuchCon 9

Page 10: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

The attackers are already there

We just got here

They might know the lay of the land better than we do

Our job is to do damage control, to buy time for the defense.

May 17th 2013 NoSuchCon 10

Page 11: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Interlude

WTF? We talked about yet!

May 17th 2013 NoSuchCon 11

Page 12: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

APT?

May 17th 2013 NoSuchCon 12

Page 13: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

APT?

What happens when a large company gets pwned.

Somehow involves China

With BYOD, IPv6, and Cloud, they are the four Horsemen of the Apocalypse.

Definitely, at least somehow involves China or persons of the Chinese persuasion.

May 17th 2013 NoSuchCon 13

Page 14: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

APTs

awesome .rar cannon!

May 17th 2013 NoSuchCon 14

Page 15: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Targeted attacks

A what, not a who

The end-goal is to get deep into the network, extract information, and maybe stay there for a long while.

What you get when you have a dedicated human attacker, not a bot or a virus.

Basically, a huge, infrastructure-scale and thorough, unwanted pentest.

May 17th 2013 NoSuchCon 15

Page 16: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

End of the interlude

And no more talk about APTs or funny slides after this point

May 17th 2013 NoSuchCon 16

Page 17: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Quote

May 17th 2013 NoSuchCon 17

are our enemies? Who are our friends? This is a

question of the first

--Sun Tzu

Page 18: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Attacker methodology

May 17th 2013 NoSuchCon 18

Page 19: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Attacker methodology

May 17th 2013 NoSuchCon 19

Planning and recon

Intrusion Privilege

escalation Perimeter expansion

Search for valuable assets

Asset exploitation

Post-Exploitation

Interaction with

the victim

Page 20: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Attacker methodology

Complex, targeted attacks

Horizontal and vertical movements

Frequent human intervention

Need for a complex and versatile tool to remotely pilot the attack

what RATs are for!

May 17th 2013 NoSuchCon 20

Page 21: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Defense methodologies

May 17th 2013 NoSuchCon 21

Page 22: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Defense methodologies

May 17th 2013 NoSuchCon 22

Detection Compromised

perimeter evaluation

Valuable assets

identification

Remediation planning

Response Remediation Post-incident

forensics Normal

operations

Interaction with

the attacker

Page 23: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

All together

May 17th 2013 NoSuchCon 23

Planning and recon Intrusion

Privilege escalation

Perimeter expansion

Search for valuable assets

Asset exploitation

Post-Exploitation

Detection Compromised

perimeter evaluation

Valuable assets

identification

Remediation planning

Response Remediation Post-incident

forensics Normal

operations

Victim’s danger zone

Attacker’s incertitude zone

Victim’s incertitude zone

Attacker’s comfort zone

Victim’s safe zone

Attacker/victim

interaction

Victim/Attacker

interaction

timeline

Victim wants to minimize this

Attacker wants to maximize this

Page 24: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

All together

May 17th 2013 NoSuchCon 24

Planning and recon Intrusion

Privilege escalation

Perimeter expansion

Search for valuable assets

Asset exploitation

Post-Exploitation

Detection Compromised

perimeter evaluation

Valuable assets identification

Remediation planning

Response Remediation Post-incident

forensics Normal

operations

Attacker/victim

interaction

Remediation cost

Victim/Attacker

interaction

timeline

Page 25: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

Very complex process, varies from org to org, attack to attack

Surveillance across the whole perimeter

Assesment of compromized assets

Traceablity

May 17th 2013 NoSuchCon 25

Page 26: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Incident response

The Arsenic Framework

May 17th 2013 NoSuchCon 26

Page 27: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Quote

May 17th 2013 NoSuchCon 27

complicated and are decided by many factors. We should

look at problems from different aspects, not from just

--Sun Tzu

Page 28: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

3 pillars of incident response

Network Analysis

Host Forensics

Reverse Engineering

May 17th 2013 NoSuchCon 28

Page 29: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

The Arsenic Framework

Aims to bring together all three pillars

Shared, modular workspace, where each discipline can express its skills

A central place for all the tools needed

An open-source sharing place

May 17th 2013 NoSuchCon 29

Page 30: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

The Arsenic Framework

Network traffic signatures

Compromised host analysis

Network traffic dissection

May 17th 2013 NoSuchCon 30

Page 31: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Network traffic signatures

Network traffic reconstruction and dissection

Known protocols (HTTP, DNS) out of the box

• httprequest[:requesturi]

• httpresponse[:headers][:content-type]

• dnsresponse[:ttl]

« session-state » to build protocol-based signatures

May 17th 2013 NoSuchCon 31

Page 32: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Network traffic signatures

Packet or frame-based signatures

• Straight-out Snort signatures

• 60% of the time, it works all the time

Behavioral or protocol based signatures

• Access to a full state machine

• Harder to write

• Harder to evade

May 17th 2013 NoSuchCon 32

Page 33: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Compromised host analysis

The framework generates an executable

Runs on the infected host and gathers information

Embedded signatures are provided by modules

Extracts relevant information

Modules process this information

May 17th 2013 NoSuchCon 33

Page 34: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Compromised host analysis

Tries to identify the module-supplied signatures

In files for patterns

In running processes memory regions for patterns

In the registry for regex in key names, values, etc.

May 17th 2013 NoSuchCon 34

Page 35: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Compromised host analysis

Sandbox mode to analyze packed RATs

Starts the executable and injects code

Blocks specified APIs to avoid propagation

Starts a scan when a specific API is called

Still must be ran on isolated machines

May 17th 2013 NoSuchCon 35

Page 36: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Network traffic dissection

Built with reverse engineering of the malware

Decrypts and decodes all the network traffic

This is where module writers do most of the work

May 17th 2013 NoSuchCon 36

Page 37: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Quote

May 17th 2013 NoSuchCon 37

solve the problem of the methods for carrying them out. If our task is to cross a

river, we cannot cross it without a bridge or a boat. Unless the bridge or boat problem is

solved, it is idle to speak of crossing the river. Unless the problem of method is solved, talk about the task is useless.

--Sun Tzu

Page 38: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Demo!

Arsenic Framework vs. Poison Ivy

May 17th 2013 NoSuchCon 38

Page 39: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

The Poison Ivy RAT

10 years old, development discontinued

Not fully detected by AVs until a few months ago

Hard to detect on the network

Still used today to pwn Big Companies

May 17th 2013 NoSuchCon 39

Page 40: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

May 17th 2013 NoSuchCon 40

Page 41: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

May 17th 2013 NoSuchCon 41

Page 42: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

May 17th 2013 NoSuchCon 42

Page 43: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Process overview

May 17th 2013 NoSuchCon 43

Network traffic signatures

Compromised host analysis

Network traffic dissection

Page 44: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network detection

Some Emerging Threats signatures

• Handshake packet size (matches on any 256b packet)

• Keep-alive (key-based) – Nice to know, when you know it

Some protocol-based signatures

• Keepalive (class signature key agnostic)

• Handshake (instance signature known key)

May 17th 2013 NoSuchCon 44

Page 45: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network detection

What if the we know the key, or it is changed?

• We still have one reliable class signature

• We are able to pinpoint infected hosts

May 17th 2013 NoSuchCon 45

Page 46: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network detection

Demo

May 17th 2013 NoSuchCon 46

Page 47: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Process overview

May 17th 2013 NoSuchCon 47

Network traffic signatures

Compromised host analysis

Network traffic dissection

Page 48: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Host Analysis

Various Poison Ivy signatures

Binary : machine code pattern

Registry : startup keys pointing to ADS

In memory : machine code / configuration structs

Sandbox : blocks infection & connection to C2 server

May 17th 2013 NoSuchCon 48

Page 49: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Host Analysis

Demo

May 17th 2013 NoSuchCon 49

Page 50: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Process overview

May 17th 2013 NoSuchCon 50

Network traffic signatures

Compromised host analysis

Network traffic dissection

Page 51: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network Dissection

May 17th 2013 NoSuchCon 51

anything, unless you understand its actual circumstances, its nature and its relations to other things, you will not know the laws governing it, or know

how to do it, or be able to do it well

--Sun Tzu

Page 52: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network Dissection

Parsing of the dump from earlier

Decryption and decompression of the traffic

Interpretation

The bulk of what we want, and most of the work

see how this works

May 17th 2013 NoSuchCon 52

Page 53: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Poison Ivy: Network Dissection

Demo

May 17th 2013 NoSuchCon 53

Page 54: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Wrapping up

May 17th 2013 NoSuchCon 54

Page 55: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

May 17th 2013 NoSuchCon 55

sacrifice and surmount every difficulty to win victory

--Sun Tzu

Page 56: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Forensics and Incident Response

In the Framework, every attacker action is journalized

You can query the timeline database

Export data

Traceability out of the box!

May 17th 2013 NoSuchCon 56

Page 57: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

TODO list

Code cleaning/Test writing

A better API for module writers

Performance issues (multithreading)

Add features to the host analysis

MOAR modules!

IPv6 and x64 compatibility ( get to it

May 17th 2013 NoSuchCon 57

Page 58: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

next?

Release of the source code in less than a month

Everything will be announced on Twitter

@ArsenicRats

We hope you will enjoy it, or at least play with it

May 17th 2013 NoSuchCon 58

Page 59: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Questions?

May 17th 2013 NoSuchCon 59

Page 60: Killing RATs with an Incident Response FrameworkAPT? What happens when a large company gets pwned. Somehow involves China With BYOD, IPv6, and Cloud, they are the four Horsemen of

Thanks for your attention

Robinson Delaugerre

@Rob_OEM

[email protected]

Adrien Chevalier

@00_ach

[email protected]

May 17th 2013 NoSuchCon 60

hesitate to contact us on twitter or by email.

Killing RATs, the Arsenic Framework


Recommended