Tampilkan postingan dengan label defense_tools. Tampilkan semua postingan
Tampilkan postingan dengan label defense_tools. Tampilkan semua postingan

Scan file-file backdoor di directory web anda

09.53 Add Comment

kembali lagi ketemu ama ane …. kali ini ane mau share tentang script php yang mungkin berguna buat pertahanan situs kita …Sebagai administrator sebuah website, pastinya kita tidak mau jika terdapat backdoor yang digunakan Attacker untuk memasuki sistem kita kapan saja dia mau. Banyak tipe Backdoor yang beredar di pasaran dunia maya saat ini. Tools ini akan mencari isi dari file yang terindikasi perintah-perintah atau fungsi-fungsi PHP yang berbahaya
script PHP ini akan menscan file2 yang ada di root yang di curigai atau berpotensi sebagai shell

#!/usr/bin/php
array(“c999shexit();”, “setcookie(”c999sh_surl”);”, “c999_buff_prepare();”),
“c100″ => array(“$back_connect_c=”f0VMRgEBAQA”, “function myshellexec($command) {“, “tEY87ExcilDfgAMhwqM74s6o”),
“r57″ => array(“if(strpos(ex(”echo abcr57”),”r57”)!=3)”, “function ex($cfe)”, “$port_bind_bd_c=”I2luY2x1ZGUg”),
“erne”=> array(“function unix2DosTime($unixtime = 0)”, “eh($errno, $er”, “$mtime=@date(”Y-m-d H:i:s”,@filemti”),
“Safe_Over” => array(“function walkArray($array){“, “function printpagelink($a, $b, $link = ””)”, “if ($cmd != ”downl”)”),
“cmd_asp” => array(” ‘ — Read th”, “ll oFileSys.D”, “Author: Maceo”)
);
//the script work
$euristic_active = true;
$euristic_sens = 40;
for ($i = 1; $i “.$file.”tprobably “.$shell.” shelln”;
}
else if ($euristic_active)
if ($t = check_euristic($l) and $t > $euristic_sens)
{
echo “[_ALERT] euristic $t%> “.$file.”tprobably is a shelln”;
}
}
else
{
echo “i can’t open $file filen”;
}
}
function check($string)
{
$check = 0;
global $word__;
foreach($word__ as $shell => $code)
foreach($code as $microcode)
if (stripos($string, $microcode) !== false)
{
$check ++;
if ($check == 3) return $shell;
}
return false;
}
function check_euristic($string)
{
global $euristic__;
$check = 0;
foreach($euristic__ as $code)
if (stripos($string, $code) !== false)
$check++;
return intval(($check * 100) / count($euristic__));
}
function help($me)
{
echo “indonesianhacker shell scannern”.
$me {-e [euristic method default = Y] Y/N -p [[0-100] euristic sensibility fewer == most feeble ] [-d [directory] / -f [file] ]}n”.
“exemple: $me -e N -d /tmpn”
;
exit;
}
?>
simpan dengan nama amankan.php ato serah ente dah panggil url nah … http://situslo/amankan.php
ntar tinggal liat hasilnya….
nb : berfungsi pada folder di mana dia ditempatkan… dan tidak jalan pada server windows…

SUMBER : dutalinux.org

Anti DDOS dengan DDOS-Deflate

09.43 Add Comment

Salah satu serangan mematikan dan menjadi suatu momok yang paling di benci oleh salah adminstrasi web jaringan adalah DDOS. ane gk jelasin mengenai apa itu DDOS .. cari tau sendiri aja ya. Nah mari kita coba2 belajar cara untuk menanggulanginya ..
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
Nah klo gk sempet ?

itulah maksud ane kita mesti melakukan apa yang di namakan dengan pencegahan ..
ingat brother mencegah itu lebih baik dari pada mengobati .. hehehe
lets learn ..
ok sekarang login ke terminal pada server anda. Lewat SSH ato koneksi apa saja yang penting pada terminal ato console.
Untuk sesi kali ini ane pengen berbagi tentang pemakaian DDOS-Deflate di mana tools ini akan membantu anda dalam pengamanan dari serangan DDOS.
first .. ( download toolsnya )
wget http://www.inetbase.com/scripts/ddos/install.sh
–2011-06-17 22:19:13– http://www.inetbase.com/scripts/ddos/install.sh
Resolving http://www.inetbase.com… 205.234.99.83
Connecting to http://www.inetbase.com|205.234.99.83|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1067 (1.0K) [application/x-sh]
Saving to: `install.sh’
100%[======================================>] 1,067 –.-K/s in 0s
2011-06-17 22:19:15 (27.5 MB/s) – `install.sh’ saved [1067/1067]
root@id-backtrack:~# ls
install.sh[/bash]
nah setelah di download kita ubah chmod nya dulu agar dapat di esekusi ,,
chmod 0700 install.sh
./install.sh
nah klo sudah terinstall teman-teman dapat mengedit 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 .. kalo ane edit2 dikit sih
##### 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

SUMBER : dutalinux.org