bro - what is in my network?
Dobrica Pavlinušić, HULK
Valentino Šefer
http://bit.ly/dc2017-bro
bro - what is in my network?
bro - what is in my network?
What is Bro?
● Flexible network security monitor with
event correlation
● Traffic inspection
● Attack detection
● Log recording
● Distributed analysis
● Full programmability
● Bro decodes protocols on your network
● Generates nice and structured log files
based on protocol, with uid for correlation
● Ground-truth about your network (it comes
from packets on it, after all)
● It doesn't depend on signatures or
ports of traffic to find out what it is
● It can be used with content hashing and
lists like https://intel.criticalstack.com/ to
detect known bad actors.
● it can use pcap files or live traffic
● event based,bind to them from external
process (e.g. iptables -j DROP)
● Bro script is DSL for network analysis
which IDS in implemented in (using 400+
scripts)
Every powerful tool can be used for good and evil.
If you don't care about state of your network, you might want to know what "metadata"
network operators can collect about you as user.
Bro IDS
Bro scripting
Bro C++
Security onion
-ETOOMUCHWORK (or: "I don't want to do all this manually")
https://securityonion.net/
Security Onion is a Linux distro for intrusion detection, network security
monitoring, and log management. It’s based on Ubuntu and contains Snort,
Suricata, Bro, OSSEC, Sguil, Squert, ELSA, Xplico, NetworkMiner, and many
other security tools. The easy-to-use Setup wizard allows you to build an army of
distributed sensors for your enterprise in minutes!
In this talk, we don't care about Snort, Suricata, only about Bro and don't
care about Web UI.
Do you know your network?
We are university setting running wired and wifi network for our users.
Multiple buildings (1Gbps uplink, 1Gbps link between buildings, 2-6Gbps
backbone aggregation - we can DoS our uplink from inside!)
~3100 active IP addresses
~53 smart switches
~1900 network ports
~30 vlans
~40 wifi APs
~1300 wifi users per day <10% @5GHz
~11000 user accounts
So, you need machine for bro....
Commodity Dell hardware OptiPlex 7040
i7-6700 CPU 3.40GHz (bro uses 4 cores ~2GHz)
2 port Intel 82575EB Gigabit Network
You will need 3GHz to process 1Gbps traffic
with pf_ring to calculate content hashing
Same machine is used as master and logger.
Our bro config is not optimal, but does work
for us and shows how useful bro is.
You should have separate bro master node
and multiple workers, but we don't have that.
Network infrastructure
bro - what is in my network?
Dell PowerConnect 6024 port mirror
interface ethernet g2
description sw-dpc-ffzg-local
interface ethernet g22
description sw-lib
interface ethernet g19
port monitor g2
port monitor g3
port monitor g21
port monitor g22
port monitor g23
port monitor g24
port monitor vlan-tagging
simple and limiting - only one port can be destination
Mikrotik tilera, tzsp, TaZmen Sniffer Protocol, WTF?!
Mikrotik "router" == doesn't have switch chip == no port mirroring
tzsp streaming in udp packets
/tool sniffer
set filter-interface=all memory-limit=10000KiB
streaming-enabled=yes streaming-server=10.9.10.2
https://github.com/thefloweringash/tzsp2pcap
modprobe dummy
ip link set dummy0 up
/home/dpavlin/tzsp2pcap -f | /usr/bin/tcpreplay --topspeed -i
dummy0 - &
terrible, terrible way to waste kernel/user-space copy just to keep bro happy
and think that it's listening to simple interface
bro on Debian
package is suitable for pcap file analysis and evaluation but lacks pf_ring and
broker support (due to missing pf_ring and actor-framework dependencies)
dpavlin@enesej:~$ git clone --recursive git://git.bro.org/bro
dpavlin@enesej:~/bro$ ./configure --enable-broker && make install
deploy with broctl deploy, carefully symlink all config dirs back to debian locations
start customizing bro configuration files in /etc/bro or /usr/local/bro/etc/
install broctl cron
bro
root@enesej:~# broctl status
Name Type Host Status Pid Started
logger logger enesej running 21215 29 May 19:42:39
manager manager enesej running 21286 29 May 19:42:40
proxy proxy enesej running 21355 29 May 19:42:42
tilera worker enesej running 21586 29 May 19:42:43
b101-1 worker enesej running 21593 29 May 19:42:43
b101-2 worker enesej running 21606 29 May 19:42:43
b101-3 worker enesej running 21605 29 May 19:42:43
b101-4 worker enesej running 21604 29 May 19:42:43
tzsp worker enesej running 21599 29 May 19:42:43
root@enesej:/var/log/bro/current# ls
communication.log conn.log dhcp.log dns.log dpd.log files.log http.log intel.log
kerberos.log known_certs.log known_hosts.log known_services.log loaded_scripts.log
netcontrol.log notice.log packet_filter.log radius.log rdp.log reporter.log sip.log
smb_mapping.log smtp.log snmp.log software.log ssh.log ssl.log stats.log stderr.log
stdout.log syslog.log traceroute.log tunnel.log weird.log x509.log
simple shell tools for useful counts
dpavlin@enesej:/var/log/bro/2017-06-01$ cat /srv/bro-tools/notice-count.sh
zcat notice.* | bro-cut -d note | sort | uniq -c
dpavlin@enesej:/var/log/bro/2017-06-01$ /srv/bro-tools/notice-count.sh
291 CaptureLoss::Too_Much_Loss
13 HTTP::SQL_Injection_Attacker
9 HTTP::SQL_Injection_Victim
3 PacketFilter::Dropped_Packets
232 Scan::Address_Scan
6 Scan::Port_Scan
2 SSH::Interesting_Hostname_Login
103 SSH::Password_Guessing
4107 SSL::Invalid_Server_Cert
76 Traceroute::Detected
67 Weird::Activity
root@bro:~#
less -S # chop long lines
bro-cut -d username # log files have header used by bro-cut
awk -F 't' '{ print $12 }'
sort | uniq -c | column -t | less -S
zless, zcat # broctl rotate and compress logs every hour
https://github.com/ffzg/bro-tools
Work in progress

