1Security Part Two:Attacks and CountermeasuresFlashback: Internet design goals1. Interconnection2. Failure resilience3. Multiple types of service4. Variety of networks5. Management of resources6. Cost-effective7. Low entry-cost8. Accountability for resourcesWhere is security?Why did they leave it out?• Designed for connectivity• Network designed with implicit trust No “bad” guys• Can’t security requirements be provided atthe edge? Encryption, Authentication etc. End-to-end arguments in system designSecurity Vulnerabilities• At every layer in the protocol stack!• Network-layer attacks IP-level vulnerabilities Routing attacks• Transport-layer attacks TCP vulnerabilities• Application-layer attacks2IP-level vulnerabilities• IP addresses are provided by the source Spoofing attacks!• Use of IP address for authentication e.g., .rhosts allows remote login without explicitpassword authentication• Some IP features that have been exploited Fragmentation Broadcast for traffic amplificationRouting attacks• Divert traffic to malicious nodes Black-hole attack Eavesdropping• How to implement routing attacks? Distance-Vector Announce low-cost routes• BGP vulnerabilities Prefix hijacking Path alterationTCP-level attacks• SYN-Floods Implementations create state at servers beforeconnection is fully established Limited # slots get exhausted• Session hijack Pretend to be a trusted host Sequence number guessing• Session resets Close a legitimate connectionSession HijackTrusted (T)Malicious (M)Server1.SYN (ISN_M)SRC = M2.SYN(ISN_S1), ACK(ISN_M)First send a legitimate SYN to server3Session HijackTrusted (T)Malicious (M)Server1.SYN (ISN_M)SRC = T2.SYN(ISN_S2), ACK(ISN_M)3.ACK(ISN_S2)SRC = TUsing ISN_S1 from earlier connection guess ISN_S2!Needs to prevent T from RST-ingWhere do the problems come from?• Protocol-level vulnerabilities Implicit trust assumptions in design• Implementation vulnerabilities Both on routers and end-hosts• Incomplete specifications Often left to the imagination of programmersOutline• Security Vulnerabilities• Denial of Service• Worms• Countermeasures: Firewalls/IDSDenial of Service• Make a service unusable, usually byoverloading the server or network• Disrupt service by taking down hosts E.g., ping-of-death• Consume host-level resources E.g., SYN-floods• Consume network resources E.g., UDP/ICMP floods4Simple DoSAttacker Victim• Attacker usually spoofs source addressto hide origin• Aside: Backscatter Analysis•Works when the traffic results in replies from thevictim•E.g. TCP SYN, ICMP ECHO•Useful for understanding attacksLots of trafficBackscatter Analysis• Attacker is sending spoofed TCP SYNpackets to www.haplessvictim.com With spoofed address chosen at random• My network sees TCP SYN-ACKs fromwww.haplessvictim.com at rate R• What is the rate of the attack? Assuming addresses chosen are uniform (2^32/ Network Address space) * RDistributed DoSAttackerHandler HandlerAgent Agent Agent Agent AgentVictimDistributed DoS• Handlers are usually high volume servers Easy to hide the attack packets• Agents are usually home users with DSL/Cable Already infected and the agent installed• Very difficult to track down the attacker Multiple levels of indirection!• Aside: How to distinguish DDoS from a Flash Crowd? Flash Crowd Many clients using a service Slashdot Effect5Smurf AttackAttacking SystemInternetBroadcastEnabledNetworkVictim SystemReflector AttackAttackerAgent AgentReflector Reflector Reflector Reflector ReflectorVictimSrc = VictimDestination = ReflectorSrc = ReflectorDestination = VictimUnsolicited traffic at victim from legitimate hostsOutline• Security, Vulnerabilities• Denial of Service• Worms• Countermeasures: Firewalls/IDSWorm Overview• Self-propagate through network• Typical Steps in Worm Propagation Probe host for vulnerable software Exploit the vulnerability E.g., Sends bogus input (for buffer overflow) Attacker can do anything that the privileges of the buggyprogram allow Launches copy of itself on compromised host• Spread at exponential rate 10M hosts in < 5 minutes Hard to deal with manual intervention6Worm Spreading model• Worm growth Slow-start, Exponential phase, Slow decayWorm Spreading ModelWhy is the growth function like this?Let R be the scan-rateLet f be the fraction of vulnerable hosts infected attime tProbing Techniques• Random Scanning• Local Subnet Scanning• Routing Worm• Pre-generated Hit List• TopologicalRandom Scanning• 32 bit number is randomly generated andused as the IP address Aside: IPv6 worms will be different …• E.g., Slammer and Code Red I• Hits black-holed IP space frequently Only 28.6% of IP space is allocated Aside: can track worms by monitoring unusedaddresses Honeypots7Subnet Scanning• Generate last 1, 2, or 3 bytes of IP addressrandomly• Code Red II and Blaster• Some scans must be completely random toinfect whole internetRouting Worm• BGP information can tell which IP addressblocks are allocated• This information is publicly available http://www.routeviews.org/ http://www.ripe.net/ris/Hit List• Hit list of vulnerable machines is sent with payload Determined before worm launch by scanning• Gives the worm a boost in the slow start phase• Skips the phase that follows the exponential model Infection rate looks linear in the rapid propagation phase• Can avoid detection by the early detection systemsTopological• Uses info on the infected host to find thenext target Morris Worm used /etc/hosts , .rhosts Email address books P2P software usually store info about peers thateach host connects to8Some proposals for countermeasures• Better software safeguards Static analysis and array bounds checking (lint/e-fence) Safe versions of library calls gets(buf) -> fgets(buf, size, ...) sprintf(buf, ...) -> snprintf(buf, size, ...)• Host-level solutions E.g., Memory randomization, Stack guard• Host-diversity Avoid same exploit on multiple machines• Network-level: IP address space randomization Make scanning ineffective• Rate-limiting: Contain the rate of spread• Dynamic quarantine: Isolate infected hosts• Content-based filtering: signatures in packet payloadsOutline• Security, Vulnerabilities• Denial of Service• Worms•
View Full Document