Burglar Alarms for Detecting Intrusions Marcus J. Ranum Network Flight Recorder, Inc.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

Fred P. Baker CCIE, CCIP(security), CCSA, MCSE+I, MCSE(2000)
Intrusion Detection System(IDS) Overview Manglers Gopal Paliwal Gopal Paliwal Roshni Zawar Roshni Zawar SenthilRaja Velu SenthilRaja Velu Sreevathsa Sathyanarayana.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 44 How Firewalls Work How Firewalls Work.
FIREWALLS Chapter 11.
Snort & ACID. UTSA IS 6973 Computer Forensics SNORT.
FIREWALLS. What is a Firewall? A firewall is hardware or software (or a combination of hardware and software) that monitors the transmission of packets.
Building Your Own Firewall Chapter 10. Learning Objectives List and define the two categories of firewalls Explain why desktop firewalls are used Explain.
How do Networks work – Really The purposes of set of slides is to show networks really work. Most people (including technical people) don’t know Many people.
1.  To analyze and explain the IDS placement in network topology  To explain the relationship between honey pots and IDS  To explain, analyze and evaluate.
EECS Presentation Web Tap: Intelligent Intrusion Detection Kevin Borders.
IDS Colloquium 2001John Kristoff - DePaul University1 Intrusion Detection Systems (IDS) John Kristoff DePaul University.
IT Security Doug Brown Jeff Bollinger. What is security? P.H.P. People Have Problems Security is the mitigation and remediation of human error in information.
Lesson 13-Intrusion Detection. Overview Define the types of Intrusion Detection Systems (IDS). Set up an IDS. Manage an IDS. Understand intrusion prevention.
Beth Johnson April 27, What is a Firewall Firewall mechanisms are used to control internet access An organization places a firewall at each external.
Privacy - not readable Permanent - not alterable (can't edit, delete) Reliable - (changes detectable) But the data must be accessible to persons authorized.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
FIREWALLS & NETWORK SECURITY with Intrusion Detection and VPNs, 2 nd ed. 6 Packet Filtering By Whitman, Mattord, & Austin© 2008 Course Technology.
Firewalls CS591 Topics in Internet Security November Steve Miskovitz, Steve Peckham, Kan Hayashi.
Beyond Security Ltd. Port Knocking Beyond Security Noam Rathaus CTO Sunday, July 11, 2004 Presentation on.
Department Of Computer Engineering
1 Intrusion Detection & Network Forensics Marcus J. Ranum Chief Technology Officer Network Flight Recorder, Inc.
Firewalls CS432. Overview  What are firewalls?  Types of firewalls Packet filtering firewalls Packet filtering firewalls Sateful firewalls Sateful firewalls.
Hafez Barghouthi. Model for Network Access Security (our concern) Patrick BoursAuthentication Course 2007/20082.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.1 ISP Responsibility Working at a Small-to-Medium Business or ISP – Chapter 8.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Chapter 6: Packet Filtering
Step-by-Step Intrusion Detection using TCPdump SHADOW.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
ECE4112 Lab 7: Honeypots and Network Monitoring and Forensics Group 13 + Group 14 Allen Brewer Jiayue (Simon) Chen Daniel Chu Chinmay Patel.
Honeypot and Intrusion Detection System
CIS 450 – Network Security Chapter 16 – Covering the Tracks.
Day 11 SAMBA NFS Logs Managing Users. SAMBA Implements the ability for a Linux machine to communicate with and act like a Windows file server. –Implements.
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
CSCE 815 Network Security Lecture 25 Data Control in HoneyNets SSH April 22, 2003.
Linux Networking Security Sunil Manhapra & Ling Wang Project Report for CS691X July 15, 1998.
Linux Networking and Security
(c) University of Technology, Sydney Firewall Architectures.
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco IOS Threat Defense Features.
Intrusion Detection (ID) Intrusion detection is the ART of detecting inappropriate, incorrect, or anomalous activity There are two methods of doing ID.
1 Implementing Monitoring and Reporting. 2 Why Should Implement Monitoring? One of the biggest complaints we hear about firewall products from almost.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
Network Security Chapter 11 powered by DJ 1. Chapter Objectives  Describe today's increasing network security threats and explain the need to implement.
Securing the Network Infrastructure. Firewalls Typically used to filter packets Designed to prevent malicious packets from entering the network or its.
Switch Features Most enterprise-capable switches have a number of features that make the switch attractive for large organizations. The following is a.
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
Security and Firewalls Ref: Keeping Your Site Comfortably Secure: An Introduction to Firewalls John P. Wack and Lisa J. Carnahan NIST Special Publication.
Network Security Terms. Perimeter is the fortified boundary of the network that might include the following aspects: 1.Border routers 2.Firewalls 3.IDSs.
Quiz 2 -> Exam Topics Fall Chapter 10a - Firewalls Simple Firewall - drops packets based on IP, port Stateful - Keeps track of connections, set.
Role Of Network IDS in Network Perimeter Defense.
Web Server Security: Protecting Your Pages NOAA OAR WebShop 2001 August 2 nd, 2001 Jeremy Warren.
SemiCorp Inc. Presented by Danu Hunskunatai GGU ID #
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Access Control Lists Accessing the WAN – Chapter 5.
An Introduction To Gateway Intrusion Detection Systems Hogwash GIDS Jed Haile Nitro Data Systems.
Lecture 19 Page 1 CS 236 Online 6. Application Software Security Why it’s important: –Security flaws in applications are increasingly the attacker’s entry.
25/09/ Firewall, IDS & IPS basics. Summary Firewalls Intrusion detection system Intrusion prevention system.
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Proventia Network Intrusion Prevention System
Working at a Small-to-Medium Business or ISP – Chapter 8
The Linux Operating System
NETWORKS Fall 2010.
Firewall – Survey Purpose of a Firewall Characteristic of a firewall
Principles of Computer Security
Access Control Lists CCNA 2 v3 – Module 11
Lecture 3: Secure Network Architecture
Crisis and Aftermath Morris worm.
6. Application Software Security
Presentation transcript:

Burglar Alarms for Detecting Intrusions Marcus J. Ranum Network Flight Recorder, Inc.

Burglar Alarms A burglar alarm is a misuse detection system that is carefully targeted –You may not care about people port- scanning your firewall from the outside –You may care profoundly about people port-scanning your mainframe from the inside –Set up a misuse detector to watch for misuses violating site policy

Burglar Alarms (cont) Goals: –Based on site policy alert administrator to policy violations –Detect events that may not be “security” events which may indicate a policy violation New routers New subnets New web servers

Burglar Alarms (cont) The ideal burglar alarm will be situated so that it fires when an attacker performs an action that they normally would try once they have successfully broken in –Adding a userid –Zapping a log file –Making a program setuid root

Burglar Alarms (cont) Burglar alarms are a big win for the network manager: –Leverage local knowledge of the local network layout –Leverage knowledge of commonly used attacker tricks –Detect successful attacks by detecting second-order effects of a break-in

Burglar Alarms: Pro Reliable Predictable Easy to implement Easy to understand Generate next to no false positives May detect previously unknown attacks by second-order effects

Burglar Alarms: Con Policy-directed –Requires knowledge about your network –Requires a certain amount of stability within your network Requires care not to trigger them yourself

Simple Burglar Alarm Internal Network Internet Router w/some screening Firewall DMZ Network WWW Server Desktop HTTP and SSL permitted Nothing else permitted In-kernel screening on WWW server with inverse of router rules

Simple Burglar Alarm (cont) In-kernel screening can be used to generate alerts easily Example is based on ip_filt screening language –Ip_filt can log packet bodies or events –Logs can be post-processed/watched with a simple perl script –Remember: this should never happen

Simple Burglar Alarm (cont) # sample: block all packets by default block all # for example we’re assuming outside interface is le0 # drop “localhost” packets coming in from network block in on le0 log body from localhost to any # drop “inside” packets coming in from “outside” block in on le0 log body from mynet to any # drop source routed packets block in quick log body all with opt lsrr block in quick log body all with opt ssrr

Internal Network Internet Router w/some screening Firewall DMZ Network WWW Server Desktop HTTP and SSL permitted Nothing else permitted Sniffer Sniffer looks for inverse of router rules Simple Burglar Alarm: 2

IDS and firewalls Firewalls allow “overlapping” rulesets with different priorities –Many firewalls can trigger alerts when traffic to “bad destination” is seen –Use this capability to build burglar alarms

Internal Network Internet Router w/some screening Firewall DMZ Network WWW Server Desktop Firewall trips an alert: why would the web server try to telnet in!?!?! IDS Firewall Alarm Broken Web Server

Internal Network Internet Router w/some screening Firewall DMZ Network WWW Server Desktop Router trips an alert: why would the web server try to IRC out!?!?! IDS Firewall Alarm 2 Broken Web Server

Building: Burglar alarms Burglar alarms are best built using: –Sniffers –In-kernel packet screens (ip_filt, ipfilter) –Application packet sniffers (tcpdump, NFR, Argus, tcpwatch) –Application logs (tcpwrapper, VPN server logs, kernel logs, syslogs)

Building a Scan Alarm Example: –Suppose we have router screening in place using “established” keyword –Then we should not get connects on certain ports through the firewall router –Set up tcp_wrapper on various port ranges Log occurrence of connections When threshold goes up trigger an alarm

Internet Router w/some screening Firewall DMZ Network WWW Server Desktop Internal system with tcp_wrapper notes unserviced connections A Scan Alarm External scans run against network ?!?!!? port 1981 port 1982 port 1983

Building a Scan Alarm (cont) Tcp_wrapper /etc/hosts.deny: bugport9: ALL: /usr/ucb/mail -s %d-%h root) & bugport10: ALL: /usr/ucb/mail -s %d-%h root) &

