Network Intrusion Detection Systems Randy Marchany VA Tech

  • Slides: 34
Download presentation
Network Intrusion Detection Systems Randy Marchany VA Tech Computing Center Blacksburg, VA 24060 Marchany@vt.

Network Intrusion Detection Systems Randy Marchany VA Tech Computing Center Blacksburg, VA 24060 Marchany@vt. edu

FAQ Information w These notes come from the Network Intrusion Detection Systems FAQ by

FAQ Information w These notes come from the Network Intrusion Detection Systems FAQ by Robert Graham (nidsfaq@robertgraham. com w http: //www. robertgraham. com/pubs/netw ork-intrusion-detection. html

Introduction w Intrusion – an attempt to compromise or misuse a computer system or

Introduction w Intrusion – an attempt to compromise or misuse a computer system or network. w 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. w NIDS can run on the target or independent system.

Introduction w Network NIDS monitor many machines. w System Integrity Verifiers (SIV) monitor system

Introduction w Network NIDS monitor many machines. w System Integrity Verifiers (SIV) monitor system files to detect trojan versions of system binaries. It may log the attempt as it occurs. w Log File Monitors (LFM) monitor log files generated by network services.

Introduction w Deception Systems aka honeypots, flytraps contain pseudo-services that emulate well-known holes in

Introduction w Deception Systems aka honeypots, flytraps contain pseudo-services that emulate well-known holes in an attempt to trap hackers. w Intruders – outsiders or insiders

How do Intruders Get In? w Physical Intrusion – console passwords, disk removal, etc.

How do Intruders Get In? w Physical Intrusion – console passwords, disk removal, etc. w System Intrusion – hacker has a low privilege account on the system and uses a tool that exploits a weakness to gain system privilege. w Remote Intrusion – gains access via a remote service on the system.

Vulnerability Types w Race Conditions – 2 programs accessing the same data at the

Vulnerability Types w Race Conditions – 2 programs accessing the same data at the same time. w Software bugs – Buffer Overflows w Unexpected Combinations – input is meaningless at 1 level but not at another. w Unhandled Input – what happens when input doesn’t match specifications.

System Configuration w Default – vendor shipped configurations w Lazy – sysadmins too lazy

System Configuration w Default – vendor shipped configurations w Lazy – sysadmins too lazy to tighten the system. w Hole Creation – most programs can run in non-secure mode. w Trust Relationships – one system trusts another. R-commands are an example.

Password Cracking w Trivial – names of people, places, things w Dictionary – Unix

Password Cracking w Trivial – names of people, places, things w Dictionary – Unix Crack or NT/L 0 pht password cracking programs w Brute Force – programs that try all possible combinations of characters.

Sniffers & Design Flaws w Shared Medium – base ethernet w Server – sniffer

Sniffers & Design Flaws w Shared Medium – base ethernet w Server – sniffer runs on the server. Works on switched nets. w Remote – SNMP based w TCP/IP Protocol Flaws – smurf, synflood, IP spoofing. IP allows data to be changed anytime. IPSEC is a fix. w System Flaws – Windows, Unix

How Do They Get Passwords? w Clear Text Passwords w Encrypted Sniffing w Replay

How Do They Get Passwords? w Clear Text Passwords w Encrypted Sniffing w Replay Attack – the intruders don’t decrypt the passwords. They use the encrypted form to login the systems. w Password file stealing w Observation/Social Engineering – piece of paper attack

Intrusion Steps w Outside Reconnaissance – whois, DNS, WWW, FTP w Inside Reconnaissance –

Intrusion Steps w Outside Reconnaissance – whois, DNS, WWW, FTP w Inside Reconnaissance – ping sweep, inverse mapping, port scanning, rpcinfo, showmount, snmpwalk. w Exploit – exploiting vulnerabilities discovered earlier.

Intrusion Steps w Foothold – gained entrance into the machine and now starts to

Intrusion Steps w Foothold – gained entrance into the machine and now starts to hide the evidence. Install rootkits, trojans. w Profit – taking advantage of the entry, the hacker now goes after the real target – information, $$, credit card info, etc. w Joyride – systems used in a relay attack.

Common WWW Exploits w CGI – passing data to the command shell via shell

Common WWW Exploits w CGI – passing data to the command shell via shell metacharacters, using hidden variables, phf. w WWW server w IIS/RDP -. . / attack to get files from the server. w Alternate data streams ( Win 95 names).

Common WWW Exploits w URL – fields can cause buffer overflows as it’s parsed

Common WWW Exploits w 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. w HTTP headers can be used to exploit bugs because some fields are passed to functions that expect only certain information.

Common WWW Exploits w HTML – MIME-type overflow in Netscape Communicator’s <EMBED> command. w

Common WWW Exploits w HTML – MIME-type overflow in Netscape Communicator’s <EMBED> command. w 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.

Common WWW Exploits w Frames – part of Java. Script or Java hack (hiding

Common WWW Exploits w Frames – part of Java. Script 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. w Java – normal Java applets have no access to the local system but sometimes they’d be more useful if they did have local access. w Active X – works purely on trust model and runs in native mode.

Buffer Overflows & DNS Attacks w DNS – extra long DNS name is sent

Buffer Overflows & DNS Attacks w DNS – extra long DNS name is sent to the server. DNS names are limited to 256 bytes. w RPC – statd, ttdbserverd, cmsd, snmp. Xdmid w DNS Cache Poisoning – Every DNS packet contains a Question/Answer section. Vulnerable servers will believe and cache Answer you provide.

Common Reconnaissance Scans and DOS Attacks w w w w Ping Sweeps TCP/UDP Scans

Common Reconnaissance Scans and DOS Attacks w w w w Ping Sweeps TCP/UDP Scans OS identification Account Scans Ping of Death SYN Flood Land DDo. S

How Do NIDS Detect Intrusions? w Anomaly detection – measures a baseline of stats

How Do NIDS Detect Intrusions? w 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. w Signature recognition – pattern matching attack probes. Uses large databases to detect the attack. Antiviral software uses this. Works only for known attacks.

Matching Signatures with Incoming Traffic w NIDS consists of special TCP/IP stack that reassembles

Matching Signatures with Incoming Traffic w NIDS consists of special TCP/IP stack that reassembles datagrams and TCP streams. It uses: w Protocol Stack Verification – search for protocol violations (SYN/FIN, etc. ) w Application Protocol Verification w New Event Creation – log all application layer protocols for later correlation.

NIDS Detect the Attack w Firewall reconfiguration to block IP address. w Chime –

NIDS Detect the Attack w Firewall reconfiguration to block IP address. w Chime – “Danger, Will Robinson!” alarm. Email or page admins. w SNMP trap – send trap datagram to console. w Syslog – record it in NT Event log or Unix syslog w Save Evidence. w Launch Program to handle the event. w Terminate the TCP connection by sending a FIN.

Other Countermeasures w Firewalls – should be considered as the LAST line of defense.

Other Countermeasures w Firewalls – should be considered as the LAST line of defense. w Authentication – password policies, single signon, removing cleartext protocols. w VPN – secure connection for remote access. However, they decrease corporate security because both ends of the pipe are wide open.

Where to locate IDS w Network hosts w Network Perimeter w WAN/LAN Backbone w

Where to locate IDS w Network hosts w Network Perimeter w WAN/LAN Backbone w Server farms w Need to be on low-bandwidth nets to keep up with traffic.

Fitting IDS with Security Framework w Put firewalls between networks with different security requirements.

Fitting IDS with Security Framework w Put firewalls between networks with different security requirements. w Use scanners to check for exploits. w Set host policy to conform with standards. w Use NIDS to see what is actually happening. w Use Host based IDS to flag intrusions. w Create effective IRP.

Implementing IDS w OS – enable logging/auditing features w Services – build/enable security in

Implementing IDS w OS – enable logging/auditing features w Services – build/enable security in WWW servers, Email Servers, DB servers. w NIDS – install in appropriate places. w Firewalls – enable detection facilities. w Install SNMP traps (Openview, Tivoli)

Some NIDS Products w w w w w Black. Ice Defender (Network Ice) Cyber.

Some NIDS Products w w w w w Black. Ice Defender (Network Ice) Cyber. Cop Monitor (Network Associates) Real. Secure (ISS) Net. Ranger (Wheel. Group/Cisco) e. Trust Intrusion Detection (CA) Net. Prowler (Axent) Centrax (Cyber. Safe) NFR (Network Flight Recorder) Dragon (Security Wizards)

Network Grep System w Based on raw packet capture and searching for patterns using

Network Grep System w Based on raw packet capture and searching for patterns using a ‘grep’ tool. w Extract the suspect string and compare to attack database. w Libpcap ( library for packet capture) is the library used by Unix-based IDS. w Feed output from libpcap to grep filters.

Network Grep System w Advantage – easy to update. Largest DB of signatures, fastest

Network Grep System w Advantage – easy to update. Largest DB of signatures, fastest time-to-market for detecting attack scripts. w Disadvantage – they detect the fewest # of serious intrusions. Example: scanning for default BO passwords. Can set off false positives.

Network Grep System w Advantages – system based on protocol analysis result in fewer

Network Grep System w 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.

Sample IDS Placement IDS #1 INTERNET INTERNAL NETWORK FIREWALL IDS #3 IDS #2 IDS

Sample IDS Placement IDS #1 INTERNET INTERNAL NETWORK FIREWALL IDS #3 IDS #2 IDS #4 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

Attacks Against the NIDS w Blind the sensor with high traffic rates. w Blind

Attacks Against the NIDS w Blind the sensor with high traffic rates. w Blind the event storage. Use decoy scans to fill up log space. w DOS w Packet Fragmentation w Slow Scan w Coordinated low-bandwidth attacks

Attacks Against the NIDS w Address spoofing w Pattern Change w Ptacek’s Paper on

Attacks Against the NIDS w Address spoofing w Pattern Change w Ptacek’s Paper on NIDS evasion.

Questions to ask IDS Vendors w How Much? w What do signature updates cost?

Questions to ask IDS Vendors w How Much? w What do signature updates cost? w What traffic level blinds the IDS? w How easy to evade? w How scalable is it? w How many signatures does it support? w What IR features are included?