Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average
Thread Closed 


[TuT]Making a Bruteforcer filter_list
Author
Message
[TuT]Making a Bruteforcer #1
Hi!!!

Today you will (hopefully) learn how to make a bruteforcer in VB.NET

Its pretty simple once you get the system Smile

WARNING: VB.NET ISN'T a good language for bruteforcers since its slow, it will take ages to break more complex passes. Use C for some serious job Smile

So, lets start Smile

to prevent leachers, Ill make a console app that will just print the letters, but its pretty easy to make it into working bruteforcer Tongue

The code:
Code:
Module Module1
    Dim a As String = String.Empty
    Dim b As String = String.Empty
    Dim c As String = String.Empty
    Dim d As String = String.Empty
    Dim e As String = String.Empty
    Dim f As String = String.Empty
    Dim g As String = String.Empty
    Dim h As String = String.Empty
    Sub Bruteforce()
        For eigth = 97 To 122
            For seventh = 97 To 122
                For sixth = 97 To 122
                    For fifth = 97 To 122
                        For fourth = 97 To 122
                            For third = 97 To 122
                                For second As Integer = 97 To 122
                                    For first As Integer = 97 To 122
                                        a = Chr(first)
                                        Console.WriteLine(a & b & c & d & e & f & g & h)
                                    Next first
                                    b = Chr(second)
                                    Console.WriteLine(a & b & c & d & e & f & g & h)
                                Next second
                                c = Chr(third)
                                Console.WriteLine(a & b & c & d & e & f & g & h)
                            Next third
                            d = Chr(fourth)
                            Console.WriteLine(a & b & c & d & e & f & g & h)
                        Next fourth
                        e = Chr(fifth)
                        Console.WriteLine(a & b & c & d & e & f & g & h)
                    Next fifth
                    f = Chr(sixth)
                    Console.WriteLine(a & b & c & d & e & f & g & h)
                Next sixth
                g = Chr(seventh)
                Console.WriteLine(a & b & c & d & e & f & g & h)
            Next seventh
            h = Chr(eigth)
            Console.WriteLine(a & b & c & d & e & f & g & h)
        Next eigth
    End Sub
    Sub Main()
        Console.WriteLine("Press any key to start...")
        Console.ReadLine()
        Bruteforce()
    End Sub
End Module

Okay, so what does what:

Code:
Dim a As String = String.Empty
    Dim b As String = String.Empty
    Dim c As String = String.Empty
    Dim d As String = String.Empty
    Dim e As String = String.Empty
    Dim f As String = String.Empty
    Dim g As String = String.Empty
    Dim h As String = String.Empty
Public declarations, they can be private... I like them public, in case I need them somewhere else Smile

Code:
For first As Integer = 97 To 122
                                        a = Chr(first)
                                        Console.WriteLine(a & b & c & d & e & f & g & h)
                                    Next first

This sets an variable "first" as an integer. The variable has assigned a number: 97 for beginning, then it executes the code and moves to next number, this is repeated untill the number is 122, then in moves to next code, in our case another loop Smile With the next loop, this one starts again.... and thats how the bruteforcing works Smile

Code:
Chr(first)
"Chr" is an ASCII character code, where the number in the brackets is the character number, Asc() does exactly the oposite Smile

Ok, now you should get the idea how it works, if you have any problem, just post it here =)


Alternative (faster) way by Coder-san:
Spoiler:
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub
Staff will never ever ask you for your personal information.
We know everything about you anyway.


[TuT]Making a Bruteforcer #2
Hi!!!

Today you will (hopefully) learn how to make a bruteforcer in VB.NET

Its pretty simple once you get the system Smile

WARNING: VB.NET ISN'T a good language for bruteforcers since its slow, it will take ages to break more complex passes. Use C for some serious job Smile

So, lets start Smile

to prevent leachers, Ill make a console app that will just print the letters, but its pretty easy to make it into working bruteforcer Tongue