More Related Content

PDF
SFScon 2020 - Jakob Schwienbacher - Linux as HA Router - Linux Kernel keepali...
PDF
zebra & openconfigd Introduction
KEY
/etc/rc.d配下とかのリーディング勉強会
PDF
OSDC 2016 - Ingesting Logs with Style by Pere Urbon-Bayes
PDF
Building a network emulator with Docker and Open vSwitch
PDF
Introduction to Game Network Programming
PDF
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
ODP
Hacking Robotics(English Version)
SFScon 2020 - Jakob Schwienbacher - Linux as HA Router - Linux Kernel keepali...
zebra & openconfigd Introduction
/etc/rc.d配下とかのリーディング勉強会
OSDC 2016 - Ingesting Logs with Style by Pere Urbon-Bayes
Building a network emulator with Docker and Open vSwitch
Introduction to Game Network Programming
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Hacking Robotics(English Version)

What's hot (19)

ODP
SSH Tunnel-Fu [NoVaH 2011]
ODT
Ubiquitous_Summary
PPTX
PDF
Offloading TC Rules on OVS Internal Ports
PDF
Kernel Recipes 2019 - Faster IO through io_uring
PDF
Python on FreeBSD
PDF
Apache Ignite In-Memory Computing Install memo
PDF
NZNOG 2020 - Getting IPv6 Private Addressing Right
PDF
ExaProxy
PPT
Day 17.1 nat pat (2)
PDF
Hands-on ethernet driver
PDF
Offline bruteforce attack on wi fi protected setup
PDF
Run Run Trema Test
PPT
bh-us-02-murphey-freebsd
PDF
Centralized Logging with syslog
TXT
Router0 running config
PDF
Linux Network commands
PDF
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
PPT
SSH Tunnel-Fu [NoVaH 2011]
Ubiquitous_Summary
Offloading TC Rules on OVS Internal Ports
Kernel Recipes 2019 - Faster IO through io_uring
Python on FreeBSD
Apache Ignite In-Memory Computing Install memo
NZNOG 2020 - Getting IPv6 Private Addressing Right
ExaProxy
Day 17.1 nat pat (2)
Hands-on ethernet driver
Offline bruteforce attack on wi fi protected setup
Run Run Trema Test
bh-us-02-murphey-freebsd
Centralized Logging with syslog
Router0 running config
Linux Network commands
Elixir Berlin 2019: Dominic Letz on Doing Blockchain with Elixir
Ad

