Security Management. 08: Technical Safeguards. Mathias Fischer Summer term 2017

Similar documents
Protection of Communication Infrastructures

Internet Security: Firewall

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

CS155 Firewalls. Simon Cooper CS155 - Firewalls 23 May of 30

ACS-3921/ Computer Security And Privacy. Chapter 9 Firewalls and Intrusion Prevention Systems

W is a Firewall. Internet Security: Firewall. W a Firewall can Do. firewall = wall to protect against fire propagation

CS155 Firewalls. Why Firewalls? Why Firewalls? Bugs, Bugs, Bugs

Network Security: Firewalls. Tuomas Aura T Network security Aalto University, Nov-Dec 2013

Computer Security and Privacy

Distributed Systems. 27. Firewalls and Virtual Private Networks Paul Krzyzanowski. Rutgers University. Fall 2013

firewalls perimeter firewall systems firewalls security gateways secure Internet gateways

CSC Network Security

Chapter 9. Firewalls

Network Security: Firewall, VPN, IDS/IPS, SIEM

COMPUTER NETWORK SECURITY

Intrusion Detection System (IDS) IT443 Network Security Administration Slides courtesy of Bo Sheng

CSE 565 Computer Security Fall 2018

Internet Security Firewalls

Distributed Systems. 29. Firewalls. Paul Krzyzanowski. Rutgers University. Fall 2015

Network Security. Chapter 0. Attacks and Attack Detection

Means for Intrusion Detection. Intrusion Detection. INFO404 - Lecture 13. Content

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

Firewalls N E T W O R K ( A N D D ATA ) S E C U R I T Y / P E D R O B R A N D Ã O M A N U E L E D U A R D O C O R R E I A

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 8

Overview of Firewalls. CSC 474 Network Security. Outline. Firewalls. Intrusion Detection System (IDS)

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 11

20-CS Cyber Defense Overview Fall, Network Basics

Overview. Computer Network Lab, SS Security. Type of attacks. Firewalls. Protocols. Packet filter

CSCI 454/554 Computer and Network Security. Topic 8.4 Firewalls and Intrusion Detection Systems (IDS)

Our Narrow Focus Computer Networking Security Vulnerabilities. Outline Part II

CSE 565 Computer Security Fall 2018

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Outline. Internet Security Mechanisms. Basic Terms. Example Attacks

AIT 682: Network and Systems Security

CyberP3i Course Module Series

PROTECTING INFORMATION ASSETS NETWORK SECURITY

n Learn about the Security+ exam n Learn basic terminology and the basic approaches n Implement security configuration parameters on network

Network Security. Thierry Sans

8/19/2010. Computer Forensics Network forensics. Data sources. Monitoring

Configuring IP Services

Implementing Firewall Technologies

Unit 4: Firewalls (I)

Configuring attack detection and prevention 1

CYBER ATTACKS EXPLAINED: PACKET SPOOFING

Single Network: applications, client and server hosts, switches, access links, trunk links, frames, path. Review of TCP/IP Internetworking

Broadcast Infrastructure Cybersecurity - Part 2

10 Defense Mechanisms

CHAPTER 8 FIREWALLS. Firewall Design Principles

Firewalls Network Security: Firewalls and Virtual Private Networks CS 239 Computer Software March 3, 2003

Firewalls, IDS and IPS. MIS5214 Midterm Study Support Materials

IDS: Signature Detection

Applied IT Security. System Security. Dr. Stephan Spitz 6 Firewalls & IDS. Applied IT Security, Dr.

Int ernet w orking. Internet Security. Literature: Forouzan: TCP/IP Protocol Suite : Ch 28

Computer Networks (Introduction to TCP/IP Protocols)

Computer Network Vulnerabilities

CIH

Configuring attack detection and prevention 1

Why Firewalls? Firewall Characteristics

Network Defenses 21 JANUARY KAMI VANIEA 1

Activating Intrusion Prevention Service

Specialized Security Services, Inc. REDUCE RISK WITH CONFIDENCE. s3security.com

Global Information Assurance Certification Paper

CIS Controls Measures and Metrics for Version 7

Securing CS-MARS C H A P T E R

SE 4C03 Winter Final Examination Answer Key. Instructor: William M. Farmer

Intranets 4/4/17. IP numbers and Hosts. Dynamic Host Configuration Protocol. Dynamic Host Configuration Protocol. CSC362, Information Security

Spring 2010 CS419. Computer Security. Vinod Ganapathy Lecture 14. Chapters 6 and 9 Intrusion Detection and Prevention

Chapter Three test. CompTIA Security+ SYO-401: Read each question carefully and select the best answer by circling it.

HP High-End Firewalls

CIS Controls Measures and Metrics for Version 7

Security Engineering. Lecture 16 Network Security Fabio Massacci (with the courtesy of W. Stallings)

Proxy server is a server (a computer system or an application program) that acts as an intermediary between for requests from clients seeking

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 9

Anomaly Detection in Communication Networks

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 12

90% 191 Security Best Practices. Blades. 52 Regulatory Requirements. Compliance Report PCI DSS 2.0. related to this regulation

Networking interview questions

Managing Latency in IPS Networks

Agenda of today s lecture. Firewalls in General Hardware Firewalls Software Firewalls Building a Firewall

INFS 766 Internet Security Protocols. Lecture 1 Firewalls. Prof. Ravi Sandhu INTERNET INSECURITY

CSC 574 Computer and Network Security. TCP/IP Security

Chapter 7. Network Intrusion Detection and Analysis. SeoulTech UCS Lab (Daming Wu)

n Given a scenario, analyze and interpret output from n A SPAN has the ability to copy network traffic passing n Capacity planning for traffic

Network Security. Tadayoshi Kohno

Cyber Common Technical Core (CCTC) Advance Sheet Windows Operating Systems

Network Security. Kitisak Jirawannakool Electronics Government Agency (public organisation)

R (2) Implementation of following spoofing assignments using C++ multi-core Programming a) IP Spoofing b) Web spoofing.

CE Advanced Network Security

BOR3307: Intro to Cybersecurity

Firewalls, Tunnels, and Network Intrusion Detection

This course prepares candidates for the CompTIA Network+ examination (2018 Objectives) N

Network Control, Con t

Network Defenses 21 JANUARY KAMI VANIEA 1

ACS / Computer Security And Privacy. Fall 2018 Mid-Term Review

Basic Concepts in Intrusion Detection

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

VG422R. User s Manual. Rev , 5

Three interface Router without NAT Cisco IOS Firewall Configuration

Google Cloud Platform: Customer Responsibility Matrix. April 2017

Transcription:

Mathias Fischer Summer term 2017 Security Management 08: Technical Safeguards (Acknowledgement: Parts of these slides have been prepared by Prof. Dr. Günter Schäfer) 1

Cyber Attacks - Numbers Source: http://www.cybersecuritymarket.com/ Cyber-attacks on critical infrastructures in the US 2

Cyber Attacks - Targets 3 3

Time to Discovery of Attacks Time to Discovery Seconds Minutes Hours Days Months Years 2014 [Man2015] 205 median number of days that threat groups were present in victim s network before detection Longest Presence: 2982 days 31% victims discovered breach internally 69% victims notified by external entity 4

Security Process and Tools Firewalls SIEM and Intrusion Prevention Systems (IPS) Secure system design & classic IT-Security Prevention Intrusion Detection Systems (IDS) Netflow analyzer Honeypots Patching Recovery Security Management Detection Reaction Vulnerability Scanner 5

Introduction to Network Firewalls (1) In building construction, a firewall is designed to keep a fire from spreading from one part of the building to another A network firewall, however, can be better compared to a moat of a medieval castle: It restricts people to entering at one carefully controlled point It prevents attackers from getting close to other defenses It restricts people to leaving at one carefully controlled point Usually, a network firewall is installed at a point where the protected subnetwork is connected to a less trusted network: Example: Connection of a corporate local area network to the Internet Internet Firewall So, basically firewalls realize access control on the subnetwork level 6

What firewalls can do A firewall is a focus for security decisions A firewall can enforce a security policy, i.e. concerning access control A firewall can log Internet activity efficiently A firewall can limit exposure to security problems in one part of a network 7

What firewalls cannot do A firewall can t protect against malicious insiders A firewall can t protect against connections that don t go through it If, for example, there is a modem pool behind a firewall that provides PPP service to access a subnetwork, the firewall can not provide any protection against malicious traffic from dial-in users A firewall can t protect against completely new threats A firewall can t fully protect against viruses A firewall can t set itself up correctly ( cost of operation) 8

Two Fundamental Approaches Regarding Firewall Policy Default deny strategy: Everything that is not explicitly permitted is denied Examine the services the users of the protected network need Consider the security implications of these services and how the services can be safely provided Allow only those services that can be safely provided and for which there is a legitimate need Deny any other service Default permit strategy: Everything that is not explicitly forbidden is allowed Permit every service that is not considered dangerous Example: Network file system (NFS) and X-Windows is not permitted across the firewall Incoming ssh connections are only allowed to one specific host 9

What Internet Services & Protocols are to be Considered? Electronic mail: simple mail transfer protocol (SMTP) File exchange: file transfer protocol (FTP), network file system (NFS) Remote terminal access and command execution: telnet, rlogin, ssh Usenet news: network news transfer protocol (NNTP) World wide web: hypertext transfer protocol (HTTP) Information about people: finger Real-time conferencing services: CUseeMe, Netmeeting, Netscape conference, MBone tools,... Name services: domain name service (DNS) Network management: simple network management protocol (SNMP) Time service: network time protocol (NTP) Window systems: X-Windows Printing systems: line printing protocols (LPR/LPD) 10

Some Background on Internet Services, IP, TCP & UDP Internet services are usually realized with client and server programs and application protocols that are run by those programs The application protocol data units are most often transported in either segments of a TCP connection or UDP datagrams The TCP segments / UDP datagrams are transported in IP packets which themselves are transported in the PDUs of the data link technology used on the links between source and destination Examples: Ethernet, FDDI, ATM, etc. Addressing of application processes is realized by tuples: Source IP address, source port Destination IP address, destination port Application Protocol TCP A port is a two-byte number that identifies what application process the application PDU is coming from / going to IP UDP Access Protocol 11

Example: An IP Packet Carrying a TCP Segment IP Header TCP Header Ver. IHL TOS Length IP Identification Flags Fragment Offset TTL Protocol IP Checksum Source Address Destination Address IP Options (if any) Source Port Destination Port Sequence Number Request Number Offset Reserv. Control Window Checksum Urgent Pointer TCP Options (if any) Payload Payload (Including Application PDU Header) 12

Protocol Fields Important for Firewalls (1) Access Protocol Network Layer Protocol: IP Access Protocol Addresses: Ethernet MAC Address, E.164 Address, etc. These addresses either refers to the final source / destination or the addresses of intermediate nodes of this link IP Source address Destination address Flags, especially the indication of an IP fragment Protocol type: TCP, UDP, ICMP,... Options: Source routing: the sender explicitly specifies the route an IP packet will take as this is often used for attacks most firewalls discard these packets In general, IP options are rarely used 13

Protocol Fields Important for Firewalls (2) TCP: Source Port, Destination Port: Evaluation of source and destination ports allow to determine (with a limited degree of confidence) the sending / receiving application, as most Internet services use wellknown port numbers Control: ACK: this bit is set in every segment but the very first one transmitted in a TCP connection, it therefore helps to identify connection requests SYN: this bit is only set in the first two segments of a connection, so it can be used to identify connection confirmations RST: if set this bit indicates an ungraceful close of a connection, it can be used to shut peers up without returning helpful error messages Application Protocol: In some cases a firewall might even need to peek into application protocol header fields However, as this is application-dependent this class will not go into detail... 14

Firewall Terminology & Building Blocks for Firewalls (1) Firewall: A component or a set of components that restricts access between a protected network and the Internet or between other sets of networks Packet Filtering: Action a device takes to selectively control the flow of data to and from a network Packet filtering is an important technique to implement access control on the subnetworklevel for packet oriented networks, e.g. the Internet A synonym for packet filtering is screening Bastion Host: A computer that must be highly secured because it is more vulnerable to attacks than other hosts on a subnetwork A bastion host in a firewall is usually the main point of contact for user processes of hosts of internal networks with processes of external hosts Dual homed host: A general purpose computer with at least two network interfaces 15

Firewall Terminology & Building Blocks for Firewalls (2) Proxy: A program that deals with external servers on behalf of internal clients Proxies relay approved client requests to real servers and also relay the servers answers back to the clients If a proxy interprets and understands the commands of an application protocol it is called an application level proxy, if it just passes the PDUs between the client and the server it is called a circuit level proxy Network Address Translation (NAT): A procedure by which a router changes data in packets to modify the network addresses This allows to conceal the internal network addresses (even though NAT is not actually a security technique) Perimeter Network: A subnetwork added between an external and an internal network, in order to provide an additional layer of security A synonym for perimeter network is de-militarized zone (DMZ) 16

