This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Saturday, June 18, 2011

Antisipasi DDOS / Ping flood dg menutup port ICMP

Tutup port ICMP melalu sysctl, cek dengan menjalankan perintah ini
/sbin/sysctl -A|grep icmp
net.ipv6.icmp.ratelimit = 1000
net.ipv4.icmp_ratemask = 6168
net.ipv4.icmp_ratelimit = 1000
net.ipv4.icmp_errors_use_inbound_ifaddr = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 0

Kemudian ubah atau tambahkan settingan:
net.ipv4.icmp_echo_ignore_all = 0, menjadi net.ipv4.icmp_echo_ignore_all = 1
pada /etc/sysctl.conf

kemudian reboot network #/etc/init.d/network restart
coba PING bisa tidak ??
Share:

Anti DDOS dengan DDOS-Deflate

Pada saat server terasa berat ada kemungkinan anda terkena serangan DDOS. klo masih sempet kebuka sih masih bisa banned ip yang melakukan bad request ke server kita .. kita bisa cek dengan perintah :

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

DDOS-Deflate di mana tools ini akan membantu anda dalam pengamanan dari serangan DDOS.

download toolnya disini http://www.inetbase.com/scripts/ddos/install.sh
tentunya melalui root console

setelah di download kita ubah chmod nya dulu agar dapat di esekusi
#chmod 0700 install.sh
./install.sh

setelah terinstall di edit file-file configurasi sesuai kehendak..

Untuk whitelist IP
vim /usr/local/ddos/ignore.ip.list

Untuk konfigurasi utamanya ada di
vim /usr/local/ddos/ddos.conf

kira - kira seperti ini defaultnya

##### Paths of the script and other files
PROGDIR="/usr/local/ddos"
PROG="/usr/local/ddos/ddos.sh"
IGNORE_IP_LIST="/usr/local/ddos/ignore.ip.list"
CRON="/etc/cron.d/ddos.cron"
APF="/etc/apf/apf"
IPT="/sbin/iptables"

##### frequency in minutes for running the script
##### Caution: Every time this setting is changed, run the script with --cron
##### option so that the new frequency takes effect
FREQ=1

##### How many connections define a bad IP? Indicate that below.
NO_OF_CONNECTIONS=150

##### APF_BAN=1 (Make sure your APF version is atleast 0.96)
##### APF_BAN=0 (Uses iptables for banning ips instead of APF)
APF_BAN=1

##### KILL=0 (Bad IPs are'nt banned, good for interactive execution of script)
##### KILL=1 (Recommended setting)
KILL=1

##### An email is sent to the following address when an IP is banned.
##### Blank would suppress sending of mails
EMAIL_TO="root"

##### Number of seconds the banned ip should remain in blacklist.
BAN_PERIOD=600
Share:

Script untuk mengamankan MikroTik dari port scanner, DDOS dan netcut

Scriptnya:

/ip firewall filter

add action=add-src-to-address-list address-list=DDOS address-list-timeout=15s \ chain=input comment="" disabled=no dst-port=1337 protocol=tcp

add action=add-src-to-address-list address-list=DDOS address-list-timeout=15m \ chain=input comment="" disabled=no dst-port=7331 protocol=tcp src-address-list=knock

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input comment="Port scanners to list " disabled=no protocol=tcp psd=21,3s,3,1

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input comment="SYN/FIN scan" disabled=no protocol=tcp tcp-flags=fin,syn

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input comment="SYN/RST scan" disabled=no protocol=tcp tcp-flags=syn,rst

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input disabled=no tcp-flags=fin,psh,urg,!syn,!rst,!ack protocol=tcp \ comment="FIN/PSH/URG scan"

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input disabled=no protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg \
comment="ALL/ALL scan"

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg comment="NMAP NULL scan" \ disabled=no protocol=tcp

add action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w \ chain=input comment="NMAP FIN Stealth scan" disabled=no protocol=tcp

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=61.213.183.1-61.213.183.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=67.195.134.1-67.195.134.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=68.142.233.1-68.142.233.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=68.180.217.1-68.180.217.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=203.84.204.1-203.84.204.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=69.63.176.1-69.63.176.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=69.63.181.1-69.63.181.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=63.245.209.1-63.245.209.254

add action=accept chain=input comment="ANTI NETCUT" disabled=no dst-port=0-65535 \ protocol=tcp src-address=63.245.213.1-63.245.213.254
Share:

Mencegah serangan Syn & Ping Flood Attack (DOS)

Syn Flooding dan ping flooding merupakan jenis serangan pada sebuah situs atau jaringan internet, lebih tepatnya DOS (Denial Of Service) kadang juga ada yang bilang DDOS (Distributed Denial Of Service). Bedanya yaitu DOS dilakukan dengan satu mesin sedangkan DDOS dilakukan oleh lebih dari satu mesin komputer. Syn Flooding adalah serangan yang dilakukan dengan cara memanfaatkan loophole pada saat koneksi TCP/IP terbentuk, tepatnya memanfaatkan three way handsake pada TCP/IP.

