Back to Security Research
CTF · Beginner-Plus

crackme_02 — Lantern01

XOR-Encoded Password Check

A step up from the first crackme — no recognizable main(), an XOR-encoded password behind a stripped entry point, recovered via static analysis and confirmed with the binary's own flag output. Worked entirely through Ghidra's GUI this time, no AI-assisted queries.

October 2026 Ghidra 12.1.3 (manual GUI) CTF

Objective

Lantern01 is a Windows crackme by author lypd0, a step up in difficulty from a first beginner binary. The binary (lantern01.exe) prompts for a password at the console and, if correct, prints a CTF-style flag. Goal: recover the password through static analysis, without guessing or brute-forcing.

Environment & Tools

Disassembler
Ghidra 12.1.3 (default auto-analysis)
Workflow
Manual GUI — no GhidraMCP / AI queries

Worked entirely through Ghidra's own GUI this time — Symbol Tree, Listing view, Decompile panel, Go To navigation, and cross-reference lookups — rather than leaning on GhidraMCP/AI-assisted queries as with the first crackme. A deliberate step toward working the tool independently.

Approach

  1. Imported lantern01.exe and let auto-analysis run to completion.
  2. Searched the Symbol Tree's Functions list for main — no matches at all. Unlike the first crackme, this binary has no recognizable CRT-generated main symbol, likely because it lacks debug info or its startup code doesn't match Ghidra's function-ID signatures.
  3. With no named entry point to search for, went to the binary's actual entry point instead (entry, which every PE executable has regardless of symbol names) and decompiled it. It called two unnamed functions (FUN_140001a60, FUN_140001650) with no indication from the names alone which one mattered.
  4. Rather than guessing which call was the real logic, checked Defined Strings first and found an "Incorrect password" style string. Right-clicked it and used References → Show References To to find exactly which function used it — the same xref-first habit from the first crackme, and what cuts through stripped/renamed code when symbol names can't help.
  5. The reference led into FUN_140001120: this function prints "Password: ", reads input into a 128-byte buffer (effectively fgets), strips the trailing newline, and passes the trimmed input to a second function, FUN_140001000, whose return value is the entire pass/fail decision.
  6. Decompiled FUN_140001000 to see the real check.

Key Findings

Decompiled FUN_140001000() — Ghidra
undefined8 FUN_140001000(char *param_1)
{
  size_t sVar1;
  undefined8 uVar2;
  ulonglong local_18;

  sVar1 = strlen(param_1);
  if (sVar1 == 0xd) {
    for (local_18 = 0; local_18 < 0xd; local_18 = local_18 + 1) {
      if ((byte)(param_1[local_18] ^ 0x37U) != (&BYTE_140018320)[local_18]) {
        return 0;
      }
    }
    uVar2 = 1;
  }
  else {
    uVar2 = 0;
  }
  return uVar2;
}

Unlike the first crackme's direct strcmp against a plaintext string, this one requires the input to be exactly 13 characters (0xd), then XORs each input byte with 0x37 and compares the result against a 13-byte table stored at 0x140018320. Since XOR is its own inverse, the real password is recoverable by reading those 13 bytes directly from the binary and XOR-ing each one with 0x37:

Byte^ 0x37Char
0x540x63c
0x580x6Fo
0x470x70p
0x470x70p
0x520x65e
0x450x72r
0x1a0x2D-
0x580x6Fo
0x400x77w
0x5b0x6Cl
0x1a0x2D-
0x030x344
0x050x322
Recovered password: copper-owl-42 — 13 characters, matching the length check exactly.

Outcome

Verified dynamically from a persistent PowerShell terminal:

Runtime verification
PS> .\lantern01.exe
Lantern 01 - beginner crackme
Recover the password or change the success path. No tricks.
Password: copper-owl-42
Unlocked! Your flag is:
FLAG{first_steps_1ab4f81e16df4d5c}

Static finding matched runtime behaviour exactly, and the binary's own banner ("Recover the password or change the success path. No tricks.") confirms the password-recovery path was the intended one rather than a patching exercise.

Notes

Scope. This writeup covers a publicly published crackme intended for practice (crackmes.one), analysed entirely offline via static analysis. No real systems, networks, or third-party software were tested. This track is CTF/crackme practice only — not exploit development against real targets.

More writeups coming

Second entry in an ongoing reverse-engineering practice log.

Back to Security Research