@Yuan Xue Worm and Botnet Yuan Xue Fall 2013.

Slides:



Advertisements
Similar presentations
(Distributed) Denial of Service Nick Feamster CS 4251 Spring 2008.
Advertisements

Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Code-Red : a case study on the spread and victims of an Internet worm David Moore, Colleen Shannon, Jeffery Brown Jonghyun Kim.
Communications of the ACM (CACM), Vol. 32, No. 6, June 1989
By Hiranmayi Pai Neeraj Jain
Denial of Service & Session Hijacking.  Rendering a system unusable to those who deserve it  Consume bandwidth or disk space  Overwhelming amount of.
CHAPTER 2 KNOW YOUR VILLAINS. Who writes it: Malware writers vary in age, income level, location, social/peer interaction, education level, likes, dislikes.
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
Computer Security Fundamentals by Chuck Easttom Chapter 4 Denial of Service Attacks.
Hacking Presented By :KUMAR ANAND SINGH ,ETC/2008.
 Population: N=100,000  Scan rate  = 4000/sec, Initially infected: I 0 =10  Monitored IP space 2 20, Monitoring interval:  = 1 second Infected hosts.
Computer Security and Penetration Testing
UNCLASSIFIED Secure Indirect Routing and An Autonomous Enterprise Intrusion Defense System Applied to Mobile ad hoc Networks J. Leland Langston, Raytheon.
Review for Exam 4 School of Business Eastern Illinois University © Abdou Illia, Fall 2006.
How to Own the Internet in your spare time Ashish Gupta Network Security April 2004.
100% Security “ The only system which is truly secure is one which is switched off and unplugged, locked in a titanium lined safe, buried in a concrete.
DDos Distributed Denial of Service Attacks by Mark Schuchter.
Attack Profiles CS-480b Dick Steflik Attack Categories Denial-of-Service Exploitation Attacks Information Gathering Attacks Disinformation Attacks.
Slide 1 Vitaly Shmatikov CS 378 Worms. slide 2 Viruses vs. Worms VIRUS uPropagates by infecting other programs uUsually inserted into host code (not a.
Internet Quarantine: Requirements for Containing Self-Propagating Code David Moore et. al. University of California, San Diego.
Internet Relay Chat Security Issues By Kelvin Lau and Ming Li.
Internet Relay Chat Chandrea Dungy Derek Garrett #29.
Denial of Service Attacks: Methods, Tools, and Defenses Authors: Milutinovic, Veljko, Savic, Milan, Milic, Bratislav,
Botnets An Introduction Into the World of Botnets Tyler Hudak
MSIT 458 – The Chinchillas. Offense Overview Botnet taxonomies need to be updated constantly in order to remain “complete” and are only as good as their.
1Federal Network Systems, LLC CIS Network Security Instructor Professor Mort Anvair Notice: Use and Disclosure of Data. Limited Data Rights. This proposal.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Basic Security Networking for Home and Small Businesses – Chapter 8.
B OTNETS T HREATS A ND B OTNETS DETECTION Mona Aldakheel
Internet Worms Brad Karp UCL Computer Science CS GZ03 / th December, 2007.
CIS3360: Security in Computing Chapter 4.3 : Worms Cliff Zou Spring 2012.
Slide 1 Adapted from Vitaly Shmatikov, UT Austin Distributed Denial of Service.
BLENDED ATTACKS EXPLOITS, VULNERABILITIES AND BUFFER-OVERFLOW TECHNIQUES IN COMPUTER VIRUSES By: Eric Chien and Peter Szor Presented by: Jesus Morales.
Active Worms CSE 4471: Information Security 1. Active Worm vs. Virus Active Worm –A program that propagates itself over a network, reproducing itself.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 45 How Hackers can Cripple the Internet and Attack Your PC How Hackers can Cripple the.
Topics to be covered 1. What are bots,botnet ? 2.How does it work? 4.Prevention of botnet. 3.Types of botnets.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
--Harish Reddy Vemula Distributed Denial of Service.
EC-Council Copyright © by EC-Council All Rights reserved. Reproduction is strictly prohibited Security News Source Courtesy:
1 Figure 4-16: Malicious Software (Malware) Malware: Malicious software Essentially an automated attack robot capable of doing much damage Usually target-of-opportunity.
How to Own the Internet in Your Spare Time (Stuart Staniford Vern Paxson Nicholas Weaver ) Giannis Kapantaidakis University of Crete CS558.
Overview What is a worm? What is a worm? Origin? Origin? How does it propagate? How does it propagate? How does it take up resources of an infected node?
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
CAP6135: Malware and Software Vulnerability Analysis Worms Cliff Zou Spring 2010.
Lecture 18 Page 1 Advanced Network Security Distributed Denial of Service Attacks Advanced Network Security Peter Reiher August, 2014.
Lecture 20 Hacking. Over the Internet Over LAN Locally Offline Theft Deception Modes of Hacker Attack.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
Distributed Denial of Service Attacks Shankar Saxena Veer Vivek Kaushik.
Distributed Denial of Service Attacks
Denial of Service Attacks
Worm Defense Alexander Chang CS239 – Network Security 05/01/2006.
4061 Session 26 (4/19). Today Network security Sockets: building a server.
Search Worms, ACM Workshop on Recurring Malcode (WORM) 2006 N Provos, J McClain, K Wang Dhruv Sharma
Mobile Code and Worms By Mitun Sinha Pandurang Kamat 04/16/2003.
A Case Study on Computer Worms Balaji Badam. Computer worms A self-propagating program on a network Types of Worms  Target Discovery  Carrier  Activation.
DoS/DDoS attack and defense
Slammer Worm By : Varsha Gupta.P 08QR1A1216.
W elcome to our Presentation. Presentation Topic Virus.
Page 1 Viruses. Page 2 What Is a Virus A virus is basically a computer program that has been written to perform a specific set of tasks. Unfortunately,
Denial of Service A comparison of DoS schemes Kevin LaMantia COSC 316.
By Thomas Pantone Cosc 380.  A virus is a type of malware that self replicates after being executed and inserts itself into other programs, data files,
@Yuan Xue Worm Attack Yuan Xue Fall 2012.
Network Attacks Instructor: Dr. X. Outline Worms DoS.
Acknowledgement This lecture uses some contents from the lecture notes from: Dr. Vitaly Shmatikov CS Network Security and Privacy.
Chap 10 Malicious Software.
A Distributed DoS in Action
Brad Karp UCL Computer Science
Chap 10 Malicious Software.
Crisis and Aftermath Morris worm.
Presentation transcript:

@Yuan Xue Worm and Botnet Yuan Xue Fall 2013

@Yuan Xue Background What is worm? Self-propagating malicious code History Morris worm was one of the first worms distributed over Internet Timeline of notable worms  _worms _worms Examples Code Red – 2001, MS IIS Slammer – 2003, MS SQL Samy (MySpace Worm) – 2005, XSS Two topics System vulnerability Propagation model

@Yuan Xue Slammer (Sapphire) Worm When Jan How Exploit Buffer-overflow with MS SQL/MS SQL Server Desktop Engine (known vulnerability, July 2002) Scale At least 74,000 hosts Feature Fast propagation speed (>55million scans per second, two orders of magnitude faster than Code Red worm) No harmful payload Countermeasure Patch Firewall (port blocking)

@Yuan Xue Scale The diameter of each circle is a function of the logarithm of the number of infected machines, so large circles visually underrepresent the number of infected cases in order to minimize overlap with adjacent locations

@Yuan Xue Details of Slammer Worm SQL server vulnerability The SSRS (SQL Server Resolution Service (SSRS) ) contains a stack buffer overflow that allows an attacker to execute arbitrary code by sending a crafted request to port 1434/udp The code within such a request will be executed by the server host with the privileges of the SQL Server service account. Slammer worm Crafts packets of 376-bytes and send them to a chosen IP addresses on port 1434/udp Random scanning  Randomly select IP addresses If the packet is sent to a vulnerable machine, this victim machine will become infected and will also begin to propagate.

@Yuan Xue Buffer Overflow The techniques to exploit a buffer overflow vulnerability vary per architecture, operating system and memory region Heap-based buffer overflow stack-based buffer overflow Linux system memory layout Buffer overflow is an anomalous condition where a program writes data beyond the allocated end of a buffer in memory. 1.The program's code and data consisting of the program's instructions and the initialized and uninitialized static and global data 2.Run-time heap (created using malloc/calloc) 3.Users stack. This stack is used whenever a function call is made.

@Yuan Xue Buffer Overflow Stack-based buffer overflow An example void function (int a, int b, int c){ char buffer1[5]; char buffer2[10]; } int main(){ function(1,2,3); }

@Yuan Xue Buffer Overflow Stack-based buffer overflow Overwrite a function's return address, which in turn can alter the program's execution path void function (char *str) { char buffer[16]; strcpy (buffer, str); } int main () { char *str = "I am greater than 16 bytes"; // length of str = 27 bytes function (str); } Function's return address is the address of the next instruction in memory, which is executed immediately after the function returns.

@Yuan Xue Buffer Overflow Stack-based buffer overflow Overwrite a function's return address, which in turn can alter the program's execution path Hacker can spawn a shell (with root permissions) by jumping the execution path to such code. If there is no such code in the program to be exploited  Place the code we are trying to execute in the buffer's overflowing area.  Overwrite the return address so it points back to the buffer and executes the intended code.  Such code can be inserted into the program using environment variables or program input parameters.

@Yuan Xue Propagation Model Random Scanning Initially spread exponentially, slows as the worms retry infected or immune addresses Probe rate of Code red worm (a typical random-scanning worm) Probes of Slammer worm from Dshield data set Initially matched random scanning worm Soon slowed down due to bw saturation and network failures

@Yuan Xue Why Slammer Was So Fast? Bandwidth constraint vs. delay constraint Slammer 404 bytes (376 payload) UDP based-- bandwidth constraint Code Red 4K bytes TCP based – delay constraint UDP vs. TCP

@Yuan Xue Morris Worm (Redux) 1988: No malicious payload, but bogged down infected machines by uncontrolled spawning Infected 10% of all Internet hosts at the time Multiple propagation vectors Remote execution using rsh and cracked passwords  Tried to crack passwords using small dictionary and publicly readable password file; targeted hosts from /etc/hosts.equiv Buffer overflow in fingerd on VAX  Standard stack smashing exploit DEBUG command in Sendmail  In early Sendmail versions, possible to execute a command on a remote machine by sending an SMTP (mail transfer) message Dictionary attack Buffer overflow attack

@Yuan Xue Summer of 2001 [from “How to 0wn the Internet in Your Spare Time”] Three major worm outbreaks

@Yuan Xue Code Red I July 13, 2001: First worm of the modern era Exploited buffer overflow in Microsoft’s Internet Information Server (IIS) 1 st through 20 th of each month: spread Find new targets by random scan of IP address space  Spawn 99 threads to generate addresses and look for IIS Creator forgot to seed the random number generator, and every copy scanned the same set of addresses 21 st through the end of each month: attack Deface websites

@Yuan Xue Usurped Exception Handling In IIS Overflow in a rarely used URL decoding routine A malformed URL is supplied to vulnerable routine… … another routine notices that stack has been smashed and raises an exception. Exception handler is invoked. … the pointer to exception handler is located on stack. It has been overwritten to point to a certain instruction inside the routine that noticed the overflow. … that instruction is CALL EBX. At that moment, EBX is pointing into the overwritten buffer. … the buffer contains the code that finds the worm’s main body on the heap and executes it! [Chien and Szor, “Blended Attacks…”]

@Yuan Xue Code Red I v2 July 19, 2001: Same codebase as Code Red I, but fixed the bug in random IP address generation Compromised all vulnerable IIS servers on the Internet Large vulnerable population meant fast worm spread  Scanned address space grew exponentially  350,000 hosts infected in 14 hours!! Payload: distributed packet flooding (denial of service) attack on Coding bug causes it to die on the 20 th of each month… but if victim’s clock is wrong, resurrects on the 1 st ! Still alive in the wild

@Yuan Xue August 4, 2001: Same IIS vulnerability, completely different code, kills Code Red I Known as “Code Red II” because of comment in code Worked only on Windows 2000, crashed NT Scanning algorithm preferred nearby addresses Chose addresses from same class A with probability ½, same class B with probability 3/8, and randomly from the entire Internet with probability 1/8 Payload: installed root backdoor in IIS servers for unrestricted remote access Died by design on October 1, 2001 Code Red II

@Yuan Xue September 18, 2001: Multi-modal worm using several propagation vectors Exploit same IIS buffer overflow as Code Red I and II Bulk- itself as an attachment to addresses harvested from infected machines Copy itself across open network shares Add exploit code to Web pages on compromised sites to infect visiting browsers Scan for backdoors left by Code Red II Payload: turned-off code deleting all data on hard drives of infected machines Nimda

@Yuan Xue Code Red I and II Code Red II dies off as programmed With its predator gone, Code Red I comes back, still exhibiting monthly pattern [Paxson]

@Yuan Xue MySpace.com (Samy worm) Users can post HTML on their pages MySpace.com ensures HTML contains no,, onclick, … but can do Javascript within CSS tags: And can hide “javascript” as “java\nscript” With careful javascript hacking: Samy worm infects anyone who visits an infected MySpace page … and adds Samy as a friend. Samy had millions of friends within 24 hours.

@Yuan Xue How to defend? – Signature-Based Defenses Don’t Help Nimda leaped firewalls Many firewalls pass mail untouched, relying on mail servers to filter out infections Most filters simply scan attachments for signatures (code snippets) of known viruses and worms Nimda was a brand-new infection with unknown signature, and scanners could not detect it Big challenge: detection of zero-day attacks When a worm first appears in the wild, signature is not extracted until minutes or hours later

@Yuan Xue How to Defend? Buffer Overflow Write secure code  Use of safe libraries Compiler tools  Choice of programming language Dynamic run-time checks  Executable space protection  Stack-smashing protection Worm Patch  MS has released the patch before the worm attack happens Firewall IDS  Deep packet inspection Architecture  Address space layout randomization

@Yuan Xue Santy Written in Perl, exploits a bug in phpBB bulletin board system (prior to version ) Allows injection of arbitrary code into Web server running phpBB Uses Google to find sites running phpBB Once injected, downloads actual worm code from a central site, asks Google for more targets and connects infected machine to an IRC botnet Multiple variants of the same worm Polymorphism: actual Perl code changes from infection to infection, so filtering worm traffic is difficult! [Provos et al.]

@Yuan Xue Evading Anomaly Detection Google will refuse worm-generated queries Different Santy variants generate different search terms or take them from an IRC botmaster Google’s solution: if an IP address generates a lot of “rare” queries, ask it to solve a CAPTCHA Exploit the fact that different infections of the same worm must use different queries (why?) [Provos et al.]

@Yuan Xue Index-Based Filtering Idea: if worm relies on search results to spread, don’t provide vulnerable targets in search results During crawl phase, tag all pages that seem to contain vulnerable software or sensitive information such as addresses Can’t drop them from the index because they may contain information useful to legitimate searchers Do not return the result of a query if it contains (a) pages from many hosts, and (b) high percentage of them are tagged as vulnerable What are the limitations of this approach? [Provos et al.]

@Yuan Xue Botnets Botnet is a network of autonomous programs capable of acting on instructions Typically a large (up to several hundred thousand) group of remotely controlled “zombie” systems  Machine owners are not aware they have been compromised Controlled and upgraded via IRC or P2P Used as a platform for various attacks Distributed denial of service Spam and click fraud Launching pad for new exploits/worms

@Yuan Xue Bot History Eggdrop (1993): early IRC bot DDoS bots (late 90s): Trin00, TFN, Stacheldracht RATs (late 90s): “Remote Administration Trojans” Variants of Back Orifice and NetBus, SubSeven, Bionet Related to rootkits Modern bots: Agobot (PhatBot, SDBot), GTBot Active spreading, multiple propagation vectors  Combines characteristics of a worm and a trojan  Many mutations and morphs of the same codebase Remotely controlled (typically via IRC) Stormbot and Conficker ( )

@Yuan Xue Typical Infection Path Exploit a vulnerability to execute a short program (shellcode) on victim’s machine Buffer overflows, viruses, etc. Shellcode downloads and installs actual bot Bot disables firewall and antivirus software Bot locates IRC server, connects, joins channel Typically need DNS to find out server’s IP address  Especially if server’s original IP address has been blacklisted Authentication password often stored in bot binary Botmaster issues authenticated commands

@Yuan Xue /connect jade.va.us.dal.net /join #hacker... Win XP... /connect jade.va.us.dal.net /join #hacker... Win XP... /connect jade.va.us.dal.net /join #hacker... Win XP jade.va.dal.net Joining the IRC Channel

@Yuan Xue (12:59:27pm) -- A9-pcgbdv has joined (#owned) Users : 1646 (12:59:27pm) (12:59:27pm) -- A6-bpxufrd 81.introweb.nl) has joined (#owned) Users : 1647 (12:59:27pm) -- A9-nzmpah has left IRC (Connection reset by peer) (12:59:28pm) DCOM (12:59:28pm) -- A9-tzrkeasv has joined (#owned) Users : 1650 Command and Control

@Yuan Xue Botnet Propagation Each bot can scan IP space for new victims Automatically  Each bot contains hard-coded list of IRC servers’ DNS names  As infection is spreading, IRC servers and channels that the new bots are looking for are often no longer reachable On-command: target specific /8 or /16 prefixes  Botmasters share information about prefixes to avoid Evidence of botnet-on-botnet warfare DoS server by multiple IRC connections (“cloning”) Active botnet management Detect non-responding bots, identify “superbots” [Abu Rajab et al.]

@Yuan Xue Rise of Botnets 2003: ,000 infected hosts, up to 100K nodes per botnet 2006: 5 million distinct bots, but smaller botnets Thousands rather than 100s of thousands per botnet Reasons: evasion, economics, ease of management More bandwidth (1 Mbps and more per host) For-profit criminal activity (not just mischief) Spread spam Extort money by threatening/unleashing DoS attacks Move to P2P control structures (rather than IRC)

@Yuan Xue Denial of Service (DoS) Redux Goal: overwhelm victim machine and deny service to its legitimate clients DoS often exploits networking protocols Smurf: ICMP echo request to broadcast address with spoofed victim’s address as source Ping of death: ICMP packets with payloads greater than 64K crash older versions of Windows SYN flood: “open TCP connection” request from a spoofed address UDP flood: exhaust bandwidth by sending thousands of bogus UDP packets

@Yuan Xue Distributed Denial of Service (DDoS) Build a botnet of zombies Multi-layer architecture: use some of the zombies as “masters” to control other zombies Command zombies to stage a coordinated attack on the victim Does not require spoofing (why?) Even in the case of SYN flood, SYN cookies don’t help (why?) Overwhelm victim with traffic arriving from thousands of different sources

@Yuan Xue DDoS Architecture Victim Attacker Master machines Zombie machines

@Yuan Xue Scan for known buffer overflows in Linux & Solaris Unpatched versions of wu-ftpd, statd, amd, … Root shell on compromised host returns confirmation Install attack daemon using remote shell access Send commands (victim IP, attack parameters), using plaintext passwords for authentication Attacker to master: TCP, master to zombie: UDP To avoid detection, daemon issues warning if someone connects when master is already authenticated August 1999: a network of 227 Trin00 zombies took U. of Minnesota offline for 3 days Trin00

@Yuan Xue Supports multiple DoS attack types Smurf; ICMP, SYN, UDP floods Attacker runs masters directly via root backdoor; masters talk to zombies using ICMP echo reply No authentication of master’s commands, but commands are encoded as 16-bit binary numbers inside ICMP packets to prevent accidental triggering Vulnerable to connection hijacking and RST sniping List of zombie daemons’ IP addresses is encrypted in later versions of TFN master scripts Protects identities of zombies if master is discovered Tribal Flood Network

@Yuan Xue Combines “best” features of Trin00 and TFN Multiple attack types (like TFN) Symmetric encryption for attacker-master connections Master daemons can be upgraded on demand February 2000: crippled Yahoo, eBay, Amazon, Schwab, E*Trade, CNN, Buy.com, ZDNet Smurf-like reflection attack on Yahoo consumed more than a Gigabit/sec of bandwidth Sources of attack still unknown Stacheldraht

@Yuan Xue Reference Worm A Taxonomy of Computer Worms A Taxonomy of Computer Worms en.wikipedia.org/wiki/Computer_worm Slammer Worm letter.mspx letter.mspx Inside the Slammer Worm, IEEE S&P 2003 Network Telescope