cinderella: A Prototype For A Specification-Based NIDS



Similar documents
Intrusion Detection Systems and Supporting Tools. Ian Welch NWEN 405 Week 12

From Network Security To Content Filtering

Intrusion Detection System Based Network Using SNORT Signatures And WINPCAP

Firewall Firewall August, 2003

Network Intrusion Detection Signatures, Part One by Karen Kent Frederick last updated December 19, 2001

Network Security Management

Intrusion Detection Systems

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

IDS / IPS. James E. Thiel S.W.A.T.

Firewalls and Intrusion Detection

Intrusion Detection & SNORT. Fakrul Alam fakrul@bdhbu.com

Detecting Threats in Network Security by Analyzing Network Packets using Wireshark

What is a Firewall? A choke point of control and monitoring Interconnects networks with differing trust Imposes restrictions on network services

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

How to protect your home/office network?

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

Intrusion Detection Categories (note supplied by Steve Tonkovich of CAPTUS NETWORKS)

Intrusion Detection Systems. Darren R. Davis Student Computing Labs

Attack and Defense Techniques 2

Firewalls. Basic Firewall Concept. Why firewalls? Firewall goals. Two Separable Topics. Firewall Design & Architecture Issues

Fuzzy Network Profiling for Intrusion Detection

Application Firewalls

Safe network analysis

Network Intrusion Detection Systems. Beyond packet filtering

IPV6 FRAGMENTATION. The Case For Deprecation. Ron Bonica NANOG58

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

IntruPro TM IPS. Inline Intrusion Prevention. White Paper

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Chapter 9 Firewalls and Intrusion Prevention Systems

Firewall implementation and testing

Role of Anomaly IDS in Network

Intrusion Detections Systems

Web Application Security

Analysis of Network Packets. C DAC Bangalore Electronics City

1. Introduction. 2. DoS/DDoS. MilsVPN DoS/DDoS and ISP. 2.1 What is DoS/DDoS? 2.2 What is SYN Flooding?

MANAGED SECURITY SERVICES

The Bro Network Intrusion Detection System

OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS

AN INTRODUCTION TO NETWORK AND HOST BASED INTRUSION DETECTION

CSCE 465 Computer & Network Security

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

A Review on Network Intrusion Detection System Using Open Source Snort

Firewalls. configuring a sophisticated GNU/Linux firewall involves understanding

Coimbatore-47, India. Keywords: intrusion detection,honeypots,networksecurity,monitoring

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

Intrusion Detection Systems

Volume 2, Issue 1, January 2012 ISSN: X International Journal of Advanced Research in Computer Science and Software Engineering

Introduction To Computer Networking

SURVEY OF INTRUSION DETECTION SYSTEM

Firewalls, NAT and Intrusion Detection and Prevention Systems (IDS)

Protocols. Packets. What's in an IP packet

N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work

CIT 380: Securing Computer Systems

Deployment of Snort IDS in SIP based VoIP environments

Network Packet Analysis and Scapy Introduction

Firewall VPN Router. Quick Installation Guide M73-APO09-380

Chapter 15. Firewalls, IDS and IPS

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

USING LOCAL NETWORK AUDIT SENSORS AS DATA SOURCES FOR INTRUSION DETECTION. Integrated Information Systems Group, Ruhr University Bochum, Germany

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

Chapter 11 Cloud Application Development

Unit 3 Research Project. Eddie S. Jackson. Kaplan University. IT540: Management of Information Security. Kenneth L. Flick, Ph.D.

Cryptography and network security

Intrusion Detection and Prevention

Multi-Homing Dual WAN Firewall Router

OpenWIPS-ng A modular and Open source WIPS. Thomas d Otreppe, Author of Aircrack-ng

CS 356 Lecture 19 and 20 Firewalls and Intrusion Prevention. Spring 2013

Introduction to Network Security Lab 1 - Wireshark

