About Flare-On 13

If you haven’t heard of it, Flare-On is the yearly reverse engineering challenge from the FLARE team. It plays differently from a normal weekend CTF. There are no categories to pick from. You get one challenge, and the next one only unlocks once you’ve submitted the flag for the one in front of you. Every flag looks like an email address ending in @flare-on.com, and every 7z is protected with the password flare (the first challenge makes a whole joke out of explaining that it’s a “five digit password”).

The challenge descriptions are a story of their own this year. You’re a test subject in some lab, strapped to an examination chair, and every challenge is another “experiment” with your nutrient paste on the line. The very first one asks: “Are you as smart as a human? How many AI tokens are you going to burn to find out the answer to that question?” I liked it right away.

I finished all nine challenges and unlocked the hidden victory stage at the end. This post covers what each challenge was, how I got through it, what I learned along the way, and why I think you should play next year if you’re into reversing at all.

The solve counts on the board give a good idea of the difficulty curve: 2165 people solved the first challenge and 642 solved the last one.

The challenges

1. FLAreCAPTCHA

flarecaptcha

The warm-up is one HTML file pretending to be a reCAPTCHA box. Naturally, the first thing I did was click the checkbox, and naturally it failed with a red X.

Reading the script explains why. The mousedown handler only reacts when e.button === Math.pow(5, 0) + Math.pow(1, 1), which works out to 2, the right mouse button. Right-click is blocked on the widget, so you can’t see that happening. You also have to keep holding it until a 2 second timer fires before the page decides you’re human.

The flag itself is a 30-byte array wrapped in a Proxy. Every read gets XORed with document.characterSet.length, which is 5 for UTF-8. Then the even bytes are XORed with one key byte and the odd bytes with another. That 16-bit key is seconds_held * (resetWidget.toString().length + 1115). So the length of a function’s own source code is part of the key, and reformatting the page would break it. Cute trick.

I didn’t bother counting characters. The key is only 16 bits and the flag has to end in @flare-on.com, so I brute forced it in a few lines of Python. The only key that worked was 0x0a72, which is 2 × 1337. I took that as the authors winking at me.

triskaidekaphobia@flare-on.com

2. GhostStream

ghoststream

This one is Harry Potter themed and came with a “haunted executable and a botched vial of PolyjuicePotion.txt”. The download is a .wim image containing GhostStream.exe and PolyjuicePotion.txt.

7z l -slt gave away the first trick. The text file has an NTFS alternate data stream called :LordVoldemort, and inside it is AlbusDumbledore. The normal contents of the text file say the potion is “stuck for exactly 7 days”. I thought that was flavour text at first. It wasn’t.

The parent executable decodes all its API names from stack strings and throws in a few distractions: a socket listener on localhost, an environment variable lookup and a telemetry thread that does nothing useful. The real logic is in its window procedure. It measures how long the process has been running, and only if that’s more than 10080 minutes (exactly 7 days) does it XOR the ADS content with 0x82 and a fixed table. Out comes HarryPotter, which gets sent over a named pipe to a second executable hidden in the parent’s resources.

The partner is sneaky in a fun way. It patches strlen inside ucrtbase.dll with its own shellcode, uses that fake strlen to turn a global string into the spell Piertotum Locomotor, puts the original bytes back, and then runs a modified RC4 using HarryPotter as the key and the spell as an extra XOR layer. From the disassembly I expected the RC4 index to step by 19, but only 18 produced readable output, so I went with what decoded.

I rebuilt the whole chain in Python, because I wasn’t about to leave a VM running for a week.

y0u_kn0w_n07h1n6_j0n_5n0w@flare-on.com

3. FlareOn13.doc

flareon13-doc

“A simple document file”, the description says. It isn’t a Word document at all. It’s a polyglot that is a valid DOS .COM program, an encrypted PDF, a UDF disc image, a ZIP and a VHD, all in one file. This was my favourite challenge of the year, because each format I peeled back gave up another small string, and the final program needed all six of them.