Similar to bro - what is in my network? (20)

DOCX
Final ProjectFinal Project Details Description Given a spec.docx
PDF
Banog meetup August 30th, network device property as code
PDF
LT04 IDNOG04 - Affan Basalamah (ITB) - Documenting your network
PDF
IDNOG 4 Lightning Talks - Documenting your Network in 3 Simple Steps
PDF
9 creating cent_os 7_mages_for_dpdk_training
PPTX
The internet of $h1t
PDF
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
PPTX
A Kernel of Truth: Intrusion Detection and Attestation with eBPF
PDF
Docker in Production: Reality, Not Hype - DevOps Chicago
PDF
Cisco Ios advanced
PDF
Docker in Production: Reality, Not Hype
PDF
Linux hpc-cluster-setup-guide
PDF
Known basic of NFV Features
PDF
Www ccnav5 net_ccna_3_v5_0_scaling_networks_final_exam_2013
PDF
26.1.7 lab snort and firewall rules
PDF
How our Cloudy Mindsets Approached Physical Routers
PDF
7 hands on
PDF
Squid proxy server
PPTX
BASIC TO ADVANCED NETWORKING TUTORIALS
PDF
class12_Networking2
Final ProjectFinal Project Details Description Given a spec.docx
Banog meetup August 30th, network device property as code
LT04 IDNOG04 - Affan Basalamah (ITB) - Documenting your network
IDNOG 4 Lightning Talks - Documenting your Network in 3 Simple Steps
9 creating cent_os 7_mages_for_dpdk_training
The internet of $h1t
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
A Kernel of Truth: Intrusion Detection and Attestation with eBPF
Docker in Production: Reality, Not Hype - DevOps Chicago
Cisco Ios advanced
Docker in Production: Reality, Not Hype
Linux hpc-cluster-setup-guide
Known basic of NFV Features
Www ccnav5 net_ccna_3_v5_0_scaling_networks_final_exam_2013
26.1.7 lab snort and firewall rules
How our Cloudy Mindsets Approached Physical Routers
7 hands on
Squid proxy server
BASIC TO ADVANCED NETWORKING TUTORIALS
class12_Networking2
Ad

More from Dobrica Pavlinušić (20)

PDF
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
PDF
Linux+sensor+device-tree+shell=IoT !
PDF
Let's hack cheap hardware 2016 edition
PDF
Raspberry Pi - best friend for all your GPIO needs
PDF
Cheap, good, hackable tools from China: AVR component tester
PDF
Ganeti - build your own cloud
PDF
FSEC 2014 - I can haz your board with JTAG
PDF
Hardware hacking for software people
PDF
Gnu linux on arm for $50 - $100
PDF
Security of Linux containers in the cloud
PDF
This is an interesting metadata source. Can I import it into Koha?
PDF
Web scale monitoring
PDF
SysAdmin cookbook
PDF
Printing on Linux, simple right?
PPT
KohaCon11: Integrating Koha with RFID system
PDF
Deploy your own P2P network
PDF
Free Libre Open Source Software at FFZG library
PDF
Post-relational databases: What's wrong with web development? v3
PDF
Virtualization which isn't: LXC (Linux Containers)
PDF
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Linux+sensor+device-tree+shell=IoT !
Let's hack cheap hardware 2016 edition
Raspberry Pi - best friend for all your GPIO needs
Cheap, good, hackable tools from China: AVR component tester
Ganeti - build your own cloud
FSEC 2014 - I can haz your board with JTAG
Hardware hacking for software people
Gnu linux on arm for $50 - $100
Security of Linux containers in the cloud
This is an interesting metadata source. Can I import it into Koha?
Web scale monitoring
SysAdmin cookbook
Printing on Linux, simple right?
KohaCon11: Integrating Koha with RFID system
Deploy your own P2P network
Free Libre Open Source Software at FFZG library
Post-relational databases: What's wrong with web development? v3
Virtualization which isn't: LXC (Linux Containers)
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...

