An extensible packet sniffer application that can filter and monitor network traffic. It also has capabilities of producing alerts.
Depending on the operating system, the install instructions will be different.
- libpcap for monitoring network traffic on the operating system
The below dependencies are managed by the Godeps and will require godeps to be installed. Please see the Godep installation for more instructions.
- gopacket for packet sniffing
- ginkgo for BDD style tests
- gomega for matchers used to create assertions in gingko
Running the application with the below command will require building it in this section.
Note: the sudo may be required to allow the application to listen to the specified network interface.
sudo ./bloodhound
Some flags that can be used to customize the application at runtime.
# network flags
- interface - Network interface to listen for packets
- default: "en0"
- protocol - Protocol to listen for packets
- default: "tcp"
- port - Port to listen to for packets
- default: "80"
# monitoring and alerting flags
- monitor - Monitoring duration in seconds to which to send a summary
- default: 10
- duration - Duration in seconds that
- default: 30
- traffic - Traffic amount that should trigger an alert
- default: 100
Run the below command in the
godep go build
Run the below command in the directory of the top most directory of the project.
godep go test ./...
Below are some of the extensible components, namely interfaces and what their responsibilities are. Under each component are a list of pre-existing components that implements the respective interface.
Components that can be extended or customized to be used in the application.
TrafficFilterdecides what messages to filter out and keepHTTPTrafficFilterfilters all traffic that are not HTTP traffic
Monitormonitors trafficTrafficMonitorgenerates statistical summaries for traffic received and sent
Alertevaluates whether an event surpasses the threshold or reverts to normalTotalTrafficAlertkeeps track of the total number of events in a given time window
Notificationthat determines when to alertConsoleNotificationalerts to the console
Messages that are passed from one component to another.
Eventrepresents a network event with fields such as status, payload, sender, destination, etcTrafficStatisticshas fields for different traffic statistics such as average payload size and total payload size
Application that listens to network traffic and passes it through a filter, a monitor, a threshold, and eventually an alert if traffic surpasses the threshold.
Applicationis composed of the different interfaces, namely theTrafficFilter,Monitor,Alert, andNotificationto allow custom components to filter for relevant traffic, monitor the filtered traffic, and alert when when the traffic surpasses some threshold
bloodhound is released under the MIT License.