Building a Scan Alarm (cont) /etc/services: #this line names a service by port #to watch these ports with tcp_wrapper bugport9 9/tcp bugport10 10/tcp

Chroot-a-nono A process that is already chrooted probably should not chroot again –If kernel source is available this is easy to do  (vfs_syscalls.c) –Check within chroot system call for root inode != real root and log alarm /* new! */ if (fdp->fd_rdir != NULL) log(LOG_ERR,"WARNING! chroot when already chrooted!");

ls-o-matic Train yourself not to run “ls” as root Replace “ls” with a program that mails you or shuts the system down if it is ever run as root Use “echo *” instead of “ls”... This trick takes a lot of discipline!

Shared-Library boobytrap Systems with shared libraries are a great place to add alarms Generate a custom version of the exec() library family that logs every command execution that isn’t one of a small expected set –Good for firewalls or web servers!

Nit-pick Many times when a break-in occurs attackers will set up a sniffer If NIT device is not configured they often add it Replace NIT device with something that triggers a warning instead –/dev/nit or bpf driver can be replaced with a driver that halts the system

File-change-o Very simple cron job can be made to –Copy critical files to a hidden directory /etc/passwd, /etc/group, /etc/inetd.conf find / -user root -print –Diff the files against what’s currently installed on the system Bring differences to the administrators’ attention –Automating tripwire works better for this

