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.
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.
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.
lantern01.exe and let auto-analysis run to completion.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.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.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.FUN_140001000 to see the real check.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 | ^ 0x37 | Char |
|---|---|---|
| 0x54 | 0x63 | c |
| 0x58 | 0x6F | o |
| 0x47 | 0x70 | p |
| 0x47 | 0x70 | p |
| 0x52 | 0x65 | e |
| 0x45 | 0x72 | r |
| 0x1a | 0x2D | - |
| 0x58 | 0x6F | o |
| 0x40 | 0x77 | w |
| 0x5b | 0x6C | l |
| 0x1a | 0x2D | - |
| 0x03 | 0x34 | 4 |
| 0x05 | 0x32 | 2 |
copper-owl-42 — 13 characters, matching the length check exactly.
Verified dynamically from a persistent PowerShell terminal:
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.
entry) regardless of what — or whether — anything downstream is named. Tracing forward from there, or working backward from a string via xrefs, are the two reliable paths when naming can't guide you.Second entry in an ongoing reverse-engineering practice log.
Back to Security Research