1 / 43

CSCE 815 Network Security Lecture 22

CSCE 815 Network Security Lecture 22. Intrusions. April 10, 2003. Protocol Review. IP internet protocol – routing packets through network TCP – connection oriented transport UDP – ARP – address resolution protocol *** ICMP – internet control message protocol ***over IP

hei
Download Presentation

CSCE 815 Network Security Lecture 22

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCE 815 Network Security Lecture 22 Intrusions April 10, 2003

  2. Protocol Review • IP internet protocol – routing packets through network • TCP – connection oriented transport • UDP – • ARP – address resolution protocol *** • ICMP – internet control message protocol ***over IP • DHCP - • Application layer – FTP, HTTP, SMTP, SNMP, SSH

  3. Buffer Overflow comments • GDB • gcc –g • breakpoints • single step • info [frame, regs, …] • print [format] variable • Linux vs CYGWIN

  4. IP Spoofing Attacks • Spoofing means fraudulently authenticating one machine as another • Fraudulent send IP packet to A with • source IP address field=“IP address of B” • Raw sockets - • Blind Spoofing: TCP handshake guessing sequence numbers • “Exploit code for IP Smart Spoofing ” • http://www.mail-archive.com/bugtraq@securityfocus. com/msg09855.html

  5. Raw Socket Creation • Reference Stevens “Unix Network Programming” Ch 25 #include <socket.h> int sockfd; • Create the raw socket sockfd = socket(AF_INET, SOCK_RAW, protocol) • The IP_HDRINCL socket option can be set int on = 1; setsocketopt(sockfd, IPPRTO_IP, IP_HDRINCL, &on sizeof(on)) • Bind(sockfd, &addr, sizeof(addr)) • Sendto(sockfd, sendbuf, len,0, dstAddr, dstAddrLen)

  6. Preventing IP Spoofing Attacks • Preventing IP spoofing • have your routers reject packets with local addresses from the outside • also have them reject internal packets claiming to originate from the outside • authenticate packets from inside

  7. ARP Spoofing • Address resolution Protocol (ARP) • IP address  hardware(ethernet) address mapping • send ARP packet “who has IP address and what is your hardware address?” • ARP cache – table of recent responses • ARP Spoofing • Assume IP address “a” of trusted host • Respond to ARP packets for address “a” • Sending false hardware address (I.e. the fraud’s address) • Solution: make ARP cache static (manual updates!?!)

  8. ARP Spoofing • Address resolution Protocol (ARP) • IP address  hardware(ethernet) address mapping • send ARP packet “who has IP address and what is your hardware address?” • ARP cache – table of recent responses • ARP Spoofing • Assume IP address “a” of trusted host • Respond to ARP packets for address “a” • Sending false hardware address (I.e. the fraud’s address) • Solution: make ARP cache static (manual updates!?!)

  9. DNS Spoofing • Domain Name System (DNS) • hierarchical name servers map FQDN  IP address • UDP packet sent with name to name server • Chinese dissidents Spoofing • http://www.dit-inc.us/hj-09-02.html

  10. Web Spoofing

  11. Email Spoofing

  12. Security Myth • “The only secure computer is the one that is turned off and unplugged” • Once connected to internet it becomes a target • So shutdown all unnecessary services. • Myth 2 “My firewall will stop the pesky crackers!”

  13. The Players, Platforms and Attacks • The Players: • The Black Hats • Script kiddies • The White Hats • Platforms of attackers • Windows • Linux/NetBSD/FreeBSD • OpenBSD billed as “the most secure OS freely available” • Attacks • Denial of Service • Viruses, Trojans, malicious scripts • Web defacement

  14. Network Administrator Tools • Network Administration tools • (MSDOS/Windows) ipconfig • ifconfig • netstat • /etc/… not really tools as much as files • /sbin/… • Find ethernet/IP addresses • More tools • http://newsforge.com/newsforge/02/12/12/0232235.shtml?tid=23

  15. ARP Spoofing Revisited • Linux World • /sbin • arp • Iptables, ipchains, ipfwadm • Arp comand –print the table • Ping somewhere then use arp to look at the table again

  16. What is a Firewall? • a choke point of control and monitoring • interconnects networks with differing trust • imposes restrictions on network services • only authorized traffic is allowed • auditing and controlling access • can implement alarms for abnormal behavior • is itself immune to penetration • provides perimeter defence

  17. Firewall Limitations • cannot protect from attacks bypassing it • eg sneaker net, utility modems, trusted organisations, trusted services (eg SSL/SSH) • cannot protect against internal threats • eg disgruntled employee • cannot protect against transfer of all virus infected programs or files • because of huge range of O/S & file types

  18. Firewalls – Packet Filters

  19. Firewalls – Packet Filters • simplest of components • foundation of any firewall system • examine each IP packet (no context) and permit or deny according to rules • hence restrict access to services (ports) • possible default policies • that not expressly permitted is prohibited • that not expressly prohibited is permitted

  20. Firewalls – Packet Filters

  21. Attacks on Packet Filters • IP address spoofing • fake source address to be trusted • add filters on router to block • source routing attacks • attacker sets a route other than default • block source routed packets • tiny fragment attacks • split header info over several tiny packets • either discard or reassemble before check

  22. Firewalls with IPtables (Linux) • IPtables • IPchains • Netfilter • “10 minutes to an iptables-based Linux firewall”by Joshua Drake • http://www.linuxworld.com/site-stories/2001/0920.ipchains.html • “Taming the Wild Netfilter”September 01, 2001 by David A. Bandel • http://www.linuxjournal.com/article.php?sid=4815

  23. Firewalls with IPtables (Linux) • [root@jd root]# /sbin/iptables -hiptables v1.2.1Usage: iptables -[ADC] chain rule-specification [options]       iptables -[RI] chain rulenum rule-specification [options]       iptables -D chain rulenum [options]       iptables -[LFZ] [chain] [options]       iptables -[NX] chain       iptables -E old-chain-name new-chain-name       iptables -P chain target [options]       iptables -h (print this help information)Commands:Either long or short options are allowed.  --append  -A chain            Append to chain  --delete  -D chain            Delete matching rule from chain  --delete  -D chain rulenum  [...]

  24. Firewalls with IPtables (Linux) • No incoming traffic (tcp connections) • /sbin/iptables -A INPUT -p tcp --syn -j DROP • Accept incoming SSH (port 22) why? • /sbin/iptables -A INPUT -p tcp --syn -s 192.168.1.110/32 --destination-port 22 -j ACCEPT • /sbin/iptables -A INPUT -p tcp --syn -j DROP • Add rule to allow a web server to the chain • /sbin/iptables -A INPUT -p tcp --syn -s 192.168.1.110/32 --destination-port 22 -j ACCEPT • /sbin/iptables -A INPUT -p tcp --syn --destination-port 80 -j ACCEPT • /sbin/iptables -A INPUT -p tcp --syn -j DROP

  25. Chroot Jails • References: • http://librenix.com/ general purpose security/Linux site • http://www.gsyc.inf.uc3m.es/~assman/jail/index.html • chroot environment:

  26. Chroot Implementation

  27. User-mode Linux • UML (binding problem) • http://user-mode-linux.sourceforge.net/ • creates a virtual Machine • allows you to run multiple instances of Linux on the same system at the same time • designed for a variety of purposes, such as kernel debugging, testing applications

  28. Firewalls – Stateful Packet Filters • examine each IP packet in context • keeps tracks of client-server sessions • checks each packet validly belongs to one • better able to detect bogus packets out of context

  29. Firewalls - Application Level Gateway (or Proxy)

  30. Firewalls - Application Level Gateway (or Proxy) • use an application specific gateway / proxy • has full access to protocol • user requests service from proxy • proxy validates request as legal • then actions request and returns result to user • need separate proxies for each service • some services naturally support proxying • others are more problematic • custom services generally not supported

  31. Firewalls - Circuit Level Gateway

  32. Firewalls - Circuit Level Gateway • relays two TCP connections • imposes security by limiting which such connections are allowed • once created usually relays traffic without examining contents • typically used when trust internal users by allowing general outbound connections • SOCKS commonly used for this

  33. Bastion Host • highly secure host system • potentially exposed to "hostile" elements • hence is secured to withstand this • may support 2 or more net connections • may be trusted to enforce trusted separation between network connections • runs circuit / application level gateways • or provides externally accessible services

  34. Firewall Configurations

  35. Firewall Configurations

  36. Firewall Configurations

  37. Access Control • given system has identified a user • determine what resources they can access • general model is that of access matrix with • subject - active entity (user, process) • object - passive entity (file or resource) • access right – way object can be accessed • can decompose by • columns as access control lists • rows as capability tickets

  38. Access Control Matrix

  39. Trusted Computer Systems • information security is increasingly important • have varying degrees of sensitivity of information • cf military info classifications: confidential, secret etc • subjects (people or programs) have varying rights of access to objects (information) • want to consider ways of increasing confidence in systems to enforce these rights • known as multilevel security • subjects have maximum & current security level • objects have a fixed security level classification

  40. Bell LaPadula (BLP) Model • one of the most famous security models • implemented as mandatory policies on system • has two key policies: • no read up (simple security property) • a subject can only read/write an object if the current security level of the subject dominates (>=) the classification of the object • no write down (*-property) • a subject can only append/write to an object if the current security level of the subject is dominated by (<=) the classification of the object

  41. Reference Monitor

  42. Evaluated Computer Systems • governments can evaluate IT systems • against a range of standards: • TCSEC, IPSEC and now Common Criteria • define a number of “levels” of evaluation with increasingly stringent checking • have published lists of evaluated products • though aimed at government/defense use • can be useful in industry also

  43. Summary • have considered: • firewalls • types of firewalls • configurations • access control • trusted systems

More Related