EvilZone

Hacking and Security => Reverse Engineering => Topic started by: Heisenburg on December 25, 2013, 06:43:57 AM

Title: Crackme
Post by: Heisenburg on December 25, 2013, 06:43:57 AM
Learn C for a few months, and I quite love "CRACKME" games.
So I decided to code some for you guys. And I can improve my programming skills in this game, too :)


I implement some anti-reverse engineering to my code. Both 32-bit and 64-bit are inside the tarball. And please don't post the magic number right here, you cal always got me in this forum.
Just PM me and ask for the magic number or the source :)



The executable file is given below :)





Title: Re: Crackme
Post by: daxda on December 25, 2013, 07:13:35 AM
I found the number, but I'm rather bad with assembler so I'm not gonna elaborate on how I traced it, if that is even called tracing when it jumps right at my face.
Title: Re: Crackme
Post by: Heisenburg on December 25, 2013, 07:47:53 AM
 ???  So hardcore ?

me neither bad at cracking too.
Title: Re: Crackme
Post by: s3my0n on December 27, 2013, 03:44:59 PM
Alright, learn to obfuscate your strings .. ;)

Code: (c) [Select]
#include <stdio.h>
#include <strings.h>
#include <errno.h>

int main(int argc, char *argv[])
{
    if (argc < 3) {
        printf("Usage: %s <file> <key>\n", argv[0]);
        puts("  Need the secret key");
        puts("  Hint: Look at 'strings' output ...");
        return 1;
    }

    if (strncmp("2046", argv[2], 4) != 0) {
        puts("Look at 'strings' output ... ");
        return 1;
    }

    FILE *fp = fopen(argv[1], "r+");
    if (fp == NULL) {
        fprintf(stderr, "Wat.. %s", strerror(errno));
        return errno;
    }

    fseek(fp, 0x8e9, SEEK_SET);
    fwrite("\x33\xC0", 1, 2, fp); // xor eax, eax (set ZF)

    fseek(fp, 0x8eb, SEEK_SET);
    fwrite("\x74\x20", 1, 2, fp); // jz 0x20

    fseek(fp, 0x90d, SEEK_SET);
    fwrite("\x74\x60", 1, 2, fp); // jz 0x60

    fclose(fp);

    return 0;
}

Key is 2046.
Title: Re: Crackme
Post by: Heisenburg on December 28, 2013, 10:23:31 AM
 :o  erm..... you were right.

I didn't obfuscate my strings...
Thanks for the code donation :)