BINF 711 Amr El Mougy Sherif Ismail ** Slides attributed to W. Stallings
Lecture (7) Security Attacks
Part I Malicious Software
Malicious Software Programs exploiting system vulnerabilities Known as malicious software or malware program fragments that need a host program e.g. viruses, logic bombs, and backdoors independent self-contained programs e.g. worms, bots replicating or not Sophisticated threat to computer systems
Malware Terminology Worm Trojan Horse Virus Back-door Logic Bomb Mobile Code Root Kit Spammers and Flooders Zombie, Bot Key-loggers Spyware Adware
Virus Piece of software that infects programs modifying them to include a copy of the virus so it executes secretly when host program is run Specific to operating system and hardware taking advantage of their details and weaknesses A typical virus goes through phases of: dormant propagation triggering execution
Virus Structure Components: Prepended / post pended / embedded infection mechanism - enables replication trigger - event that makes payload activate payload - what it does, malicious or benign Prepended / post pended / embedded When infected program invoked, executes virus code then original program code Can block initial infection (difficult) Or propagation (with access controls)
Virus Structure
Compression Virus
By Concealment Strategy Virus Classification By Target Boot sector infector File infector Macro virus By Concealment Strategy Stealth virus Polymorphic virus Metamorphic virus
Macro Virus Became very common in mid-1990s platform independent infect documents easily spread Exploit macro capability of office apps executable program embedded in office doc often a form of the Basic programming language More recent releases include protection Recognized by many anti-virus programs
Virus Countermeasures Prevention - ideal solution but difficult Realistically need: detection identification removal If detect but can’t identify or remove, must discard and replace infected program
Anti-virus Evolution Virus & antivirus tech have both evolved Early viruses simple code, easily removed As viruses become more complex, so must the countermeasures Generations first - signature scanners second - heuristics third - identify actions fourth - combination packages
Generic Decryption Runs executable files through GD scanner: CPU emulator to interpret instructions virus scanner to check known virus signatures emulation control module to manage process Lets virus decrypt itself in interpreter Periodically scan for virus signatures Issue is how long to interpret and scan tradeoff chance of detection vs time delay
Worms Replicating program that propagates over net using email, remote exec, remote login Has phases like a virus: dormant, propagation, triggering, execution propagation phase: searches for other systems, connects to it, copies self to it and runs May disguise itself as a system process
Worm Propagation Model
Worm Countermeasures Overlaps with anti-virus techniques Once worm on system A/V can detect Worms also cause significant net activity Worm defense approaches include: signature-based worm scan filtering filter-based worm containment payload-classification-based worm containment threshold random walk scan detection rate limiting and rate halting
Bots Program taking over other computers To launch hard to trace attacks If coordinated form a botnet Characteristics: remote control facility via IRC/HTTP etc spreading mechanism attack software, vulnerability, scanning strategy Various counter-measures applicable
Rootkits Set of programs installed for admin access Malicious and stealthy changes to host O/S May hide its existence subverting report mechanisms on processes, files, registry entries etc May be: persistent or memory-based user or kernel mode Installed by user via Trojan or intruder on system Range of countermeasures needed
Modern Malware Exploits ubiquitous applications such as Adobe reader to spread Exploit.Win32.pdfka exploits a vulnerability in Adobe reader to run a Javascript that automatically downloads files from the Internet Viruses on Jailbroken iPhones bypass the check for the security certificates of phone apps Most dangerous modern threat: Ransomware Typically installs itself as a Trojan Encrypts all files on the system Payment is required to deliver the key
Denial of Service Attacks Part II Denial of Service Attacks
Denial of Service Denial of Service (DoS): an action that prevents or impairs the authorized use of networks, systems, or applications by exhausting resources such as central processing units (CPU), memory, bandwidth, and disk space Attacks network bandwidth system resources application resources Have been an issue for some time
Classic Denial of Service Attacks Can use simple flooding ping From higher capacity link to lower Causing loss of traffic Source of flood traffic easily identified
Classic Denial of Service Attacks
Source Address Spoofing Use forged source addresses given sufficient privilege to “raw sockets” easy to create Generate large volumes of packets Directed at target With different, random, source addresses Cause same congestion Responses are scattered across Internet Real source is much harder to identify
Types of Flooding Attacks Classified based on network protocol used ICMP Flood uses ICMP packets, e.g. echo request typically allowed through, some required UDP Flood alternative uses UDP packets to some port TCP SYN Flood use TCP SYN (connection request) packets but for volume attack
SYN Spoofing Other common attack Attacks ability of a server to respond to future connection requests Overflowing tables used to manage them Hence an attack on system resource
Distributed Denial of Service Attacks Have limited volume if single source used Multiple systems allow much higher traffic volumes to form a Distributed Denial of Service (DDoS) Attack Often compromised PC’s / workstations zombies with backdoor programs installed forming a botnet
DDOS Control Hierarchy
Reflection Attacks Use normal behavior of network Attacker sends packet with spoofed source address being that of target to a server Server response is directed at target If send many requests to multiple servers, response can flood target Various protocols e.g. UDP or TCP/SYN Ideally want response larger than request Prevent if block source spoofed packets
Reflection Attacks Further variation creates a self-contained loop between intermediary and target Fairly easy to filter and block
Amplification Attacks
DNS Amplification Attacks Use DNS requests with spoofed source address being the target Exploit DNS behavior to convert a small request to a much larger response 60 byte request to 512 - 4000 byte response Attacker sends requests to multiple well connected servers, which flood target need only moderate flow of request packets DNS servers will also be loaded
DoS Attack Defenses High traffic volumes may be legitimate result of high publicity, e.g. “slash-dotted” or to a very popular site, e.g. Olympics etc Or legitimate traffic created by an attacker Three lines of defense against (D)DoS: attack prevention and preemption attack detection and filtering attack source traceback and identification
DDOS Attack on DYN DNS Provider Examples of Attacks DDOS Attack on DYN DNS Provider DNS is a global network that resolves URLs to IP addresses DYN is a DNS service provider that supports a large number of websites such as: Amazon, Github, Airbnb, CNN, Netflix http://computer.howstuffworks.com/dns.htm
DDOS Attack on DYN DNS Provider Examples of Attacks DDOS Attack on DYN DNS Provider A DOS attack is an attack on a system’s resources This can be network resources, application resources, TCP resources, etc. Modern systems have abundant resources. A successful attack needs a botnet The attack is executed using a sophisticated attack vector
DDOS Attack on DYN DNS Provider Examples of Attacks DDOS Attack on DYN DNS Provider The botnet was formed using the Mirai malware code, released early October 2016 It targets IoT devices with their default passwords unchanged The attackers enslaved approx. 100,000 devices. The attack traffic peaked at approx. 1.2 Tbps (largest attack known) Not all traffic was from the botnet. Legitimate traffic was generated from users trying to refresh their caches
DDOS Attack on DYN DNS Provider Examples of Attacks DDOS Attack on DYN DNS Provider First attack occurred at 11:00 UTC elevated bandwidth in the DNS platform (Asia Pacific, South America, Eastern Europe and US-West) As the incident response team started to react, the attack vector changed and focused on US-East with high volume of TCP and UDP packets Response team deployed traffic shaping and filtering techniques that efficiently reduced the impact of the attack By 13:20 UTC the defenses were deployed and the attack subsided At 15:50 UTC the second wave started and was more globally diverse The attack used the same protocols so the defenses dealt with it efficiently. The 2nd wave subsided at 17:00 UTC
DDOS Mitigation Scrubbing The attack consumes the bandwidth at the ISP and saturates the bandwidth at the target The target enterprise has no capacity to defend against volumetric attacks
DDOS Mitigation Scrubbing The victim makes an announcement that allows the ISP to redirect traffic to a specialized filter
DDOS Mitigation Scrubbing Bad traffic is directed to a black hole while good traffic is directed back to the enterprise network