Jump to content
Tuts 4 You

1 Screenshot

This is my first attempt at a binary protector. Currently, the VM has very little protection, so this should be good for those interested in learning about VM-based obfuscation. I intend on uploading new challenges that feature my protector as I add more features.

GOAL:

- You must find the correct key. Simply patching to get a goodboy message is NOT allowed.
- Bonus points for devirt and explanation of your approach.
- MOST IMPORTANTLY, have fun!

:)

#include <stdio.h>

#pragma GCC push_options
#pragma GCC optimize ("O0")

int isCorrect(unsigned int input)
{
	unsigned int key = 0x77259243;
	key |= 0x23;
	key &= 0x23;
	key += 0x843;
	key &= 0x5466;
	key += 0x843;
	key |= 0x234;
	int result = 0;
	key += 0x63654;
	key &= 0x4545;
	key |= 0x65466;
	key -= 0x5234;
	key -= 0x863;
	key ^= 0x7;

	if (input == 0x743)
		result = 1;

	key += 0x65363;
	key &= 0x75454;
	key |= 0x754;
	key += 0x1;
	key -= 0x1;
	key += 0x711;

	if (input == 0x972)
		result = 1;

	key += 0x3643;
	key += 0x54;
	key |= 0x54;
	key |= 0x331;
	key |= 0x12;
	key += 0x321;

	if (input == 0x666)
		result = 1;

	key -= 0x97;
	key += 0x744;
	key |= 0x54;
	key -= 0x82;
	key |= 0x12;
	key += 0x223;

	if (input == key)
		result = 1;

	key += 0x7342;
	key ^= 0x42;
	key ^= 0x744;
	unsigned int tempKey2 = 0x7443;
	key ^= 0x33;
	key |= 0x88;
	key += 0x764;

	if (input == tempKey2)
		result = 1;

	return result;
}

#pragma GCC pop_options

int main() {
    unsigned int input = 0x0;

    printf("Enter Key: ");
    scanf("%d", &input);

    if (isCorrect(input))
	{
        printf("Correct Key!\n");
    }
	else
	{
        printf("Incorrect Key.\n");
    }

    return 0;
}

correct key: 299902

crackme.unprotected.zip

  • Like 1

User Feedback

Recommended Comments

There are no comments to display.

×
×
  • Create New...