Recently uploaded (20)

PPTX
Artificial_Intelligence_Basics use in our daily life
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PDF
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
PDF
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
PPSX
AI AppSec Threats and Defenses 20250822.ppsx
PDF
Understand the Gitlab_presentation_task.pdf
PPTX
COPD_Management_Exacerbation_Detailed_Placeholders.pptx
PDF
Alethe Consulting Corporate Profile and Solution Aproach
DOCX
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
PPTX
ECO SAFE AI - SUSTAINABLE SAFE AND HOME HUB
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PPTX
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
PDF
Course Overview and Agenda cloud security
PDF
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
PPTX
Basic understanding of cloud computing one need
PPTX
10.2981-wlb.2004.021Figurewlb3bf00068fig0001.pptx
PDF
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
PPTX
MY PRESENTATION66666666666666666666.pptx
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
Computer Networking, Internet, Casting in Network
Artificial_Intelligence_Basics use in our daily life
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
AI AppSec Threats and Defenses 20250822.ppsx
Understand the Gitlab_presentation_task.pdf
COPD_Management_Exacerbation_Detailed_Placeholders.pptx
Alethe Consulting Corporate Profile and Solution Aproach
Memecoinist Update: Best Meme Coins 2025, Trump Meme Coin Predictions, and th...
ECO SAFE AI - SUSTAINABLE SAFE AND HOME HUB
Uptota Investor Deck - Where Africa Meets Blockchain
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
Course Overview and Agenda cloud security
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
Basic understanding of cloud computing one need
10.2981-wlb.2004.021Figurewlb3bf00068fig0001.pptx
KEY COB2 UNIT 1: The Business of businessĐH KInh tế TP.HCM
MY PRESENTATION66666666666666666666.pptx
Alethe Consulting Corporate Profile and Solution Aproach
Computer Networking, Internet, Casting in Network