CS2107 Introduction to Information and System Security (Slid. (Slide set 8)

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

Attacking the TCP Reassembly Plane of Network Forensics Tools

Managing Latency in IPS Networks

Internet Security Firewalls

Fuzzy Network Profiling for Intrusion Detection

Chapter 14 Analyzing Network Traffic. Ed Crowley

Chapter 8 Network Security

CSCI 4250/6250 Fall 2015 Computer and Networks Security

Network Instruments white paper

Nessus. A short review of the Nessus computer network vulnerability analysing tool. Authors: Henrik Andersson Johannes Gumbel Martin Andersson

Internet Security Firewalls

EXPLORER. TFT Filter CONFIGURATION

Network Security: 30 Questions Every Manager Should Ask. Author: Dr. Eric Cole Chief Security Strategist Secure Anchor Consulting

Introduction of Intrusion Detection Systems

Traffic Monitoring : Experience

allow all such packets? While outgoing communications request information from a

CS155: Computer and Network Security

TS-301 Case Project Shaun DeRosa

How to (passively) understand the application layer? Packet Monitoring

Computer Networks. Secure Systems

Intrusion Detection. Tianen Liu. May 22, paper will look at different kinds of intrusion detection systems, different ways of

INTRUSION DETECTION SYSTEMS and Network Security

Port Scanning and Vulnerability Assessment. ECE4893 Internetwork Security Georgia Institute of Technology

Transcription:

cinderella: A Prototype For A Specification-Based NIDS Andreas Krennmair krennmair@acm.org August 8, 2003 Abstract What is actually network intrusion detection? How does it work? What are the most common methods? What s cinderella? What are cinderella s concepts? How does it behave with common attacks? How can it possibly be evaded? 0-0

Agenda Introduction to network intrusion detection Introduction to cinderella cinderella s concepts cinderella s behaviour Evading cinderella Andreas Krennmair 0-1

So, what s actually this intrusion detection thingy? Networks that are publicly accessible via the internet (e.g. SMTP and web servers) are under constant attack (mostly by script kiddies) Unusued ports and services that shouldn t be publicly accessible are protected by packet filters Problem: publicly accessible services can t be protected by packet filters Solution: use secure software (DJBware *flame*, SE Linux,...) use sandboxing tools like systrace intrusion detection is not about preventing attacks or protecting systems Network intrusion detection is about detecting attacks and benefiting from the information gained during the detection process Andreas Krennmair 0-2

Warnings And Hints Network intrusion detection systems aren t turn-key solutions. Any NIDS vendor asserting that is talking total crap. Network intrusion detection systems can t prevent attacks. Any NIDS vendor asserting that is talking total crap. Network intrusion detection is not about getting informed who attacked which host by using which exploit. Current NIDS vendors and projects want to make you believe that, obviously that s bullshit. Everyone who wants such a system should install a blinkenlight on his/her desk that blinks whenever an attack was detected. Andreas Krennmair 0-3

Network Intrusion Detection Techniques Misuse detection Anomaly detection Specification-based detection Andreas Krennmair 0-4

Misuse Detection NIDS has a set of patterns Tries to match these patterns against what is currently sniffed off the network. Disadvantages: Attacks must be known before they can be detected Unknown attacks can t be detected It s very likely that variations of a known exploit can t be detected (unless the patterns are very good, changing a few bytes in the exploit string can lead to evasion) The set of patterns is going to grow the larger the set, the longer it takes to match the patterns against the traffic Andreas Krennmair 0-5

Anomaly-based Detection Uses machine-learning techniques, most often implemented using statistical methods The system is trained how normal (good) traffic has to look like All anomalies are marked as abnormal traffic Advantages: Unknown attacks can be detected No database of patterns has to be maintained Disadvantages: System must be trained with basically the same or similar attack-free traffic that will be encountered in live operation When too few features are trained, the system can t be effective Andreas Krennmair 0-6

Specification-based Detection Good behaviour is first defined programmatically Anomalies of this defined good behaviour are marked as bad Difference to anomaly-based detection: no training Better: the programmer maps his/her trained knowledge to the program Low rate of false alarms (at least several papers say so ;-) cinderella implements some of these concepts Andreas Krennmair 0-7

Facts About cinderella (1) Prototype for a NIDS implementing specification-based detection (not evolutionary!) Basic concepts in dubio contra reo : any traffic that is not clearly detected as good traffic is automatically (per definitionem) bad Details about attacks are irrelevant: this has already been implemented by other projects, and won t help us anyway Keep the codebase small and simple Keep cinderella modular and extensible cinderella may act as wrapper around other NIDS Andreas Krennmair 0-8

Facts About cinderella (2) Implemented using Ruby: Ruby is a pretty good prototyping language Should work on any platform supporting Ruby 1.6.x and ruby/pcap (Ruby module to interface with libpcap) Further goals: when cinderella is stable and mature, it shall be reimplemented in a compiled language (preferably C + libowfat) and algorithms and data structures shall be optimized Why the name cinderella? Cinderella is the English version of the well-known Brothers Grimm tale Aschenputtel This tale contains a famous quote that very well describes what cinderella (the NIDS) does: The good into the pot, the bad into the crop. Andreas Krennmair 0-9

So, how does cinderella do this intrusion detection stuff? Ethernet frames are sniffed off the network, packets other than IP are discarded TCP, UDP, ICMP and other packets are separated TCP packets are reassembled to the complete stream of the connection A connection is identified by SrcIP:SrcPort and DstIP:DstPort A conversation is built from the connection This conversation is evaluated by a module When the connection is identified as good or bad, it is marked as such, and written to a corresponding tcpdump file Else, the connection is reevaluated when the connection s next packet arrives Connections that aren t explicitly configured are automatically bad Andreas Krennmair 0-10

Implementation Of UDP And ICMP UDP: ICMP: Implementation similar to the TCP modules Easier than TCP, since only single packets have to be analyzed, and not whole connections The modules for most UDP-based protocols can be implemented using stateless logic Policies instead of modules Policies define which host(s) may send which ICMP codes to which host(s) ICMP packets without corresponding policy are marked as bad Andreas Krennmair 0-11

Example Configuration TCP modules: tcp modules/tcp_http.rb ^.*$ ^192\.168\.124\.1[3-5]:80$ UDP modules: udp modules/udp_dns.rb ^192\.168\.\d+\.\d+:\d+$ \ ^192\.168\.123\.16:53$ ICMP policies: icmp ^192\.168\.\d+\.\d+$ ^.*$ echo,echoreply icmp ^193\.170\.156\.1$ ^.*$ routeradvert,routersolicit Andreas Krennmair 0-12

Example: HTTP Module (1) class TcpModule def initialize goodlist_file = "etc/http_goodlist.txt" @regexps = Array.new IO.foreach(goodlist_file) do line line.chomp! @regexps << line end end Andreas Krennmair 0-13

Example: HTTP Module (2) def evaluate(conv) if conv.size > 0 then @regexps.each do re if conv[0] =~ re then return [ true, true ] end end return [ true, false ] end return [ false, false ] end end Andreas Krennmair 0-14

Example: HTTP Module Configuration File ^GET /([a-z]/){0,3}[a-z0-9]{1,10}\.html HTTP/1\.[01] ^GET /cgi-bin/[a-z]+\.(pl cgi)(\?[a-z&=]{0,20})? HTTP/1\.1 ^GET /exploitable-cms/[a-z]+\.php3? HTTP/1\.1 Scripts to auto-generate these configuration files can be easily written (it has been already done within 50 lines of Perl code, for cinderella s non-free predecessor). Andreas Krennmair 0-15

cinderella In Practice How does cinderella handle port scans? How do cinderella s concepts make it possible to detect Code Red, Nimda and possible other similar worms in the future? Andreas Krennmair 0-16

How Does cinderella Handle Port Scans? TCP connection attempts that are not explicitly defined in cinderella s configuration are marked as bad In case it is defined, but the connection is either reset or closed without sending any payload, the traffic is marked as bad, too Although port scans are not explicitly handled, they can be easily detected, thanks to in dubio contra reo In practice, packet filters are placed in front of a publicly accessible network to reduce unnecessary traffic and to reduce false positives that a NIDS could detect port scans usually don t even reach the NIDS Andreas Krennmair 0-17

How Do cinderella s Concepts Make It Possible To Detect Code Red, Nimda And Possible Other Similar Worms In The Future? In the late summer of 2001, the two worms Code Red and Nimda struck the internet, exploiting a buffer overflow in some DLL of MS IIS Several variations of Code Red existed, with different padding characters (version 1: N, version 2: X) cinderella s HTTP module only marks HTTP requests as good that are explicitly defined It is very unlikely that the NIDS s administrator defines some worm s exploit string as allowed HTTP request Code Red, Nimda and similar worms are detected due to cinderella s in dubio contra reo concept Andreas Krennmair 0-18

cinderella As Wrapper I mentioned it before: cinderella is intended to act as a wrapper around other NIDS. The reason for this is also the reason why I said before that network intrusion detection is not about immediately detecting attacks. cinderella is intended to separate suspicious from unsuspicious network traffic The unsuspicious network traffic is discarded Another NIDS (e.g. Snort) has a look at the traffic This other NIDS discards all traffic in which it finds exploit strings/known patterns What is left should contain previously unknown exploits and attacks Andreas Krennmair 0-19

Drawbacks And Possible Evasion Of cinderella Practical problems that currently make cinderella not really usable in production environments: IP fragment reassembly isn t yet implemented. This is a crucial feature specially-crafted fragmented IP packets could pass cinderella undetected The TCP state machine is working but not 100 % perfect Modules for a wide range of protocols are still missing (SSH, FTP (yuck), DNS, IMAP, NTP,...) You are invited to try evading cinderella! I m desparately waiting for your bug reports Andreas Krennmair 0-20

Where Can I Get cinderella From? Source code: http://developer.berlios.de/projects/cinderella/ Documentation/general information: http://synflood.at/cinderella/ Andreas Krennmair 0-21

Comments, Flames,... Flames go to /dev/null, where they are recycled to a biodegradable bitstream that is reused as entropy by /dev/random All other comments go to ak-cinderella@synflood.at Andreas Krennmair 0-22

Any Questions? You can ask me now or after the lecture. Again, the most important addresses: http://developer.berlios.de/projects/cinderella/ http://synflood.at/cinderella/ mailto:ak-cinderella@synflood.at Andreas Krennmair 0-23