File shrinkener Write a program to check if the inode number of /var/log/messages has not changed at the same time the file has shrunk –Use ls -i, and ls -l in a shell script –Use stat in C code Embed this within something innocuous (how about cron?)

Terrify Suzy* May make people think twice about what kind of monitoring is going on in the system # cat > main.c main() { while(1) sleep(30); } ^D # cc -o watchdog main.c # nohup watchdog& * based on an old story from Boyd Roberts

Fake Hacktools Install something that pretends to be a trojan horse program –Backofficer friendly: pretends to be a back orifice server –an eggdrop or FSP server that logs everything

Noset Executable For dedicated service machines, consider removing the ability to set the execute bit in multiuser mode –Must also be attached to a terminal –Log and alert attempts to set execute permission

No Exec Stack Several versions of UNIX (Solaris, some *BSD variants) can now block attempts to execute code from within the stack –Makes buffer overruns a bit harder to implement for attacker –Doesn’t prevent code to call existing functions -- not a perfect solution

Fake Holes Install a phf.pl script in your CGI directory on your web server –Have it generate an alert

DumDum Users Have a user with a crackable but not obvious password –Put something in their.login to alert you when they log in If they ever log in, you know someone has gotten hold of your password file, somehow

Summary Burglar alarms are a neat idea They work Some of these examples are simplistic and lame –If you have a sick imagination you should be able to do much better than these Exploit the home turf advantage