The code:
Code:
Module Module1
    Dim a As String = String.Empty
    Dim b As String = String.Empty
    Dim c As String = String.Empty
    Dim d As String = String.Empty
    Dim e As String = String.Empty
    Dim f As String = String.Empty
    Dim g As String = String.Empty
    Dim h As String = String.Empty
    Sub Bruteforce()
        For eigth = 97 To 122
            For seventh = 97 To 122
                For sixth = 97 To 122
                    For fifth = 97 To 122
                        For fourth = 97 To 122
                            For third = 97 To 122
                                For second As Integer = 97 To 122
                                    For first As Integer = 97 To 122
                                        a = Chr(first)
                                        Console.WriteLine(a & b & c & d & e & f & g & h)
                                    Next first
                                    b = Chr(second)
                                    Console.WriteLine(a & b & c & d & e & f & g & h)
                                Next second
                                c = Chr(third)
                                Console.WriteLine(a & b & c & d & e & f & g & h)
                            Next third
                            d = Chr(fourth)
                            Console.WriteLine(a & b & c & d & e & f & g & h)
                        Next fourth
                        e = Chr(fifth)
                        Console.WriteLine(a & b & c & d & e & f & g & h)
                    Next fifth
                    f = Chr(sixth)
                    Console.WriteLine(a & b & c & d & e & f & g & h)
                Next sixth
                g = Chr(seventh)
                Console.WriteLine(a & b & c & d & e & f & g & h)
            Next seventh
            h = Chr(eigth)
            Console.WriteLine(a & b & c & d & e & f & g & h)
        Next eigth
    End Sub
    Sub Main()
        Console.WriteLine("Press any key to start...")
        Console.ReadLine()
        Bruteforce()
    End Sub
End Module

Okay, so what does what:

Code:
Dim a As String = String.Empty
    Dim b As String = String.Empty
    Dim c As String = String.Empty
    Dim d As String = String.Empty
    Dim e As String = String.Empty
    Dim f As String = String.Empty
    Dim g As String = String.Empty
    Dim h As String = String.Empty
Public declarations, they can be private... I like them public, in case I need them somewhere else Smile

Code:
For first As Integer = 97 To 122
                                        a = Chr(first)
                                        Console.WriteLine(a & b & c & d & e & f & g & h)
                                    Next first

This sets an variable "first" as an integer. The variable has assigned a number: 97 for beginning, then it executes the code and moves to next number, this is repeated untill the number is 122, then in moves to next code, in our case another loop Smile With the next loop, this one starts again.... and thats how the bruteforcing works Smile

Code:
Chr(first)
"Chr" is an ASCII character code, where the number in the brackets is the character number, Asc() does exactly the oposite Smile

Ok, now you should get the idea how it works, if you have any problem, just post it here =)


Alternative (faster) way by Coder-san:
Spoiler:
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub
Staff will never ever ask you for your personal information.
We know everything about you anyway.


RE: [TuT]Making a Bruteforcer #3
Even though I agree that VB would be too slow for this, I have to say this code can be a lot more faster than it is now. Smile

Currently you have a huge loop running in a single thread which would hang the app, which can be ignored since this is a Tutorial, and a Programmer can find his way out.

Data-types you can change to increase speed and consume less memory:
Code:
Object (In 6 For Loops) -> Byte
Integer(In 2 For Loops) -> Byte
String (8 variables)       -> Char

You don't need to Console.WriteLine in every Loop, only in the most inner Loop (or just keep storing in a String variable).
Refreshing a Control slows down the Loop as well. I'm not sure if this would affect Commandline (It looks pretty cool though).

I'm assuming you knew most of them, I'm just mentioning this for others who will read the Thread.
Good Tutorial. Smile
[Image: rytwG00.png]
Redcat Revolution!


RE: [TuT]Making a Bruteforcer #4
Even though I agree that VB would be too slow for this, I have to say this code can be a lot more faster than it is now. Smile

Currently you have a huge loop running in a single thread which would hang the app, which can be ignored since this is a Tutorial, and a Programmer can find his way out.

Data-types you can change to increase speed and consume less memory:
Code:
Object (In 6 For Loops) -> Byte
Integer(In 2 For Loops) -> Byte
String (8 variables)       -> Char

You don't need to Console.WriteLine in every Loop, only in the most inner Loop (or just keep storing in a String variable).
Refreshing a Control slows down the Loop as well. I'm not sure if this would affect Commandline (It looks pretty cool though).

I'm assuming you knew most of them, I'm just mentioning this for others who will read the Thread.
Good Tutorial. Smile
[Image: rytwG00.png]
Redcat Revolution!


RE: [TuT]Making a Bruteforcer #5
(03-19-2011, 03:31 PM)Coder-san Wrote: Even though I agree that VB would be too slow for this, I have to say this code can be a lot more faster than it is now. Smile

Currently you have a huge loop running in a single thread which would hang the app, which can be ignored since this is a Tutorial, and a Programmer can find his way out.

Data-types you can change to increase speed and consume less memory:
Code:
Object (In 6 For Loops) -> Byte
Integer(In 2 For Loops) -> Byte
String (8 variables)       -> Char

