[Linux] crack-me à clés multiples

Download | Vote Up (2) | Vote Down (0)
; Author: spin
; License : VodkaWare (buy me a vodka if you like this software)
    
; yet another crack-me... this crack-me is designed to
; be analysed while disassembling. Either the cracker
; can make away a 'call' or deduce some valid keys by
; analysing the code.
; The key is 5 characters.

; have fun ;)
    
    
format ELF executable 3
entry start

    ;; .text
segment readable executable

start:
    push "pw> "
    mov eax, 4
    mov ebx, 1
    mov ecx, esp
    mov edx, 4
    int $80
    
    mov eax, 3
    mov ebx, 0
    mov ecx, bf
    mov edx, 6
    int $80

    call check

    push $a                        ; '\n'
    push "good"
    mov eax, 4
    mov ebx, 1
    mov ecx, esp
    mov edx, 5
    int $80

    mov eax, 1
    xor ebx, ebx
    int $80

    
check:
    mov al, [bf+1]                ; mov byte2
    add al, [bf+4]                ; add byte5
    sub al, [bf]                ; byte2 + byte5 == byte1 ?
    jnz fail

    mov al, [bf+3]                ; mov byte4
    add al, al                ; 2*byte4
    sub al, [bf+2]                ; 2*byte4 == byte3 ?
    jnz fail

    ret


fail:
    push $a                        ; '\n'
    push "fail"
    mov eax, 4
    mov ebx, 2
    mov ecx, esp
    mov edx, 5
    int $80

    mov eax, 1
    mov ebx, -1
    int $80


    ;; .data
segment readable writable

bf:        db "AAAAA"

spin


Be the first to give feedback !

Please login to comment !