Firewall Architectures (1) The Simple Packet Filter Architecture Firewall Internet Packet Filtering Router Denied Traffic Permitted Traffic The most simple architecture just consists of a packet filtering router It can be either realized with: A standard workstation, e.g., Linux PC, with at least two network interfaces plus routing and filtering software A dedicated router device, which usually also offers filtering capabilities 17

Firewall Architectures (2) The Dual-Homed Host Architecture Firewall Internet Dual-Homed Bastion Host The dual-homed host provides: Proxy services to internal and / or external clients Potentially packet filtering capabilities if it is also acting as a router Properties of the dual-homed host: It has at least two network interfaces Drawback: As all permitted traffic passes through the bastion host, this might introduce a performance bottleneck 18

Firewall Architectures (3) The Screened Host Architecture Firewall Internet Bastion Host Packet filter: Allows permitted IP traffic to flow between screened host and Internet Blocks all direct traffic between other internal hosts and Internet Screened host provides proxy services: Despite partial protection by the packet filter the screened host acts as a bastion host 19

Firewall Architectures (4) The Screened Subnet Architecture Firewall Internet Bastion Host A perimeter network is created between two packet filters Inner packet filter serves for additional protection in case the bastion host is ever compromised: For example, this avoids a compromised bastion host to sniff on internal traffic Perimeter network is also a good place to host a publicly accessible information server, e.g., a www-server 20

Firewall Architectures (5) The Split Screened Subnet Architecture Firewall Internet Dual-Homed Bastion Host A dual-homed bastion host splits perimeter network in two distinct networks This provides defense in depth, as: Dual-homed bastion host provides finer control on the connections as his proxy services are able to interpret application protocols Bastion host is protected from external hosts by an outer packet filter Internal hosts are protected from bastion host by an inner packet filter 21

Packet Filtering (1) What can be done with packet filtering? Theoretically speaking everything, as all information exchanged in a communication relation is transported via packets In practice, however, the following observations serve as a guide: Operations that require quite detailed knowledge of higher layer protocols or prolonged tracking of past events are easier to realize in proxy systems Operations that are simple but need to be done fast and on individual packets are easier to do in packet filtering systems Basic packet filtering enables to control data transfer based on: Source IP Address Destination IP Address Transport protocol Source and destination application port Potentially, specific protocol flags (e.g. TCP s ACK- and SYN-flag) The network interface a packet has been received on 22

Packet Filtering (2) More elaborate packet filtering: Stateful or dynamic packet filtering: Example 1: Let incoming UDP packets through only if they are responses to outgoing UDP packets that have been observed Example 2: Accept TCP packets with SYN bit set only as part of TCP connection initiation Protocol checking: Example 1: Let in packets bound for the DNS port, but only if they are formatted like DNS packets Example 2: Do not allow HTTP transfers to these sites However, more elaborate packet filtering consumes more resources! Actions of a packet filter: Pass the packet Drop the packet Potentially, log the passed or dropped packet (entirely or parts of it) Potentially, pass an error message to the sender (may help attacker!) 23

Specifying Packet Filtering Rules As a packet filter protects one part of a network from another one, there is an implicit notion of the direction of traffic flow: Inbound: traffic is coming from an interface which is outside protected network and its destination can be reached on an interface which is connected to protected network Outbound: opposite of inbound For every packet filtering rule this direction is specified as either inbound, outbound, or either Source and destination address specifications can make use of wildcards, e.g. 125.26.*.* denotes all addresses starting with 125.26. In our examples, we denote often simply denote addresses as internal or external when we want to leave exact network topology out of account For source and destination ports we sometimes write ranges, e.g. >1023 We assume filtering rules to be applied in the order of specification, that means the first rule that matches a packet is applied 24

An Example Packet Filtering Ruleset (1) Rule Direction Src. Addr. Dest. Addr. Protocol Src. Port Dest. Port ACK Action A Inbound External Internal TCP 25 Permit B Outbound Internal External TCP >1023 Permit C Outbound Internal External TCP 25 Permit D Inbound External Internal TCP >1023 Permit E Either Any Any Any Any Deny This first ruleset aims to specify, that incoming and outgoing email should be only allowed traffic into and out of a protected network Email is relayed between two servers by transferring it to an SMTP-daemon on target server (server port 25, client port > 1023) Rule A allows incoming email to enter the network and rule B allows acknowledgements to exit network Rules C and D are analogous for outgoing email Rule E denies all other traffic 25

