Intrusion Detection System (Portsentry dan Honeypot ...

31
Network Security Network Security Intrusion Detection System (Portsentry dan Honeypot) (Portsentry dan Honeypot) Muhammad Zen S. Hadi

Transcript of Intrusion Detection System (Portsentry dan Honeypot ...

Page 1: Intrusion Detection System (Portsentry dan Honeypot ...

Network SecurityNetwork Security

Intrusion Detection System (Portsentry dan Honeypot)(Portsentry dan Honeypot)

Muhammad Zen S. Hadi

Page 2: Intrusion Detection System (Portsentry dan Honeypot ...

N t k I t i D t tiNetwork Intrusion Detection

Memahasi dasar intrusion detection systems (portsentry) Memahami dasar honeypot

2

Page 3: Intrusion Detection System (Portsentry dan Honeypot ...

Fi ll S j Tdk C kFirewall Saja Tdk Cukup

Tidak semua akses melalui firewall Ada beberapa aplikasi yang memang diloloskan

l h fi ll (W b E il dll)oleh firewall (Web, Email, dll) Tidak semua ancaman berasal dari luar firewall,

tapi dari dalam jaringan sendiritapi dari dalam jaringan sendiri Firewall kadang merupakan object serangan Perlu suatu aplikasi sebagai pelengkap Firewall Perlu suatu aplikasi sebagai pelengkap Firewall

yang bisa mendeteksi ancaman yang tidak bisa diproteksi oleh firewall

3

Page 4: Intrusion Detection System (Portsentry dan Honeypot ...

D S tiDoS preventive

IDS IPS Honeypots firewall

4

Page 5: Intrusion Detection System (Portsentry dan Honeypot ...

I t i D t ti S t (IDS)Intrusion Detection System (IDS)

Examining system logs (host based) Examining network traffic (network based) A Combination of the two Implementation:

snort snort

5

Page 6: Intrusion Detection System (Portsentry dan Honeypot ...

I t i P ti S t (IPS)Intrusion Prevention System (IPS)

Upgrade application Active reaction (IDS = passive) Implementation:

portsentry

6

Page 7: Intrusion Detection System (Portsentry dan Honeypot ...

P ti IDSPengertian IDS

IDS kepanjangan Intrusion Detection System Sistem untuk mendeteksi dan merespons adanya

“intrusion” yang dilakukan oleh “intruder”intrusion yang dilakukan oleh intruder Pendeteksian bisa dilakukan sebelum, selama dan

sesudah kejadian.T d k i b l k bi l k k i d k Terdeteksi sebelum, maka bisa melakukan tindakan pencegahan

Terdeteksi selama : bisa diputuskan untuk diblok dan alarm T d t k i t l h lih t kib t diti b lk Terdeteksi setelah : melihat akibat yang ditimbulkan

IDS mengumpulkan info dari dari berbagai sistem dan source network kemudian melakukan analisa terhadap i f b i d l d h di kinfo tsb sesuai dengan rule yang sudah ditetapkan

7

Page 8: Intrusion Detection System (Portsentry dan Honeypot ...

P ti IDS (C t )Pengertian IDS (Cont…)

Intrusion Didefinisikan sebagai kegiatan yang bersifat anomaly, incorrect,

inappropriate yang terjadi di jaringan atau di host Klasifikasi intrusi : Klasifikasi intrusi :

Attempted Break-ins Masquerade attacks Penetration of Security Control Systems Leakage Leakage Denial of Service Malicious Use

Anomaly merupakan Traffic/aktivitas yang tidak sesuai d lidgn policy: akses dari/ke host yang terlarang memiliki content terlarang (virus) menjalankan program terlarang (web directory traversal:GET menjalankan program terlarang (web directory traversal:GET

../..;cmd.exe )

8

Page 9: Intrusion Detection System (Portsentry dan Honeypot ...

I t i D t ti S t (IDS)Intrusion Detection System (IDS)

Intrusion detection adalah proses notifikasi ketika seseorang ingin masuk ke sebuah sistem. K t i d i ft i i di b t i t i d t ti Kategori dari software ini disebut intrusion detection systems (IDS)

PortSentry, oleh Psionic, melihat port network ketikaPortSentry, oleh Psionic, melihat port network ketika paket melakukan port scan.

Tool yang lebih kompleks dari PortSentry adalah Linux IDS t LIDS d t b h Li k lIDS, atau LIDS, yang dapat merubah Linux kernel

9

Page 10: Intrusion Detection System (Portsentry dan Honeypot ...

Penggunaan Software IntrusionPenggunaan Software Intrusion Detection

Penggunaan yang disarankan untuk tool intrusion detection : Gunakan nmap untuk scan system setelah konfigurasi untuk Gunakan nmap untuk scan system setelah konfigurasi untuk

mengecek security holes. Selanjutnya, gunakan PortSentry untuk melihat host luar yang

mencoba melakukan port scan ke servermencoba melakukan port scan ke server. Gunakan LIDS untuk mengamankan file system anda, sehingga

seseorang yang ingin untuk masuk ke server akan mempunyai akses yang dibatasiakses yang dibatasi.

10

Page 11: Intrusion Detection System (Portsentry dan Honeypot ...

B i I t i D t tiBasic Intrusion Detection

TargetSystem

IntrusionDetectionSystem

Monitor

y System

Respond Report

Intrusion Detection System Infrastructure

Respond Report

Intrusion Detection System Infrastructure

11

Page 12: Intrusion Detection System (Portsentry dan Honeypot ...

I t i D t ti S t IDSIntrusion Detection System IDS

Port : Pelabuhan Sentry : Penjaga

P S d l h b h k l k di PortSentry adalah sebuah perangkat lunak yang di rancang untuk mendeteksi adanya port scanning & meresponds secara aktif jika ada port scanning secara p j p greal time

portsentry – mencegah portscan Jalankan sebagai daemon pada host yang terproteksi, hal ini

akan mendengarkan ke port TCP/UDP dan akan memblok scanning host dari server yang terkoneksi.

12

g y g Untuk implementasi : http://sourceforge.net/projects/sentrytools/

Page 13: Intrusion Detection System (Portsentry dan Honeypot ...

P tS tPortSentryhttp://www.psionic.com/products/portsentry.html.

13

Page 14: Intrusion Detection System (Portsentry dan Honeypot ...

Pl tf P t S tPlatform Port Sentry

FreeBSD Open BSD Linux

14

Page 15: Intrusion Detection System (Portsentry dan Honeypot ...

K t P t S tKeuntungan Port Sentry

Deteksi portscan TCP/UDP berbasis host-based dan mengaktifkan sistem pertahanan

Deteksi Stealth scanBereaksi ke portscan dengan memblok host Internal state engine untuk mengingat host

yang terkoneksi sebelumnyaSemua kejadian akan disimpan ke syslog

15

Page 16: Intrusion Detection System (Portsentry dan Honeypot ...

K k P t S tKekurangan Port Sentry

Portsentry dibinding ke port sehingga diperlukan pengecekan menyeluruhTid k d t d t k i fi Tidak dapat mendeteksi spoofing

16

Page 17: Intrusion Detection System (Portsentry dan Honeypot ...

Di P t S t Dil t kkDimana Port Sentry Diletakkan

Dibelakang Firewall Dibelakang tiap host yang dilindungi

17

Page 18: Intrusion Detection System (Portsentry dan Honeypot ...

EEPIS Secure Network

18

Page 19: Intrusion Detection System (Portsentry dan Honeypot ...

Fit P tS tFiture PortSentry

Mendeteksi scan Melakukan aksi terhadap host yg melakukan pelanggaran Mengemail admin system bila di integrasikan dengan

Logcheck/LogSentry

19

Page 20: Intrusion Detection System (Portsentry dan Honeypot ...

Ak i dil k k P t S tAksi yang dilakukan Port Sentry Stealth setting ????g Melogging semua pelanggaran di syslog dan

mengindikasikan nama system, waktu serangan, IP mesin TCP / UDP t t t dil k kpenyerang, TCP / UDP port tempat serangan dilakukan.

Menambahkan entry untuk penyerang di /etc/hosts.deny Mengeblok akses ke sistem berbasis iptables atau Mengeblok akses ke sistem berbasis iptables atau

tcpwrapper

20

Page 21: Intrusion Detection System (Portsentry dan Honeypot ...

Fil K fi i P tS tFile Konfigurasi PortSentryfil / t / t t / t t f file /etc/portsentry/portsentry.confmerupakan konfigurasi utama portsentry. Disini secara bertahapdiset port mana saja yang perlu di monitor, responds apa yang harus di lakukan ke mesin yang melakukan portscan, mekanismemenghilangkan mesin dari routing table, masukan ke host.deny.

file /etc/default/portsentryp y set mode deteksi yang dilakukan portsentry. Semakin baik mode deteksi yang dipilih (advanced stealth

TCP/UP scanning) biasanya PortSentry akan semakin sensitif &TCP/UP scanning), biasanya PortSentry akan semakin sensitif & semakin rewel karena sedikit-sedikit akan memblokir mesin.

file /etc/portsentry/portsentry.ignorei ik IP dd l di b ikisikan IP address yang perlu di abaikan

21

Page 22: Intrusion Detection System (Portsentry dan Honeypot ...

M j l k t tMenjalankan portsentry

/usr/sbin/portsentry /etc/init.d/portsentry start

portsentry udp (normal scan detection) portsentry -udp (normal scan detection) portsentry -tcp (normal scan detection) portsentry -sudp (normal stealth scan detection)p y p ( ) portsentry -stcp (normal stealth scan detection) portsentry -audp (advanced stealth scan detection)

t t t ( d d t lth d t ti ) portsentry -atcp (advanced stealth scan detection)

22

Page 23: Intrusion Detection System (Portsentry dan Honeypot ...

K fi i P t S tKonfigurasi Port Sentry Un-comment these if you are really anal:

#TCP PORTS="1 7 9 11 15 70 79 80 109 110 111 119 138 139 143 5#TCP_PORTS="1,7,9,11,15,70,79,80,109,110,111,119,138,139,143,512,513,514,515,540,635,1080,1524,2000,2001,[..] #UDP_PORTS="1,7,9,66,67,68,69,111,137,138,161,162,474,513,517,518,635,640,641,666,700,2049,31335,27444,34555,[..] # # U th if j t t t b # # Use these if you just want to be aware: TCP_PORTS="1,11,15,79,111,119,143,540,635,1080,1524,2000,5742,6667,12345,12346,20034,27665,31337,32771,32772,[..] UDP_PORTS="1,7,9,69,161,162,513,635,640,641,700,37444,34555,31335 32770 32771 32772 32773 32774 31337 54321“1335,32770,32771,32772,32773,32774,31337,54321“

# # Use these for just bare-bones #TCP_PORTS="1,11,15,110,111,143,540,635,1080,1524,2000,12345,12346,20034,32771,32772,32773,32774,49724,54320" , , , , , , ,#UDP_PORTS="1,7,9,69,161,162,513,640,700,32770,32771,32772,32773,32774,31337,54321"

23

Page 24: Intrusion Detection System (Portsentry dan Honeypot ...

Bl ki H tBlocking Host

file /etc/portsentry/portsentry.conf Blocking dengan iptables :

KILL_ROUTE="/usr/local/sbin/iptables -I INPUT -s $TARGET$ -j DROP“

Blocking dengan tcpwrapper : Blocking dengan tcpwrapper :KILL_HOSTS_DENY="ALL: $TARGET$ : DENY"

24

Page 25: Intrusion Detection System (Portsentry dan Honeypot ...

D ft L SDaftar Log Serangan

/etc/hosts.deny /etc/portsentry/portsentry.blocked.atcp /etc/portsentry/portsentry.blocked.audp /etc/portsentry/portsentry.history

25

Page 26: Intrusion Detection System (Portsentry dan Honeypot ...

O t t P tS tOutput PortSentry

Sep 19 01:50:19 striker portsentry[129]: attackalert: \ Host 192.168.0.1 has been blocked via dropped route using command: \ "/sbin/ipfw add 1 deny all from 192 168 0 1:255 255 255 255 to any"192.168.0.1:255.255.255.255 to any

Sep 19 01:50:19 striker portsentry[129]: attackalert: \ Connect from host:attackalert: \ Connect from host: 192.168.0.1/192.168.0.1 to TCP port: 9 Sep 19 01:50:19 striker portsentry[129]: attackalert: \0 50 9 s e po se y[ 9] a ac a e \Host: 192.168.0.1 is already blocked. Ignoring

26

Page 27: Intrusion Detection System (Portsentry dan Honeypot ...

H tHoneypot

Merupakan sebuah resource yang berpura-pura menjadi sebuah target real, yang diharapkan untuk diserang. T j t Tujuan utamanya : membelokkan attacker dari serangan ke productive system mendapatkan informasi tentang jenis-jenis serangan dan p g j j g

penyerang.

Penempatan honeypot Penempatan secara tidak langsung antara firewall dan internet Penempatan secara tidak langsung antara firewall dan internet Penempatan honeypot pada DMZ

27

Page 28: Intrusion Detection System (Portsentry dan Honeypot ...

HoneypotsHoneypots (http://www.honeynet.org)

28

Page 29: Intrusion Detection System (Portsentry dan Honeypot ...

Vi t l H tVirtual HoneynetI t t

Implement VMware

Internet

Host Operating System

Guest OS Guest OS Guest OS

29

Page 30: Intrusion Detection System (Portsentry dan Honeypot ...

Ti H tTipe HoneypotHi h I t ti H t High Interaction Honeypotadalah sistem yang mengoperasikan Sistem Operasi penuh sehingga penyerang akan melihatnya sebagaipenuh sehingga penyerang akan melihatnya sebagai sebuah sistem operasi/host yang siap untuk dieksploitasi

Low Interaction Honeypotmensimulasikan sebuah sistem operasi dengan service-service tertentu(misalnya SSH,HTTP,FTP) atau dengan kata lain sistem yang bukan merupakan sistem operasikata lain sistem yang bukan merupakan sistem operasi secara keseluruhan, service yang berjalan tidak bisa dieksploitasi untuk mendapatkan akses penuh terhadap h thoneypot.

30

Page 31: Intrusion Detection System (Portsentry dan Honeypot ...

T j H tTujuan Honeypot

Early Detection Pendeteksian ancaman baru Mengenal si attacker (know your enemy) Menyelamatkan sistem

M k l fiki tt k Mengacaukan pola fikir attacker Membangun pertahanan Mencegah proses hacking Mencegah proses hacking

31