EvilZone

Hacking and Security => Hacking and Security => : blk.Sith0 March 29, 2011, 12:56:42 AM

: URL Bruteforce I guess
: blk.Sith0 March 29, 2011, 12:56:42 AM
So uh, lets say there's a website which has users. Now, every user is associated with some random 11 digit code. And you can get to a users page by typing in their little code into the site address. (Like site.com/users/j245kj4j12d.html, or something like that)

Anyway, I want to enter every combination into there, until I get the words "Welcome", and when this happens, log that. But dont log when the page contains the word "bad".

So, someone said the best way to do this would be with PHP, but I'm not sure, so wondering what you guys think.
: Re: URL Bruteforce I guess
: I_Learning_I March 29, 2011, 01:15:53 AM
Well, your methodology is correct basically you do 11 for's inside each others so it will increment every character and then do a GET. then filter the file and see if it contains Welcome, shouldn't be very hard to do.
.NET it's usually the most used, but you can use C/C++, PHP or Java, they're quite easy to accomplish. In fact I can give you my C++ sockets code then just add the for's and charset and filter results.

small example:
:
char mycharset [] = { 'a', 'b', 'c', 'd', 'e', '\0' };


// Create socket
//Connect to host

//Start bruteforcing

for(int i=0; i<sizeof(mycharset); i++){
      for(int j=0; j<sizeof(mycharset); j++){
       myget= "GET /users/" + mycharset[i] + mycharset[j] +"\r\n";
       send(sock,myget);
       while(recv(sock, buff) >0){
          bigfile+=buff;
          bzero(buff);
       }
        // Getline if file
        // substr if string
        if (bigfile.find("Welcome")!=string::npos){
                available[count] = mycharset[i] + mycharset[j];
                i++;
       }

        bzero(bigfile);
      }
}

This is just a small example, this was meant for C++ but can equally be applied to PHP, since functions are similar if not equal and as well as syntax.
You still have to define socket and outside website and connect to it before the for's.
: Re: URL Bruteforce I guess
: blk.Sith0 March 29, 2011, 01:21:59 AM
So I guess now my question is, which is easier to set up? PHP or C++? I need to go download one of those.

Also, here:
myget= "GET /users/" + mycharset + mycharset[j] +"\r\n";

When you say /users/, you mean to say site.com/users/, right?
And when you have the two mycharset, do you mean to put 11 of those in order?
And what are the \r and \n?

: Re: URL Bruteforce I guess
: I_Learning_I March 29, 2011, 01:23:54 AM
Depends on your experience with any of them, since syntax is pretty much the same :D
: Re: URL Bruteforce I guess
: blk.Sith0 March 29, 2011, 01:25:47 AM
I updated the post, so uh, not sure if you saw that.

And zero experience with both :D
: Re: URL Bruteforce I guess
: ande March 29, 2011, 11:33:00 AM
Using PHP or C++ makes no difference. I would suggest PHP just because there is no compiling in the picture, so less work. On the other hand, PHP needs a server with it(you can rut it as CLI tho).

I could possibly help you out with some PHP code, but am not at home right now. Program logic would be:

- Generate URL with the bruteforce part in it
- Get the URL
- Check content
- If instr("Welcome"), log
- If done, exit
- goto top
: Re: URL Bruteforce I guess
: I_Learning_I March 29, 2011, 02:51:42 PM
So I guess now my question is, which is easier to set up? PHP or C++? I need to go download one of those.

Also, here:
When you say /users/, you mean to say site.com/users/, right?
And when you have the two mycharset, do you mean to put 11 of those in order?
And what are the \r and \n?


Sorry didn't see it yesterday.

If you don't have any experience it shouldn't be that easy, but nonetheless...
first of you would do something like a simple connect() which would contain information of the server, in this case site.com.
Once you're inside server.com you have to make requests for specific folders and files inside, so you'll ask for /users/yourbruteforcehere.
Think as server side if you need to, on the server side you have a folder called users and each user will have his randomname.html page, so the client has to ask for the whole path.

