Author Topic: Crackme  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline Heisenburg

  • Serf
  • *
  • Posts: 32
  • Cookies: 4
    • View Profile
Crackme
« 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 :)





« Last Edit: December 25, 2013, 06:48:38 am by Heisenburg »

Offline daxda

  • Peasant
  • *
  • Posts: 114
  • Cookies: 112
  • Not the guy you're looking for
    • View Profile
    • Daxda on Github
Re: Crackme
« Reply #1 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.
« Last Edit: December 25, 2013, 07:33:00 am by daxda »

Offline Heisenburg

  • Serf
  • *
  • Posts: 32
  • Cookies: 4
    • View Profile
Re: Crackme
« Reply #2 on: December 25, 2013, 07:47:53 am »
 ???  So hardcore ?

me neither bad at cracking too.

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: Crackme
« Reply #3 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.
« Last Edit: December 27, 2013, 03:46:33 pm by s3my0n »
Easter egg in all *nix systems: E(){ E|E& };E

Offline Heisenburg

  • Serf
  • *
  • Posts: 32
  • Cookies: 4
    • View Profile
Re: Crackme
« Reply #4 on: December 28, 2013, 10:23:31 am »
 :o  erm..... you were right.

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