Trapped S0n1c seed derived from scene physics, not player input

rev
flag L3m0n{sp1n_d4sh_thr0ugh_th3_b00l34n}

A Unity IL2CPP build about Sonic standing on a pressure pad while a wall opens, then closes behind him once he steps off, with the goal of getting him to the other side.

Pitfall

The first handout given out was the wrong game entirely: a Flappy Bird clone called "Over-Flapped" with none of the described mechanics. global-metadata.dat had no wall, door, pad, or player-movement classes

  • only Score, Pipe, LoopGround. Two encrypted strings in that build did decode to flag-shaped text (L3m0n{0v3rfl0w_1s_c00l_but_n0t_h3r3} and L3m0n{th1s_b1rd_c4nt_c0unt}), and a third sat in plain text in a score-canvas text object (L3m0n{h44_y0u_ch3ck3d_th3_str1ngs}) - all three in-fiction taunts, all three submitted and rejected. The decryption routine, keystream, and seed derivation were all fully recovered and verified byte-exact against both ciphertexts; the strings themselves were simply never the flag. Exhaustive inventory of the build (every scene, sprite, asset, and authored string) confirmed there was nothing else to find - the attached handout was the wrong build, not a missed trick. The organizers re-uploaded the correct one as v2/trapped_sonic_v2.zip, password L3m0np455.

A frame assembled from the wrong handout's own sprites: a Flappy Bird clone with a yellow bird between green pipes

Not the challenge: the sprites shipped in the first, wrong build (Over-Flapped), recomposed from its extracted textures.

Dumping the real build

Unity 6000.5.10f1 IL2CPP, metadata version 107 - new enough that the stock Il2CppDumper rejects it outright; a newer fork (AndnixSH's, targeting .NET 10) dumps it cleanly.

The real game classes show up immediately: PlayerMovement, WallMover (shouldMove bool, TriggerMove/ResetMove), Collection (the pressure pad - OnTriggerEnter calls TriggerMove, OnTriggerExit calls ResetMove), and PassTrigger (the far side of the wall, which decodes EncodedFlag into the on-screen text the moment Sonic reaches it).

The decode routine

output
A = RoundToInt(_speed   * 100)
B = RoundToInt(_slope   * 100)
C = RoundToInt(_collect * 100)

e    = C ^ (A * 0x0466F45D)
b    = B * 0x0127409F
seed = (e == b) ? 0x9E3779B9 : (e ^ b)

# per byte: xorshift32 (x<<13, x>>17, x<<5), output = (state & 0xff) ^ enc[i]

Insight

The seed depends on three scene-tuned float values - _speed, _slope, _collect - baked into the PassTrigger MonoBehaviour in the level scene, not into any code path a player's input can change. Reading them straight out of the serialized scene data (_speed=14, _slope=11, _collect=23) gives seed = 0xE7A1FF50 directly, with no need to run the game or guess the inputs at all.

With that seed, the 36-byte ciphertext sitting in global-metadata.dat decrypts to:

output
L3m0n{sp1n_d4sh_thr0ugh_th3_b00l34n}

Note

The level also carries a plaintext decoy TMP text object reading L3m0n{d1d_y0u_r34lly_th1nk_1t_w4s_th4t_s1mpl3} - flag-shaped, sitting in plain sight, and not the answer. By this point in the challenge that's basically the house style: assume any un-encrypted flag-looking string sitting loose in a scene is bait until the actual decode routine confirms otherwise.