A Bro Walk-Through. Robin Sommer International Computer Science Institute & Lawrence Berkeley National Laboratory



Similar documents
Flow-level analysis: wireshark and Bro. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis

The Bro Network Intrusion Detection System

The Open Source Bro IDS Overview and Recent Developments

Bro at 10 Gps: Current Testing and Plans

Monitoring Network Security with the Open-Source Bro NIDS

High-Performance Network Security Monitoring at the Lawrence Berkeley National Lab

Firewall Firewall August, 2003

Linux MDS Firewall Supplement

An Overview of the Bro Intrusion Detection System

The Bro Network Security Monitor. Broverview

shortcut Tap into learning NOW! Visit for a complete list of Short Cuts. Your Short Cut to Knowledge

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

Using the Intrusion Prevention System in MultiNet V5.3

The Bro Monitoring Platform

Cisco Configuring Commonly Used IP ACLs

Intrusion Detection System

Host Discovery with nmap

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

Bro: An Open Source Network Intrusion Detection System

EXPLORER. TFT Filter CONFIGURATION

Virtual Server and DDNS. Virtual Server and DDNS. For BIPAC 741/743GE

Multi-Homing Dual WAN Firewall Router

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Port Scanning. Objectives. Introduction: Port Scanning. 1. Introduce the techniques of port scanning. 2. Use port scanning audit tools such as Nmap.

Linux MPS Firewall Supplement

Network Traffic Analysis

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

Network security Exercise 10 Network monitoring

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

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

EE Easy CramBible Lab DEMO ONLY VERSION EE F5 Big-Ip v9 Local Traffic Management

Configure a Microsoft Windows Workstation Internal IP Stateful Firewall

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

Guardian Digital WebTool Firewall HOWTO. by Pete O Hara

How To Monitor A Network On A Network With Bro (Networking) On A Pc Or Mac Or Ipad (Netware) On Your Computer Or Ipa (Network) On An Ipa Or Ipac (Netrope) On

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

NETWORK SECURITY WITH OPENSOURCE FIREWALL

Device Log Export ENGLISH

GregSowell.com. Mikrotik Security

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Configuring Security for SMTP Traffic

The Bro Network Security Monitor. Broverview. Bro Workshop NCSA, Urbana-Champaign, IL. Bro Workshop 2011

Firewall Testing. Cameron Kerr Telecommunications Programme University of Otago. May 16, 2005

Lab Objectives & Turn In

Securizarea Calculatoarelor și a Rețelelor 13. Implementarea tehnologiei firewall CBAC pentru protejarea rețelei

TS-301 Case Project Shaun DeRosa

Bypassing PISA AGM Theme Seminar Presented by Ricky Lou Zecure Lab Limited

Berkley Packet Filters and Open Source Tools. a tranched approach to packet capture analysis at today s network speeds

DDoS Mitigation Techniques

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Lab Conducting a Network Capture with Wireshark

Wharf T&T Limited DDoS Mitigation Service Customer Portal User Guide

Preventing credit card numbers from escaping your network

Classic IOS Firewall using CBACs Cisco and/or its affiliates. All rights reserved. 1

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

What is included in the ATRC server support

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

F-Secure Messaging Security Gateway. Deployment Guide

Firewalls (IPTABLES)

12. Firewalls Content

Introduction. Background

Virtual Managment Appliance Setup Guide

Network Packet Analysis and Scapy Introduction

Configuring Security for FTP Traffic

F-SECURE MESSAGING SECURITY GATEWAY

An Open Source IPS. IIT Network Security Project Project Team: Mike Smith, Sean Durkin, Kaebin Tan

Virtual Web Appliance Setup Guide

OfficeScan 10 Enterprise Client Firewall Updated: March 9, 2010

Linux Network Security

Networking Security IP packet security

Chapter 15. Firewalls, IDS and IPS

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

Firewalls. Chapter 3