Here’s how each layer paid out:

  • The DOS stub XORs the start of the EICAR antivirus test string and prints FLARE-STANDARD-ANTIVIRUS-TEST-FILE!.
  • The PDF opens with an empty password. It has a line of invisible text whose bytes are EBCDIC, the old IBM mainframe encoding, which decodes to mainframe_ebcdic_ghost. It also has a JBIG2 fax-style image that says jbig2_fax_geometry.
  • The disc image refused to open until I noticed the descriptors were 2352 bytes apart. That means raw CD sectors, so I stripped every sector back to its 2048 data bytes and the disc extracted fine. Inside was a fat Mach-O called click_me. Its arm64 slice is a decoy written in Odin, with a hash that looks like SHA-1 but is really SHA-0, and it produces Ød1n_373rn4l_fl4r3.
  • The ZIP after the PDF’s %%EOF uses ZipCrypto with the classic malware password infected. Its compression method is “Reduce”, which is so old that Python’s zipfile doesn’t support it. I ended up writing my own unreducer, and the output reduce_not_deflate matched the stored CRC.
  • The UDF metadata had the last one, udf_tagged_descriptor, sitting there in plain text. I only found it by hashing every printable string in the file against the remaining MD5.

The real program is the arm64e slice, written in Crystal. It MD5-checks six inputs, XORs their SHA-256 digests into a 32-byte key and RC4-decrypts the flag. Its constants are stored one nibble per byte, which is why strings never showed any of them.

Ju$7_4_l177l3_7r34$ur3_HUN7@flare-on.com

4. ToxicMiner

toxicminer

A “rogue CPU miner” that wants to turn your processor into “weapons-grade slag”. It’s a real build of cpuminer-multi 1.3.7 with one extra function hidden among the hashing algorithms.

The first thing that stands out is the pool password in main. Its base64 part decodes to m1n3_y0ur_0wn_bus1n3ss, and it’s a decoy. I spent a while reading the stratum code, the auth code and the API server, and all of it matched upstream cpuminer. What eventually worked was tracking every place the program reads the username global. One of them was sub_140134F70, buried in the hashing code and the only function that calls GetVolumeInformationA. It double-hashes the drive’s volume serial number, compares the result with the -u username, and if they match it uses the hash as an RC4 key to decrypt the flag.

The catch is that the “SHA-256” isn’t really SHA-256. My first Python model found nothing at all, so I stopped trusting the decompiler, emulated the function in Unicorn and compared it with my model round by round. The differences: it runs 32 rounds instead of 64, uses + where SHA uses ^ in the Ch and Maj functions, swaps the first two round constants, and does an extra table-based tweak on the first output word. Once my model matched the emulator exactly, a multithreaded C search over the 32-bit serial space found 0x01CEC01D.

cpu_m3lt3d_4nd_all_i_g0t_w4s_th1s_fl4g@flare-on.com

5. catthief

catthief

“One of our stray laboratory felines just pilfered classified contraband from the server room.” You get a Rust executable and a packet capture of it running.

I started with the pcap, since it shows what actually left the machine. There were six POST /exfil requests to a local server. The bodies looked like random noise, but all six started with the same bytes, which strongly suggests a stream cipher with a fixed key.

In IDA, the binary turned out to compress each file with canonical Huffman coding (the panic strings even mention src\compress.rs), then encrypt it with completely standard RC4. The key is stored XORed with 0x33 and decodes to i11_b3_p1und3r1n_y3r_d474, or “I’ll be plunderin’ yer data”. Pirate cats, of course.

After undoing both layers, the first request was a tiny READYDD check-in and the other five were JPEGs of cats on pirate ships. I went looking for stego, but there was nothing hidden in the files. The flag is simply written on a scroll in one of the pictures, next to a Maine Coon in a tricorn hat. I laughed at that one.

th3r3_b3_tr34sure_1n_th4t_pc4p@flare-on.com

6. Threat Invaders

threat-invaders

“How about a nice retro space-shooter to blow off some steam. Don’t ask why it is over a hundred megabytes.” That line tells you most of what you need. It’s a Space Invaders clone shipped as a .NET 8 single-file bundle, plus a pcap of it talking to a “high-score server”.

