Usama Arshad. Résumé

BlackHat MEA 2026 Qualification round · 29 Aug 2026 FlagYard

CTF Writeups

Fifteen challenges, fully documented.

Full writeups for every challenge in the 2026 qualifiers. Each one gets the whole story: what the challenge exposed, the precise root cause, the exploitation chain with working code, and the routes that died on the way.

Challenges
15
Full writeups
15
Categories
05
Code snippets
135

Before the writeups

How to read these.

Every writeup follows the same shape. Recon is what the challenge handed over and what analysis showed. The bug is the precise root cause, quoted from source where the source is the point. Exploitation is the chain that turns it into a flag, step by step, with the load-bearing code. Dead ends is where the hours actually went.

Every challenge is written up to the same depth, including the ones where the interesting part was a route that did not work. A writeup that only shows the clean path is a sales deck, not a notebook.

WHAT THE 15 BRIEFS LOOKED LIKE

WHAT THE BRIEF SAID WHAT WAS BEHIND IT

WHAT WAS ACTUALLY BEHIND THEM

All fifteen, full detail

The writeups.

Showing all 15 challenges

Hokan

Prony / Ben-Or–Tiwari with a structured node set, then an LLL knapsack

Reconstruct a secret 11-variable degree-11 polynomial over an unknown 256-bit prime field from only 8 evaluations, two fewer than Prony interpolation nominally requires, by choosing query points whose structure makes the integer kernel depend only on the exponents.

Full writeup·4 sections·17 blocks

Crypto Full writeup

Popcnt Oracle

RSA malleability plus popcount invariance under doubling, driven by beam search

The service is an unrestricted RSA decryption oracle that leaks only popcount(x^d mod n); because 2y mod n is a pure left shift (identical popcount) exactly when 2y < n, a popcount change along a doubling chain proves a modular wrap, and for the chain seeded at m those wrap flags are literally the binary digits of m/n. Three chains (k = 1, 3, 5, 2051 queries each) driven through a beam search recovered all 2048 bits of the secret m in ~1020–1080 s, which was then submitted verbatim to get the flag.

Full writeup·4 sections·37 blocks

Crypto Full writeup

Reduce, Reuse, Recycle

GCM forbidden attack, UTF-8 length juggling, then a hex-alphabet collapse

AES-GCM key and nonce are reused on every encryption while the plaintext contains the key's own hex. Half of each tag recovers the GHASH key H; multi-byte UTF-8 characters slide the key hex across GHASH block boundaries; a hex-alphabet quirk collapses the residual 2^48 ambiguity to 2^16.

Full writeup·4 sections·17 blocks

Crypto Full writeup

Qfact

Defender quarantine RC4 recovery, then ransomware key and IV, then AES-CBC decrypt

Windows Defender quarantined the ransomware but the evidence set ships the quarantine store. Decrypt the quarantine with the static MsMpEng RC4 key, read the AES key out of the dropper, rebuild the IV from host identifiers found in the registry, and decrypt the victim files.

Full writeup·4 sections·24 blocks

Forensics Full writeup

Whisper

Ollama prompt history, script recovered from Trash, blake2b-derived AES-zip password

The local Ollama prompt history is an uncensored record of the insider designing the exfil tool, including the passphrase. The script itself survives in the GNOME Trash, and it reveals both the key- derivation function and where the archive was staged.

Full writeup·4 sections·22 blocks

Forensics Full writeup

baiby-pwn

Unbounded array write to GOT overwrite to FSOP leak to setcontext ROP

arr[i] = v with no bounds check on a non-PIE Partial-RELRO binary is an arbitrary aligned write over the whole writable page, including the GOT. Repointing memset@got at main's third setbuf call site and setbuf@got at the read setup inside getval converts the "2" command into read(0, *0x404060, 0x40), a 64-byte arbitrary write, which forges an FSOP header in the real _IO_2_1_stderr_ to leak libc on fd 2, then points setbuf@got at setcontext with the slot aimed at a fake ucontext for full register control, and finally chains open/getdents64/read/write(2,…) to read the randomly-named flag file without ever calling execve (which Landlock restricts).

Full writeup·4 sections·31 blocks

Pwn Full writeup

Teto

Full reverse engineering and validated primitives, blocked on the OR-write budget

A Tetris implementation with an out-of-bounds cell write and a width field that can be corrupted into an arbitrary-length stack read. Both primitives were verified against the real binary and a working stack leak runs on the live target; the exploit stalls on an arithmetic budget, not on a missing idea.

Full writeup·4 sections·35 blocks

Pwn Full writeup

Bug Where

io_uring double-free of an iovec to pipe_buffer UAF to kernel LPE

Linux 7.2.0-rc3 ships an io_uring/kbuf.c bug where io_ring_buffers_peek() does kfree(arg->iovs) on the array it just filled instead of on the replaced array, while io_uring/net.c only refreshes kmsg->vec.iovec when a realloc actually happened, leaving a dangling iovec pointer parked in ctx->netmsg_cache. Reclaiming the freed chunk with a pipe_buffer[] and issuing a second bundled IORING_OP_SEND writes attacker-chosen (iov_base, iov_len) pairs directly over pipe_buffer[0].ops, so close() calls a userland pipe_buf_operations->release → commit_creds(prepare_kernel_cred(&init_task)) → root, then read the flag off /dev/sda.

