vigilante: end-to-end containment of internet worms paper by: manuel costa, jon crowcroft, miguel...

42
Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul Barham Microsoft Research Cambridge Microsoft Research Silicon Valley University of Cambridge, Computer Laboratory Presented by Marcus Peinado, Microsoft Research

Post on 19-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Vigilante: End-to-End Containment of Internet Worms

Paper by:Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron,

Lidong Zhou, Lintao Zhang, Paul Barham

Microsoft Research CambridgeMicrosoft Research Silicon Valley

University of Cambridge, Computer Laboratory

Presented byMarcus Peinado, Microsoft Research

Page 2: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

1980’s to early 1990’s

– Widespread adoption of personal computers– Limited or no network connectivity– Initially no hard drives; just floppy disks– Single user operating systems– Attack model: Somebody steals or tampers

with my floppy disk.– Limited attention to software security

Page 3: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Mid 1990’s to early 2000’s

• Broad internet adoption• Massive improvements in hardware

performance• Massive increase in software complexity• Multi-user operating systems• New complex threats to computer security

Page 4: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Worms: Code Red

• Released July, August 2001– Infected 360,000 machines–Spread slowly (days)–Payload: (among others) DOS attack

against www.whitehouse.gov

Page 5: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Worms: Slammer

• Released January 25, 2003– 75,000 vulnerable machines– Almost all of them infected within 10 minutes– No payload beyond worm propagation– Worm packets sent from infected machines

saturated parts of the internet.• Exacerbated by crashes of internet routers.

Page 6: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Worms: Blaster

• Released: August 2003– 500,000 infected machines– Spread much more slowly than Slammer

(days)– Author was found and sentenced to 18

months in jail.

Page 7: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Worms

• Each of these worms– Made newspaper headlines– Caused huge financial damages– Exploited vulnerabilities for which patches had

been issued several months earlier• There have been more highly-visible

worms– But not many more

Page 8: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

What happened next?

• Lots of work on techniques for avoiding attacks.– Some of them are practical.– Some of them are in widespread use.

• Stack canaries, ASLR, NX, static analysis tools, pen-testing, fuzzing, software development standards

• Developer awareness: check for buffer overflows etc.• User awareness: install patches asap; use AV, use firewalls• Response infrastructure: fast patch release, AV

• A new kind of attacker emerges– Interested in financial gain, rather than vandalism– Cyber warfare

Page 9: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Case study: Slammer

• Buffer overflow vulnerability in Microsoft SQL Server (MS02-039).

• Vulnerability of the following kind:

ProcessUDPPacket() { char SmallBuffer[ 100 ];

UDPRecv( LargeBuff ); strcpy( SmallBuf, LargeBuf ); …}

Page 10: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Case Study: Slammer

• Slammer is a single UDP packet• Contains a string that overflows

SmallBuffer,– Overwriting the return address on the stack– Placing the payload on the stack directly

above the return address.• Payload

– Repeat foreverDest_IP = random();UDPSend( Dest_IP, SlammerPacket );

Page 11: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Vigilante

Page 12: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

The worm threat

• worms are a serious threat– worm propagation disrupts Internet traffic– attacker gains control of infected machines

• worms spread too fast for human response– Slammer scanned most of the Internet in 10 minutes– infected 90% of vulnerable hosts

worm containment must be automatic

Page 13: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Automatic worm containment

• previous solutions are network centric– analyze network traffic – generate signature and drop matching traffic or– block hosts with abnormal network behavior

• no vulnerability information at network level– false negatives: worm traffic appears normal– false positives: good traffic misclassified

false positives are a barrier to automation

Page 14: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Vigilante’s end-to-end architecture

• host-based detection– instrument software to analyze infection attempts

• cooperative detection without trust– detectors generate self-certifying alerts (SCAs)– detectors broadcast SCAs

• hosts generate filters to block infection

can contain fast spreading worms with small number of detectors and without false positives

Page 15: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

15

Worm containment

Internet

• Vigilante Detectors– Analyze execution of