An Example Packet Filtering Ruleset (2) Consider, for example, a packet which wants to enter the protected subnet and has a forged IP source address from the internal network: As all allowed inbound packets must have external source and internal destination addresses (A, D) this packet is successfully blocked Same holds for outbound packets with external source addresses (B, C) Consider now telnet traffic: As a telnet server resides usually at port 23, and all allowed inbound traffic must be either to port 25 or to a port number > 1023, incoming packets to initiate an incoming telnet connection are successfully blocked Same holds for outgoing telnet connections However, the ruleset is flawed as, for example, it does not block the X11-protocol for remote operation of X-Windows applications: An X11-server usually listens at port 6000, clients use port numbers > 1023 Thus, an incoming X11-request is not blocked (B), neither is any answer (D) This is highly undesirable, as the X11-protocol offers many vulnerabilities to an attacker, like reading and manipulating the display and keystrokes 26

An Example Packet Filtering Ruleset (3) Rule Direction Src. Addr. Dest. Addr. Protocol Src. Port Dest. Port ACK Action A Inbound External Internal TCP >1023 25 Permit B Outbound Internal External TCP 25 >1023 Permit C Outbound Internal External TCP >1023 25 Permit D Inbound External Internal TCP 25 >1023 Permit E Either Any Any Any Any Any Deny Above flaw can be fixed by including source ports into ruleset specification: As now outbound traffic to ports >1023 is allowed only if the source port is 25 (B), traffic from internal X-clients or -servers (port >1023) will be blocked Same holds for inbound traffic to ports >1023 (D) However, it can not be assumed for sure, that an attacker will not use port 25 for his attacking X-client: In this case the above filter will let the traffic pass 27

An Example Packet Filtering Ruleset (4) Rule Direction Src. Addr. Dest. Addr. Protocol Src. Port Dest. Port ACK Action A Inbound External Internal TCP >1023 25 Any Permit B Outbound Internal External TCP 25 >1023 Yes Permit C Outbound Internal External TCP >1023 25 Any Permit D Inbound External Internal TCP 25 >1023 Yes Permit E Either Any Any Any Any Any Any Deny This problem can be addressed by also specifying TCP s ACK-bit in rules B and D: As the ACK-bit is required to be set in rule B, it is not possible to open a new TCP connection in the outbound direction to ports >1023, as TCP s connect-request is signaled with the ACK-bit not set Same holds for the inbound direction, as rule D requires the ACK bit to be set As a basic rule, any filtering rule that permits incoming TCP packets for outgoing connections should require ACK-bit be set 28

An Example Packet Filtering Ruleset (5) Rule Direction Src. Addr. Dest. Addr. Protocol Src. Port Dest. Port ACK Action A Inbound External Bastion TCP >1023 25 Any Permit B Outbound Bastion External TCP 25 >1023 Yes Permit C Outbound Bastion External TCP >1023 25 Any Permit D Inbound External Bastion TCP 25 >1023 Yes Permit E Either Any Any Any Any Any Any Deny If firewall comprises a bastion host, packet filtering rules should further restrict traffic flow ( screened host architecture): As in the modified rules above only traffic between the Internet and bastion host is allowed, external attackers can not attack SMTP on arbitrary internal hosts any longer In screened subnet firewall, two packet filtering routers are set up: one for traffic allowed between Internet and bastion host, and one for traffic allowed between bastion host and internal network 29

Bastion Hosts (1) A bastion host is defined as a host that is more exposed to the hosts of an external network than other hosts of network it protects A bastion host may serve for different purposes: Packet filtering Providing proxy services A combination of both Principles for building a bastion hosts are extensions of those for securing any mission critical host: Keep it simple Prepare for bastion host to be compromised: Internal hosts should not trust it any more than is absolutely required If possible, it should be connected in a way to the network so that it can not sniff on internal traffic Provide extensive logging for incident detection / analysis, if possible such that it can not be easily tampered with even when the host is compromised 30