I carved out the managed assembly and read it in ILSpy. It was completely clean: a telemetry reporter, a local high score store, an updater, and nothing suspicious. That pushed me toward the native CLR host, and there it was. The host hooks the JIT prestub, matches six methods by a custom 64-bit name hash and swaps their compiled code for its own stubs. The game is effectively a C2 agent wearing a costume.

The protocol is clever. A high score entry counts as a command when Score XOR first four bytes of PlayerName spells cmd:. Its comment field holds an encrypted shell command. The output of that command goes back to the server inside a telemetry “feedback” upload, encrypted with the same PCG keystream.

My first attempt used a key from my own machine and gave garbage. That was the clue that the key had to come from the capture instead. The first feedback upload leaks key XOR reverse(session_guid), and the session GUID is sent in plain JSON right next to it. With the key in hand, I replayed the keystream in order: the first command was dir, which listed a 46-byte flag.txt, and the second was type flag.txt, whose 46 bytes of output were the flag. There’s also a fake flag at no-flare.com near the updater, in case you get impatient.

wh4t_4_l0ng_str4ng3_tr1p_1ts_b33n@flare-on.com

7. FlareCalc

flarecalc

“Punch in a few arithmetic equations while our EEG sensors record the exact millisecond you realize FlareCalc.exe is quietly plotting your demise.” This is the challenge where it started getting hard.

The window procedure has four hardcoded expressions that each decode a message when you press =: FLAG{NICE_TRY}, ACCESS DENIED, KEY_EXPIRED, and one that scrolls Rick Astley lyrics across the display. All four are fake, but they taught me how the obfuscated constants work, which helped later.

The real entry point is a vectored exception handler that only fires on a floating-point divide by zero. It checks the calculator’s value stack for 8675309 (Jenny’s number), 88224646, and 22/7. When everything matches, it starts a thread that reads the exe’s own Authenticode signature into executable memory and jumps into it. So the code signing certificate is carrying x64 shellcode.

That shellcode pulls 1,035 encrypted pieces out from under a custom OID, decrypts each one with an MD5-seeded LCG and throws away chaff bytes. The pieces form a state machine where every input byte picks the next state and changes a 32-byte buffer. I wrote a DFS that ran each piece in Unicorn and tried all 256 bytes at every step. Two problems slowed me down. Every piece contains a junk loop that runs a million times, which I skipped with a hook that jumps straight to the result. And Unicorn kept executing stale translated code, because every piece loads at the same address, until I flushed its cache after each load.

The search found exactly one path, FLAREON_ASN1_Labyrinth_Key_2026!, and that buffer decrypts the final blob into the flag.

t3mplat3s_asn_and_j1t_0h_my@flare-on.com

8. crux

crux

“The underlying code was compiled by someone who genuinely despises humanity.” They weren’t joking. crux is a Chrome extension whose popup loads a Go WebAssembly module, and that module exposes a single function, window.check(input).

The Go binary was obfuscated with garble, so names are random and strings are only built at runtime. On top of that, most function names were blanked and the pclntab magic bytes were overwritten, so tools that search for the table by signature come up empty. I found it by scanning for its structure instead, which gave back the names that survived, and mapped them onto Ghidra’s unnamed_function_N labels.

Decompiled Go wasm is almost unreadable, so I switched to tracing. Using binaryen, I injected a hook at the start of the interesting functions and logged their arguments from a Node harness. That showed the full shape of the check. The input is base64 of AES-256-CBC with a hardcoded key and IV. The plaintext is deserialized into a tree, and each node has to hold a prime p, a generator g, and child nodes whose primes multiply to p - 1. That’s a Pratt primality certificate, and the root prime has to equal one specific 256-bit number.

Once I knew that, the rest was maths. sympy factored every p - 1 down the tree in a few seconds. I built the certificate, serialized it, encrypted it with the recovered key and passed it to the real main.wasm, which printed the flag.

Pr4tt_Pr1M4lItY_C3rt5_4nd_Wa4aA4aAA4aAA4a4a5M@flare-on.com

9. NeonOutRun

neonoutrun

The final experiment is a “28-lap synthwave racing simulator” and a stripped Rust/Tauri binary. The game logic is JavaScript hidden inside the executable behind four layers (XOR, a custom LZSS, zstd and deflate), and it runs in an embedded V8 engine.

