0x400589 - the access routine: out8 = access(in16, key8).
Loads 4 dwords a,b,c,d from in16 and 2 dwords e,f from key8, then
12 rounds:output
a = rol32(a + e, 7)
b = rol32(b ^ a, 11)
c = rol32(c + b + f, 17)
d = rol32(d ^ c, 19)
e = (e + d + i*0x9e3779b9) & 0xffffffff
f = rol32(f ^ a, 13)
(a,b,c,d) = (b,c,d,a)
output = (a^c, b^d) packed LE = 8 bytes.
main (0x4006f8) calls access(KBUF, FIXVEC[:8]) where FIXVEC is the 16-byte
.rodata value at 0x401280 = 4753432d37000123011b033b54000000 (the "fixed
internal vector"), and prints the first 4 output bytes as image-sig. Our
reconstruction reproduces de8c1297 exactly - the constant-verified anchor.
Live auth: the session NONCE is 8 bytes (16 hex). The access routine takes a
16-byte vector plus an 8-byte key - the nonce is the key, and the built-in
vector KBUF is the input. So:
After the edit arm_will_restore=1: the watchdog (trigger=runtest,
action=restore_backup) would revert the live program from the backup slot at
arm because the live checksum no longer matched trusted_checksum. Neutralise it
the clean way - promote the corrected program to the trusted backup:
output
BACKUP SAVE -> trusted_checksum=9ebaae207f06
BACKUP STATUS -> live=backup=trusted=9ebaae207f06 arm_will_restore=0
(Disabling the watchdog with WDOG SET enabled=0 also works, but leaves the
integrity model broken; BACKUP SAVE keeps the watchdog enabled and correct.)
Instance was reached over TLS with SNI (the platform's instancer terminates TLS):
socat TCP-LISTEN:7603,reuseaddr,fork OPENSSL-CONNECT:<HOST>:<PORT>,snihost=<HOST>
or plain ssl with server_hostname=<HOST> (used here).