Bastion Hosts (2) Further Guidelines Make the bastion host unattractive: Slower machines are less appealing targets and are less useful if compromised However, if the bastion host offers some resource consuming service, e.g. WWW-service, it may be wiser not to make it too slow The fewer tools are available on the bastion host, the less useful the machine is to an attacker Get a reliable hardware configuration (no leading / bleeding edge) The bastion host should be placed at a physically secure location Disable any user accounts on the bastion host Secure the system logs (by writing them directly to a printer or even better using the printer port to a dedicated PC which is not networked) Do regular backups of the system logs and the configuration (using a dedicated backup device) Monitor the machine closely (reboots, usage / load patterns, etc.) If possible, restore machine regularly from a prepared installation 31

Proxy Services Proxying provides access to a specific Internet service for a single host, while appearing to provide it for all hosts of a protected network Candidate services for proxying: FTP, Telnet, DNS, SMTP, HTTP Proxy servers usually run on (possibly dual-homed) bastion hosts The use of a proxy service usually leads to the following situation: User of a proxy service has the illusion of exchanging data with the actual server host Actual server has the illusion of exchanging data with the proxy host To instruct proxy service to which server it should connect to, one of the following approaches can be taken: Proxy-aware user procedures Proxy-aware client software Proxy-aware operating system Proxy-aware router 32

Goal of Intrusion Detection Systems Overall goal: Supervision of computer systems and communication infrastructures in order to detect intrusions and misuse Why detection of attackers? Full protection is usually not possible! Security measures too expensive or with too low flexibility, e.g., not possible to build every functionality in ASICs Wrong postulates about capabilities of attackers (NSA?) Unpatched systems for compliance reasons (medical systems etc.) What can be attained with intrusion detection? Detection of attacks and attackers Detection of system misuse (includes misuse by legitimate users) 33

Possibilities of Intrusion Detection Systems Using detection system only makes sense if there are consequences! Possible goals Limitation of damage if (automated) response mechanisms exist Gain of experience to recover from attack, improve preventive measures Deterrence of other potential attackers (if and only if police is able to arrest them!) Prevention Detection IDS is a fraction of this step! IDS + Firewalls = Intrusion Prevention Systems (IPS) PDRR Process Recovery Reaction 34

Schematic Overview of Intrusion Detection Reaction Alarm Events Audit Audit Log Analysis Response System IDS 35 35

Tasks of an Intrusion Detection System Audit: Recording of all security relevant events of a supervised system Preprocessing and management of recorded audit data Detection: Automatic analysis of audit data Principle Approaches: Misuse detection (signature analysis, also called knowledge-based intrusion detection) Anomaly detection Response: Reporting of detected attacks (alarms) Potentially also initiating countermeasures (reaction) 36

Classification of IDS (1) Scope Host-based: analysis of system events Network-based: analysis of exchanged information (IP packets) Hybrid: combined analysis of system events and network traffic Time of analysis Post mortem analysis Online analysis Detection mechanism Signature-based Anomaly-based 37

Types of IDS (1) - Host Intrusion Detection Systems (HIDS) Works on information available on a system, e.g., OS-Logs, application-logs, timestamps Can easily detect attacks by insiders, as modification of files, illegal access to files, installation of Trojans or rootkits Problems: has to be installed on every system produces lots of information often no real-time-analysis but predefined time intervals hard to manage a large number of systems 38

Types of IDS (2) - Network Intrusion Detection System (NIDS) Works on information provided by the network, mainly packets sniffed from network layer. Existing systems use combination of signature detection, protocol decoding, statistical anomaly analysis Can detect DoS with buffer overflow attacks, invalid packets, attacks on application layer, DDoS, spoofing attacks, port scans Often used on network hubs to monitor a segment of the network 39

Scope: IDS Placement Internet Monitors all incoming traffic High load High rate of false alarms Monitors all traffic to and from systems in the DMZ Reduced amount of Data Can only detect Intrusions on these Computers Monitors all traffic within the corporate LAN Possible detection of misuse by insiders Possible detection of intrusion via mobile machines (notebooks...) DMZ LAN 40

Recording Audit Data Recording audit data is an elementary security function: Recording security relevant events Collects the input of intrusion detection and response mechanisms Can be seen as the sensory apparatus for reactive defense Audit data delivers information on: who accessed when, where and how whose and which resource? Audit data requires integrity protection: Otherwise, an attacker could wipe out traces of intrusive behavior 41

Types of Audit Data Events recorded in a computer system: Opening of files Execution of programs Detected access violation Failed password verification etc. Events recorded in a network: Connection establishment and release Packets transferred from / to specific systems / ports Specific signaling events, e.g. ICMP network unreachable message, etc. Application specific events: Have to be programmed for a specific application Events are application specific and indicate security relevant activities 42