Once decoded, game.js looks complete. It builds a flag out of lap messages and gives you decode_this_system_to_win_it@f1are-on.com. Look closely at the domain: that’s f1are with a digit one. It’s a decoy, and a good one.

The real check happens before the script even runs. The Rust side replaces three JavaScript builtins with native functions. The Array.prototype.sort hook sets up random lap splits and a target sum. The Math.min hook runs on every finished lap: it requires the lap time to be a whole number from 0 to 255, saves it as a byte, and adds split × sin(angle) to an accumulator. The String.prototype.replaceAll hook runs at the end, and if the accumulator matches the target it overwrites the start of the flag with your 28 saved lap times and fixes the 1 in f1are to an l.

Since the splits are random, the only way the sum can match is if every sine equals exactly 1. So each lap time has to make its angle land on 90 degrees. The per-lap constants are heavily obfuscated, so I emulated that code in Unicorn instead of reading it (after patching in the PIE relocations by hand), then solved for each lap. All 28 lap times come out as printable ASCII, and together they spell the flag.

I never got to drive the car, because webkit2gtk wasn’t installed and I didn’t have sudo on that box. Everything was static analysis plus emulation.

R3_ag3nt_4b0ut_t0_f33l_d1zzy@flare-on.com

Victory

victory

Finishing NeonOutRun unlocks the hidden victory stage worth 9000 points, with the message “Congratulations on completing FLARE-On 13! We hope you or your AI model learned something and had a blast!” I did both.

What I learned in each area

Web and JavaScript. FLAreCAPTCHA was a nice reminder that even a toy page can tie its key to odd things like the length of Function.toString() or the page’s character set. Those break the moment you try to “clean up” the code. And when the keyspace is small and you know part of the plaintext, brute forcing is completely fair.

File formats and forensics. FlareOn13.doc made me learn a stack of formats I’d never opened by hand: raw CD sectors, ZIP Reduce, JBIG2, EBCDIC and fat Mach-O slices. GhostStream showed me that 7z keeps NTFS alternate data streams when it extracts a WIM. Checking for ADS is now on my list of things to do with any Windows sample.

Crypto inside binaries. RC4 turned up in almost every challenge, but the plain RC4 never slowed me down. The modified versions did: a SHA-256 with half its rounds and some operators changed, an RC4 with a different step size, an RC4 helped along by a hooked strlen. The lesson I keep learning again: familiar constants don’t mean a standard algorithm. Now I emulate the function and compare it against my model before I trust my model.

Malware and network traffic. catthief and Threat Invaders felt the most like real incident response. You get a sample and a pcap, and you have to work out how the C2 talks. Threat Invaders taught me that when a decrypt gives garbage on your machine, the key might be sitting in the traffic instead.

Managed code and unusual runtimes. .NET with a hooked JIT, Go compiled to wasm under garble, and V8 embedded in Rust. Each time, the obvious code (ILSpy output, game.js, the Go functions) was clean or misleading, and the real behaviour lived in the native layer underneath. I’ll look there sooner next time.

Emulation. Unicorn carried me through ToxicMiner, FlareCalc and NeonOutRun. Fast-forwarding junk loops, flushing the translation cache when code is reused, and applying relocations by hand are now things I can do without searching for them.

Was it worth it?

Absolutely. Flare-On is slow in a good way. You can’t skip to the challenges you like, so you end up spending real time on formats and runtimes you’d normally avoid. I would never have opened a Crystal Mach-O or a garbled Go wasm module on my own, and now I’ve done both.

It’s also just funny. Harry Potter spells in GhostStream, pirate cats in catthief, a Rick roll in FlareCalc, the lab-experiment story running through every description, and decoy flags with f1are or no-flare.com waiting for anyone who submits too fast. My favourite moments were the ones where a decoy almost got me and I caught it just in time.

On the practical side, I came away with a pile of scripts I’ll use again: a modified SHA-256 model, a ZIP unreducer, a Unicorn state machine walker and a binaryen tracing harness for Go wasm. If you’re thinking about playing next year, do it. Even if you only get through the first few, you’ll learn a lot. See you at Flare-On 14.