Note: The assumption for the exercise is that Bro is already installed or run in a VM. In this exercise, "<PREFIX>" represents the Bro install directory.
Advanced users who want more of a challenge may skip directly to part D and solve the second exercise marked Level advanced.
BroControl is an interactive shell for easily operating/managing Bro installations on a single system or even across multiple systems in a traffic-monitoring cluster. To learn more about BroControl please refer to the documentation. The following exercise is to start and use BroControl.
Exercise
Level beginner
Start up BroControl:
broctl
The first time that you run BroControl, you must install the BroControl configuration:
[BroControl] > install
Now type:
[BroControl] > help
Use the BroControl help to achieve the following tasks:
If you don’t want to use BroControl, then you can run Bro directly. When you run Bro directly, it creates its log files in the current working directory. Therefore, it is a good idea to create a temporary directory so that you can more easily see which files are generated by Bro. Using Bro directly is especially useful when you want to analyze packet capture (pcap) traffic files.
Exercise
Level beginner
Use the ”bro” command with "—help" to find the option that allows you to read a pcap file. Read the pcap file http.pcap and examine the log files that are created.
After completing the last two exercises you should now have two different log sets. Logs created by BroControl are stored in the "<PREFIX>/logs" directory. The logs directory contains a subdirectory named with today’s date (in the form of YYYY-MM-DD). This date-named subdirectory contains various log files (all are gzipped) which are copied into this subdirectory when Bro is stopped. Running Bro directly writes the logs into your working directory, as discussed above. These files are not zipped. One more notable difference between BroControl and running Bro directly is that BroControl loads local.bro scripts, whereas running Bro directly only runs "base" scripts.
Exercise
Level beginner
This exercise gives you an overview of the default logs generated by Bro. Find all the logs created during the previous exercises. Examine both log sets, the one created by BroControl and the one created using Bro directly. What is the difference? Why are they different?
The command
gunzip -dc <PREFIX>/logs/<date>/<log> | less
allows you to look inside the zipped logs. The other not-zipped logs can be examined using "less".
Answer the following questions by scanning through the logs. You can select one of the log sets or go through both.
In the following exercise a pcap file is provided that potentially contains real malware. Do not execute files or follow links with a real system. Use the Bro training VM, Bro-Live, try.bro.org, or whatever training environment you are using for these exercises. The objective of this exercise is to learn more about what can be done with Bro logs. There are two parts: one for beginners and one for more advanced Bro users.
The pcap used in this exercise was provided by http://forensicscontest.com/ and is their property.
For this exercise we assume a certain set of skills:
Exercise
Level beginner
Produce log files the same way as above, using the file infected.pcap.
Advanced Bro users continue here:
The background to this exercise can be found at http://forensicscontest.com/2010/04/01/ms-moneymanys-mysterious-malware. We present only a selection of the questions asked there. Use Bro to examine infected.pcap.
Exercise
Level advanced
The given pcap contains malware. Answer the following questions using Bro only:
© 2014 The Bro Project.