{"id":109,"date":"2011-02-09T15:21:52","date_gmt":"2011-02-09T15:21:52","guid":{"rendered":"http:\/\/gigihfordanama.wordpress.com\/?p=109"},"modified":"2012-08-08T00:14:47","modified_gmt":"2012-08-08T00:14:47","slug":"ids-using-snort-2-7-and-freebsd-6-2-stable","status":"publish","type":"post","link":"https:\/\/dosen.unila.ac.id\/gigih\/2011\/02\/09\/ids-using-snort-2-7-and-freebsd-6-2-stable\/","title":{"rendered":"IDS Using SNORT 2.7 and FREEBSD 6.2 Stable"},"content":{"rendered":"<p>Sebelumnya mungkin kita sudah tidak asing lagi dengan Firewall dan IDS (Intrusion Detection System) semuanya ituadalah sebuah system yang berfungsi untuk mengamankan network dan server.<\/p>\n<p>IDS itu sendiri pun dibagi dalam 2 jenis yaitu Network Instrusion Detection System (NIDS) dan Host Intrusion Detection System (HIDS). Fungsi dari IDS ini sendiri adalah untuk mendeteksi suatu kejanggalan dari suatu system atau network yang terjadi sesuai dengan jenis tipe yang ada berdasarkan rules.<\/p>\n<p>Disini penulis hanya akan membicarakan membangun menggunakan aplikasi opensource. Sedangkan cara kerja lebih kurang seperti gambar dibawah ini :<\/p>\n<p>|\u00a0\u00a0 \u00a0|\u00a0 Input Traffic<br \/>\n|\u00a0\u00a0 \u00a0|<br \/>\n|\u00a0\u00a0 \u00a0|<br \/>\nV\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 V<br \/>\n&#8212;&#8212;&#8212;&#8212;-\u00a0 Attack Traffic\u00a0\u00a0\u00a0\u00a0\u00a0 OUTPUT DENY<br \/>\nHIPS\/NIPS\u00a0\u00a0\u00a0\u00a0 &#8212;&#8212;&#8212;&#8211;&gt;\u00a0\u00a0\u00a0\u00a0\u00a0 ^<br \/>\n&#8212;&#8212;&#8212;&#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n| \u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n|\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 V\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\n|\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;&#8212;&#8212;&#8212;-\u00a0 Block IP |<br \/>\nV&#8212;&#8212;&#8212;-&gt;\u00a0\u00a0\u00a0 Firewall\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;&#8212;&#8212;<br \/>\nL\u00a0\u00a0 \u00a0 &#8212;&#8212;&#8212;&#8212;-<br \/>\nE\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nG\u00a0\u00a0\u00a0\u00a0 T\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nA\u00a0\u00a0\u00a0\u00a0\u00a0 R\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nL\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nF<br \/>\nF\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nI\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<br \/>\nC\u00a0\u00a0\u00a0\u00a0\u00a0 V<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nApplication<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;<!--more--><!--more--><br \/>\nInstalasi;<\/p>\n<blockquote>\n<ul>\n<li>Masuk ke direktori snort<\/li>\n<li>unila-inherent-gtw# <strong>cd \/usr\/ports\/security\/snort<\/strong><\/li>\n<li>unila-inherent-gtw# ll<br \/>\ntotal 22<br \/>\n-rw-r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5080 Aug 15 03:01 Makefile<br \/>\n-rw-r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 197 Aug 15 03:01 distinfo<br \/>\ndrwxr-xr-x\u00a0\u00a0\u00a0 2 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 512 Jun 15 10:01 files<br \/>\n-rw-r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1202 Apr 20\u00a0 2003 pkg-descr<br \/>\n-rw-r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6768 Apr 19 09:23 pkg-plist<br \/>\ndrwxr-xr-x\u00a0\u00a0\u00a0 3 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 512 Sep 27 15:36 work<br \/>\nunila-inherent-gtw#<\/li>\n<li>unila-inherent-gtw# <strong>make &amp;&amp; make install<\/strong><\/li>\n<li>setelah instalasi selesai download rules dari website resmi http:\/\/snort.org<\/li>\n<li>Yang musti diinget rules nya harus bersesuian dengan snort yang udah diinstall\n<ul>\n<li>unila-inherent-gtw# <strong>pkg_info | grep snort<\/strong><br \/>\nsnort-2.7.0.1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Lightweight network intrusion detection system<br \/>\nunila-inherent-gtw#<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/blockquote>\n<ul>\n<li>Karena gue pake snort versi 2.7 jadi download rules yang versi 2.7, pengalaman gue kalo download rules nya tidak sesuai dengan snort yang diinstall maka snort tidak akan berfungsi.<\/li>\n<li>Setelah donwload rules, ekstrak file tersebut di direktori snort<\/li>\n<li>unila-inherent-gtw# <strong>cd \/usr\/local\/etc\/snort\/<\/strong><br \/>\nunila-inherent-gtw# <strong>ll<\/strong><br \/>\ntotal 2710<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3455 Sep 27 15:36 classification.config<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3455 Sep 27 15:36 classification.config-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12196 Sep 27 15:36 gen-msg.map<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12196 Sep 27 15:36 gen-msg.map-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2060 Sep 27 15:36 generators<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2060 Sep 27 15:36 generators-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 548 Sep 27 15:36 reference.config<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 548 Sep 27 15:36 reference.config-sample<br \/>\ndrwxr-xr-x\u00a0\u00a0\u00a0 5 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1536 Sep 27 16:49 rules<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5 Sep 27 15:36 sid<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0 1237107 Sep 27 15:36 sid-msg.map<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0 1237107 Sep 27 15:36 sid-msg.map-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5 Sep 27 15:36 sid-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 39083 Sep 27 16:14 snort.conf<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 39042 Sep 27 15:36 snort.conf-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2319 Sep 27 15:36 threshold.conf<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2319 Sep 27 15:36 threshold.conf-sample<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 53841 Sep 27 15:36 unicode.map<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 wheel\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 53841 Sep 27 15:36 unicode.map-sample<br \/>\nunila-inherent-gtw#<\/li>\n<li>Langsung kopiin ke folder rules<\/li>\n<li>Setelah selesai tambahkan command\u00a0 <strong>snort_enable=&#8221;YES&#8221;<\/strong> di file startup <strong>\/etc\/rc.conf<\/strong><\/li>\n<li>Jalankan snort dengan menggunakan perintah <strong>\/usr\/local\/etc\/rc.d\/snort start<\/strong><\/li>\n<li>unila-inherent-gtw# <strong>tail -f \/var\/log\/messages<\/strong><br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2325]: Warning: flowbits key &#8216;ms_sql_seen_dns&#8217; is checked but not ever set. Sep 28 08:46:52 unila-inherent-gtw snort[2325]: Warning: flowbits key &#8216;dce.bind.ca-alert&#8217; is checked but not ever set. Sep 28 08:46:52 unila-inherent-gtw snort[2325]: Warning: flowbits key &#8216;flv.xfer&#8217; is checked but not ever set.<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2325]: 51 out of 512 flowbits in use.<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2325]: *** *** interface device lookup found: em0 ***<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2325]: Initializing daemon mode<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2326]: PID path stat checked out ok, PID path set to \/var\/run\/<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2326]: Writing PID &#8220;2326&#8221; to file &#8220;\/var\/run\/\/snort_em0.pid&#8221;<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2326]: Daemon initialized, signaled parent pid: 2325<br \/>\nSep 28 08:46:52 unila-inherent-gtw snort[2325]: Daemon parent exiting<br \/>\nSep 28 08:47:07 unila-inherent-gtw snort[2326]: Preprocessor\/Decoder Rule Count: 0<br \/>\nSep 28 08:47:07 unila-inherent-gtw snort[2326]: Snort initialization completed successfully (pid=2326)<br \/>\nSep 28 08:47:07 unila-inherent-gtw snort[2326]: Not Using PCAP_FRAMES<\/li>\n<li>unila-inherent-gtw# <strong>ps ax | grep snort<\/strong><br \/>\n2326\u00a0 ??\u00a0 Ss\u00a0\u00a0\u00a0\u00a0 0:33.51 \/usr\/local\/bin\/snort -Dq -c \/usr\/local\/etc\/snort\/snort.conf<br \/>\n2329\u00a0 p3\u00a0 L+\u00a0\u00a0\u00a0\u00a0 0:00.00 grep snort<br \/>\nunila-inherent-gtw#apakah snort sudah berjalan dengan baik<\/li>\n<li>Kemudian cek apakah ada yang melakukan penyerangan dengan mengecek log alert snort<\/li>\n<li>unila-inherent-gtw# <strong>tail -f \/var\/log\/snort\/alert<\/strong><\/li>\n<li> ho..ho..ho&#8230;. ternyata banyak juga yang iseng<\/li>\n<li> [**] [1:483:6] ICMP PING CyberKit 2.2 Windows [**]<br \/>\n[Classification: Misc activity] [Priority: 3]<br \/>\n09\/28-08:52:57.862390 192.168.140.35 -&gt; 192.168.43.188<br \/>\nICMP TTL:28 TOS:0x0 ID:39662 IpLen:20 DgmLen:92<br \/>\nType:8\u00a0 Code:0\u00a0 ID:512\u00a0\u00a0 Seq:45340\u00a0 ECHO<br \/>\n[Xref =&gt; http:\/\/www.whitehats.com\/info\/IDS154]<\/p>\n<p>[**] [1:483:6] ICMP PING CyberKit 2.2 Windows [**]<br \/>\n[Classification: Misc activity] [Priority: 3]<br \/>\n09\/28-08:52:57.862498 192.168.140.35 -&gt; 192.168.43.189<br \/>\nICMP TTL:105 TOS:0x0 ID:39663 IpLen:20 DgmLen:92<br \/>\nType:8\u00a0 Code:0\u00a0 ID:512\u00a0\u00a0 Seq:45596\u00a0 ECHO<br \/>\n[Xref =&gt; http:\/\/www.whitehats.com\/info\/IDS154]<\/p>\n<p>[**] [1:483:6] ICMP PING CyberKit 2.2 Windows [**]<br \/>\n[Classification: Misc activity] [Priority: 3]<br \/>\n09\/28-08:52:57.862515 192.168.140.35 -&gt; 192.168.43.189<br \/>\nICMP TTL:104 TOS:0x0 ID:39663 IpLen:20 DgmLen:92<br \/>\nType:8\u00a0 Code:0\u00a0 ID:512\u00a0\u00a0 Seq:45596\u00a0 ECHO<br \/>\n[Xref =&gt; http:\/\/www.whitehats.com\/info\/IDS154]<\/p>\n<p>[**] [1:483:6] ICMP PING CyberKit 2.2 Windows [**]<br \/>\n[Classification: Misc activity] [Priority: 3]<br \/>\n09\/28-08:52:57.862622 192.168.140.35 -&gt; 192.168.43.188<br \/>\nICMP TTL:27 TOS:0x0 ID:39662 IpLen:20 DgmLen:92<br \/>\nType:8\u00a0 Code:0\u00a0 ID:512\u00a0\u00a0 Seq:45340\u00a0 ECHO<br \/>\n[Xref =&gt; http:\/\/www.whitehats.com\/info\/IDS154]<\/p>\n<p>[**] [1:483:6] ICMP PING CyberKit 2.2 Windows [**]<br \/>\n[Classification: Misc activity] [Priority: 3] ^C<\/li>\n<li>Yups udah ketauan orang yang iseng, tinggal blok pake PF aja&#8230;..<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Sebelumnya mungkin kita sudah tidak asing lagi dengan Firewall dan IDS (Intrusion Detection System) semuanya ituadalah sebuah system yang berfungsi untuk mengamankan network dan server. IDS itu sendiri pun dibagi dalam 2 jenis yaitu Network Instrusion Detection System (NIDS) dan Host Intrusion Detection System (HIDS). Fungsi dari IDS ini sendiri adalah untuk mendeteksi suatu kejanggalan &hellip; <a href=\"https:\/\/dosen.unila.ac.id\/gigih\/2011\/02\/09\/ids-using-snort-2-7-and-freebsd-6-2-stable\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;IDS Using SNORT 2.7 and FREEBSD 6.2 Stable&#8221;<\/span><\/a><\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1348,5],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-kiat-sukses-menjadi-seorang-network-engineer-2","category-old-post-dari-unilanet"],"_links":{"self":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts\/109"}],"collection":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":0,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/gigih\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}