You don't need to Console.WriteLine in every Loop, only in the most inner Loop (or just keep storing in a String variable).
Refreshing a Control slows down the Loop as well. I'm not sure if this would affect Commandline (It looks pretty cool though).

I'm assuming you knew most of them, I'm just mentioning this for others who will read the Thread.
Good Tutorial. Smile

Well, the command line loops work a lot faster then with form, example: Cmd catches up form that was running for 10 mins in less then 30 secs.

Anyway, can you please explain me your idea? didn't really get it Biggrin This loop idea came from my friend when he needed a quick bruteforcer and he got the idea while watching a clock Smile

Thanks!!!!
Staff will never ever ask you for your personal information.
We know everything about you anyway.


RE: [TuT]Making a Bruteforcer #6
(03-19-2011, 03:31 PM)Coder-san Wrote: Even though I agree that VB would be too slow for this, I have to say this code can be a lot more faster than it is now. Smile

Currently you have a huge loop running in a single thread which would hang the app, which can be ignored since this is a Tutorial, and a Programmer can find his way out.

Data-types you can change to increase speed and consume less memory:
Code:
Object (In 6 For Loops) -> Byte
Integer(In 2 For Loops) -> Byte
String (8 variables)       -> Char

You don't need to Console.WriteLine in every Loop, only in the most inner Loop (or just keep storing in a String variable).
Refreshing a Control slows down the Loop as well. I'm not sure if this would affect Commandline (It looks pretty cool though).

I'm assuming you knew most of them, I'm just mentioning this for others who will read the Thread.
Good Tutorial. Smile

Well, the command line loops work a lot faster then with form, example: Cmd catches up form that was running for 10 mins in less then 30 secs.

Anyway, can you please explain me your idea? didn't really get it Biggrin This loop idea came from my friend when he needed a quick bruteforcer and he got the idea while watching a clock Smile

Thanks!!!!
Staff will never ever ask you for your personal information.
We know everything about you anyway.


RE: [TuT]Making a Bruteforcer #7
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub

This would do the same thing using less resources.
At some times, these optimizations don't matter much, but when these datatypes are inside multiple-loops they slow down the code too much.

A Bruteforce algorithm using a varied length is much trickier by the way. :p
[Image: rytwG00.png]
Redcat Revolution!


RE: [TuT]Making a Bruteforcer #8
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub

This would do the same thing using less resources.
At some times, these optimizations don't matter much, but when these datatypes are inside multiple-loops they slow down the code too much.

A Bruteforce algorithm using a varied length is much trickier by the way. :p
[Image: rytwG00.png]
Redcat Revolution!


RE: [TuT]Making a Bruteforcer #9
(03-20-2011, 06:59 AM)Coder-san Wrote:
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub

This would do the same thing using less resources.
At some times, these optimizations don't matter much, but when these datatypes are inside multiple-loops they slow down the code too much.

A Bruteforce algorithm using a varied length is much trickier by the way. :p

oh cool =) I will add it to the OP as more efficient way Tongue

thanks for explaining Smile

EDIT: tested it and its like 2x faster then my code, with the difference that my code doesn all combinations from 1 to 8 characters and yours does just 8 characters Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.


RE: [TuT]Making a Bruteforcer #10
(03-20-2011, 06:59 AM)Coder-san Wrote:
Code:
Sub Bruteforce()
        'CheckForIllegalCrossThreadCalls = False         'For MultiThreading
        For eigth As Byte = 97 To 122
            For seventh As Byte = 97 To 122
                For sixth As Byte = 97 To 122
                    For fifth As Byte = 97 To 122
                        For fourth As Byte = 97 To 122
                            For third As Byte = 97 To 122
                                For second As Byte = 97 To 122
                                    For first As Byte = 97 To 122
                                        TextBox2.Text = Chr(first) & Chr(second) & Chr(third) & Chr(fourth) & Chr(fifth) & Chr(sixth) & Chr(seventh) & Chr(eigth)
                                    Next first
                                Next second
                            Next third
                        Next fourth
                    Next fifth
                Next sixth
            Next seventh
        Next eigth
    End Sub

This would do the same thing using less resources.
At some times, these optimizations don't matter much, but when these datatypes are inside multiple-loops they slow down the code too much.

A Bruteforce algorithm using a varied length is much trickier by the way. :p

oh cool =) I will add it to the OP as more efficient way Tongue

thanks for explaining Smile

EDIT: tested it and its like 2x faster then my code, with the difference that my code doesn all combinations from 1 to 8 characters and yours does just 8 characters Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.








Users browsing this thread: 1 Guest(s)