firewalls
play

Firewalls CS461/ECE422 Spring 2012 Reading Material - PowerPoint PPT Presentation

Firewalls CS461/ECE422 Spring 2012 Reading Material Text chapter 9 Firewalls and Internet Security: Repelling the Wily Hacker, Cheswick, Bellovin,


  1. Firewalls ¡ CS461/ECE422 ¡ Spring ¡2012 ¡

  2. Reading ¡Material ¡ • Text ¡chapter ¡9 ¡ • “Firewalls ¡and ¡Internet ¡Security: ¡Repelling ¡the ¡ Wily ¡Hacker”, ¡Cheswick, ¡Bellovin, ¡and ¡Rubin. ¡ ¡

  3. Firewall ¡Goal ¡ • Insert ¡ a"er ¡the ¡fact ¡security ¡by ¡wrapping ¡or ¡ interposing ¡a ¡filter ¡on ¡network ¡traffic ¡ ¡ Inside Outside

  4. Firewall ¡Requirements ¡ • All ¡traffic ¡between ¡network ¡secTon ¡A ¡and ¡ network ¡secTon ¡B ¡(and ¡visa ¡versa) ¡must ¡pass ¡ through ¡the ¡firewall ¡(or ¡a ¡consistently ¡ controlled ¡set ¡of ¡firewalls) ¡ • Only ¡authorized ¡traffic ¡(as ¡specified ¡by ¡the ¡ security ¡policy) ¡is ¡allowed ¡to ¡pass ¡ • The ¡firewall ¡itself ¡is ¡immune ¡to ¡penetraTon ¡

  5. “Typical” ¡corporate ¡network ¡ Firewall Demilitarized Intranet Zone (DMZ) Mail forwarding DNS (DMZ) Web Server File Server Web Server Mail server DNS (internal) Firewall User machines User machines User machines Internet

  6. Packet ¡Filter ¡Firewall ¡ • Operates ¡at ¡Layer ¡3 ¡in ¡router ¡or ¡HW ¡firewall ¡ • Has ¡access ¡to ¡the ¡Layer ¡3 ¡header ¡and ¡Layer ¡4 ¡header ¡ • Can ¡block ¡traffic ¡based ¡on ¡source ¡and ¡desTnaTon ¡ address, ¡ports, ¡and ¡protocol ¡ • Does ¡not ¡reconstruct ¡Layer ¡4 ¡payload, ¡so ¡cannot ¡do ¡ reliable ¡analysis ¡of ¡layer ¡4 ¡or ¡higher ¡content ¡

  7. Rule ¡Scenario ¡

  8. Example ¡Packet ¡Filter ¡Rules ¡ • Rules ¡a^ached ¡to ¡outside ¡interface ¡ Ac#on ¡ Source ¡ Src ¡ Dest ¡Addr ¡ Dest ¡ Protocol ¡ Comment ¡ Addr ¡ port ¡ Port ¡ Block ¡ Outside ¡host ¡ * ¡ * ¡ * ¡ * ¡ Don’t ¡trust ¡ Allow ¡ * ¡ * ¡ Our ¡Mail ¡ 25 ¡ Tcp ¡ Allow ¡mail ¡traffic ¡ Server ¡ • Rules ¡a^ached ¡to ¡inside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡Addr ¡ Dest ¡Port ¡ Protocol ¡ Comment ¡ Addr ¡ Port ¡ Block ¡ * ¡ * ¡ Outside ¡ * ¡ ¡ * ¡ ¡ Don’t ¡trust ¡ host ¡ Allow ¡ Our ¡Mail ¡ 25 ¡ * ¡ * ¡ Tcp ¡ Allow ¡Mail ¡traffic ¡ Server ¡

  9. Same ¡Rules ¡in ¡iptables ¡ • Rules ¡in ¡the ¡filter ¡table ¡ • -A FORWARD –p ip -s outside_host –j REJECT -A FORWARD –p ip –d outside_host –j REJECT -A FORWARD –i outside –p tcp –d our_mail_server –m tcp --dport 25 –j ACCEPT -A FORWARD –i inside –p tcp –s our_mail_server –m tcp --sport 25 –j ACCEPT -A FORWARD –j REJECT

  10. More ¡Example ¡Pack ¡Filter ¡Rules ¡ • Rules ¡a^ached ¡to ¡inside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ * ¡ * ¡ * ¡ 25 ¡ TCP ¡ Allow ¡traffic ¡to ¡all ¡mail ¡ servers ¡ • Rules ¡a^ached ¡to ¡outside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ * ¡ 25 ¡ * ¡ * ¡ TCP ¡ Allow ¡return ¡traffic ¡from ¡all ¡ mail ¡servers ¡

  11. A ¡Be^er ¡Example ¡ • Rules ¡a^ached ¡to ¡inside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ Inside ¡ * ¡ * ¡ 25 ¡ TCP ¡ Allow ¡traffic ¡to ¡all ¡mail ¡ networks ¡ servers ¡ • Rules ¡a^ached ¡to ¡outside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Flags ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ * ¡ 25 ¡ Inside ¡ * ¡ TCP ¡ ACK ¡ Allow ¡return ¡traffic ¡from ¡ networks ¡ all ¡mail ¡servers ¡

  12. FTP ¡Example ¡ • Rules ¡a^ached ¡to ¡inside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Flags ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ Inside ¡ * ¡ * ¡ 21 ¡ TCP ¡ Allow ¡Control ¡channel ¡ networks ¡ traffic ¡out ¡ Allow ¡ Inside ¡ > ¡1024 ¡ * ¡ * ¡ ¡ TCP ¡ ACK ¡ Allow ¡data ¡traffic ¡back ¡ networks ¡ • Rules ¡a^ached ¡to ¡outside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡ Dest ¡ Proto ¡ Flags ¡ Comment ¡ Addr ¡ Port ¡ Addr ¡ Port ¡ Allow ¡ * ¡ 21 ¡ Inside ¡ * ¡ TCP ¡ ACK ¡ Allow ¡return ¡traffic ¡for ¡ networks ¡ FTP ¡control ¡channel ¡ Allow ¡ * ¡ * ¡ Inside ¡ >1024 ¡ TCP ¡ IniTate ¡data ¡traffic ¡ networks ¡

  13. Stateful ¡InspecTon ¡Firewall ¡ • Evolved ¡as ¡packet ¡filters ¡aimed ¡for ¡proxy ¡funcTonality ¡ • In ¡addiTon ¡to ¡Layer ¡3 ¡reassembly, ¡it ¡can ¡reconstruct ¡layer ¡4 ¡traffic ¡ • Some ¡applicaTon ¡layer ¡analysis ¡exists, ¡e.g., ¡for ¡HTTP, ¡FTP, ¡H.323 ¡ – Called ¡context-­‑based ¡access ¡control ¡(CBAC) ¡on ¡IOS ¡ – Configured ¡by ¡fixup ¡command ¡on ¡PIX ¡ • Some ¡of ¡this ¡analysis ¡is ¡necessary ¡to ¡enable ¡address ¡translaTon ¡and ¡ dynamic ¡access ¡for ¡negoTated ¡data ¡channels ¡ • ReconstrucTon ¡and ¡analysis ¡can ¡be ¡expensive. ¡ ¡ ¡ – Must ¡be ¡configured ¡on ¡specified ¡traffic ¡streams ¡ – At ¡a ¡minimum ¡the ¡user ¡must ¡tell ¡the ¡Firewall ¡what ¡kind ¡of ¡traffic ¡to ¡ expect ¡on ¡a ¡port ¡ – Degree ¡of ¡reconstrucTon ¡varies ¡per ¡plaform, ¡e.g. ¡IOS ¡does ¡not ¡do ¡IP ¡ reassembly ¡

  14. Circuit ¡Firewall ¡ • Actually ¡creates ¡two ¡separate ¡TCP ¡connecTons ¡ – Completely ¡reconstructs ¡TCP ¡connecTons ¡ – SOCKS ¡is ¡an ¡example ¡implementaTon ¡

  15. Example ¡Stateful ¡Rules ¡ • Rules ¡a^ached ¡to ¡outside ¡interface ¡ Ac#on ¡ Source ¡ Src ¡ Dest ¡Addr ¡ Dest ¡ Protocol ¡ Comment ¡ Addr ¡ port ¡ Port ¡ Block ¡ Outside ¡host ¡ * ¡ * ¡ * ¡ * ¡ Don’t ¡trust ¡ Allow ¡ * ¡ * ¡ Our ¡Mail ¡ 25 ¡ Tcp ¡ Allow ¡mail ¡traffic ¡ Server ¡ • Rules ¡a^ached ¡to ¡inside ¡interface ¡ Ac#on ¡ Source ¡ Source ¡ Dest ¡Addr ¡ Dest ¡Port ¡ Protocol ¡ Comment ¡ Addr ¡ Port ¡ Block ¡ * ¡ * ¡ Outside ¡ * ¡ ¡ * ¡ ¡ Don’t ¡trust ¡ host ¡

  16. Same ¡Rules ¡in ¡iptables ¡ • Rules ¡in ¡the ¡filter ¡table ¡ • -A FORWARD –p ip -s outside_host –j REJECT -A FORWARD –p ip –d outside_host –j REJECT -A FORWARD –m state --state ESTABLISHED, RELATED – j ACCEPT -A FORWARD –i outside –m state –state NEW –p tcp – d our_mail_server –m tcp --dport 25 –j ACCEPT -A FORWARD –j REJECT

  17. ApplicaTon ¡Proxy ¡Firewall ¡ • Firewall ¡sogware ¡runs ¡in ¡applicaTon ¡space ¡on ¡the ¡ firewall ¡ • The ¡traffic ¡source ¡must ¡be ¡aware ¡of ¡the ¡proxy ¡and ¡ add ¡an ¡addiTonal ¡header ¡ • Now ¡transparent ¡proxy ¡support ¡is ¡available ¡(TPROXY) ¡ • Leverage ¡basic ¡network ¡stack ¡funcTonality ¡to ¡saniTze ¡ applicaTon ¡level ¡traffic ¡ – Block ¡java ¡or ¡acTve ¡X ¡ – Filter ¡out ¡“bad” ¡URLs ¡ – Ensure ¡well ¡formed ¡protocols ¡or ¡block ¡suspect ¡aspects ¡of ¡ protocol ¡

  18. Traffic ¡reconstrucTon ¡ X Y FTP: X to Y GET /etc/passwd GET command causes Might have filter for files to firewall to dynamically block, like /etc/passwd open data channel initiate from Y to X

  19. Ingress ¡and ¡Egress ¡Filtering ¡ • Ingress ¡filtering ¡ – Filter ¡out ¡packets ¡from ¡invalid ¡addresses ¡before ¡entering ¡your ¡network ¡ • Egress ¡filtering ¡ – Filter ¡out ¡packets ¡from ¡invalid ¡addresses ¡before ¡leaving ¡your ¡network ¡ Owns network X Inside Outside Egress Filtering Ingress Filtering Block outgoing traffic not Block incoming traffic from sourced from network X one of the set of invalid networks

  20. Denial ¡of ¡Service ¡ ¡ • Example ¡a9acks ¡ – Smurf ¡A9ack ¡ – TCP ¡SYN ¡A9ack ¡ – Teardrop ¡ • DoS ¡general ¡exploits ¡resource ¡limita#ons ¡ – Denial ¡by ¡ConsumpTon ¡ – Denial ¡by ¡DisrupTon ¡ – Denial ¡by ¡ReservaTon ¡

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