Archive for September 3rd, 2014

Raspberry Pi – ‚Pulledpork‘ for ‚Snort‘ rule management

Mittwoch, September 3rd, 2014

raspberrypi_logo.jpg   ‚Snort‘ needs to have an updated set of rulesets in order to be able to detect and respond to emerging threats as effectively as possible ‚Pulledpork‘ is a Perl script that is able to keep your Snort rulesets updated at all times with a minimal amount of effort

# cd /usr/local/src/snort
# wget https://pulledpork.googlecode.com/files/pulledpork-0.7.0.tar.gz
# tar -xvzf /usr/local/src/snort/pulledpork-0.7.0.tar.gz

Subscription rules are served from this URL  https://www.snort.org/rules/<file_name>?oinkcode=<oinkcode>  if your subscription is active you will receive the latest rules

Snort_00

Raspberry Pi – Simple Log Watcher ‚Swatch‘ die Echtzeitbenachrichtigung für ‚Snort‘

Mittwoch, September 3rd, 2014

raspberrypi_logo.jpg   Mit dem Simple Log Watcher ‚Swatch‘ können Sie Logdateien in Echtzeit nach bestimmten Mustern überwachen lassen und entsprechende Aktionen ausführen lassen – dies kann ein Skript sein was ausgeführt werden soll oder wie in unserem Fall eine eMail-Benachrichtigung und dafür legt man unter /root/ eine Datei namens „.swatchrc“ an die uns als Konfigurationsdatei für Swatch dient

# apt-get install swatch
# cd
# touch .swatchrc
# vi .swatchrc

watchfor /Priority\: 1/
echo=normal
mail=josef.schuster@dpsolution.de,subject=[SNORT] Priority 1 Alert

watchfor /ICMP test/
echo=normal
mail=josef.schuster@dpsolution.de,subject=[SNORT] ICMP test

# swatch –daemon -c /root/.swatchrc –input-record-separator=“\n\n“ -t /var/log/snort/alert

Raspberry Pi – ‚Postfix‘ als Mail Relay Agent

Mittwoch, September 3rd, 2014

raspberrypi_logo.jpg   Um Mails verschicken zu können wird der Mail Transfer Agent ‚Postfix‘ benötigt um einfach Mails an einen bestehenden Mailserver (z.B. 1und1) weiterzuleiten

# apt-get install mailutils
# apt-get install libsasl2 libsasl2-modules sasl2-bin
# apt-get install postfix

# vi /etc/postfix/main.cf

relayhost = smtp.1und1.de:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
inet_protocols = ipv4

# vi /etc/postfix/sasl_passwd

smtp.1und1.de josef.schuster@dpsolution.de:<password>

# chmod 600 /etc/postfix/sasl_passwd
# postmap /etc/postfix/sasl_passwd
# /etc/init.d/postfix reload

# mail -s „testbetreff“ josef.schuster@dpsolution.de < testmailtext.txt

postfix_02

postfix_00