This repository has been archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 521
SensorStopsSeeingTraffic
Doug Burks edited this page Mar 25, 2015
·
8 revisions
Just like in everything, there's always more than one way to do it!
Here are a few options:
[https://github.com/Security-Onion-Solutions/security-onion/wiki/Email#how-do-i-configure-ossec-to-send-emails](https://github.com/Security-Onion-Solutions/security-onion/wiki/Email#how-do-i-configure-ossec-to-send-emails) Bro will automatically email you when it stops seeing traffic on an interface. All you have to do is configure Bro per the [Email](Email) page:
[https://github.com/Security-Onion-Solutions/security-onion/wiki/Email#how-do-i-configure-bro-to-send-emails](https://github.com/Security-Onion-Solutions/security-onion/wiki/Email#how-do-i-configure-bro-to-send-emails) Here's another option contributed by Jerry Shenk:
#!/bin/sh
#script to monitor Security Onion activity for the past hour to alert on inactivity
#Inactivity could be due to a connection having been removed or some process failing
[email protected]
DATE=`date`
SUBJECT="`hostname` Security Onion inactivity alert `date`"
LIMIT=5
REPORT=/root/so-lasthour.txt
echo $SUBJECT > /root/edgerouter.log
if test ` mysql -N -B --user root --database securityonion_db -e
"SELECT COUNT(signature)as cnt, signature FROM event WHERE status<>1
and timestamp>=date_sub(now(), interval 3 hour) GROUP BY signature
ORDER BY cnt DESC LIMIT 20;" | grep -c .` -le $LIMIT
then
echo "Too few events"
echo "non-URL signatures" > $REPORT
mysql -N -B --user root --database securityonion_db -e "SELECT
COUNT(signature)as cnt, signature FROM event WHERE status<>1 and
timestamp>=date_sub(now(), interval 3 hour) GROUP BY signature ORDER
BY cnt DESC LIMIT 20;" >> $REPORT
echo "" >> $REPORT
echo "URL signatures" >> $REPORT
mysql -N -B --user root --database securityonion_db -e "SELECT
COUNT(signature)as cnt, signature FROM event WHERE status=1 and
timestamp>=date_sub(now(), interval 3 hour) GROUP BY signature ORDER
BY cnt DESC LIMIT 20;" >> $REPORT
cat $REPORT | mail -s "$SUBJECT" $MAILTO
else
echo "Acceptible number of events"
fi
- Introduction
- Use Cases
- Hardware Requirements
- Release Notes
- Download/Install
- Booting Issues
- After Installation
- UTC and Time Zones
- Services
- VirtualBox Walkthrough
- VMWare Walkthrough
- Videos
- Architecture
- Cheat Sheet
- Conference
- Elastic Stack
- Elastic Architecture
- Elasticsearch
- Logstash
- Kibana
- ElastAlert
- Curator
- FreqServer
- DomainStats
- Docker
- Redis
- Data Fields
- Beats
- Pre-Releases
- ELSA to Elastic
- Network Configuration
- Proxy Configuration
- Firewall/Hardening
- Email Configuration
- Integrating with other systems
- Changing IP Addresses
- NTP
- Managing Alerts
- Managing Rules
- Adding Local Rules
- Disabling Processes
- Filtering with BPF
- Adjusting PF_RING for traffic
- MySQL Tuning
- Adding a new disk
- High Performance Tuning
- Trimming PCAPs