bro - what is in my network?

  • 1. bro - what is in my network? Dobrica Pavlinušić, HULK Valentino Šefer http://bit.ly/dc2017-bro
  • 4. What is Bro? ● Flexible network security monitor with event correlation ● Traffic inspection ● Attack detection ● Log recording ● Distributed analysis ● Full programmability ● Bro decodes protocols on your network ● Generates nice and structured log files based on protocol, with uid for correlation ● Ground-truth about your network (it comes from packets on it, after all) ● It doesn't depend on signatures or ports of traffic to find out what it is ● It can be used with content hashing and lists like https://intel.criticalstack.com/ to detect known bad actors. ● it can use pcap files or live traffic ● event based,bind to them from external process (e.g. iptables -j DROP) ● Bro script is DSL for network analysis which IDS in implemented in (using 400+ scripts) Every powerful tool can be used for good and evil. If you don't care about state of your network, you might want to know what "metadata" network operators can collect about you as user. Bro IDS Bro scripting Bro C++
  • 5. Security onion -ETOOMUCHWORK (or: "I don't want to do all this manually") https://securityonion.net/ Security Onion is a Linux distro for intrusion detection, network security monitoring, and log management. It’s based on Ubuntu and contains Snort, Suricata, Bro, OSSEC, Sguil, Squert, ELSA, Xplico, NetworkMiner, and many other security tools. The easy-to-use Setup wizard allows you to build an army of distributed sensors for your enterprise in minutes! In this talk, we don't care about Snort, Suricata, only about Bro and don't care about Web UI.
  • 6. Do you know your network? We are university setting running wired and wifi network for our users. Multiple buildings (1Gbps uplink, 1Gbps link between buildings, 2-6Gbps backbone aggregation - we can DoS our uplink from inside!) ~3100 active IP addresses ~53 smart switches ~1900 network ports ~30 vlans ~40 wifi APs ~1300 wifi users per day <10% @5GHz ~11000 user accounts
  • 7. So, you need machine for bro.... Commodity Dell hardware OptiPlex 7040 i7-6700 CPU 3.40GHz (bro uses 4 cores ~2GHz) 2 port Intel 82575EB Gigabit Network You will need 3GHz to process 1Gbps traffic with pf_ring to calculate content hashing Same machine is used as master and logger. Our bro config is not optimal, but does work for us and shows how useful bro is. You should have separate bro master node and multiple workers, but we don't have that.
  • 10. Dell PowerConnect 6024 port mirror interface ethernet g2 description sw-dpc-ffzg-local interface ethernet g22 description sw-lib interface ethernet g19 port monitor g2 port monitor g3 port monitor g21 port monitor g22 port monitor g23 port monitor g24 port monitor vlan-tagging simple and limiting - only one port can be destination
  • 11. Mikrotik tilera, tzsp, TaZmen Sniffer Protocol, WTF?! Mikrotik "router" == doesn't have switch chip == no port mirroring tzsp streaming in udp packets /tool sniffer set filter-interface=all memory-limit=10000KiB streaming-enabled=yes streaming-server=10.9.10.2 https://github.com/thefloweringash/tzsp2pcap modprobe dummy ip link set dummy0 up /home/dpavlin/tzsp2pcap -f | /usr/bin/tcpreplay --topspeed -i dummy0 - & terrible, terrible way to waste kernel/user-space copy just to keep bro happy and think that it's listening to simple interface
  • 12. bro on Debian package is suitable for pcap file analysis and evaluation but lacks pf_ring and broker support (due to missing pf_ring and actor-framework dependencies) dpavlin@enesej:~$ git clone --recursive git://git.bro.org/bro dpavlin@enesej:~/bro$ ./configure --enable-broker && make install deploy with broctl deploy, carefully symlink all config dirs back to debian locations start customizing bro configuration files in /etc/bro or /usr/local/bro/etc/ install broctl cron
  • 13. bro root@enesej:~# broctl status Name Type Host Status Pid Started logger logger enesej running 21215 29 May 19:42:39 manager manager enesej running 21286 29 May 19:42:40 proxy proxy enesej running 21355 29 May 19:42:42 tilera worker enesej running 21586 29 May 19:42:43 b101-1 worker enesej running 21593 29 May 19:42:43 b101-2 worker enesej running 21606 29 May 19:42:43 b101-3 worker enesej running 21605 29 May 19:42:43 b101-4 worker enesej running 21604 29 May 19:42:43 tzsp worker enesej running 21599 29 May 19:42:43 root@enesej:/var/log/bro/current# ls communication.log conn.log dhcp.log dns.log dpd.log files.log http.log intel.log kerberos.log known_certs.log known_hosts.log known_services.log loaded_scripts.log netcontrol.log notice.log packet_filter.log radius.log rdp.log reporter.log sip.log smb_mapping.log smtp.log snmp.log software.log ssh.log ssl.log stats.log stderr.log stdout.log syslog.log traceroute.log tunnel.log weird.log x509.log
  • 14. simple shell tools for useful counts dpavlin@enesej:/var/log/bro/2017-06-01$ cat /srv/bro-tools/notice-count.sh zcat notice.* | bro-cut -d note | sort | uniq -c dpavlin@enesej:/var/log/bro/2017-06-01$ /srv/bro-tools/notice-count.sh 291 CaptureLoss::Too_Much_Loss 13 HTTP::SQL_Injection_Attacker 9 HTTP::SQL_Injection_Victim 3 PacketFilter::Dropped_Packets 232 Scan::Address_Scan 6 Scan::Port_Scan 2 SSH::Interesting_Hostname_Login 103 SSH::Password_Guessing 4107 SSL::Invalid_Server_Cert 76 Traceroute::Detected 67 Weird::Activity
  • 15. root@bro:~# less -S # chop long lines bro-cut -d username # log files have header used by bro-cut awk -F 't' '{ print $12 }' sort | uniq -c | column -t | less -S zless, zcat # broctl rotate and compress logs every hour https://github.com/ffzg/bro-tools