How To Test The Bandwidth Meter For Hyperv On Windows V (Windows) On A Hyperv Server (Windows V2) On An Uniden V2 (Amd64) Or V2A (Windows 2

How to protect your home/office network?

LUCOM GmbH * Ansbacher Str. 2a * Zirndorf * Tel / * Fax / *

The Bro Network Intrusion Detection System

10 Configuring Packet Filtering and Routing Rules

Multi-Homing Gateway. User s Manual

Measurement of the Usage of Several Secure Internet Protocols from Internet Traces

Network Security, ISA 656, Angelos Stavrou. Snort Lab

Networking for Caribbean Development

Network Security and Firewall 1

File Transfer Examples. Running commands on other computers and transferring files between computers

1. LAB SNIFFING LAB ID: 10

Configuring Health Monitoring

Websense Web Security Gateway: What to do when a Web site does not load as expected

Network Security. Network Scanning

11.1. Performance Monitoring

Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network.

Reverse Shells Enable Attackers To Operate From Your Network. Richard Hammer August 2006

Firewall Log Format. Log ID is a Unique 12 characters code (c1c2c3c4c5c6c7c8c9c10c11c12) e.g ,

How to launch and defend against a DDoS

OpenBSD in the wild...a personal journey

Figure 41-1 IP Filter Rules

Firewalls. Pehr Söderman KTH-CSC

Transcription:

A Bro Walk-Through Robin Sommer International Computer Science Institute & Lawrence Berkeley National Laboratory robin@icsi.berkeley.edu http://www.icir.org

Doing the Walk-Through... Going from simple to more complex setups Start simple and then load & customize more scripts over time Examine the log files which Bro generates Take a look at some scripts to get an idea how to look for more information Tries to mimic the process of using Bro Due to lack of documentation, one often has to examine the scripts That s how we do it as well; nobody knows everything about all scripts Discussion requires some understanding of scripting Try to explain what s needed, assuming some familiarity with similar languages You re going to try this yourself in the lab 2

Installation Download current development version 1.3.2 http://www.bro-ids.org/download.html See Wiki for documentation: http://www.bro-ids.org/wiki Compile and install./configure --prefix=<path> && make install Files and directories Bro executable: $PREFIX/bin/bro Policy files (scripts): $PREFIX/policy Important policy files for reference: bro.init, events.bif.bro Environment export PATH=$PATH:$PREFIX/bin export BROPATH=$PREFIX/policy:$PREFIX/policy/sigs If no DNS: export BRO_DNS_FAKE=1 3

Overview 1. Connection summaries 2. Notices and alarms 3. Weird activity 4. Protocol analyzers 5. Packet filter 6. Dynamic protocol detection 7. Protocol-independent analyzers 8. More customization Filter Notices and alarms Log rotation Tuning time-outs 4

Connection Summaries One-line summaries for all TCP connections Most basic, yet also one of the most useful analyzers > bro -r trace tcp (Output in conn.log) Time Duration Source Destination 1144876596.658302 1.206521 192.150.186.169 62.26.220.2 \ http 53052 80 tcp 874 1841 SF X Serv SrcPort DstPort Proto SrcBytes DstBytes State Dir Works also for UDP (udp.bro) and ICMP (icmp.bro) 5

Connection Summaries (2) Connection state SF Normal establishment & termination REJ SO RSTO Connection attempt rejected Connection attempt seen, no reply. Established, originator aborted...... Connection direction Set local_nets (see site.bro) to a list local networks L X Locally initiated Not locally initiated 6

Notices & Alarms A Notice reports potentially interesting behavior. A Notice is not an alarm but can turn into one Site-policy determines what to do with a Notice Escalate into an alarm (default for most; we ll see later how to customize this) Just log Ignore A Notice carries meta-information as context Notice type Source information Per-type attributes Scripts to record Notices and Alarms to disk > bro -r trace notice alarm... 7

Weird Activity... Network traffic contains tons of crud Activity which does not conform to standards but is not an attack NIDSs often cannot separate crud from actual attacks Bro s approach Performs thorough consistency-checks Reports non-conforming activity as weird (Notice of type WeirdActivity) Weirds can be pre-filtered with weird.bro E.g., no Notice raised but logged into weird.log 8

Protocol Analyzers Perform protocol-specific analysis Log activity Check for protocol-specific attacks Bro ships with analyzers for many protocols Including FTP, HTTP, POP3, IRC, SSL, DNS, SSH, NTP, Portmapper, SMB, etc. Example: FTP analyzer > bro -r trace ftp.bro > cat ftp.log 9

Protocol Analyzers (2) Almost all analyzers can be tuned to site-specifics Examine analyzer script to learn about options Export section contains options which can be changed Use redef to modify their values Example: Adapt sensitive file names in ftp.bro More protocol analyzers: SMTP analyzer (smtp.bro, imap.bro) HTTP analyzer (http-request.bro, http-reply.bro, http-header.bro, http-body.bro) 10

Behind the Scenes: Packet Filter Bro analyzes only packets required by scripts analysis Examines which scripts are loaded Builds BPF packet filter dynamically (e.g., port 80 packets for HTTP) To see the packet filter, load print-filter.bro > bro tcp ftp smtp print-filter ((port smtp) or (port ftp)) or (tcp[13] & 7!= 0) Packet filter can be changed by Adding to capture_filters to include additional traffic (i.e. or ) Adding to restrict_filters to exclude traffic (i.e., and ) Fully overriding the filter via -f command line option Likely the number-one pitfall is to forget that, by default, Bro completely skips parts of the traffic. 11

Dynamic Protocol Detection (1) How does Bro know the analyzer for a connection? Default mechanism: Examine the ports From http.bro: global http_ports = { 80/tcp, 81/tcp, 631/tcp, 1080/tcp, 3138/tcp, 8000/tcp, 8080/tcp, 8888/tcp }; redef dpd_config += { [ANALYZER_HTTP] = [$ports = http_ports] }; That s how any other NIDS does it as well 12

Dynamic Protocol Detection (2) Problem: Well-known ports are pretty unreliable Bro can analyze protocols independent of ports Dynamic Protocol Detection (DPD) Currently supports HTTP, IRC, SMTP, SSH, FTP, and POP3 Find potential uses with signatures and then validates by parsing Signatures in policy/sigs/dpd.sig Activated by loading dpd.bro > bro -r trace -f tcp http-request http-reply dpd Important to adapt the packet filter! Example: Analyze HTTP session on port 22 13

DPD: Advanced Applications Turning off analyzers if it s not their protocol dyn-disable.bro Fundamental question: when to decide it s not theirs? Analyzers report ProtocolViolation if they can t parse basic structure Policy script can then decide whether to indeed disable analyzer dyn-disable.bro takes simplest approach: turn off for every violation Not on per default due to potential evasion opportunities Reporting protocols found on non-standard ports detect-protocols.bro Reports ProtocolFound and ServerFound notices Further identify applications on top of HTTP (e.g., Gnutella, SOAP, Squid) @load detect-protocols-http Easy to extend by adding more patterns 14

Protocol-independent Analyzers Bro also has several protocol-independent analyzers Example: Scan detector (scan.bro) Reports PortScan and AddressScan Notices (and more) Example: Flood detector (synflood.bro) Detects flooded hosts and excludes them temporarily from analysis 15

Customization: Filtering Notices Local policy determines which Notices are relevant Simple filtering: Assign an action per Notice type @load notice-action-filters redef notice_action_filters += { [RemoteWorm] = file_notice }; file_notice Write only to notice.log ignore_notice Ignore completely notice_alarm_per_orig Alarm once per source tally_notice Count occurrences...... notice-action-filters.bro 16

Customization: Filtering Notices (2) More flexible filtering: function determines the action redef notice_policy += { [$pred(a: notice_info) = { # Do not report this notice for remote hosts. return a$note == ProtocolDetector::ServerFound &&! is_local_addr(a$src); }, $result = NOTICE_FILE, ] }; 17

Thanks for your attention. Robin Sommer International Computer Science Institute & Lawrence Berkeley National Laboratory robin@icsi.berkeley.edu http://www.icir.org