application– Produce alerts (SCAs)

based on attack packets and vulnerable applications

– Broadcast SCAs over the Pastry P2P network

Detector

SCASCA

SCA

SCA SCA

• Receive SCAs• Verify SCAs• Generate packet filters from

SCAs• Deploy packet filters

Page 16: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Vigilante’s components

Detector Host Vulnerable Host

Protection

SCA Distribution

SCA Verification

FilterVulnerable Application

Network

NetworkSCA Distribution

SCA Verification

Detection Engine

SCA Generation

Network

Page 17: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Outline

• self-certifying alerts (SCAs)• detection and generation of SCAs• generation of vulnerability filters • evaluation

Page 18: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Self-certifying alerts

• identify an application vulnerability– describe how to exploit a vulnerability – contain a log of events– contain verification information

• enable hosts to verify if they are vulnerable– replay infection with modified events– verification has no false positives

enable cooperative worm containment without trust

Page 19: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

SCA types• arbitrary code execution (ACE)

– attacker can execute code in message– code injection

• arbitrary execution control (AEC)– attacker can load a value in message into the PC– no code injection (e.g. return into libc)

• arbitrary function argument (AFA)– attacker can call function with arbitrary argument– data-only attacks, no abnormal control flow

Page 20: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Verifying an AEC alert

vulnerable process

normal code

verifiedalert type: AEC , attack message:verification information: program counter is at offset 6 of attack message

11111144444444111recv

0x44444444

proves that external interfaces allow arbitrary control of the execution

SCA

11111111111111111

verification information enables independenceverification is independent of detection mechanism

Page 21: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

SCA generation

• log events• generate SCA when worm is detected

– compute verification information – search log for relevant events– generate tentative version of SCA– repeat until verification succeeds

• detectors may guide search– dynamic dataflow analysis is one such detector

Page 22: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Detection

• dynamic dataflow analysis• track the flow of data from input messages

– mark memory as dirty when data is received– track all data movement

• trap the worm before it executes any instructions– track control flow changes– trap execution of input data – trap loading of data into the program counter

Page 23: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Detection and SCA Generation

stack pointer return address

msg1

buffer

id 100

id 400

id 100

id 400//vulnerable code push len push netbuf push sock call recv push netbuf push localbuf call strcpy ret

log: 1111111111111111111

id 400id 100

msg1

id 236

AEC, , pc at offset 136SCA: 1111111111111111111

direct extraction of verification informationhigh coverage

Page 24: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Cooperative worm containment

• SCA enables cooperative containment– any host can be a detector– hosts can run high-overhead detection engines – hosts can run different detection engines– small TCB for SCA verification

cooperation enables low false negative rate

Page 25: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

SCA broadcast

• uses secure overlay: Pastry– hosts join overlay– detectors flood alerts over overlay links

• denial-of-service prevention– per-link rate limiting – per-hop filtering and verification– controlled disclosure of overlay membership

hosts receive SCAs with high probability

Page 26: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Protection

• hosts generate filter from SCA• dynamic data and control flow analysis

– run vulnerable application in a sandbox– track control and data flow from input messages– compute conditions that determine execution path– filter blocks messages that satisfy conditions

Page 27: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

• …• cmp eax,buf[23]• jne addr1• …• …• test ecx, buf[13]• je addr2• …• …• mov eax,buf[20]• call eax

Execution trace filters

addr1

addr2

Vulnerability point

Program start

Condition 1

Condition 2

Page 28: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Generating filters for vulnerabilities

0x3 0x24 0x67 0x42 0x1attack:

mutation: 0x3 0x12 0x28 0x63 0x4

=3 ≠0 ≠0 ≠0 ≠0filter: //vulnerable code mov al,[msg] mov cl,0x3 cmp al,cl jne L2 //msg[0] == 3 ? xor eax,eax

L1 mov [esp+eax+4],cl mov cl,[eax+msg+1] inc eax test cl,cl jne L1 //msg[i] == 0 ?

L2 ret

Match!

look at the program, not at the messages

find control flow decisions that enable the attack

Page 29: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Filters

• capture generic conditions– dataflow graphs of CPU instructions

• safe and efficient– no side effects, no loops

• accumulating all control flow decisions limits the amount of polymorphism tolerated– two filter design alleviates this– details in the paper, still improving

Page 30: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

• Central question:– What if the exploit mutates?– Will the filter still cover exploits that differ from the

exploit the detector saw?

• Good:– Any byte in the input that does not alter the execution

path of the application can be changed.– Immune to a large class of mutations.

• Bad:– Mutations that alter the execution path of the

application can bypass the filter.

Properties of execution trace filters

Page 31: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

• <title> … </title>• <body>• <IMG …>… </IMG>• <A …> …</A>• <span> … </span>

• Arbitrary sequence of HTLM tags

• Tag that exploits the vulnerability• <script> exploit </script>

• Arbitrary sequence of HTML tags

• </body>

• All the irrelevant tags on the page affect the execution trace.• Thus, the attacker can thwart execution trace filters by adding irrelevant input.

• Follow up work by the authors and others tries to address this problem.

HTLM Exploit

Page 32: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Evaluation

• three real worms:– Slammer (SQL server), Blaster (RPC), CodeRed (IIS)

• measurements of prototype implementation– SCA generation and verification– filter generation– filtering overhead

• simulations of SCA propagation with attacks

Page 33: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Time to generate SCAs

18

206

2667

2

1

10

100

1000

10000

Slammer Blaster CodeRed Slammer

Dynamic dataflow NX

SC

A g

en

era

tion

tim

e (

ms)

Page 34: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Time to verify SCAs

1018

75

0

20

40

60

80

Slammer Blaster CodeRed

SC

A v

erifi

catio

n tim

e (m

s)

Page 35: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Time to generate filters

24

273

3402

1

10

100

1000

10000

Slammer Blaster CodeRedFilt

er

ge

ne

ratio

n t

ime

(m

s)

Page 36: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Filtering overhead

0.51

1.4

0.7

1.92

0.76

2.07

0.16 0.16 0.2

0

1

2

3

SQL RPC IIS

Ove

rhea

d (

%)

InterceptedIntercepted+filter

Intercepted+filter+attack

Page 37: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Simulating SCA propagation

• Susceptible/Infective epidemic model• 500,000 node network on GeorgiaTech topology• network congestion effects

– RIPE data gathered during Slammer’s outbreak– delay/loss increase linearly with infected hosts

• DoS attacks– infected hosts generate fake SCAs– verification increases linearly with number of SCAs

Page 38: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

0%

5%

10%

15%

20%

25%

30%

35%

40%

45%

50%

0.000 0.002 0.004 0.006 0.008 0.010

Detector Fraction

Infe

cted

Per

cen

tag

e Slammer+DoS

Slammer

Containing Slammer

Page 39: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

0%

5%

10%

15%

20%

25%

30%

0.5β β 2β 4β 8β

Infection Rate

Infe

cte

d P

erc

en

tag

e w/ DoS

w/o DoS

Increasing infection rate

(ß is Slammer’s infection rate)

Page 40: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

0%

2%

4%

6%

8%

10%

12%

14%

0 200 400 600 800 1000

SCA Verification Time (msec)

Infe

cte

d P

erc

en

tag

e w/ DoS

w/o DoS

Increasing verification time

Page 41: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

0%

5%

10%

15%

20%

25%

30%

35%

0 2000 4000 6000 8000 10000

Number of Initially Infected Hosts

Infe

cte

d P

erc

en

tag

e w/ DoS

w/o DoS

Baseline

Increasing seed hosts

Page 42: Vigilante: End-to-End Containment of Internet Worms Paper by: Manuel Costa, Jon Crowcroft, Miguel Castro, Ant Rowstron, Lidong Zhou, Lintao Zhang, Paul

Conclusion

• Vigilante can contain worms automatically– requires no prior knowledge of vulnerabilities– no false positives– low false negatives– works with today’s binaries