About mycharset, it my help if you have some quick reading on C++, but I'll give you some basics.
What you're doing is incrementing a character one by one like:
aaaaaaaaaaa
aaaaaaaaaab
aaaaaaaaaac

and so on...
As a result you'll need a for that will make a loop through your charset, which will contain the characters you wish to bruteforce. (Might be only numbers, only lowercase, everything, special characters,etc...)
Then you need to do a for for each string position, like for 2 characters you need 2 for's, for 11 characters string, you'll need 11 for's, so it will loop every string character.

for()
  for()
    for()
      for()
.... You get the drill.

\r\n means terminate string, like in a std::string would be a \0.
You might have to do some reading before you do that.
Anything else, just ask.

PS: In C++ you do not need a server running, since you'll only be using one socket, you can send and wait for an answer in the same socket, without the need to create another application for the server.
I'm not sure you do in PHP, but PHP isn't exactly my thing, although being very similar to PHP.
: Re: URL Bruteforce I guess
: blk.Sith0 March 29, 2011, 03:07:11 PM
Thanks guys. Now I'm trying to install C++, and get that set up. Is it made by Microsoft? It looks like I need to download Microsoft Visual Studio (http://www.microsoft.com/express/Windows/), which confuses me, because I thought that was only for making Visual Basic applications and such. So I'm not sure what's going on here, there doesn't seem to be a website for this with a specific download button. Forgive my newbiness.
: Re: URL Bruteforce I guess
: I_Learning_I March 29, 2011, 03:44:07 PM
What you're download and installing it's an IDE , which is basically a compiler with a graphical environment that makes it easier to associate projects, files, functions and to check for typos.
You can use lots of compilers and lots of IDE's, there's NetBeans, CodeBlock, Microsoft Visual Studio C++, GCC, and so on...
I would advise you to use CodeBlocks as it is very light and doesn't has any Microsoft only libraries, like stdafx.h in Microsoft Visual C++, like that you'll be making this program and getting used to native C/C++.
: Re: URL Bruteforce I guess
: blk.Sith0 April 02, 2011, 04:46:12 AM
Alright, I got codeblocks, and naturally I clicked Create New Project. Now where do I go from this screen?
(http://i.imgur.com/nwhIV.jpg)
: Re: URL Bruteforce I guess
: I_Learning_I April 03, 2011, 10:59:47 AM
Since you've installed CodeBlocks I presume you chose for C/C++, therefore, if you want native C/C++ instead of WinAPI or any variant, you should chose console project.

I must warn you that, although I like to help, I won't tell you every single line, I've told you the main functions and even showed you the for's, that's around 90% of the code and close to 100% of the theory.

Still, post your doubts and good luck with it :)
I hope you learn with your project ;)
: Re: URL Bruteforce I guess
: blk.Sith0 April 04, 2011, 04:02:33 AM
Do I need to get a compiler or something? I tried to run something and it says this at the bottom.
Test uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
When I was installing, it asked me to pick a compiler from a long list, so I just went with the default one (GNU GCC Compiler). However, I'm lost now.
: Re: URL Bruteforce I guess
: Satan911 April 04, 2011, 04:36:00 AM
I think you need to do some more reading before getting into this project.

1- Read on different languages. Take into consideration if you only want to get this project done or you want to start programming seriously. There's no point really in using C++ for this kind of project. Manipulating sockets in C++ is way more complicated than in PHP, Perl, python, etc.

2- Once you find a language setup a development environment. Look for suitable IDE and perhaps you'll need to install python or perl binaries on your system if you choose one of these languages.

3- Learn the basics of the programming language you are going to use before starting this project. It's not really a complicated project but it might might be a little too advanced for a beginner.

If you wanna code something by yourself you are gonna have to read a lot first.. There's no way around it.
: Re: URL Bruteforce I guess
: I_Learning_I April 04, 2011, 12:55:15 PM
Do I need to get a compiler or something? I tried to run something and it says this at the bottom.When I was installing, it asked me to pick a compiler from a long list, so I just went with the default one (GNU GCC Compiler). However, I'm lost now.

About that I don't know how to solve, my installation was pretty forward, I installed the IDE, also chose GCC compiler but then I didn't had any problem compiling.
You probably need to go to the configurations and choose compiler settings.

