announcements
play

Announcements You must therefore hard-code target stack - PowerPoint PPT Presentation

Announcements You must therefore hard-code target stack loca6ons in your exploits. You should not use a func6on such as get sp() in the


  1. Announcements ¡ • “You ¡must ¡therefore ¡hard-­‑code ¡target ¡stack ¡ loca6ons ¡in ¡your ¡exploits. ¡You ¡should ¡not ¡use ¡ a ¡func6on ¡such ¡as ¡get ¡sp() ¡in ¡the ¡exploits ¡you ¡ hand ¡in.” ¡ • Some ¡confusion ¡about ¡this. ¡ – Read ¡about ¡seman6cs ¡of ¡execve ¡(man ¡page ¡good ¡ start) ¡ – Calling ¡get_sp ¡in ¡sploit1.c ¡does ¡not ¡necessarily ¡ give ¡appropriate ¡stack ¡addresses ¡of ¡target1 ¡

  2. TCP/IP ¡security ¡ CS642: ¡ ¡ Computer ¡Security ¡ Professor ¡Ristenpart ¡ hKp://www.cs.wisc.edu/~rist/ ¡ rist ¡at ¡cs ¡dot ¡wisc ¡dot ¡edu ¡ University ¡of ¡Wisconsin ¡CS ¡642 ¡

  3. Moving ¡up ¡the ¡network ¡stack ¡ Internet ¡protocol ¡and ¡ICMP ¡ IP ¡spoofing, ¡fragmenta6on ¡ UDP ¡and ¡TCP ¡ Denial ¡of ¡Service ¡ IP ¡traceback, ¡filtering ¡ University ¡of ¡Wisconsin ¡CS ¡642 ¡

  4. Internet ¡ Alice ¡ ISP2 ¡ ISP1 ¡ backbone ¡ Bob ¡ Local ¡area ¡network ¡ ¡ Internet ¡ (LAN) ¡ TCP/IP ¡ ¡ Ethernet ¡ BGP ¡ ¡(border ¡gateway ¡protocol) ¡ 802.11 ¡ DNS ¡(domain ¡name ¡system) ¡

  5. Internet ¡threat ¡models ¡ ISP2 ¡ ISP1 ¡ backbone ¡ (1) ¡Malicious ¡hosts ¡ (2) ¡Subverted ¡routers ¡or ¡links ¡ (3) ¡Malicious ¡ISPs ¡or ¡backbone ¡

  6. Internet ¡protocol ¡stack ¡ Applica6on ¡ HTTP, ¡FTP, ¡SMTP, ¡SSH, ¡etc. ¡ Transport ¡ TCP, ¡UDP ¡ Network ¡ IP, ¡ICMP, ¡IGMP ¡ Link ¡ 802x ¡(802.11, ¡Ethernet) ¡ Applica6on ¡ Applica6on ¡ Transport ¡ Transport ¡ Network ¡ Network ¡ Network ¡ Link ¡ Link ¡ Link ¡

  7. IP ¡protocol ¡(IPv4) ¡ • Connec6onless ¡ – no ¡state ¡ • Unreliable ¡ – no ¡guarantees ¡ • ICMP ¡(Internet ¡Control ¡Message ¡Protocol) ¡ – error ¡messages, ¡etc. ¡ – oaen ¡used ¡by ¡tools ¡such ¡as ¡ping, ¡traceroute ¡

  8. Internet ¡protocol ¡stack ¡ user ¡data ¡ Applica6on ¡ Appl ¡ user ¡data ¡ TCP ¡ hdr ¡ IP ¡ Ethernet ¡ TCP ¡ Appl ¡ TCP ¡segment ¡ user ¡data ¡ hdr ¡ hdr ¡ IP ¡ TCP ¡ Appl ¡ user ¡data ¡ IP ¡datagram ¡ hdr ¡ hdr ¡ hdr ¡ ENet ¡ IP ¡ TCP ¡ Appl ¡ ENet ¡ user ¡data ¡ Ethernet ¡frame ¡ hdr ¡ hdr ¡ hdr ¡ hdr ¡ tlr ¡ 14 ¡ 20 ¡ 20 ¡ 46 ¡to ¡1500 ¡bytes ¡

  9. IPv4 ¡ Ethernet ¡frame ¡ ¡ ENet ¡ IP ¡ ENet ¡ data ¡ containing ¡ ¡ hdr ¡ hdr ¡ tlr ¡ IP ¡datagram ¡ 4-­‑bit ¡ 4-­‑bit ¡ 8-­‑bit ¡ ¡ 16-­‑bit ¡ ¡ version ¡ hdr ¡len ¡ type ¡of ¡service ¡ total ¡length ¡(in ¡bytes) ¡ 16-­‑bit ¡ ¡ 3-­‑bit ¡ 13-­‑bit ¡ ¡ iden6fica6on ¡ flags ¡ fragmenta6on ¡offset ¡ 8-­‑bit ¡ ¡ 8-­‑bit ¡ ¡ 16-­‑bit ¡ ¡ 6me ¡to ¡live ¡(TTL) ¡ protocol ¡ header ¡checksum ¡ 32-­‑bit ¡ ¡ source ¡IP ¡address ¡ 32-­‑bit ¡ ¡ des6na6on ¡IP ¡address ¡ op6ons ¡(op6onal) ¡

  10. Classless ¡Inter-­‑Domain ¡rou6ng ¡(CIDR) ¡ 128.168.0.0/16 ¡ a.b.c.d ¡/ ¡x ¡ ¡ x ¡indicates ¡number ¡of ¡bits ¡used ¡for ¡a ¡rou6ng ¡prefix ¡ IP ¡addresses ¡with ¡same ¡/x ¡prefix ¡share ¡some ¡por6on ¡of ¡route ¡

  11. From ¡hKp://en.wikipedia.org/wiki/IPv4 ¡

  12. CIDR ¡addressing ¡ 10110… ¡1110000 ¡ 10110… ¡1100011 ¡ 5.6.7.8 ¡ ISP2 ¡ ISP1 ¡ …1111001 ¡ 10110… ¡1111000 ¡ backbone ¡ …1111011 ¡ Prefixes ¡used ¡to ¡setup ¡hierarchical ¡rou6ng: ¡ ¡ ¡-­‑ ¡An ¡organiza6on ¡assigned ¡ ¡ ¡a.b.c.d/x ¡ ¡ ¡-­‑ ¡It ¡manages ¡addresses ¡prefixed ¡by ¡a.b.c.d/x ¡ ¡

  13. Rou6ng ¡ 10110… ¡1110000 ¡ 10110… ¡1100011 ¡ 5.6.7.8 ¡ ISP2 ¡ ISP1 ¡ …1111001 ¡ 10110… ¡1111000 ¡ backbone ¡ …1111011 ¡ Autonomous ¡systems ¡(AS) ¡are ¡organiza6onal ¡building ¡blocks ¡ ¡-­‑ ¡Collec6on ¡of ¡IP ¡prefixes ¡under ¡single ¡rou6ng ¡policy ¡ ¡-­‑ ¡wisc.edu ¡ Within ¡AS, ¡might ¡use ¡RIP ¡(Rou6ng ¡Informa6on ¡Protocol) ¡ Between ¡AS, ¡use ¡BGP ¡(Border ¡Gateway ¡Protocol) ¡

  14. Security ¡issues ¡with ¡IP ¡ 5.6.7.8 ¡ ISP2 ¡ ISP1 ¡ 1.2.3.4 ¡ backbone ¡ Rou6ng ¡has ¡issues, ¡we’ll ¡get ¡to ¡that ¡later ¡ What ¡else? ¡ ¡-­‑ ¡Anyone ¡can ¡talk ¡to ¡anyone ¡ ¡-­‑ ¡No ¡source ¡address ¡authen6ca6on ¡in ¡general ¡

  15. Denial ¡of ¡Service ¡(DoS) ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ Goal ¡is ¡to ¡prevent ¡legi6mate ¡users ¡from ¡accessing ¡ ¡ vic6m ¡(1.2.3.4) ¡ ¡ ICMP ¡ping ¡flood ¡

  16. ICMP ¡ ¡ (Internet ¡Control ¡Message ¡Protocol) ¡ IP ¡ ICMP ICMP ¡message ¡ hdr ¡ hdr ¡ 8-­‑bit ¡ ¡ 8-­‑bit ¡ ¡ 16-­‑bit ¡ ¡ type ¡ code ¡ checksum ¡ 4-­‑byte ¡ more ¡of ¡header ¡(depends ¡on ¡type) ¡ message ¡… ¡

  17. ICMP ¡ ¡ (Internet ¡Control ¡Message ¡Protocol) ¡ IP ¡ ICMP ICMP ¡message ¡ hdr ¡ hdr ¡ 8-­‑bit ¡ ¡ 8-­‑bit ¡ ¡ 16-­‑bit ¡ ¡ type ¡(0 ¡or ¡8) ¡ code ¡= ¡0 ¡ checksum ¡ 16-­‑bit ¡ ¡ 16-­‑bit ¡ ¡ iden6fier ¡ ¡ sequence ¡number ¡ op6onal ¡data ¡ Echo ¡request ¡(used ¡by ¡ping) ¡

  18. Denial ¡of ¡Service ¡(DoS) ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ Goal ¡is ¡to ¡prevent ¡legi6mate ¡users ¡from ¡accessing ¡ ¡ vic6m ¡(1.2.3.4) ¡ ¡ ICMP ¡ping ¡flood ¡ -­‑ AKacker ¡sends ¡ICMP ¡pings ¡as ¡fast ¡as ¡possible ¡to ¡vic6m ¡ -­‑ When ¡will ¡this ¡work ¡as ¡a ¡DoS? ¡ ¡ AKacker ¡resources ¡> ¡vic6m’s ¡ -­‑ How ¡can ¡this ¡be ¡prevented? ¡ ¡ ¡ Ingress ¡filtering ¡near ¡vic6m ¡

  19. Denial ¡of ¡Service ¡(DoS) ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ ISP3 ¡ ¡ 8.7.3.4 ¡ How ¡can ¡aKacker ¡avoiding ¡ingress ¡filtering? ¡ AKacker ¡can ¡send ¡packet ¡with ¡fake ¡source ¡IP ¡ ¡“spoofed” ¡packet ¡ Packet ¡will ¡get ¡routed ¡correctly ¡ Replies ¡will ¡not ¡ source: ¡8.7.3.4 ¡ Send ¡IP ¡packet ¡with ¡ ¡ from ¡5.6.7.8 ¡ dest: ¡1.2.3.4 ¡

  20. Reflec6on ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ ISP3 ¡ ¡ 8.7.3.4 ¡ Note ¡a ¡valid ¡packet ¡sends ¡a ¡reply ¡to ¡8.7.3.4 ¡ ¡-­‑ ¡AKacker ¡can ¡bounce ¡an ¡aKack ¡against ¡8.7.3.4 ¡off ¡1.2.3.4 ¡ ¡ ¡-­‑ ¡Frame ¡1.2.3.4 ¡ ¡-­‑ ¡Hides ¡a ¡single-­‑packet ¡exploit ¡even ¡beKer ¡ ¡ ¡ ¡(1.2.3.4 ¡in ¡foreign ¡country) ¡

  21. Anonymous ¡single-­‑packet ¡ ¡ aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ ISP3 ¡ ¡ 8.7.3.4 ¡ 1.2.3.4 ¡contains ¡a ¡buffer ¡overflow ¡in ¡web ¡server ¡ src: ¡8.7.3.4 ¡ src: ¡8.7.3.4 ¡ dst: ¡1.2.3.4 ¡ dst: ¡1.2.3.4 ¡ ¡ ¡ HTTP/1.1 ¡ ¡GET ¡ HTTP/1.1 ¡ ¡GET ¡ AAAAAAAAAAA…. ¡ exploit ¡buffer ¡ Untraceable ¡packet ¡of ¡death ¡ Untraceable ¡single-­‑packet ¡exploit ¡+ ¡payload ¡

  22. Denial ¡of ¡Service ¡(DoS) ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ DoS ¡works ¡beKer ¡when ¡there ¡is ¡ asymmetry ¡between ¡ vic6m ¡and ¡aKacker ¡ -­‑ AKacker ¡uses ¡few ¡resources ¡to ¡cause ¡ -­‑ Vic6m ¡to ¡consume ¡lots ¡of ¡resources ¡

  23. Denial ¡of ¡Service ¡(DoS) ¡aKacks ¡ 5.6.7.8 ¡ Backbone ¡ ¡ ISP2 ¡ ¡ ISP1 ¡ 1.2.3.4 ¡ DoS ¡works ¡beKer ¡when ¡there ¡is ¡ asymmetry ¡between ¡ vic6m ¡and ¡aKacker ¡ -­‑ AKacker ¡uses ¡few ¡resources ¡to ¡cause ¡ -­‑ Vic6m ¡to ¡consume ¡lots ¡of ¡resources ¡ Old ¡example: ¡Smurf ¡aKack ¡ Router ¡allows ¡aKacker ¡to ¡send ¡broadcast ¡ICMP ¡ping ¡on ¡ network. ¡AKacker ¡spoofs ¡SRC ¡address ¡to ¡be ¡1.2.3.4 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend