integrity signals: a statement bound to nothing, inside a computed code
huntress ctf 2026, day 25 · mobile android · all three modes
tools used: android apk toolkit and timed-attempt pipeline.
"forge or replay a bounded challenge-owned integrity statement and explain the missing binding." the single was a puzzle of the oldest kind: data and a codec in the apk's assets that decode to the backend answer code, ANS- and sixteen uppercase hex digits. the time trial and every mastery apk were day 23's kind: a puzzle file that names the codec analysis and carries no data, because the app's own code computes the code. day 25 put an "integrity statement" into that computation.
the key insight: the statement is the xor of two numbers the code derives from its own constants. it is bound to nothing outside the method: not the case id, not a nonce, not a key, not a reading of the device. that is the missing binding the prompt asks about, and it is also why there is nothing to forge: interpreting the method that builds the ANS- string computes the statement exactly as the app would.
challenge shape
single 1 field the answer code of a schema v1 puzzle (codec hex)
time trial 1 field the answer code of a schema v2 puzzle (codec
"analysis", no data, no key)
mastery 9 fields one code per apk, nine computed-code apks
artifact anatomy
the single's apk holds a manifest, a classes.dex of 2.6 kilobytes, a signature and assets/huntress_puzzle.json: schema v1, day 25, the codec named hex and forty hex digits of data. forty hex digits are twenty bytes, exactly the length of an answer code, and decoding them is the whole puzzle.
the time-trial apk is the computed kind: a manifest, a classes.dex of about 5.3 kib, a signature, and a puzzle file holding only the schema, the day, the codec name and a build id. the dex has eight classes in the case's package, and a static method takes a Context and returns the code as a string. its call graph, reconstructed from the bytecode (each helper's name carries a short suffix that changes from build to build; the suffixes are left out here):
Release.code(ctx) "ANS-" + 16 hex nibbles of
VerdictMap.finSeal(Mix.f1(Release.token())) ^ K
Release.token() VerdictMap.mixIntegrity(
Util.scanStatement(Util.mixCert(C)))
Util.scanStatement(x) a = Probe.s2(four int constants)
b = Probe.s2(four other int constants)
s = IntegritySignals.integrityStatement(a, b)
folds a, b and s into x with 64-bit multiplies,
xors and shifts
Probe.s2(p, q, r, t) the i in 0..4095 where ((i ^ r) * p + q) & 0xfff
equals t, or -1
IntegritySignals (long) b ^ a
.integrityStatement(a, b)
Mix, VerdictMap, Util 64-bit add, xor, multiply and rotate by constants
the integrity statement is one instruction of real work, an xor-long. its two inputs are the results of the probe searches, and the probe arguments are integer constants in the method's own code. nothing in the chain reads a build property, a signature, the case id in the question or anything the backend could have sent. three more helpers of the same shape (two seal functions in Util and one in VerdictMap) and a proof method beside code are never called from the answer method, so only the call graph tells them apart from the live ones.
extraction method
for the single, the apk toolkit reads the puzzle file, looks up its codec and decodes the data: hex to bytes, bytes to ascii, which by hand is bytes.fromhex(puzzle["data"]).decode().
for the computed apks, the dalvik interpreter we wrote for day 23 runs the bytecode: a register file per call, wide values in register pairs, java's 64-bit wraparound and unsigned-shift semantics, and python stand-ins for the few library calls the code makes (StringBuilder, String.charAt). it lists every method in the question's package whose code loads the ANS- string, runs each and keeps the results that have the answer's shape:
def answer_codes(apk, package):
vm = Vm.of(app(apk), package)
found = []
for method, called in vm.answer_methods(): # called-by-others first
vm.reset()
out = vm.run(method)
if isinstance(out, str) and ANSWER.fullmatch(out) and out not in found:
found.append(out)
return found
the last loop of Release.code is worth reading once, because it fixes the answer's shape in code: a shift counter starts at 60 and steps down by 4, and each step appends "0123456789ABCDEF".charAt((v >>> shift) & 15). the code is always sixteen uppercase nibbles of one 64-bit value, most significant first.
def nibbles(v: int) -> str:
return "".join("0123456789ABCDEF"[(v >> s) & 15] for s in range(60, -4, -4))
on the time-trial apk Release.code was the only candidate, and the whole solve took about 12 milliseconds.
validation and answer formatting
the result must match the question's own pattern (ANS- and exactly sixteen uppercase hex digits). for the computed apks the string is the one the app builds, so its case and length come from the code, not from us; for the single, the decoded bytes must already have that shape, and they are submitted as decoded, ANS-1333EAAB62D23DAB.
failed approaches and pivots
none on day 25.
automation across modes
the mastery's nine apks were all computed-code puzzles, labelled with days of the event from 2 to 25. their call graphs differ: the day-25 one calls two probe functions instead of one and puts its final step in a different class, and the one labelled day 20 loads a second dex from assets/payload.dex through an in-memory class loader, which the interpreter has handled since day 23. the nine together took about 0.1 seconds.
lessons
- a statement that binds to nothing but the program's own constants is not a secret; emulating the program reproduces it, and that is the missing binding in one sentence.
- read the method that formats the answer: its loop states the answer's width, alphabet and case more reliably than the question text.
solve times
public scoreboard · day 25 finish: below top 10
- 0:03.3single#4 of 154 solvers
- 0:05.3time trial#3 of 151 solvers
- 0:07.9mastery#2 of 149 solvers
- #11team day finishof 138 teams that cleared it, in 6:15.3
- #2single orderof the day's 8, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from when we started working on the mode to its flag.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 0.7s | 1 | 0 |
| time trial | 0.5s | 1 | 0 |
| mastery | 0.8s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 50.0s | 0.5s | 49.5s |
| mastery | 290.0s | 0.8s | 289.2s |
where we got stuck
- nowhere on day 25: the single's codec was one of the first we wrote, and the interpreter written for day 23's computed codes read the integrity statement as one more xor.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}