Full writeup·5 sections·58 blocks

Pwn Full writeup

extended-license

eBPF-decrypted SIGTRAP shellcode, Feistel inversion, z3 username solve

A 34 MB stripped PIE hides its license check in 40 encrypted x86 shellcode chunks that are decrypted inside the kernel by an embedded eBPF tracepoint program (bpf_probe_write_user on syscalls:sys_enter_openat with dirfd 0x1337) and dispatched via int3/SIGTRAP. Dumping the chunks in a privileged container, reconstructing the 8×4-round Feistel/PRNG license transform, scraping the expected 512-bit target out of the seccomp ERRNO oracle's own argument stream, and z3- solving the 14 hidden username byte-checksums plus crc32(user)==0xbf2b0fa2 yields the unique username xorionxarcheryxseedx, whose derived 72-byte license.dat makes the untouched binary print the flag.

Full writeup·4 sections·64 blocks

Reversing Full writeup

free-agentic-tool

Go dropper to reflective PE stage 2 to deterministic X25519 key to pcap decryption

The distributed binary is a dropper. Its real payload is a reflectively-loaded second Go executable that speaks gRPC to a C2, and that stage derives its X25519 private key from sha256(USERNAME + "_" + COMPUTERNAME) instead of generating one, so the whole captured session decrypts from the pcap alone.

Full writeup·4 sections·30 blocks

Reversing Full writeup

upyx

UPX to PyInstaller to 100 marshal layers to a Cython RPC client to a VEH-packed C verifier

An 11.8 MB PE that is UPX over PyInstaller over 100 nested marshal layers over a Cython GUI over a custom VEH packer. The final gate is a 960-byte keyed comparison that inverts cleanly, and the last hop is a named-pipe service hidden in the UPX stub tail that upx -d throws away.

Full writeup·4 sections·17 blocks

Reversing Full writeup

Dead Drop

CSS-allowlist escape via </style>, then a CSS selector oracle against the bot

The per-drop "envelope cipher" CSS field is validated by a real CSS parser with a property/ value allowlist, but the accepted CSS is echoed verbatim into a block, and a CSS string literal may contain , giving arbitrary HTML injection (including a second that never sees the validator). Under a JS-free CSP (default-src 'none'; style-src 'unsafe-inline'; img- src 'self'), the same-origin pickup beacon /px/:id logs the full request URL including query string into an owner-readable log, so html:has(input[value^='…']) #qN{background:url(/px/ COLLECTOR?p=N)} rules turn the headless-Chrome courier bot into a CSS-selector oracle that leaks the courier-only hidden one character at a time.

Full writeup·4 sections·38 blocks

Web Full writeup

Lumen

Cross-parameter urldecode XSS plus max_input_vars CSP removal

A 1000 query parameters, which makes PHP print a max_input_vars request-startup warning before the script runs, so header("Content-Security-Policy: ...") fails with "headers already sent". The resulting unrestricted onerror handler reads the operator bot's localStorage.flag and posts it to the app's own ?p=trace note store, which the attacker reads back.

Full writeup·4 sections·47 blocks

Web Full writeup

DeckForge

file:// read, then an SOP-disabled cross-origin pivot to a privileged chromedriver

The preview renderer runs Chromium with --allow-file-access-from-files and --disable-web-security, so injected HTML gets an arbitrary local file read and can drive a loopback chromedriver that runs as a different, privileged user.

Full writeup·4 sections·26 blocks

Web Full writeup

Huddle

SHA-256 length extension to owner, then ffmpeg dref arbitrary file read

Huddle signs invite tokens with sha256(secret ‖ "team=main&email=…&role=member") and parses them with a hand-rolled last-duplicate-key-wins splitter, so a SHA-256 length-extension appending &role=owner promotes any member to workspace owner. Owner unlocks the video- message thumbnailer, which shells out to ffmpeg -enable_drefs 1 -use_absolute_path 1; a hand- built MP4 with a Mac-alias (alis) external data reference plus a custom 256-entry pal8 colour table turns each thumbnail into one JPEG-lossless bit-plane of an arbitrary server file, and 8 requests reconstruct /flag.txt byte-exact.

Full writeup·4 sections·69 blocks

Web Full writeup

Afterwards

What the set rewarded.

Three of these were not really about the primitive. Hokan, Popcnt Oracle and Reduce, Reuse, Recycle each present a budget that looks one query, one bit or one block too small, and each opens the moment you stop querying at random and start querying with structure. That transfers straight to real work: an oracle that leaks one bit is still an oracle, and the interesting question is what you choose to ask it.

The web set punished trust in the wrong layer. Dead Drop validated CSS with a real CSS parser and still lost, because the parser has no idea it is writing into HTML. Lumen sanitised both halves of a path and then decoded the concatenation. DeckForge put an IP allowlist in front of a service the attacker was already executing inside. In all three the control was real and the boundary was imaginary.

Bug Where felt least like a puzzle. It is a genuine Linux 7.2.0-rc3 io_uring bug with a one-line fix in the final release, and the distance between freeing the wrong array and a root shell is a reminder of how little slack there is in kernel memory management.