Requirements to Intrusion Detection Systems High accuracy (= low rate of false positives and false negatives, see also next slide) Easy to integrate into a system / network Easy to configure & maintain Autonomous and fault tolerant operation Low resource requirements Self protection, so that an IDS itself can not easily be deactivated by a deliberate attack (to conceal subsequent attacks) 43

Normal Detection Anomalous Detection Quality False alarm: Corresponds to an anomalous event that is inoffensive False Positive True Positive Successful detection of attacks Harmless event that was successfully labeled as normal True Negative Harmless False Negative Attacks that were not detected Event Nature Source: [ET04] 44

Signature Detection Basic idea: Some attack patterns can be described with sufficient detail specification of attack signatures Event audit analyzed if it contains known attack signatures Identifying attack signatures: Analyzing vulnerabilities Analyzing past attacks that have been recorded in audit Specifying attack signatures: Based on identified knowledge so-called rules describing attacks are specified Most IDS offer specification techniques for describing rules Drawbacks of signature-based detection: Requires prior knowledge of potential attacks Signature database requires continuous updating High rate of false negatives if signature database is not up to date 45

Signature Detection Example: Snort (1) Network IDS and intrusion prevention system Analysis of IP packets in real time Mainly signature based, each intrusion needs a predefined rule alert tcp $HOME_NET any -> any 9996 \ (msg:"sasser ftp script to transfer up.exe"; \ content:" 5F75702E657865 "; depth:250; flags:a+; classtype: misc-activity; \ sid:1000000; rev:3) Three step processing of captured information (capturing is done by libpcap): Preprocessing (normalized and reassembled packets) Detection Engine works on the data and decides what action should be taken Action is taken (log, alert, pass) 46

Anomaly Detection (1) Basic idea detect behavior that differs significantly from normal use: Users have certain habits in their system usage: Duration of usage Login times Amount of file system usage Executed programs, accessed files, etc Assumption: normal user behavior can be described statistically Requires a learning phase / specification of normal behavior y Most approaches require labeled data Analysis: compares recorded events with reference profile of normal behavior N 1 N 2 O 1 O 2 Advantage: An attack scenario needs not to be defined a priori This approach can, in principle, detect unknown attacks 0 3 x 47

Anomaly Detection () Network abuse anomalies DoS flood attacks Port scans [Bar01] 48

Honeypots Definition: A security resource who's value lies in being probed, attacked or compromised We want to get compromised! Certainly not a standalone security mechanism. Why? FUN! No false-positives! Research: Malware analysis/reverse engineering Reducing available attack surface/early warning system 49

Honeypot Classification - Interaction Low interaction Passive honeypot that simulates network operations (usually at tcp/ip level) Do not modify network traffic in any way and do not interact with attacker No operating system for the attacker to interact with Analysis of spammers and as active countermeasure against worms Medium interaction Interaction with the attacker Simulate network operations and provide attackers with illusion of an OS Logging and analysis of more complex attacks High interaction Real systems (e.g., VMs) Attacker is provided with real OS to interact with 50

Honeynets and Honeytokens Honeynets Most advanced and complex honeypots Entire network of computers to be attacked Primary purpose: Capturing extensive information on (internal and external) threats Honeytokens Not a computer, but a digital entity, e.g., an Excel spreadsheet, database entry, login and password Any interaction with honeytoken indicates unauthorized or malicious activity 51

Honeypots Advantages Small data sets Collection of data only when someone or something is interacting with them Reduced false positives Any activity with honeypots is by definition unauthorized Catching false negatives Identification of new attacks as any activity with the honeypot is an anomaly Encryption Capturing of attack activity independent from malicious activity being encrypted as honeypot is a communication endpoint Highly Flexible Honeypots are extremely adaptable to a wide range of environments Minimal Resources Even on large networks only minimal resources required 52

Honeypots - Disadvantages Risk An attacker can use honeypot to attack other systems Risk varies with type of honeypot used Limited field of view Honeypots see or capture only what interacts with them They are not capturing activities between all other systems 53

Honeypots - Dionaea Low Interaction honeypot for collecting malware Protocol simulated: Basic protocol: SMB (port 445) Others: HTTP, HTTPS, FTP, TFTP, MSSQL and SIP (VOIP) Also support for IPv6 and TLS Photo by Noah Elhardt / CC BY Malware files: stored locally or/and sent to 3rd party entities (CWSandbox, Norman Sandbox, Anubis, VirusTotal) 54