Ok langsung aja, disini saya menggunakan Linux, karena kebanyakan server menggunakannya sebagai layanan jaringan :
1. Mencegah paket Syn Flood Attack
Buat sebuah file bernama closesyn.sh yang isinya sebagai berikut untuk mencegah serangan syn flood
#!bin/sh
#Menghapus semua Rule
iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
#blok paket syn yang dicurigai jahat
iptables -N synjahat
iptables -A INPUT -p tcp --syn -j synjahat
iptables -A synjahat -m limit --limit 1/s --limit-burst 3 -j ACCEPT
iptables -A synjahat -j DROP

root@3xpl01ts:~# sh closesyn.sh

2. Mencegah Ping Flood attack
Buat sebuah file bernama closeping.sh yang isinya sebagai berikut untuk mencegah serangan ping flood
#!bin/sh
#Menghapus semua Rule
iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
#blok paket ping(icmp) yang dicurigai jahat
iptables -N pingjahat
iptables -A INPUT -p icmp -j pingjahat
iptables -A pingjahat -m limit --limit 1/s --limit-burst 2 -j ACCEPT
iptables -A pingjahat -j DROP

root@3xpl01ts:~#sh closeping.sh

coba lakukan testing dengan perintah

ping [target] -s 6500
Share:

Anti DDoS di Mikrotik

ip firewall filter add chain=input protocol=tcp dst-port=1337 action= add-src-to-address-list address-list=DDOS address-list-timeout=15s comment=”" disabled=no
ip firewall filter add chain=input protocol=tcp dst-port=7331 src-address-list=knock action= add-src-to-address-list address-list=DDOS address-list-timeout=15m comment=”" disabled=no

ip firewall filter add chain=input connection-state=established action=accept comment=”accept established connection packets” disabled=no
ip firewall filter add chain=input connection-state=related action=accept comment=”accept related connection packets” disabled=no
ip firewall filter add chain=input connection-state=invalid action=drop comment=”drop Paket Invalid” disabled=no

ip firewall filter add chain=input protocol=tcp psd=21,3s,3,1 action=drop comment=”Mendetek serangan Port Scaner” disabled=no
ip firewall filter add chain=input protocol=tcp connection-limit=3,32 src-address-list=black_list action=tarpit comment=”Bikin kejutan ke ip penyerang” disabled=no
ip firewall filter add chain=input protocol=tcp connection-limit=10,32 action=add-src-to-address-list address-list=black_list address-list-timeout=1d comment=”Masukin ke karung Ip penyerang” disabled=no

ip firewall filter add chain=input protocol=icmp action=jump jump-target=ICMP comment=”jump chain ICMP” disabled=no
ip firewall filter add chain=input action=jump jump-target=services comment=”jump chain service” disabled=no

ip firewall filter add chain=input dst-address-type=broadcast action=accept comment=”Allow Broadcast Traffic” disabled=no

ip firewall filter add chain=input action=log log-prefix=”Filter:” comment=”Catat kegiatan penyerang” disabled=no

ip firewall filter add chain=input src-address=Subnet WAN action=accept comment=”List Ip yang boleh akses ke router”
ip firewall filter add chain=input src-address=Subnet Lan action=accept
ip firewall filter add chain=input src-address=Subnet DMZ action=accept
ip firewall filter add chain=input action=drop comment=”Blok Semua yang aneh2″ disabled=no

ip firewall filter add chain=ICMP protocol=icmp icmp-options=0:0-255 limit=5,5 action=accept comment=”0:0 dan limit utk 5pac/s” disabled=no
ip firewall filter add chain=ICMP protocol=icmp icmp-options=3:3 limit=5,5 action=accept comment=”3:3 dan limit utk 5pac/s” disabled=no
ip firewall filter add chain=ICMP protocol=icmp icmp-options=3:4 limit=5,5 action=accept comment=”3:4 dan limit for 5pac/s” disabled=no
ip firewall filter add chain=ICMP protocol=icmp icmp-options=8:0-255 limit=5,5 action=accept comment=”8:0 and limit utk 5pac/s” disabled=no
ip firewall filter add chain=ICMP protocol=icmp icmp-options=11:0-255 limit=5,5 action=accept comment=”11:0 and limit utk 5pac/s” disabled=no
ip firewall filter add chain=ICMP protocol=icmp action=drop comment=”Blok semua yang aneh2″ disabled=no

ip firewall filter add chain=forward protocol=icmp comment=”Perbolehkan ping”
ip firewall filter add chain=forward protocol=udp comment=”Perbolehkan ke udp”
ip firewall filter add chain=forward src-address=Subnet WAN action=accept comment=”Akses hanya dari ip terdaftar”
ip firewall filter add chain=forward src-address=Subnet LAN action=accept
ip firewall filter add chain=forward src-address=Subnet DMZ action=accept
ip firewall filter add chain=forward action=drop comment=”blok semua yang aneh2″
Share:

Followers

Total Pageviews

Definition List

Unordered List

Support