[-]
Shout:
Click Refresh to load shouts.

Post Reply 
 
Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Brute-forcer, numbers
12-13-2007, 08:57 AM (This post was last modified: 12-13-2007 09:01 AM by Grob. Edit Reason: )
Post: #1
Brute-forcer, numbers
Hi,

I have a friend who likes reverse engineering and stuff like that and he was trying to program a brute-forcer. As always, bored to my mind, I gave it a go to create a super-simple brute-forcer and here's the result. I hope it isn't against any rules posting this and I hope you might enjoy testing it. I had loads of fun creating it and just as with the DMA watching the szVariable getting updated in Olly, seeing the program work in action.

Program description:
It tries all possible number combinations from 0000000000 (I think) to 9999999999 (I think) and after every loop you check the szVariable in a function to see if the key is valid or not.

Sidenote: The code is old as I haven't programmed for very long.

EDIT: I just ran the program, it took me less than 30 seconds to go through all possible combinations.

Code:
include \masm32\include\masm32rt.inc

.data
szVariable db 10 dup(48),0

.code

start:

call main
inkey
exit

main proc
    lea edi,szVariable
    xor eax,eax
    xor ecx,ecx
    mov cl,48
    push ecx
    @Loop1:
        pop ecx
        cmp cl,58
        jnb @Done
        mov byte ptr [edi],cl
        add ecx,1
        push ecx
        @Loop2Start:
            mov cl,48
            push ecx
            @Loop2:
                pop ecx
                cmp cl,58
                jnb @Loop1
                mov byte ptr [edi+1],cl
                add ecx,1
                push ecx
                @Loop3Start:
                    mov cl,48
                    push ecx
                    @Loop3:
                        pop ecx
                        cmp cl,58
                        jnb @Loop2
                        mov byte ptr [edi+2],cl
                        add ecx,1
                        push ecx
                        @Loop4Start:
                            mov cl,48
                            push ecx
                            @Loop4:
                                pop ecx
                                cmp cl,58
                                jnb @Loop3
                                mov byte ptr [edi+3],cl
                                add ecx,1
                                push ecx
                                @Loop5Start:
                                    mov cl,48
                                    push ecx
                                    @Loop5:
                                        pop ecx
                                        cmp cl,58
                                        jnb @Loop4
                                        mov byte ptr [edi+4],cl
                                        add ecx,1
                                        push ecx
                                        @Loop6Start:
                                            mov cl,48
                                            push ecx
                                            @Loop6:
                                                pop ecx
                                                cmp cl,58
                                                jnb @Loop5
                                                mov byte ptr [edi+5],cl
                                                add ecx,1
                                                push ecx
                                                @Loop7Start:
                                                    mov cl,48
                                                    push ecx
                                                    @Loop7:
                                                        pop ecx
                                                        cmp cl,58
                                                        jnb @Loop6
                                                        mov byte ptr [edi+6],cl
                                                        add ecx,1
                                                        push ecx
                                                        @Loop8Start:
                                                            mov cl,48
                                                            push ecx
                                                            @Loop8:
                                                                pop ecx
                                                                cmp cl,58
                                                                jnb @Loop7
                                                                mov byte ptr [edi+7],cl
                                                                add ecx,1
                                                                push ecx
                                                                @Loop9Start:
                                                                    mov cl,48
                                                                    push ecx
                                                                    @Loop9:
                                                                        pop ecx
                                                                        cmp cl,58
                                                                        jnb @Loop8
                                                                        mov byte ptr [edi+8],cl
                                                                        add ecx,1
                                                                        push ecx
                                                                        @Loop10Start:
                                                                            mov cl,48
                                                                            @Loop10:
                                                                                cmp cl,58
                                                                                jnb @Loop9
                                                                                mov byte ptr [edi+9],cl ; Check the serial(szVariable) in your serial check function after this row
                                                                                add ecx,1
                                                                                jmp @Loop10
                                                                        pop ecx
                                                                        jmp @Loop9
                                                                pop ecx
                                                                jmp @Loop8
                                                        pop ecx
                                                        jmp @Loop7
                                                pop ecx
                                                jmp @Loop6
                                        pop ecx
                                        jmp @Loop5
                                pop ecx
                                jmp @Loop4
                        pop ecx
                        jmp @Loop3
                pop ecx
                jmp @Loop2
        pop ecx
        jmp @Loop1
    
    @Done:
        print offset szVariable,0dh,0ah
        ret
main endp

end start
Find all posts by this user
Quote this message in a reply
Post Reply 



Contact UsTProgrammingReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication