~/d4nnyX

← IHack 2026

ADUDU

Forensics · IHack 2026

  • Forensics
  • Network
  • SSTI
  • TLS
  • RSA
ADUDU challenge card: 616 points, challenge.pcapng download, warning about vibecoded websites
"Don't vibecode your website bro. Too many vuln inside."

Overview

The challenge gave a single capture, challenge.pcapng. The flag came in two parts: one leaked through a blind template-injection oracle over plain HTTP, the other hidden inside a TLS session I had to decrypt.

Part one: a blind-timing SSTI oracle

Starting with the HTTP filter, I noticed repeated POST /search requests from 192.168.97.4 to 192.168.97.2:8080. They looked like ordinary searches, but the body was a URL-encoded Jinja2 template. The payload is split across TCP segments, so it only becomes obvious after following the stream and URL-decoding the q parameter.

CyberChef decoding the URL-encoded Jinja2 SSTI payload from the search request body
The decoded q parameter: a Jinja2 template abusing cycler to reach subprocess.
{% set c=session['username'] %}
{% set p=cycler[...][...][...][...] %}
{% if p('cat app/data/flag-part-1.txt')[...][0] == '~' %}
  {{ p('sleep 0.8')[...] }}
{% endif %}

The payload reads app/data/flag-part-1.txt, checks one character at a time, and runs sleep 0.8 only when the guess is correct. The response body is always identical, so the body is useless — but comparing each POST's timestamp with its following response reveals the leak: a wrong guess returns almost instantly, a correct guess takes about 0.8 s longer.

Reconstructing character by character from the timing gaps gave the first part:

ihack{1_know_1ts_p4in_br0

Part two: decrypting TLS with a weak RSA key

The second part lived in an encrypted TLS stream. The connection used an RSA key-exchange cipher, so I extracted the server certificate (right-click → Copy → as hex stream, saved through CyberChef as cert.der) to test whether its modulus was weak.

It was: n factored as 991 × q. With a tiny prime factor I could rebuild the private key, decrypt the RSA pre-master secret, and derive the TLS 1.2 session keys (the handshake used extended master secret). My solver chained the whole pipeline together:

1. Parse POST /search SSTI payloads -> blind timing oracle -> flag-part-1
2. Recover weak RSA key from the TLS cert (n = 991 * q)
3. Decrypt TLS 1.2 RSA_WITH_AES_128_GCM_SHA256 (EMS) -> flag-part-2
4. Base64-decode the tail and print the full flag

Decrypting the C2 channel exposed the command transcript and the remaining pieces of the flag.

ihack{1_know_1ts_p4in_br0_but_1ts_j0b_dut13s_th4nks_f0r_y0ur_dedicat10n}

Takeaways

A blind oracle does not need a visible response — a consistent timing difference is enough signal to exfiltrate a file one byte at a time. And RSA key exchange is only as safe as the modulus: a single small prime factor collapses the whole session, which is one reason modern TLS prefers forward-secret (EC)DHE suites where capturing the traffic is not enough to decrypt it later.