| Field | Value |
|---|---|
| Challenge | Character |
| Category | Terminal / Warmup |
| Vulnerability Class | Incremental secret disclosure |
| Transport | Raw TCP |
| Prompt style | One character per requested index |
This material is for authorized CTF infrastructure only. Do not run this PoC against systems you do not own or have explicit permission to test.
The service asks for a numeric index and returns one flag character at that
position. By repeatedly querying index 0,1,2,... and concatenating responses,
the full flag can be reconstructed until the server returns Index out of range.
- Service discloses secret data deterministically by index.
- No meaningful anti-automation controls prevent bulk extraction.
- Response format is stable:
Character at Index N: X. - Entire secret can be rebuilt with a simple loop.
- Connect to the service:
nc <HOST> <PORT>- Send a few indexes manually:
0
1
2
3
- Observe output format:
Character at Index 0: H
Character at Index 1: T
Character at Index 2: B
Character at Index 3: {
- Continue incrementing indexes until:
Index out of range
Script:
character_poc.sh
cd "/home/eliah/Desktop/CTF/HackTheBox/Character"
chmod +x character_poc.sh
./character_poc.sh <host> <port>./character_poc.sh 154.57.164.76 31059
./character_poc.sh --host 154.57.164.76 --port 31059 --verbose
./character_poc.sh --host 154.57.164.76 --port 31059 --json--host <host>: target host or IP.--port <port>: target TCP port.--timeout <seconds>: socket timeout, default8.--max-index <n>: maximum index attempts, default500.--json: machine-readable JSON output.--verbose: print debug details.-h,--help: show usage help.
0: exploit succeeded and flag extracted.2: invalid CLI arguments.3: target connectivity failure.4: protocol parse failure.5: extraction completed but noHTB{...}pattern detected.
- Returning one character at a time still leaks the full secret.
- Index-based access gives direct random access into flag contents.
- Repetition is trivial to automate over a single persistent socket.
- Do not expose secret bytes/characters by user-controlled index.
- Enforce strict authorization before revealing sensitive values.
- Add rate limits, anomaly detection, and challenge/response controls.
- Prefer challenge designs that never return real secret material incrementally.
Flag values are instance-specific. The format remains HTB{...}.
Target instance: 154.57.164.76:31059
Solved on: 2026-04-02
Flag: HTB{tH15_1s_4_r3aLly_l0nG_fL4g_i_h0p3_f0r_y0Ur_s4k3_tH4t_y0U_sCr1pTEd_tH1s_oR_els3_iT_t0oK_qU1t3_l0ng!!}