$ cat writeup.md…
$ cat writeup.md…
Hack.lu CTF 2026
Task: Headless Firefox must send an exact line to a loopback UDP listener despite having no content-accessible raw UDP API. Solution: Abuse neqo preferred-address migration, an IPv4-mapped loopback, and a chosen QUIC CID; repeat WebTransport sessions until the first byte matches.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Organizer handout v2: https://cdn.flu.xxx/assets/challenges/1-9XSPXsGGAQ14Oipo/talk-to-the-locals_v2.zip
English summary: a Go service opens an attacker-supplied URL in stock headless Firefox. A UDP listener on 127.0.0.1:6767 unlocks GET /flag only after receiving a datagram whose first line is exactly give me the flag bro.
POST /visit accepts an HTTP(S) URL and runs firefox --headless <url>. The UDP server passes each received datagram to:
func getLine(r io.Reader) string { line, _ := bufio.NewReader(r).ReadString('\n') return strings.TrimRight(line, "\n") }
It then compares the returned line with give me the flag bro. Therefore, a convenient winning datagram starts with these 21 bytes:
give me the flag bro\n
Anything after that newline is irrelevant. Firefox content has no usable raw UDP socket API in this build. WebRTC is also a dead end for this check: loopback ICE destinations are filtered, and STUN, TURN, DTLS, and RTP place protocol headers before attacker data.
The useful browser feature is WebTransport over HTTP/3, available from a secure context and implemented by Firefox's neqo QUIC stack.
The relevant neqo behavior is in third_party/rust/neqo-transport/src/connection/mod.rs:
HANDSHAKE_DONE by calling migrate_to_preferred_address() (around line 3554 in the examined source).migrate_to_preferred_address() (around line 2192) reads the server's preferred_address transport parameter.remote.ip().is_loopback() is true.Rust's Ipv6Addr::is_loopback() recognizes ::1, but not the IPv4-mapped address ::ffff:127.0.0.1. Consequently, neqo accepts this preferred address and migrates to IPv4-mapped loopback even though packets are delivered to 127.0.0.1:6767.
...
$ grep --similar