KCTF 第六题 酉时·书院迷局

SkillWeb & browsing

Lets your agent solve KCTF JNI reverse-engineering challenges that split input into even/odd shares with ARX, XOF, S-box, and TEA checks.

Available today. Use it from your connected AI after setup.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the KCTF 第六题 酉时·书院迷局 skill

About this skill

Solve KCTF JNI validators that deinterleave fixed-length input into even/odd shares, combine ARX/XOF constraints, sparse Boolean gates, S-box state machines, and TEA-derived schedules.

What this skill tells your AI

The instructions your AI receives, as published by manyuegong33/r0crawl_skills in skills/kctf-jni-even-odd-xof/SKILL.md and read by ahel’s review.

Workflow

  1. Confirm Java hex input normalization (100 hex chars→50 bytes) and JNI entry; deinterleave with vld2 into even25/odd25.
  2. Recover APK .kctfguard key derivation (CRC + ELF section metadata), then simplify native opaque helpers (XOR/add/sub, inverse MixColumns, low-byte extraction, mix32).
  3. Solve odd channel first: reverse four-round 64-bit ARX/XOF; use output bytes and seed branches to derive initial state words. Encode the 46-bit sparse Boolean gate as local CNF by enumerating each output bit’s 2–5 input support; split cubes and SAT-solve.
  4. Apply cheap padding check by inverting XOF and requiring recovered bytes 25:32 == 5a…5a; this isolates unique odd25 and seed.
  5. Invert even channel’s byte permutation/state chain. Recover S-box seed from self-check bytes and enumerate small config fields.
  6. Brute-force 32-bit TEA schedule seed (LCG 1664525*x+1013904223, 16 rounds) using first known-answer test, then verify two additional KATs. Fold selector to derive final seed.
  7. Reverse even share, verify expected 16-byte block equals odd-generated block, interleave even/odd bytes, hex-encode flag.

Constants from writeup

Native key: 870573e5f5c63d52862dbd05ab3d9494; hidden target first 16 bytes 9f73be24a1dd6c96b90723bba7cdfdc9. Correct branch seed=d7; odd share 7ae31b94d256f80c41b7298e63a5df104bc8723d960fe458ad. Even share a77a78ff6a94367d1b4eb43faa8de2b30400bd533de8553443. Final interleaved flag hex: a77a7ae3781bff946ad2945636f87d0c1b414eb7b4293f8eaa638da5e2dfb310044b00c8bd72533d3d96e80f55e4345843ad.

Validation

Replay original JNI function (or a faithful Python model) and require all initial checks, S-box checks, 3 TEA KATs, sparse gate, and final block comparison to pass.

Signals

GitHub stars
285
Forks
100
Last commit
Sep 2026
Advanced
Catalog kind
skill
Key
kctf-jni-even-odd-xof
Source
github.com/manyuegong33/r0crawl_skills