ECPE 5984 – Fundamentals of Computer


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

ECPE 5984 – Fundamentals of Computer

  1. 1. Network Intrusion Detection Systems Randy Marchany VA Tech Computing Center Blacksburg, VA 24060 [email_address]
  2. 2. FAQ Information <ul><li>These notes come from the Network Intrusion Detection Systems FAQ by Robert Graham ( [email_address] </li></ul><ul><li> </li></ul>
  3. 3. Introduction <ul><li>Intrusion – an attempt to compromise or misuse a computer system or network. </li></ul><ul><li>Network Intrusion Detection System (NIDS) monitors packets on the network wire and attempts to discover if hackers are attempting to break into a system or cause a DOS. </li></ul><ul><li>NIDS can run on the target or independent system. </li></ul>
  4. 4. Introduction <ul><li>Network NIDS monitor many machines. </li></ul><ul><li>System Integrity Verifiers (SIV) monitor system files to detect trojan versions of system binaries. It may log the attempt as it occurs. </li></ul><ul><li>Log File Monitors (LFM) monitor log files generated by network services. </li></ul>
  5. 5. Introduction <ul><li>Deception Systems aka honeypots, fly-traps contain pseudo-services that emulate well-known holes in an attempt to trap hackers. </li></ul><ul><li>Intruders – outsiders or insiders </li></ul>
  6. 6. How do Intruders Get In? <ul><li>Physical Intrusion – console passwords, disk removal, etc. </li></ul><ul><li>System Intrusion – hacker has a low privilege account on the system and uses a tool that exploits a weakness to gain system privilege. </li></ul><ul><li>Remote Intrusion – gains access via a remote service on the system. </li></ul>
  7. 7. Vulnerability Types <ul><li>Race Conditions – 2 programs accessing the same data at the same time. </li></ul><ul><li>Software bugs – Buffer Overflows </li></ul><ul><li>Unexpected Combinations – input is meaningless at 1 level but not at another. </li></ul><ul><li>Unhandled Input – what happens when input doesn’t match specifications. </li></ul>
  8. 8. System Configuration <ul><li>Default – vendor shipped configurations </li></ul><ul><li>Lazy – sysadmins too lazy to tighten the system. </li></ul><ul><li>Hole Creation – most programs can run in non-secure mode. </li></ul><ul><li>Trust Relationships – one system trusts another. R-commands are an example. </li></ul>
  9. 9. Password Cracking <ul><li>Trivial – names of people, places, things </li></ul><ul><li>Dictionary – Unix Crack or NT/L0pht password cracking programs </li></ul><ul><li>Brute Force – programs that try all possible combinations of characters. </li></ul>
  10. 10. Sniffers & Design Flaws <ul><li>Shared Medium – base ethernet </li></ul><ul><li>Server – sniffer runs on the server. Works on switched nets. </li></ul><ul><li>Remote – SNMP based </li></ul><ul><li>TCP/IP Protocol Flaws – smurf, synflood, IP spoofing. IP allows data to be changed anytime. IPSEC is a fix. </li></ul><ul><li>System Flaws – Windows, Unix </li></ul>
  11. 11. How Do They Get Passwords? <ul><li>Clear Text Passwords </li></ul><ul><li>Encrypted Sniffing </li></ul><ul><li>Replay Attack – the intruders don’t decrypt the passwords. They use the encrypted form to login the systems. </li></ul><ul><li>Password file stealing </li></ul><ul><li>Observation/Social Engineering – piece of paper attack </li></ul>
  12. 12. Intrusion Steps <ul><li>Outside Reconnaissance – whois, DNS, WWW, FTP </li></ul><ul><li>Inside Reconnaissance – ping sweep, inverse mapping, port scanning, rpcinfo, showmount, snmpwalk. </li></ul><ul><li>Exploit – exploiting vulnerabilities discovered earlier. </li></ul>
  13. 13. Intrusion Steps <ul><li>Foothold – gained entrance into the machine and now starts to hide the evidence. Install rootkits, trojans. </li></ul><ul><li>Profit – taking advantage of the entry, the hacker now goes after the real target – information, $$, credit card info, etc. </li></ul><ul><li>Joyride – systems used in a relay attack. </li></ul>
  14. 14. Common WWW Exploits <ul><li>CGI – passing data to the command shell via shell metacharacters, using hidden variables, phf. </li></ul><ul><li>WWW server </li></ul><ul><li>IIS/RDP - ../../../../ attack to get files from the server. </li></ul><ul><li>Alternate data streams ( Win95 names). </li></ul>
  15. 15. Common WWW Exploits <ul><li>URL – fields can cause buffer overflows as it’s parsed in the HTTP header, displayed on the screen or saved in the cache history. Old IE bug would execute .LNK or .URL commands. </li></ul><ul><li>HTTP headers can be used to exploit bugs because some fields are passed to functions that expect only certain information. </li></ul>
  16. 16. Common WWW Exploits <ul><li>HTML – MIME-type overflow in Netscape Communicator’s <EMBED> command. </li></ul><ul><li>Javascript – usually tries to exploit the “file upload” function by generating a filename and automatically hidden the SUBMIT button. Many fixes for this but equal # of circumventions. </li></ul>
  17. 17. Common WWW Exploits <ul><li>Frames – part of JavaScript or Java hack (hiding web bugs). Hackers include link to valid site that uses frames then replace some of those frames with bad www pages. </li></ul><ul><li>Java – normal Java applets have no access to the local system but sometimes they’d be more useful if they did have local access. </li></ul><ul><li>Active X – works purely on trust model and runs in native mode. </li></ul>
  18. 18. Buffer Overflows & DNS Attacks <ul><li>DNS – extra long DNS name is sent to the server. DNS names are limited to 256 bytes. </li></ul><ul><li>RPC – statd, ttdbserverd, cmsd, snmpXdmid </li></ul><ul><li>DNS Cache Poisoning – Every DNS packet contains a Question/Answer section. Vulnerable servers will believe and cache Answer you provide. </li></ul>
  19. 19. Common Reconnaissance Scans and DOS Attacks <ul><li>Ping Sweeps </li></ul><ul><li>TCP/UDP Scans </li></ul><ul><li>OS identification </li></ul><ul><li>Account Scans </li></ul><ul><li>Ping of Death </li></ul><ul><li>SYN Flood </li></ul><ul><li>Land </li></ul><ul><li>DDoS </li></ul>
  20. 20. How Do NIDS Detect Intrusions? <ul><li>Anomaly detection – measures a baseline of stats like CPU utilization, disk activity, user logins, file activity. NIDS triggers when a deviation from this baseline occurs. </li></ul><ul><li>Signature recognition – pattern matching attack probes. Uses large databases to detect the attack. Antiviral software uses this. Works only for known attacks. </li></ul>
  21. 21. Matching Signatures with Incoming Traffic <ul><li>NIDS consists of special TCP/IP stack that reassembles datagrams and TCP streams. It uses: </li></ul><ul><li>Protocol Stack Verification – search for protocol violations (SYN/FIN, etc.) </li></ul><ul><li>Application Protocol Verification </li></ul><ul><li>New Event Creation – log all application layer protocols for later correlation. </li></ul>
  22. 22. NIDS Detect the Attack <ul><li>Firewall reconfiguration to block IP address. </li></ul><ul><li>Chime – “Danger, Will Robinson!” alarm. Email or page admins. </li></ul><ul><li>SNMP trap – send trap datagram to console. </li></ul><ul><li>Syslog – record it in NT Event log or Unix syslog </li></ul><ul><li>Save Evidence. </li></ul><ul><li>Launch Program to handle the event. </li></ul><ul><li>Terminate the TCP connection by sending a FIN. </li></ul>
  23. 23. Other Countermeasures <ul><li>Firewalls – should be considered as the LAST line of defense. </li></ul><ul><li>Authentication – password policies, single signon, removing cleartext protocols. </li></ul><ul><li>VPN – secure connection for remote access. However, they decrease corporate security because both ends of the pipe are wide open. </li></ul>
  24. 24. Where to locate IDS <ul><li>Network hosts </li></ul><ul><li>Network Perimeter </li></ul><ul><li>WAN/LAN Backbone </li></ul><ul><li>Server farms </li></ul><ul><li>Need to be on low-bandwidth nets to keep up with traffic. </li></ul>
  25. 25. Fitting IDS with Security Framework <ul><li>Put firewalls between networks with different security requirements. </li></ul><ul><li>Use scanners to check for exploits. </li></ul><ul><li>Set host policy to conform with standards. </li></ul><ul><li>Use NIDS to see what is actually happening. </li></ul><ul><li>Use Host based IDS to flag intrusions. </li></ul><ul><li>Create effective IRP. </li></ul>
  26. 26. Implementing IDS <ul><li>OS – enable logging/auditing features </li></ul><ul><li>Services – build/enable security in WWW servers, Email Servers, DB servers. </li></ul><ul><li>NIDS – install in appropriate places. </li></ul><ul><li>Firewalls – enable detection facilities. </li></ul><ul><li>Install SNMP traps (Openview, Tivoli) </li></ul>
  27. 27. Some NIDS Products <ul><li>BlackIce Defender (Network Ice) </li></ul><ul><li>CyberCop Monitor (Network Associates) </li></ul><ul><li>RealSecure (ISS) </li></ul><ul><li>NetRanger (WheelGroup/Cisco) </li></ul><ul><li>eTrust Intrusion Detection (CA) </li></ul><ul><li>NetProwler (Axent) </li></ul><ul><li>Centrax (CyberSafe) </li></ul><ul><li>NFR (Network Flight Recorder) </li></ul><ul><li>Dragon (Security Wizards) </li></ul>
  28. 28. Network Grep System <ul><li>Based on raw packet capture and searching for patterns using a ‘grep’ tool. </li></ul><ul><li>Extract the suspect string and compare to attack database. </li></ul><ul><li>Libpcap ( library for packet capture) is the library used by Unix-based IDS. </li></ul><ul><li>Feed output from libpcap to grep filters. </li></ul>
  29. 29. Network Grep System <ul><li>Advantage – easy to update. Largest DB of signatures, fastest time-to-market for detecting attack scripts. </li></ul><ul><li>Disadvantage – they detect the fewest # of serious intrusions. Example: scanning for default BO passwords. Can set off false positives. </li></ul>
  30. 30. Network Grep System <ul><li>Advantages – system based on protocol analysis result in fewer false positives. Able to fully diagnose a problem. Example: BO PING is harmless. BO compromise is more serious. </li></ul>
  31. 31. Sample IDS Placement INTERNET IDS #3 FIREWALL IDS #2 INTERNAL NETWORK IDS #4 IDS #1 IDS #1 – FW don’t produce enough info to effectively detect hits. IDS #2 – detects attacks that penetrate the FW IDS #3 – detects attacks attempted against the FW IDS #4 – Insider attacks will be detected
  32. 32. Attacks Against the NIDS <ul><li>Blind the sensor with high traffic rates. </li></ul><ul><li>Blind the event storage. Use decoy scans to fill up log space. </li></ul><ul><li>DOS </li></ul><ul><li>Packet Fragmentation </li></ul><ul><li>Slow Scan </li></ul><ul><li>Coordinated low-bandwidth attacks </li></ul>
  33. 33. Attacks Against the NIDS <ul><li>Address spoofing </li></ul><ul><li>Pattern Change </li></ul><ul><li>Ptacek’s Paper on NIDS evasion. </li></ul>
  34. 34. Questions to ask IDS Vendors <ul><li>How Much? </li></ul><ul><li>What do signature updates cost? </li></ul><ul><li>What traffic level blinds the IDS? </li></ul><ul><li>How easy to evade? </li></ul><ul><li>How scalable is it? </li></ul><ul><li>How many signatures does it support? </li></ul><ul><li>What IR features are included? </li></ul>