Satan, since he's just starting, I wouldn't advise him to start with Perl and/or Python, he'll need to know the difference between interpreter and compiler as well as scripting language and programming language, also Python syntax has nothing to do with Java, C/C++ or PHP, which means he would be going back to go forward.
Although I agree with you when you say he will have to do some reading before accomplishing the project.
: Re: URL Bruteforce I guess
: blk.Sith0 April 04, 2011, 02:44:50 PM
Since PHP is used on webservers and such, does it need an IDE? Or just set up apache, and do it from there?
Well, Im going to install PHP and netbeans.
: Re: URL Bruteforce I guess
: blk.Sith0 April 04, 2011, 02:55:01 PM
Will this work if I do without the webserver? From the command line?
(http://i.imgur.com/C9tcw.jpg)
Do I need a framework?
(http://i.imgur.com/Zpx9v.jpg)


How can I add a slash to my charset?
$charset .= abcdefghijlmnopqrstuvwxyz0123456789
Thanks for the help guys :)
: Re: URL Bruteforce I guess
: ande April 04, 2011, 03:24:45 PM
Will this work if I do without the webserver? From the command line?
(http://i.imgur.com/C9tcw.jpg)
Do I need a framework?
(http://i.imgur.com/Zpx9v.jpg)


How can I add a slash to my charset?
$charset .= abcdefghijlmnopqrstuvwxyz0123456789
Thanks for the help guys :)

You CAN run PHP by command line, yes.

To add slash:
$charset .= "abcdefghijlmnopqrstuvwxyz0123456789\\";
: Re: URL Bruteforce I guess
: blk.Sith0 April 05, 2011, 11:13:31 PM
Now when I create a project, it gives me all these other files.
(http://i.imgur.com/Vi2pZ.jpg)
Do I need them, or can I use only the main php file? (index)
: Re: URL Bruteforce I guess
: ande April 05, 2011, 11:45:03 PM
What kind of gay IDE are you using? :P You only need the index.php unless your IDE stuffs lots of code in the other files for some crazy ass reason
: Re: URL Bruteforce I guess
: blk.Sith0 April 06, 2011, 12:41:55 AM
Yeah I uninstalled that IDE just now and switched to another lol

I get an error when trying to do this line in PHP.
for(int i=0; i<sizeof(mycharset); i++){

So first I did this and made a variable called i.
$i = 0;
But I'm pretty sure that the "sizeof" is only in C++, so what is the equivalent in PHP?

And for some reason, getting an error from this line.
$i = 0;
Unexpected T_Variable. I dont see what I did wrong.

This is annoying, Im still getting an error just from this.
for ($i=0; $i<=; $i++);
Its saying unexpected semicolon, with AND without the semicolon at the end. So I just dont know.
: Re: URL Bruteforce I guess
: ande April 06, 2011, 11:54:48 AM
You just quadposted... Also you should learn PHP from the start before you try something like this. Non the less, here is your solution:

:
for($i=0; $i<sizeof($mycharset); $i++){
     // Code logic here
}
: Re: URL Bruteforce I guess
: blk.Sith0 April 07, 2011, 04:42:24 AM
Is this right? Change:
:
myget= "GET /users/" + mycharset[a] + mycharset[b] +"\r\n";(Thats the C++ version)
change it to this:
:
$myget = $_"GET /users/" + mycharset[a] + mycharset[b] +"\r\n";I thought of this after reading this (http://www.w3schools.com/php/php_get.asp).
I'm doing good, right, right?
: Re: URL Bruteforce I guess
: ande April 07, 2011, 09:04:52 AM
Is this right? Change:
:
myget= "GET /users/" + mycharset[a] + mycharset[b] +"\r\n";(Thats the C++ version)
change it to this:
:
$myget = $_"GET /users/" + mycharset[a] + mycharset[b] +"\r\n";I thought of this after reading this (http://www.w3schools.com/php/php_get.asp).
I'm doing good, right, right?


The "+" sign in PHP means pluss as in math. To add multiple characters you use the "."
Also. All variables starts with $
:
$myget = $_"GET /users/" . $mycharset[$a] . $mycharset[$b] . \r\n";
: Re: URL Bruteforce I guess
: blk.Sith0 April 07, 2011, 03:10:58 PM
Thanks, I forgot about that, but I mean replacing the GET with $_GET.
: Re: URL Bruteforce I guess
: ande April 07, 2011, 03:26:33 PM
Thanks, I forgot about that, but I mean replacing the GET with $_GET.

Not quiet sure I understand what you mean. The $_ part of the code in this case would cause an error. This is correct:

:
$myget = "GET /users/" . $mycharset[$a] . $mycharset[$b] . \r\n";
: Re: URL Bruteforce I guess
: I_Learning_I April 07, 2011, 04:53:32 PM
I believe what blk was saying is that he was doing something like $_GET[$mycharset[$a].$mycharset[$b]].
However that code is used on a PHP server and not on a client, when you're a client you need to send a HTTP request, in this case you'll request the page site.com/asdsdasd.html since you're bruteforcing the URL, it means you're using the GET method and not the POST, therefore a HTTP request would be like:
GET site.com/asdsdasd.html\r\n

When you're working on a PHP server and handling a website you can use $_GET["id"] to detect the value the client sent to you on that variable using the GET method.
For instance, on a forum, you can access the forum.php?section=31 which would display Hacking and Security

In PHP the code would be something like:

:
if("$_GET["section"]){
       showsection($_GET["section"]);
}
The show section doesn't exist, I just used it so you can understand the theory.

Anyways, what matters to you is to work as a client, which means to make HTTP requests, and not to handle PHP requests.
: Re: URL Bruteforce I guess
: blk.Sith0 April 08, 2011, 02:34:48 AM
:
Hey in this line.
[codeif(bigfile.find("Course")!=string::npos){
Where does the bigfile part come from?
: Re: URL Bruteforce I guess
: ande April 08, 2011, 09:12:33 AM
:
Hey in this line.
[codeif(bigfile.find("Course")!=string::npos){
Where does the bigfile part come from?

If you tell us where you are getting all this random code from, it will be alot easier to help you :P
: Re: URL Bruteforce I guess
: I_Learning_I April 08, 2011, 02:48:01 PM
If you tell us where you are getting all this random code from, it will be alot easier to help you :P
Indeed! :D
But I'm starting to think Satan was right and that you really should do some light-reading first.
I don't know what you have so far, but doesn't look to me that you're understanding your own code, which is awful a in the future you might wanna go back to it, and still you won't understand.
: Re: URL Bruteforce I guess
: blk.Sith0 April 09, 2011, 12:59:31 AM
Thats your code that YOU posted here lol. You started write "buff" and "bigfile" and thats where you lost me.
: Re: URL Bruteforce I guess
: I_Learning_I April 09, 2011, 01:21:03 AM
Well, first of all my code was for C/C++, not PHP :D
Anyhow, since it's mostly adapted, bigfile was meant to be the file that would have the whole response from the server, since sometimes the response is VERY big, it's better to loop and partially store it in another variable, which is what we're doing, storing in bigfile.

I just spotted an error in my code, although I did it right here, I still forgot a parameter in recv()/read() which was the size.

:
read(sockfd,buffer,255);
So, to explain:
sockfd would be the variable you earlier defined as socket.
buffer is the variable that will hold the data received from that socket
255 is the max size of the receive

Now we have to store what we received:
bigfile+=buffer;


But then you have to clear buffer otherwise you'll start having errors like this:
First reading:
Client Sends:
aaaaa

You receive:
aaaaa

Second Reading :
Client sends:
b

You receive:
baaaa


So after you have to clear buffer by doing bzero(buffer,256);

And I believe that's it.
Re-post if you require :)
: Re: URL Bruteforce I guess
: blk.Sith0 April 12, 2011, 01:09:53 AM
Where would you put that little bit of code?

Also, error on this line. How do I convert this to PHP?
:
available[count] = $mycharset[$i] + $mycharset[$j];unexpected bracket.
: Re: URL Bruteforce I guess
: ande April 12, 2011, 10:20:48 AM
Where would you put that little bit of code?

Also, error on this line. How do I convert this to PHP?
:
available[count] = $mycharset[$i] + $mycharset[$j];unexpected bracket.

There is to little code in this topic. Let me try writing a simple bruteforce idea.

:
$charset = array ("a","b","c","d","e","f","g","h","i","j","k","l","m");
$datacount = array (0,0,0,0,0);

for($i=0;$i<50;$i++)
{
if($datacount[4]==sizeof($charset)-1)
{$datacount[4]=0;$datacount[3]+=1;}
if($datacount[3]==sizeof($charset)-1)
{$datacount[3]=0;$datacount[2]+=1;}
if($datacount[2]==sizeof($charset)-1)
{$datacount[2]=0;$datacount[1]+=1;}
if($datacount[1]==sizeof($charset)-1)
{$datacount[1]=0;$datacount[0]+=1;}
if($datacount[0]==sizeof($charset)-1)
{return -1;}
echo $charset[$datacount[0]].$charset[$datacount[1]].$charset[$datacount[2]].$charset[$datacount[3]].$charset[$datacount[4]];
$datacount[4]+=1;
echo("<br />");
}
: Re: URL Bruteforce I guess
: blk.Sith0 April 14, 2011, 01:39:29 AM
What does the "{return -1;}" part do? What is it there for?

Also, why this? "$datacount[4]+=1;" Why add 1 to the datacount?
Well I see that it doesnt go to the next set (aaaaab), but why?
: Re: URL Bruteforce I guess
: ande April 14, 2011, 10:04:27 AM
What does the "{return -1;}" part do? What is it there for?

Also, why this? "$datacount[4]+=1;" Why add 1 to the datacount?
Well I see that it doesnt go to the next set (aaaaab), but why?

The return -1 will end the PHP script running. I placed the return -1 because when it reaches the end of the 5 letter chain this script wont be able to continue. Instead of doing -1 you could break; it instead to exit the loop and continue the code below.

The $datacount[4]+=1; is to get the next letter(s) representing the values in the datacount array. If you look above it you will see that there is some if statements that will make sure the datacount indexes dosent go out of range, when a index reaches the max value possible with a x charset it will increment the index above itself until it reaches the index 0 which is the highest index possible. When that one is full it will exit.

Example;
These numbers will represent the values of $datacount[0-4]:
0 0 0 0 0
this is the same as aaaaa represented as the chars in our charset variable because the first index(0 index) of our charset array is a. Next;
0 0 0 0 1
This is the same as aaaab represented as the chars in our charset variable because the second index(index 1) of our charset array is b. Etc

0 0 0 0 2 = aaaac
0 0 0 0 3 = aaaad
 
Additionally my example will only do 5 chars, no more, no less. In order to do so you need a way more complex algorithm.
: Re: URL Bruteforce I guess
: blk.Sith0 April 16, 2011, 11:05:48 PM
Whats wrong with this when I try to make it eleven characters long?
:
$charset = 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","0","1","2","3","4","5","6","7","8","9","/");
$datacount = array (0,0,0,0,0,0,0,0,0,0,0);

$i=0;
for($i=0;$i<100;$i++)
{
    if($datacount[11]==sizeof($charset)-1)
{$datacount[11]=0;$datacount[10]+=1;}
    if($datacount[10]==sizeof($charset)-1)
{$datacount[10]=0;$datacount[9]+=1;}
    if($datacount[9]==sizeof($charset)-1)
{$datacount[9]=0;$datacount[8]+=1;}
    if($datacount[8]==sizeof($charset)-1)
{$datacount[8]=0;$datacount[7]+=1;}
    if($datacount[7]==sizeof($charset)-1)
{$datacount[7]=0;$datacount[6]+=1;}
    if($datacount[6]==sizeof($charset)-1)
{$datacount[6]=0;$datacount[5]+=1;}
    if($datacount[5]==sizeof($charset)-1)
{$datacount[5]=0;$datacount[4]+=1;}
if($datacount[4]==sizeof($charset)-1)
{$datacount[4]=0;$datacount[3]+=1;}
if($datacount[3]==sizeof($charset)-1)
{$datacount[3]=0;$datacount[2]+=1;}
if($datacount[2]==sizeof($charset)-1)
{$datacount[2]=0;$datacount[1]+=1;}
if($datacount[1]==sizeof($charset)-1)
{$datacount[1]=0;$datacount[0]+=1;}
if($datacount[0]==sizeof($charset)-1)
{return -1;}
echo $charset[$datacount[0]].$charset[$datacount[1]].$charset[$datacount[2]].$charset[$datacount[3]].$charset[$datacount[4]].$charset[$datacount[5]].$charset[$datacount[6]].$charset[$datacount[7]].$charset[$datacount[8]].$charset[$datacount[9]].$charset[$datacount[10]].$charset[$datacount[11]];
$datacount[11]+=1;
echo("<br />");
 }


Not sure why the formatting looks weird up there, it looks fine in on my end. Undefined offset in lines 8 and 32, and 33.
: Re: URL Bruteforce I guess
: ande April 16, 2011, 11:24:56 PM
Whats wrong with this when I try to make it eleven characters long?
:
$charset = 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","0","1","2","3","4","5","6","7","8","9","/");
$datacount = array (0,0,0,0,0,0,0,0,0,0,0);

$i=0;
for($i=0;$i<100;$i++)
{
    if($datacount[11]==sizeof($charset)-1)
{$datacount[11]=0;$datacount[10]+=1;}
    if($datacount[10]==sizeof($charset)-1)
{$datacount[10]=0;$datacount[9]+=1;}
    if($datacount[9]==sizeof($charset)-1)
{$datacount[9]=0;$datacount[8]+=1;}
    if($datacount[8]==sizeof($charset)-1)
{$datacount[8]=0;$datacount[7]+=1;}
    if($datacount[7]==sizeof($charset)-1)
{$datacount[7]=0;$datacount[6]+=1;}
    if($datacount[6]==sizeof($charset)-1)
{$datacount[6]=0;$datacount[5]+=1;}
    if($datacount[5]==sizeof($charset)-1)
{$datacount[5]=0;$datacount[4]+=1;}
if($datacount[4]==sizeof($charset)-1)
{$datacount[4]=0;$datacount[3]+=1;}
if($datacount[3]==sizeof($charset)-1)
{$datacount[3]=0;$datacount[2]+=1;}
if($datacount[2]==sizeof($charset)-1)
{$datacount[2]=0;$datacount[1]+=1;}
if($datacount[1]==sizeof($charset)-1)
{$datacount[1]=0;$datacount[0]+=1;}
if($datacount[0]==sizeof($charset)-1)
{return -1;}
echo $charset[$datacount[0]].$charset[$datacount[1]].$charset[$datacount[2]].$charset[$datacount[3]].$charset[$datacount[4]].$charset[$datacount[5]].$charset[$datacount[6]].$charset[$datacount[7]].$charset[$datacount[8]].$charset[$datacount[9]].$charset[$datacount[10]].$charset[$datacount[11]];
$datacount[11]+=1;
echo("<br />");
 }


Not sure why the formatting looks weird up there, it looks fine in on my end. Undefined offset in lines 8 and 32, and 33.

:
<?php

$charset 
= 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","0","1","2","3","4","5","6","7","8","9","/");
$datacount = array (0,0,0,0,0,0,0,0,0,0,0);

$i=0;
for(
$i=0;$i<10000;$i++)
{
    if(
$datacount[10]==sizeof($charset)-1)
{$datacount[10]=0;$datacount[9]+=1;}
    if(
$datacount[9]==sizeof($charset)-1)
{$datacount[9]=0;$datacount[8]+=1;}
    if(
$datacount[8]==sizeof($charset)-1)
{$datacount[8]=0;$datacount[7]+=1;}
    if(
$datacount[7]==sizeof($charset)-1)
{$datacount[7]=0;$datacount[6]+=1;}
    if(
$datacount[6]==sizeof($charset)-1)
{$datacount[6]=0;$datacount[5]+=1;}
    if(
$datacount[5]==sizeof($charset)-1)
{$datacount[5]=0;$datacount[4]+=1;}
if($datacount[4]==sizeof($charset)-1)
{$datacount[4]=0;$datacount[3]+=1;}
if($datacount[3]==sizeof($charset)-1)
{$datacount[3]=0;$datacount[2]+=1;}
if($datacount[2]==sizeof($charset)-1)
{$datacount[2]=0;$datacount[1]+=1;}
if($datacount[1]==sizeof($charset)-1)
{$datacount[1]=0;$datacount[0]+=1;}
if($datacount[0]==sizeof($charset)-1)
{return -1;}
echo $charset[$datacount[0]].$charset[$datacount[1]].$charset[$datacount[2]].$charset[$datacount[3]].$charset[$datacount[4]].$charset[$datacount[5]].$charset[$datacount[6]].$charset[$datacount[7]].$charset[$datacount[8]].$charset[$datacount[9]].$charset[$datacount[10]];
$datacount[10]+=1;
echo("<br />");
 }

?>


Arrays start at 0 not at 1. 0-10 is 11. Index 11 of a array with 11 indexes is not 11 but 10.
: Re: URL Bruteforce I guess
: blk.Sith0 April 17, 2011, 01:05:10 AM
Oh duh.
Another problem though, its not using the slash in the charset. "/"
I think theres a special way youre supposed to put a slash, and I know you said to do this //
However, that when they were all together, and not an array, with each one quoted. So how do I put a slash in my character set?
: Re: URL Bruteforce I guess
: ande April 17, 2011, 01:09:49 AM
Oh duh.
Another problem though, its not using the slash in the charset. "/"
I think theres a special way youre supposed to put a slash, and I know you said to do this //
However, that when they were all together, and not an array, with each one quoted. So how do I put a slash in my character set?

Dooh, seams I fucked up on that one. Remove the -1 in all of the "if($datacount[NUM]==sizeof($charset)-1)"
: Re: URL Bruteforce I guess
: blk.Sith0 April 17, 2011, 10:17:04 AM
Well, ten juicy dollars to the first person that makes this for me.
(http://i.imgur.com/ANsAJ.jpg)
: Re: URL Bruteforce I guess
: ande April 17, 2011, 03:35:48 PM
Well, ten juicy dollars to the first person that makes this for me.
(http://i.imgur.com/ANsAJ.jpg)

I almost have dude. Nobody here knows exactly how you want it, if you want anyone to give it a go you at least have to specify things a bit more.
: Re: URL Bruteforce I guess
: blk.Sith0 April 17, 2011, 06:35:11 PM
Just enter every combination of an 11 character code (a-z, 0-9, and /) into a URL field. But it always ends with an = sign. So site.com/users/aaaaaaaaaaa= all the way to site.com/users////////////=.

Then only log it (the entire link) if it sees the words "High School".
Oh oh, better idea. Make it log to a text file, right? However the text file will look like this.
:
<a href="site.com/users/a8fj48/47sh=">Last, First</a>
<a href="site.com/users/0f9n2nfjaw1=">Last, First</a>
<a href="site.com/users/a8fj48/472b=">Last, First</a>

You see where I'm going with this? You see? So Ill have a nice little html file that will have Everyone's logged name as a link to their page.

Now to get the name, that part might be hard. But its in the same place every time:
:
<div class="StudentHeader"><span class="StudentName">Last, First</span>
Also, it probably needs to clear its own cookies every time, at least thats what you have to do using a browser, I dont know if you need to do it in PHP or not. Because if you dont clear your cookies, then it doesnt matter what you put in the code field, it will just keep getting you the last successful one.

And uh, I think thats all, its https if that matters.
: Re: URL Bruteforce I guess
: ande April 17, 2011, 06:55:32 PM
Okay.. I could make it for you. But am not going to bother, because 11 chars with all lowerletters and the slash is 11^28 combinations. Which is 144209936106499234037676064081 request to the server. Even if you have 1000 requests pr second to that server it will take more than 4967549055696760431 years to complete.
: Re: URL Bruteforce I guess
: blk.Sith0 April 17, 2011, 07:51:17 PM
But if I get 2 computers going at the same time, then its only 2.48377453 x 10^18 years. which is only 9.06577703 × 10^20 days. I have time.
: Re: URL Bruteforce I guess
: Satan911 April 18, 2011, 12:49:26 AM
No you don't ;)

That's why dictionary attacks are better in this situation rather than bruteforcing.
: Re: URL Bruteforce I guess
: blk.Sith0 April 18, 2011, 01:45:33 AM
Lets pretend this dictionary has every word from "aaaaaaaaaaa" to "///////////". Now uh, should make this. Who cares if it doesnt finish, I could at least get some, right?
: Re: URL Bruteforce I guess
: Satan911 April 18, 2011, 02:08:08 AM
That would require the exact same amount of time.

Instead make a good list of common file or dir names and bruteforce these instead. Might get less results but it will definitely take less time.

And by the way you wouldn't even get like phpmyadmin/ or administrator/ because there are too much chars.
: Re: URL Bruteforce I guess
: ande April 18, 2011, 02:10:33 AM
Lets pretend this dictionary has every word from "aaaaaaaaaaa" to "///////////". Now uh, should make this. Who cares if it doesnt finish, I could at least get some, right?

Even just one row of letters aaaaaaaaaaa to bbbbbbbbbbb would be 296196766695424 attempts or something. And the likeliness of finding something in between aaaaaaaaaaa to bbbbbbbbbbb is very small.

If these values are to represent names, you will have much greater success downloading a few megs of name lists and combo bruting them.
: Re: URL Bruteforce I guess
: blk.Sith0 April 18, 2011, 04:03:33 AM
Well I guess I'm out of luck then, because each page's code is some weird completely random thing.
ucePV/9yWJA=
RRdpA/Pna2c=
There's a couple of actual codes. So I guess theres not much to be done.
: Re: URL Bruteforce I guess
: blk.Sith0 April 19, 2011, 04:06:54 AM
Alright guys. Guys. I know this is as important to you as it is to me, so I have some good news.

I have at least 8 computers that can be running this nonstop 24/7.

And if my calculations are correct, that will only take 8.45 days. So we can do this!

10 juicy dollars

(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)
: Re: URL Bruteforce I guess
: ande April 19, 2011, 06:19:14 PM
Alright guys. Guys. I know this is as important to you as it is to me, so I have some good news.

I have at least 8 computers that can be running this nonstop 24/7.

And if my calculations are correct, that will only take 8.45 days. So we can do this!

10 juicy dollars

(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)(http://www.findcarsunder1000.com/images/form_dollar.gif)

I can assure you it will not take 8,45 days. It does not matter how many computers you got. The web server is going to be the bottleneck. Take my earlier calcs with 1000 requests pr second, which is insanely much.
: Re: URL Bruteforce I guess
: Stackprotector April 19, 2011, 11:51:17 PM
Also, i'm not sure if you have all the computers on 1 net.
If so, 8 would be to much for 1k requests/s, you will notice alot of lag.
And yes, only if you are brute-forcing a very high end server you will have profit of 8 computers.
: Re: URL Bruteforce I guess
: blackghost07 July 09, 2013, 09:38:18 PM
hii i want to brute force on url which is like site.com/code?u=12345678901234&p=123456 and i just want to brute force on the p value and it contains only number of 6 digit.
: Re: URL Bruteforce I guess
: ande July 10, 2013, 08:04:57 PM
hii i want to brute force on url which is like site.com/code?u=12345678901234&p=123456 and i just want to brute force on the p value and it contains only number of 6 digit.

You should consider making a new thread for this question. This thread is pretty old.


However, it is pretty simple. But we probably need a bit more information. Do you know any programming languages? Is it a logged-in page? What sort of data are you looking to extract from the pages?

Here is a simple full-page-save in PHP

: (php)
for($i=0;$i<999999;$i++)
{
    file_put_contents($i.'.html', file_get_contents('http://evilzone.org/index.php?u=12345678901234&u='.$i));
}