CS 4700 / CS 5700 Network Fundamentals Lecture 20: Malware and Tinfoil Hats (Parasites, Bleeding hearts and Spies) Slides stolen from Vern Paxson (ICSI)

Slides:



Advertisements
Similar presentations
Thank you to IT Training at Indiana University Computer Malware.
Advertisements

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
Lecture 12 Page 1 CS 236 Online When you run it, the Greeks creep out and slaughter your system Trojan Horses Seemingly useful program that contains code.
Towards efficient traffic-analysis resistant anonymity networks Stevens Le Blond David Choffnes Wenxuan Zhou Peter Druschel Hitesh Ballani Paul Francis.
Introduction to Security Computer Networks Computer Networks Term B10.
 Population: N=100,000  Scan rate  = 4000/sec, Initially infected: I 0 =10  Monitored IP space 2 20, Monitoring interval:  = 1 second Infected hosts.
BotMiner Guofei Gu, Roberto Perdisci, Junjie Zhang, and Wenke Lee College of Computing, Georgia Institute of Technology.
BOTNETS/Cyber Criminals  How do we stop Cyber Criminals.
What Are Malicious Attacks? Malicious Attacks are any intentional attempts that can compromise the state of your computer. Including but not limited to:
How to Own the Internet in your spare time Ashish Gupta Network Security April 2004.
EE 122: Network Security Kevin Lai December 2, 2002.
Botnets Uses, Prevention, and Examples. Background Robot Network Programs communicating over a network to complete a task Adapted new meaning in the security.
Lecture 11 Electronic Business (MGT-485). Recap – Lecture 10 Transaction costs Network Externalities Switching costs Critical mass of customers Pricing.
Internet Safety CSA September 21, Internet Threats Malware (viruses) Spyware Spam Hackers Cyber-criminals.
Botnets An Introduction Into the World of Botnets Tyler Hudak
Introduction to Honeypot, Botnet, and Security Measurement
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
 Collection of connected programs communicating with similar programs to perform tasks  Legal  IRC bots to moderate/administer channels  Origin of.
CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014.
Internet Worms Brad Karp UCL Computer Science CS GZ03 / th December, 2007.
Lecture 14 Page 1 CS 236 Online Worms Programs that seek to move from system to system –Making use of various vulnerabilities Other performs other malicious.
Lecture 26 Page 1 Advanced Network Security Malware for Networks Advanced Network Security Peter Reiher August, 2014.
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.
1 How to 0wn the Internet in Your Spare Time Authors: Stuart Staniford, Vern Paxson, Nicholas Weaver Publication: Usenix Security Symposium, 2002 Presenter:
A Taxonomy of Computer Worms Nicholas Weaver, Vern Paxson, Stuart Staniford, and Robert Cunningham ACM WORM 2003 Speaker: Chang Huan Wu 2008/8/8.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
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?
Trojan Horses on the Web. Definition: A Trojan horse a piece of software that allows the user think that it does a certain task, while actually does an.
Modeling Worms: Two papers at Infocom 2003 Worms Programs that self propagate across the internet by exploiting the security flaws in widely used services.
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.
Understanding Computer Viruses: What They Can Do, Why People Write Them and How to Defend Against Them Computer Hardware and Software Maintenance.
Security. Security Flaws Errors that can be exploited by attackers Constantly exploited.
Omar Hemmali CAP 6135 Paul Barford Vinod Yegneswaran Computer Sciences Department University of Wisconsen, Madison.
Topic 5: Basic Security.
Worm Defense Alexander Chang CS239 – Network Security 05/01/2006.
Malicious Software.
CSE 592 INTERNET CENSORSHIP (FALL 2015) LECTURE 19 PHILLIPA GILL - STONY BROOK U.
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.
1 Modeling, Early Detection, and Mitigation of Internet Worm Attacks Cliff C. Zou Assistant professor School of Computer Science University of Central.
Understand Malware LESSON Security Fundamentals.
Slammer Worm By : Varsha Gupta.P 08QR1A1216.
Lecture 14 Page 1 CS 236 Online Worms Programs that seek to move from system to system –Making use of various vulnerabilities Other performs other malicious.
BotMiner: Clustering Analysis of Network Traffic for Protocol- and Structure-Independent Botnet Detection Presented by D Callahan.
Speaker: Hom-Jay Hom Date:2009/10/20 Botnet Research Survey Zhaosheng Zhu. et al July 28-August
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,
Information Systems CS-507 Lecture 32. Physical Intrusion The intruder could physically enter an organization to steal information system assets or carry.
MUHAMMAD GHAZI AIMAN BIN MOHD AIDI. DEFINITION  A computer virus is a malware program that, when executed, replicates by inserting copies of itself (possibly.
Brett Stone-Gross, Marco Cova, Lorenzo Cavallaro, Bob Gilbert, Martin Szydlowski, Richard Kemmerer, Christopher Kruegel, and Giovanni Vigna Proceedings.
Antivirus Software Technology By Mitchell Zell. Intro  Computers are vulnerable to attack  Most common type of attack is Malware  Short for malicious.
@Yuan Xue Worm Attack Yuan Xue Fall 2012.
CS 4700 / CS 5700 Network Fundamentals
Botnets A collection of compromised machines
Instructor Materials Chapter 7 Network Security
Worms Programs that seek to move from system to system
Botnets A collection of compromised machines
Internet Worm propagation
Chap 10 Malicious Software.
Brad Karp UCL Computer Science
Chap 10 Malicious Software.
November 3, 2003 (last updated: 11/3/2003, 5:45pm)
Crisis and Aftermath Morris worm.
Introduction to Internet Worm
Presentation transcript:

CS 4700 / CS 5700 Network Fundamentals Lecture 20: Malware and Tinfoil Hats (Parasites, Bleeding hearts and Spies) Slides stolen from Vern Paxson (ICSI) and Stefan Savage (UCSD)

Motivation  Internet currently used for important services  Financial transactions, medical records  Increasingly used for critical services  911, surgical operations, water/electrical system control, remote controlled drones, etc.  Networks more open than ever before  Global, ubiquitous Internet, wireless 2

Malicious Users 3  Miscreants, e.g. LulzSec  In it for thrills, street cred, or just to learn  Defacing web pages, spreading viruses, etc.  Hacktivists, e.g. Anonymous  Online political protests  Stealing and revealing classified information  Organized Crime  Profit driven, online criminals  Well organized, divisions of labor, highly motivated

Network Security Problems  Host Compromise  Attacker gains control of a host  Can then be used to try and compromise others  Denial-of-Service  Attacker prevents legitimate users from gaining service  Attack can be both  E.g., host compromise that provides resources for denial-of- service 4

Definitions  Virus  Program that attaches itself to another program  Worm  Replicates itself over the network  Usually relies on remote exploit (e.g. buffer overflow)  Rootkit  Program that infects the operating system (or even lower)  Used for privilege elevation, and to hide files/processes  Trojan horse  Program that opens “back doors” on an infected host  Gives the attacker remote access to machines  Botnet  A large group of Trojaned machines, controlled en-mass  Used for sending spam, DDoS, click-fraud, etc. 5

 Worms  Basics  Example worms  Botnets  Basics  Torpig – fast flux and phishing  Privacy  Anonymous communication Outline 6

Host Compromise  One of earliest major Internet security incidents  Internet Worm (1988): compromised almost every BSD- derived machine on Internet  Today: estimated that a single worm could compromise 10M hosts in < 5 min  Attacker gains control of a host  Read data  Erase data  Compromise another host  Launch denial-of-service attacks on another host 7

Host Compromise: Stack Overflow  Typical code has many bugs because those bugs are not triggered by common input  Network code is vulnerable because it accepts input from the network  Network code that runs with high privileges (i.e., as root) is especially dangerous  E.g., web server 8

Example  What is wrong with this code? // Copy a variable length user name from a packet #define MAXNAMELEN 64 int offset = OFFSET_USERNAME; char username[MAXNAMELEN]; int name_len; name_len = packet[offset]; memcpy(&username, packet[offset + 1], name_len); name_len name 043 Packet 9

Example void foo(packet) { #define MAXNAMELEN 64 int offset = OFFSET_USERNAME; char username[MAXNAMELEN]; int name_len; name_len = packet[offset]; memcpy(&username, packet[offset + 1],name_len); … } “foo” return address char username[] int offset int name_len Stack X X-4 X-8 X-72 X name_len name 043 Packet Christo Wilson 15 [Malicious assembly instructions] 72 (MAXNAMELEN + 8) Address: X-72

Breaking news: Heartbleed Attack 11  Vulnerability in OpenSSL  Used by HTTPS, SSH, many others to encrypt communication  Heartbeat attack  Message of form: “Here’s some data, echo it back to me”  Takes as input: Data and length (L), where L <= 64KB  Echoes back a block of data L  What’s the problem?  Send one byte, get 64KB of RAM!  Private keys, passwords, etc have been leaked

As described by XKCD 12

As described by XKCD 13

As described by XKCD 14

As described by XKCD 15

As described by XKCD 16

As described by XKCD 17

Effect of Stack Overflow  Write into part of the stack or heap  Write arbitrary code to part of memory  Cause program execution to jump to arbitrary code  Worm  Probes host for vulnerable software  Sends bogus input  Attacker can do anything that the privileges of the buggy program allows Launches copy of itself on compromised host  Spread at exponential rate  10M hosts in < 5 minutes 18

Worm Spreading f = ( e K(t-T) – 1) / (1+ e K(t-T) )  f – fraction of hosts infected  K – rate at which one host can compromise others  T – start time of the attack T f t 1 19

Worm Examples  Morris worm (1988)  Code Red (2001)  MS Slammer (January 2003)  MS Blaster (August 2003) 20

Morris Worm (1988)  Infect multiple types of machines (Sun 3 and VAX)  Spread using a Sendmail bug  Attack multiple security holes including  Buffer overflow in fingerd  Debugging routines in Sendmail  Password cracking  Intend to be benign but it had a bug  Fixed chance the worm wouldn’t quit when reinfecting a machine  number of worm on a host built up rendering the machine unusable 21

Code Red Worm (2001)  Attempts to connect to TCP port 80 on a randomly chosen host  If successful, the attacking host sends a crafted HTTP GET request to the victim, attempting to exploit a buffer overflow  Worm “bug”: all copies of the worm use the same random seed to scanning new hosts  DoS attack on those hosts  Slow to infect new hosts  2 nd generation of Code Red fixed the bug!  It spread much faster 22

MS SQL Slammer (January 2003)  Uses UDP port 1434 to exploit a buffer overflow in MS SQL server  Generate massive amounts of network packets  Brought down as many as 5 of the 13 internet root name servers  Stealth Feature  The worm only spreads as an in-memory process: it never writes itself to the hard drive Solution: close UDP port on firewall and reboot 23

MS SQL Slammer (January 2003)  Slammer exploited a connectionless UDP service, rather than connection-oriented TCP.  Entire worm fit in a single packet!  When scanning, worm could “fire and forget”.  Worm infected 75,000+ hosts in 10 minutes (despite broken random number generator).  At its peak, doubled every 8.5 seconds  Progress limited by the Internet’s carrying capacity! 24

Life Just Before Slammer 25

Life Just After Slammer 26

MS Blaster (August 2003)  Exploits a buffer overflow vulnerability of the RPC (Remote Procedure Call) service in Win 200 and XP  Scans a random IP range to look for vulnerable systems on TCP port 135  Opens TCP port 4444, which could allow an attacker to execute commands on the system  DDoS windowsupdate.com on certain versions of Windows 27

Spreading Faster  Idea 1: Reduce Redundant Scanning  Construct permutation of address space.  Each new worm instance starts at random point  Worm instance that “encounters” another instance re- randomizes  Idea 2: Reduce Slow Startup Phase  Construct a “hit-list” of vulnerable servers in advance  Assume 1M vulnerable hosts, 10K hit-list, 100 scans/worm/sec, 1 sec to infect 99% infection rate in 5 minutes 28

Spreading Even Faster — Flash Worms  Idea: use an Internet-sized hit list.  Initial copy of the worm has the entire hit list  Each generation… Infect n hosts from the list Give each new infection 1/n of the list  Need to engineer for locality, failure & redundancy  ~10 seconds to infect the whole Internet 29

Contagion worms  Suppose you have two exploits: Es (Web server) and Ec (Web client)  You infect a server (or client) with Es (Ec)  Then you... wait (Perhaps you bait, e.g., host porn)  When vulnerable client arrives, infect it  You send over both Es and Ec  As client happens to visit other vulnerable servers, infect 30

Incidental Damage … Today  Today’s worms have significant real-world impact:  Code Red disrupted routing  Slammer disrupted root DNS, elections, ATMs, airlines, operations at an off-line nuclear power plant …  Blaster possibly contributed to Great Blackout of Aug … ?  Plus major clean-up costs  But most worms are amateurish  Unimaginative payloads 31

Where are the Nastier Worms??  Botched propagation the norm  Doesn’t anyone read the literature?  e.g. permutation scanning, flash worms, metaserver worms, topological, contagion  Botched payloads the norm  e.g. Flooding-attack fizzles  Some worm authors are in it for kicks …  No arms race. 32

Next-Generation Worm Authors  Military (e.g. Stuxnet)  Worm spread in 2010 (courtesy of US/Israel)  Targets Siemens industrial (SCADA) systems  Target: Iranian uranium enrichment infrastructure  Crooks:  Very worrisome onset of blended threats Worms + viruses + spamming + phishing + DOS-for-hire + botnets + spyware  Money on the table  arms race (market price for spam proxies: 3-10¢/host/week) 33

Witty  Released March 19, 2004  Single UDP packet exploits flaw in the passive analysis of Internet Security Systems products  “Bandwidth-limited” UDP worm ala’ Slammer  Vulnerable pop. (12K) attained in 75 minutes  Payload: slowly corrupt random disk blocks 34

Witty, con’t  Flaw had been announced the previous day  Telescope analysis reveals:  Initial spread seeded via a hit-list  In fact, targeted a U.S. military base  Analysis also reveals “Patient Zero”, a European retail ISP  Written by a Pro 35

Shamoon 36  Found August 16, 2012  Targeted computers from Saudi Aramco  Largest company/oil producer in the world  Infected 30,000 desktop machines  Took one week to clean and restore  Could have been much worse  Attack was not stealthy Stolen data slowly over time Slowly corrupt random disk blocks, spreadsheets, etc.  Did not target SCADA or production control systems

Some Cheery Thoughts  Imagine the following species:  Poor genetic diversity; heavily inbred  Lives in “hot zone”; thriving ecosystem of infectious pathogens  Instantaneous transmission of disease  Immune response 10-1M times slower  Poor hygiene practices  What if diseases were…  Trivial to create  Highly profitable to create and spread What would its long-term prognosis be? 37

 Worms  Basics  Example worms  Botnets  Basics  Torpig – fast flux and phishing  Privacy  Anonymous communication Outline 38

 Worms  Basics  Example worms  Botnets  Basics  Torpig – fast flux and phishing  Privacy  Anonymous communication Outline 39

Worms to Botnets  Ultimate goal of most Internet worms  Compromise machine, install rootkit, then trojan  One of many in army of remote controlled machines  Used by online criminals to make money  Extortion “Pay use $100K or we will DDoS your website”  Spam and click-fraud  Phishing and theft of personal information Credit card numbers, bank login information, etc. 40

Botnet Attacks  Truly effective as an online weapon for terrorism  i.e. perform targeted attacks on governments and infrastructure  Recent events: massive DoS on Estonia  April 27, 2007 – Mid-May, 2007  Closed off most government and business websites  Attack hosts from US, Canada, Brazil, Vietnam, …  Web posts indicate attacks controlled by Russians  All because Estonia moved a memorial of WWII soldier  Is this a glimpse of the future? 41

Detecting / Deterring Botnets  Bots controlled via C&C channels  Potential weakness to disrupt botnet operation  Traditionally relied on IRC channels run by ephemeral servers Can rotate single DNS name to different IPs on minute-basis  Can be found by mimicing bots (using honeypots)  Bots also identified via DNS blacklist requests  A constant cat and mouse game  Attackers evolving to decentralized C&C structures  Peer to peer model, encrypted traffic  Storm botnet, estimated 1-50 million members in 9/

Old-School C&C: IRC Channels 44 IRC Servers Botmaster snd spam: Problem: single point of failure Easy to locate and take down

P2P Botnets 45 Master Servers Botmaster Structured P2P DHT Insert commands into the DHT Get commands from the DHT

Fast Flux DNS 46 HTTP Servers Botmaster Change DNS  IP mapping every 10 seconds But: ISPs can blacklist the rendezvous domain

Random Domain Generation 47 HTTP Servers Botmaster Bots generate many possible domains each day …But the Botmaster only needs to register a few Can be combined with fast flux

 Worms  Basics  Detection  Botnets  Basics  Torpig – fast flux and phishing  Storm – P2P and spam Outline 48

“Your Botnet is My Botnet” 49  Takeover of the Torpig botnet  Random domain generation + fast flux  Team reverse engineered domain generation algorithm  Registered 30 days of domains before the botmaster!  Full control of the botnet for 10 days  Goal of the botnet: theft and phishing  Steals credit card numbers, bank accounts, etc.  Researchers gathered all this data  Other novel point: accurate estimation of botnet size

Torpig Architecture 50 Host gets infected via drive-by- download Rootkit installation Trojan installation Collect stolen data Capture banking passwords Researchers Infiltrated Here

Man-in-the-Browser Attack 51

Stolen Information 52  Data gathered from Jan 25-Feb User Accounts Banks Accounts  How much is this data worth?  Credit cards: $0.10-$25 Banks accounts: $10-$1000  $83K-$8.3M

How to Estimate Botnet Size? 53  Passive data collection methodologies  Honeypots Infect your own machines with Trojans Observe network traffic  Look at DNS traffic Domains linked to fast flux C&C  Networks flows Analyze all packets from a large ISP and use heuristics to identify botnet traffic  None of these methods give a complete picture

Size of the Torpig Botnet 54  Why the disconnect between IPs and bots?  Dynamic IPs, short DHCP leases  Casts doubt on prior studies, enables more realistic estimates of botnet size

 Worms  Basics  Example worms  Botnets  Basics  Torpig – fast flux and phishing  Privacy  Anonymous communication Outline 55

56 Snowden wants to communicate with Greenwald without Alexander to find out Ed’s IP Glenn’s IP

The problem of IP anonymity Client Server 57 VPN proxy Proxies are single point of attack (rogue admin, break in, legal, etc)

Tor model (very simplified) 58  Bitwise unlinkability  Use multiple hosts to form a “circuit”  Use multiple layers of encryption, peel them off as you go  Sender/receiver anonymity  Only the first hop (entry node) of a circuit knows the sender  Only the last hop (exit node) of a circuit knows the receiver  In simple case, this property holds as long as first and lost hop are not compromised

59 Proxy Traffic analysis Onion routing (Tor) Onion routing doesn’t resist traffic analysis (well known)

Outline 60

Anonymous Quanta (Aqua)  k-anonymity: Indistinguishable among k clients  BitTorrent  Appropriate latency and bandwidth  Many concurrent and correlated flows 61

62 Threat model  Global passive (traffic analysis) attack  Active attack  Edge mixes aren’t compromised

Padding 63 Constant rate (strawman) Defeats traffic analysis, but overhead proportional to peak link payload rate on fully connected network

Outline 64

65 Multipath Multipath reduces the peak link payload rate Padding

Variable uniform rate 66 Reduces overhead by adapting to changes in aggregate payload traffic

Outline 67

k-anonymity sets (ksets) 68 Send ksetRecv kset Provide k-anonymity by ensuring correlated rate changes on at least k client links Padding

Forming efficient ksets 69 Epochs Peers’ rates Are there temporal and spatial correlations among BitTorrent flows?

Outline 70

Methodology: Trace driven simulations  Month-long BitTorrent trace with 100,000 users  20 million flow samples per day  200 million traceroute measurements  Models of anonymity systems  Constant-rate: Onion routing v2  Broadcast: P5, DC-Nets  P2P: Tarzan  Aqua 71

edges 72 Models Overhead Much better bandwidth efficiency

edges 73 Models Throttling Efficiently leverages correlations in BitTorrent flows