10 Malware
10 Malware
Leader hacked on
march 2009
Post Islamic
message
Wikipedia
What is rootkit
Symantec
What is a worm
2000000
1500000
1000000
500000
0
2002 2003 2004 2005 2006 2007 2008
13%
9% Trojan
1% Worm
3%
Other
Adware
74% Spyware
Executable
Interpreted file
Kernel
Service
MBR
Hypervisor
Overwriting malware
Targeted Malware
Malware
Executable
prepending malware
Malware
Infected
Targeted
Malware host
Executable
Executable
appending malware
Infected
Targeted
Malware host
Executable
Executable
Malware
Cavity malware
Malware
Targeted
Malware Infected
Executable
host
Executable
Multi-Cavity malware
Malware
Targeted
Malware
Executable Malware
Malware
Packers
Payload
Packer Infected host
Malware
Executable
Packer functionalities
Compress
Encrypt
Randomize (polymorphism)
Anti-debug technique (int / fake jmp)
Add-junk
Anti-VM
Virtualization
Auto start
Win.ini : run=[backdoor]" or
"load=[backdoor]".
System.ini : shell=myexplorer.exe
Wininit
Config.sys
Auto start cont.
Init.d
/etc/rc.local
.login .xsession
crontab
crontab -e
/etc/crontab
Macro virus
MS Office
Open Office
Acrobat
Userland root kit
Perform Hide activity
login ps
sshd netstat
passwd ls
find
du
Subverting the Kernel
rootkit KERNEL
Hardware :
HD, keyboard, mouse, NIC, GPU
Subverting techniques
Kernel patch
Loadable Kernel Module
Kernel memory patching (/dev/kmem)
Windows Kernel
P1 P2 Pn Csrss.exe
Ntdll.dll
ntoskrnl.exe Executive
Underlying kernel
Hardware Abstraction Layer (HAL.dll)
Hardware
Kernel Device driver
P2
C
Interrupt Hook
System service
System service dispatch table
dispatcher
App App
Target OS
Hardware
Hypervisor rootkit
App App
Hardware
Propagation
Vector
Outline
A ; % #! " # $ % &" ' ( ) * + # , #) " #" ) 5 ) & ' + #* 1 #* ; ' * #1 2 #* ; % #2 ) + " * #" > ' 5 #5 % " " ' / % " #' ( 3 % + * ) " ) . /
B%&1$#)"#'.#%C'5>&%#12#'#5'&)7)1-"#(15').D
!"#$%&'($)*$+&%,-&.+#+$/&$/"#$0&(12/#'$3.2/&(./)0.--4$&'$/"'&25"$2*#'$),/#'.0/)&,67
8&%#9#':$;&'$/"#$+&%,-&.+$/&$<#$*200#**;2-:$2*#'*$(2*/$.5'##$/&$)/=
>)52'#$??7$@&%,-&.+$&;$/"#$(.-)0)&2*$;)-#7
E)/-+%#FG@#H'&)7)1-"#?'&%('7#(15').@
A4<#'B0'&&C*$0'#./#+$,2(#'&2*$+&(.),*$/&$+)*/')<2/#$/"#$D.-#+.0$%&'($2*),5$),&;;#,*)9#
,.(#*$*20"$.*$0.'+7#E#:$#0.'+7#E#:$-&9#7#E#:$-&9#4&27#E#:$(#.,+4&27#E#:$#/07
F&(#$&;$/"#*#$+&(.),*$%#'#$+#*)5,#+$/&$(&+);4$/"#$;)-#$/&$<#$+&%,-&.+#+$),$&'+#'$/&
+)*/')<2/#$+);;#'#,/$(.-)0)&2*$0&+#*$.,+$1'#9#,/$*#02')/4$0&(1.,)#*$;'&($+#/#0/),5$/"#(7
!")*$)+#.$&;$,2(#'&2*$*(.--$),;#0/)&,*$)*$C,&%,$.*$.$*)-#,/$#1)+#()07
!"#$)(1.0/$&;$+&(.),*$+)*/')<2/),5$(.-)0)&2*$D.-#+.0$0&+#*$%.*$*&$5'#./$/"./$*&(#
+&(.),*$%#'#$#9#,$")5"-4B'.,C#+$),$*#.'0"$#,5),#*7$!")*$0&2-+$0.2*#$2*#'*$/'4),5$/&$-&0./#
9)'/2.-$0.'+*$/&$.00#**$(.-)0)&2*$+&(.),*$<4$.00)+#,/7
Symantec 2009
Fake codec
Fake antivirus
Popular
query
35.5% are
malwares
(Kalafut 2006)
Backdoor
Basic
Infected TCP
Attacker
Host
Reverse
Infected TCP
Attacker
Host
covert
Infected ICMP
Attacker
Host
Rendez vous backdoor
RDV
Point
Infected
Attacker
Host
Bestiary
Outline
Defcon 1998
1998
Trj/SMSlock.A
Russian
ransomware
April 2009 To unlock you need to send an SMS with the text
4121800286
to the number
3649
Enter the resulting code:
Analyze system
behavior
Analyze binary to
decide if it a virus
Type :
Scanner
Diagonal argument
P is a perfect detection program
V is a virus
V can call P
if P(V) = true -> halt
if P(V) = false -> spread
Virus signature
81
Some historical worms
of note
Worm Date Distinction
Morris 11/88 Used multiple vulnerabilities, propagate to nearby sys
ADM 5/98 Random scanning of IP address space
Ramen 1/01 Exploited three vulnerabilities
Lion 3/01 Stealthy, rootkit worm
Cheese 6/01 Vigilante worm that secured vulnerable systems
Code Red 7/01 First sig Windows worm; Completely memory resident
Walk 8/01 Recompiled source code locally
Nimda 9/01 Windows worm: client-to-server, c-to-c, s-to-s,
11 days after announcement of vulnerability; peer-to-peer
Scalper 6/02
network of compromised systems
Slammer 1/03 Used a single UDP packet for explosive growth
Kienzle and
82
Elder
Increasing propagation
speed
Code Red, July 2001
Affects Microsoft Index Server 2.0,
Windows 2000 Indexing service on Windows NT 4.0.
Windows 2000 that run IIS 4.0 and 5.0 Web servers
83
Code Red
86
Measuring activity: network
telescope
Slides: Vern
92
Paxson
How do worms
propagate?
Scanning worms : Worm chooses random address
Coordinated scanning : Different worm instances scan different addresses
Flash worms
Assemble tree of vulnerable hosts in advance, propagate along tree
Not observed in the wild, yet
Meta-server worm :Ask server for hosts to infect (e.g., Google for
powered by phpbb)
Topological worm: Use information from infected hosts (web server logs,
email address books, config files, SSH known hosts)
Contagion worm : Propagate parasitically along with normally initiated
communication
93
slammer
01/25/2003
Vulnerability disclosed : 25 june 2002
Better scanning algorithm
UDP Single packet : 380bytes
Slammer propagation
Number of scan/sec
Packet loss
A server view
Consequences
Response Period
Program
months Viruses Macro
Viruses E-mail
Signature
Worms Network
days Worms
Pre- Post-
automation automation
hrs
Flash
mins
Contagion Period Worms
secs Signature Response Period
1990 2005
Time
Challenge
need to automatically learn a content signature for each
new worm potentially in less than a second!
102
Signature inference
Monitor network and look for strings
common to traffic with worm-like
behavior
Signatures can then be used for content
filtering
105
The basic algorithm
Detector in
network
B
A
C
cnn.com
E D
C
cnn.com
E D
1 1 (A) 1 (B)
C
cnn.com
E D
1 1 (A) 1 (B)
1 1 (C) 1 (A)
(Stefan Savage, UCSD *) 108
Detector in
network
B
A
C
cnn.com
E D
2 2 (A,B) 2 (B,D)
1 1 (C) 1 (A)
(Stefan Savage, UCSD *) 109
Detector in
network
B
A
C
cnn.com
E D
State
On a fully-loaded 1Gbps link a nave implementation can easily
consume 100MB/sec for table
Computation/memory duality: on high-speed (ASIC)
implementation, latency requirements may limit state to
on-chip SRAM