Regulatory Requirements for Intrusion Detection Recording of personal data depends on configuration of IDS IDS placement at transition point to other network Less personal data Attacks from the outside: Personal data: IP addresses To map IP addresses to persons, the ISP/company/ needs to be contacted Quite often mapping not possible Attacks from the inside: Personal data collected only in cases IDS also monitors internal traffic Personal data: login names and IP addresses IDS to monitor internal network Detection of insider attacks and policy violations Designated purpose required for collecting personal data 55

German Laws (1) Bundesdatenschutzgesetz (BDSG) 14 (2): Das Speichern, Verändern oder Nutzen [...] ist [...] zulässig, wenn es zur Verfolgung von Straftaten oder Ordnungswidrigkeiten [...] erforderlich ist. Storing, changing, or using is allowed when it is required for prosecution and to punish minor violations of the law 14 (4), 31: Personenbezogene Daten, die ausschließlich [...] zur Sicherstellung eines ordnungsgemäßen Betriebs einer Datenverarbeitungsanlage genutzt werden, dürfen nur für diesen Zweck verwendet werden. Personal data that is used to maintain operation of IT systems can be used for this purpose Purpose of the deployment of an IDS is to maintain operation of IT systems, thus designated purpose on the basis of 14 (4), 31 required Telekommunikations-Datenschutzverordnung (TDSV) Regulates the protection of personal data during collection, processing, and usage by companies and employees that provide telecommunication services or that assist in their provisioning 56

German Laws (2) Data protection law for service providers Teledienstdatenschutzgesetz (TDDSG) Users need to be informed by service provider on kind, extent, and purpose of the collection of personal data Service provider can establish user profiles under certain conditions Betriebsverfassungsgesetz (BetrVG) Regulates collaboration between employer and work council ( Betriebsrat ) Work council has right to be informed and to object when monitoring systems like IDS are deployed ( 87) (Bundes) Personalvertretungsgesetz ((B)PersVG) Same as BetrVG but for public employees 57

Examples for Legal Requirements (Germany) Data protection officer, work councils have to be consulted and have to approve when introducing an IDS Work council, data protection officer, and IDS manager should define requirements for the IDS deployment: All employees are informed on IDS deployment and its purpose All employees that administrate the IDS or access data are subject of data protection law (BDSG) Personal data is only collected to maintain operation and to an extent that is necessary for detecting attacks and security violations as well as their backtracking Monitored information can only be transferred by IDS admin to third parties, e.g., to trace the origin of an attack, when respective supervisor agrees, or when data has to be transferred on the basis of a guideline Collected information has to be deleted at latest after two months, except data that is required for evidence Changes in IDS deployment and purpose require approval of work council 58

Summary Firewalls, IDS, Honeypots as reactive security tools to detect and mitigate attacks Firewalls Different architectures for deployment Packet filtering vs. deep packet inspection (usually via IDS) IDS Signature-based vs. anomaly-based IDS In combination with Firewalls: IPS Honeypots as purely passive monitoring component Nearly no false positives! Law Allows monitoring with purpose to maintain operation of IT Deletion deadlines, work council approval, information of employees 59

Additional References [Zwi00a] E. Zwicky, S. Cooper, B. Chapman. Building Internet Firewalls. Second Edition, O Reilly, 2000. [Sem96a] C. Semeria. Internet Firewalls and Security. 3Com Technical Paper, 1996. [Wack95a] [StaBro08] [Bar01] [Chan09] J. P. Wack, L.J. Carnahan. Keeping Your Site Comfortably Secure: An Introduction to Internet Firewalls. NIST Special Publication 800-10, 1995. William Stallings and Lawrie Brown. Computer Security: Principles and Practice. Prentice Hall Press, Upper Saddle River, NJ, USA, 2nd edition, 2008. P. Barford, D. Plonka, Characteristics of Network Traffic Flow Anomalies. Proceedings of ACM SIGCOMM Internet Measurement Workshop, October 2001. Chandola, Varun, Arindam Banerjee, and Vipin Kumar. 2009. Anomaly Detection: A Survey. ACM Computing Surveys 41 (3) (July 1): 1 58. doi:10.1145/1541880.1541882. 60