Skip to content
JanSurft edited this page May 17, 2016 · 1 revision

Ubuntu 14 und 15 Einrichtung:

Installation von Snort mit dem ProfiNet Preprocessor Prototypen

  1. Klone dieses repository https://github.com/TruffleHogProject/Snort_testing.git

  2. Öffne diese PDF: https://s3.amazonaws.com/snort-org-site/production/document_files/files/000/000/065/original/Snort_2.9.7.x_on_Ubuntu_12_and_14.pdf

  3. Folge NUR Kapitel 7 Installing the Snort Pre-Requisites -- nicht mehr! :)

  4. im Terminal sudo apt-get install -y zlib1g-dev

  5. im Terminal sudo apt-get install libdtool

  6. im Terminal sudo apt-get install automake

  7. im Terminal sudo chmod 777 build.sh && sudo chmod 777 rebuild.sh

  8. im Terminal ./build.sh -- wenn dabei error entstehen unten ERROR section nachschauen

  9. (optional) Öffne /etc/snort/snort.conf als root in einem Texteditor

  10. (optional) Ändere Zeile 45 ipvar HOME_NET any -- ersetze any durch Deine Adresse ... also z.B. 192.168.1.3/24

  11. (optional) Ändere Zeile 48 ipvar EXTERNAL_NET any -- ersetze any durch: !$HOME_NET

Einrichten von TruffleHog_IPC_Testing (Die Java TruffleHog Test Schnittstelle für Snort)

  1. Klone repository: https://github.com/TruffleHogProject/TruffleHog_IPC_testing.git
  2. Führe mvn package im Repository aus

Erstellen eines eigenen pcap Testfiles

  1. sudo apt-get install tcpreplay tcpdump
  2. im Terminal: /sbin/ifconfig
  3. Wähle dein aktives Netwerk interface (z.B. wlan0) und kopiere die HWaddr (z.B. E0:DB:55:CC:13:F1) und kopiere die inet addr (z.B. 192.168.1.20)
  4. im Terminal: tcprewrite --infile=Hochlauf_LMF.pcapng --outfile=temp.pcap --dstipmap=0.0.0.0/0:192.168.1.20 --enet-dmac=E0:DB:55:CC:13:F1
  5. im Terminal: tcprewrite --infile=temp.pcap --outfile=final.pcap --fixcsum
  6. final.pcap ist unser Testfile für tcpreplay

Testumgebung starten

  1. im Terminal: sudo tcpreplay -i wlan0 final.pcap (wobei wlan0 auch eth0 sein kann je nachdem welches bei Euch das aktive interface ist)
  2. im Terminal: sudo snort -i wlan0 -u snort -g snort -c /etc/snort/snort.conf -v
  3. im Terminal: sudo java -jar trufflehog-0.0.1-SNAPSHOT.jar path/to/your/home/folder

ERROR Handling:

Wenn dieser Error auftritt führe aclocal im Terminal aus (vom Haupt repository Verzeichnis aus)

/bin/bash: AR@: command not found make[3]: *** [libsfutil.a] Error 127 make[3]: Leaving directory /home/jan/projects/Snort_testing/src/sfutil' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory /home/jan/projects/Snort_testing/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jan/projects/Snort_testing' make: *** [all] Error 2