Cyberlium

Reverse › Module 7 › Lesson 4

BeginnerModule 7Lesson 4/5

Lab — Crackme

Full crackme pass on $RE_LAB — static, dynamic, optional patch on YOUR toy, CTF-style writeup with ethics block.

25 min+40 XP3 quiz
Module progress4 of 5

Visual · t23_crackme_lab

Lab: crackme/CTF on $RE_LAB with optional toy patch. Original Cyberlium.

Opening

Solve one crackme end-to-end — flag or success string — and prove you did it without piracy side quests.

On YOUR assigned crackme or CTF reversing challenge: (1) ethics verify — authorized source and hash; (2) static summary from Module 5; (3) dynamic GDB proof from Module 6; (4) optional patch on YOUR toy sub-binary if brief provides separate toy — document offset and hashes; (5) extract flag or success message on $RE_LAB; (6) write CTF-style writeup with tools, steps, redacted flag if needed, integrity block (no commercial targets, no piracy); (7) chmod 600 pack. No keygen for commercial apps, no sharing patched pirated exes.

1. Lab deliverables

Static+dynamic notes, flag proof screenshot or stdout redacted, optional toy patch appendix with hashes.

Cross-link Module 6 dynamic lab if same binary.

Command guide

Try these commands — Lab deliverables

═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)

crackmes.one — https://crackmes.one/ (compare workflow to YOUR educational crackme) strings + objdump — https://man7.org/linux/man-pages/man1/strings.1.html (find strcmp targets) GDB break strcmp — https://sourceware.org/gdb/current/onlinedocs/gdb.html/ (dynamic on YOUR toy)

═══ INSTALL ═══

Linux (Debian/Ubuntu):

Command — copy this

sudo apt install build-essential

Built-in (binutils)

Command — copy this

sudo apt install binutils
sudo apt install gdb

macOS:

Command — copy this

xcode-select --install  # or brew install gcc

Built-in (Xcode CLI) or brew install binutils

Command — copy this

brew install gdb

Windows: Use WSL or MinGW Use WSL or install binutils Use WSL binutils Use WSL gdb

═══ LINUX / macOS ═══

Optional command

sudo apt install build-essential binutils gdb  # gcc strings objdump gdb

Command — copy this

export LAB_RE=${LAB_RE:-$HOME/cyberlium-lab/t23-re}
cat > "$LAB_RE/src/crackme.c" <<'EOF'
#include <stdio.h>
#include <string.h>
int main(void) {
    char buf[64];
    printf("Enter key: ");
    if (!fgets(buf, sizeof(buf), stdin)) return 1;
    buf[strcspn(buf, "
")] = 0;
    if (strcmp(buf, "cyberlium-lab") == 0) {
        puts("Access granted — educational crackme only");
        return 0;
    }
    puts("Access denied");
    return 1;
}
EOF

Command — copy this

gcc -Wall -O0 -g -o "$LAB_RE/bin/crackme" "$LAB_RE/src/crackme.c"
strings "$LAB_RE/bin/crackme" | grep -E 'Enter|Access|cyberlium' | head -6
objdump -d "$LAB_RE/bin/crackme" | grep -E 'strcmp|main' | head -8
printf 'wrong
' | "$LAB_RE/bin/crackme"; printf 'cyberlium-lab
' | "$LAB_RE/bin/crackme"
gdb -q -batch -ex 'break main' -ex 'run <<< cyberlium-lab' -ex quit "$LAB_RE/bin/crackme" 2>/dev/null | head -12

Primary tools to practice this lesson: gcc, strings, objdump, gdb. Reference sites: crackmes.one (https://crackmes.one/); strings + objdump (https://man7.org/linux/man-pages/man1/strings.1.html); GDB break strcmp (https://sourceware.org/gdb/current/onlinedocs/gdb.html/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.

2. Writeup integrity

State crackme author/URL, $RE_LAB only, no commercial DRM bypass attempted.

Observed vs inferred in every finding bullet.

3. Stop conditions

Undocumented binary — stop; mystery exe not crackme/CTF class.

If challenge forbids patching, observe-only — honor rules.

4. What you ship: crackme lab pack

Writeup + static/dynamic proof + flag evidence + ethics block — chmod 600.

5. What you record before the next lesson

Crackme lab pack path.

6. Wrong vs right: commercial piracy vs crackmes/CTF toys

Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.

  • Wrong

    Crackme lab using commercial game executable.

  • Right

    Crackme lab pack from $RE_LAB. Next: quiz.

Mission: crackme lab

1) Verify authorized crackme hash. 2) Static and dynamic proof. 3) Flag or success evidence. 4) Writeup with ethics block; chmod 600.

Stuck? Ask Cyberlium AI Mentor

Ask Mentor: “Patch optional — when skip?”

Knowledge Check

1

APPLY: Crackme lab target:

Multiple choice

Knowledge Check

2

APPLY: True or False: Keygen for paid software counts as crackme lab.

True or False

Knowledge Check

3

APPLY: Crackme writeup includes:

Multiple choice

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)