Video Tutorial How to make a KeyGen - Ziggy's KeyGenMe Tutorial

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

ismaelvazquezjr

Meme Tier VIP
Fleep Tier Donator
Trump Tier Donator
Jan 4, 2020
30
4,148
0
Learn how to reverse engineer a key generation algorithm in Ziggy's KeyGenMe #0. A KeyGenMe is a program that is intentionally made for learning reverse engineering legally. We are not doing anything illegal in this video. KeyGenMes and CrackMes are common learning tools for ethical hackers. Even antivirus companies create CrackMes for ethical reasons.

Ziggy's KeyGenMe #0 is a very simple one that utilizes a simple XOR algorithm, which is very common. You will learn how to reverse engineer it using Ida Pro and then using this information we will show you a simple python script that can generate serials based on the username.


Python Key Generation Script
Python:
#!/usr/bin/env python3

encryption_buffer = 0x4E6AF4BC

username = input("Enter a username: ")
full_serial = "FIT-"
username_length = len(username)
min_username_length = 5

while(username_length < min_username_length):
    print("[-] Username must be 5 characters long... Try again.")
    username = input("Enter a username: ")
    username_length = len(username)

i = 0
xor_val = ''.join([str(hex(ord(c))[2:]) for c in username[i:i+4]][::-1])
username_length -= 4
encryption_buffer ^= int(xor_val, 16)

while(username_length > 0):
    i += 1
    xor_val = ''.join([str(hex(ord(c))[2:]) for c in username[i:i+4]][::-1])
    encryption_buffer ^= int(xor_val, 16)
    username_length -= 1

full_serial += str(encryption_buffer)

print(f"The serial is: {full_serial}")
 
Last edited by a moderator:

KF1337

*copies code from tutorials, then breaks it.*
Dank Tier Donator
Full Member
Nobleman
Jan 30, 2020
153
3,603
0
First of all: love your reverse engineering videos! It can be a pain to start reversing, your videos are kinda kickstarting it.
It is very helpful that you comment every instruction that you analyze.

Is there a specific reason to use Dependency Walker, when you load it into IDA anyways and are able to look at the imports?
 

Rake

I'm not your friend
Administrator
Jan 21, 2014
12,497
78,998
2,417
Is there a specific reason to use Dependency Walker, when you load it into IDA anyways and are able to look at the imports?
No, this is just an old school method of doing things that is taught in older books and tutorials
 
  • Like
Reactions: KF1337

ismaelvazquezjr

Meme Tier VIP
Fleep Tier Donator
Trump Tier Donator
Jan 4, 2020
30
4,148
0
Ziggy KeyGenMe #1 Tutorial with Python Script


You can download the keygen itself in the attachments
password: guidedhacking
 

Attachments

You can download 0 Attachments
  • Like
Reactions: Langour

Langour

Full Member
Sep 12, 2019
1
112
0
Gr8 video, keep it up!.
I couldn't find anywhere Ziggy's KeyGenMe#0 executable file to download. Would be someone kind and share it?
I'll leave source code written in c++ for these KeyGens if someone would be interested in.

Edited:
C++:
#include <iostream>
#include <string>
#include <sstream>

int main()
{
    std::string name;
    std::getline(std::cin, name);

    const size_t len = name.length();
    if (len >= 5)
    {
        __int64 serial = 0x4E6AF4BC;
        for (int i = 0; i < len - 3; ++i)
        {
            std::stringstream ss;
            for (int j = 3; j >= 0; --j)
                ss << std::hex << (int)name[j + i];

            __int64 xorValue = 0;
            ss >> xorValue;

            serial ^= xorValue;
        }
        printf("Name: %s\nSerial: FIT-%I64d\n", name.c_str(), serial);
    }
}

C++:
#include <iostream>
#include <string>

int main()
{
    std::string name;
    std::getline(std::cin, name);

    int serial = 0;
    for (const auto& ch : name)
    {
        if (ch != 32) // (space)
            serial += toupper(ch) * 5961 - 1;
    }
    printf("Name: %s\nSerial: SnD-%i", name.c_str(), serial);
}
 
Last edited:

diabloSOD

Learner
Trump Tier Donator
Aug 30, 2020
22
354
0
I just went on tuts4you to download it and it says the attachment is no longer available.
Link: Ziggy's Keygenme #0

I tried downloading the mega-pack which includes Ziggys KeyGenMe #0 (Tuts 4 You KeygenMe Collection (2016)) and Windows Defender wouldn't let me download the file because it was flagged with "Trojan:Win32/Bumat!rts". It may be a false positive but I'm not too familiar with that field.

Does anybody here on the forum have that file specifically (Ziggys KeyGenMe #0)?
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods