SNORT: Install SNORT saja Ubuntu 20.04

From OnnoWiki
Revision as of 19:48, 18 December 2020 by Onnowpurbo (talk | contribs) (→‎Jalankan Snort mode NIDS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Siapkan Pendukung

Cek repository

apt update


Cek Jaringan

ifconfig

catat nama interface yang nanti akan di monitor

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.169  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::a00:27ff:fe2c:cc3c  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:2c:cc:3c  txqueuelen 1000  (Ethernet)
        RX packets 34056  bytes 43367030 (43.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4141  bytes 337064 (337.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


maka interface yang dimonitor adalah

enp0s3


Siapkan Aplikasi Pendukung

sudo locale-gen id_ID.UTF-8
apt update
apt -y install oinkmaster snort snort-common snort-rules-default snort-doc

Akan di tanya

  • interface yang akan di monitor, misalnya enp0s3
  • range IP yang di monitor, misalnya 192.168.0.0/24

Cek Snort

snort -C

Jalankan Snort mode NIDS

snort -dev -l /var/log/snort/ -h 192.168.0.0/24 -c /etc/snort/snort.conf &

kalau ingin supaya bisa di baca di kemudian hari oleh wireshark harus di simpan dalam bentuk binary, dengan perintah

/usr/sbin/snort -m 027 -b -l /var/log/snort/ -u agung -c /etc/snort/snort.conf -S HOME_NET=[192.168.0.0/24] -i enp0s3 &

Supaya tidak rewel, sebaiknya permission /var/log/snort di jadikan

chmod 770 /var/log/snort

ini sebetulnya cara yang tidak baik.

Menjalankan Snort mode NIDS, log text

Agar log /var/log/snort bisa di baca oleh manusia, kita bisa menjalankan snort dengan perintah,

snort -c /etc/snort/snort.conf -l /var/log/snort/ -K ascii -D

Referensi


Pranala Menarik