root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat spookypass.md
// writeups

SpookyPass

13 Nov 2024 · 2 min read
SpookyPass — HTB challenge
A 64-bit ELF that prompts for a password. The secret sits in cleartext among the binary's strings — strings reveals it with no debugging required.

Challenge overview

FieldValue
PlatformHack The Box · Challenge
CategoryReversing
DifficultyVery Easy
StateRetired
Filespass (ELF 64-bit)

Attack map

[ELF pass] file → Linux binary
      │
      ▼
[strings] cleartext password
      │
      ▼
[./pass] enter password
      │
      ▼
[FLAG]

1. Identify the file

Before touching anything, find out what we're dealing with: binary type, architecture and whether it's statically linked.
file pass
pass: ELF 64-bit LSB executable, x86-64

It's a Linux executable — this is basic reversing territory.

2. Check protections

checksec summarises the mitigations (Canary, NX, PIE). Here it's informative only — we won't exploit memory corruption, just read data.
checksec --file=pass

3. Extract strings (key step)

Many "Very Easy" challenges store the password as a literal string. strings dumps every readable chunk of text in the binary.
strings pass | less
Before we let you in, you'll need to give us the password:
s3cr3t_p455_f0r_gh05t5_4nd_gh0ul5

Right among the program's messages, the password appears in plain sight.

4. Run it and enter the password

chmod +x pass
./pass
Welcome to the SPOOKIEST party of the year.
Before we let you in, you'll need to give us the password: s3cr3t_p455_f0r_gh05t5_4nd_gh0ul5

5. Flag

HTB{un0bfu5c4t3d_5tr1ng5}

Chain summary

PhaseTechniqueToolResult
TriageBinary identificationfileELF x86-64
AnalysisEmbedded stringsstringsCleartext password
ExploitationAuthentication./passFlag

Lessons learned

  • Never store secrets as literal strings in a binary — strings exposes them in seconds.
  • Reversing starts with the cheap tools (file, strings, checksec) before opening a disassembler.
  • The challenge name (unobfuscated strings) is usually the biggest hint.