WORD.EXE USB HID report diff reveals a cheat's keystrokes

forensics
flag L3m0n{jus7_g4mesens3_br0}

Two packet captures of the same LAN match: one billed as the official server-side reference recording, the other pulled from a player's machine that anti-cheat flagged. Both carry Ethernet and a USBPcap device capture - and the closing line of the brief is the actual hint: "the peripherals have a story of their own." Peripherals in a packet capture means USB, not TCP.

output
$ capinfos -M forsaken_pc.pcapng
Encapsulation in use by packets (# of pkts):
                     Ethernet (1779)
                     USB packets with USBPcap header (3540)
Hint

Two captures of the same keyboard session, byte-identical except for a handful of reports. What would you do with a keyboard if you wanted to hide a message, but only in the frames that differ?

Detour: the Ethernet side is a labeled decoy

The Ethernet traffic is a hand-rolled LAN cup: fake HTTP, Source-engine UDP game traffic, high entropy, nothing readable. One of the three HTTP streams in the player's capture hands over a flag-shaped string immediately:

output
POST /report HTTP/1.1
cmd=flag&data=TDNtMG57bjB0X3RoM19mbDRnX2gzcjN9

Pitfall

That base64-decodes to L3m0n{n0t_th3_fl4g_h3r3} - a flag that explicitly denies being the flag. A challenge that puts an answer in the very first HTTP body it shows you is either trivial or telling you to look elsewhere, and the string itself tells you which. The other requests (GET /cfg/autoexec.cfg, a /cheat/ping POST reading w0rd.exe was never here) are pure flavor text - and the title's source.

Getting the HID reports out by hand

usb.capdata returns nothing in tshark on these files - the interrupt URBs never reach the usbhid dissector, they stay opaque payload. Rather than fight the dissector, parsing the pcapng format directly is about 60 lines of stdlib Python: an IDB block per interface, EPB blocks carrying packet bytes, and each USB packet prefixed with a fixed 28-byte USBPcap header before the actual URB data.

Two devices show up on bus 1 in both files, with report descriptors included in the capture (so there's no guessing the layout):

output
dev 3  04d9:0169  keyboard  EP 0x81  interrupt IN   1216 reports
dev 4  046d:c077  mouse     EP 0x82  interrupt IN   2300 reports (1900 in the other file)

The keyboard descriptor is boot-keyboard shaped: modifier byte, a reserved byte (always zero), then six usage bytes for pressed keys.

Note

The mouse doesn't line up between the two captures at all - different report counts, no timestamps within half a millisecond of each other, different total durations. It's a second, independent recording, not part of the hidden channel. It has smooth deltas, regular 8ms polls, and nothing structured in its byte values - it reads as unrelated gameplay filler. Worth ruling out explicitly rather than assuming it must also carry data just because it's also a peripheral.

The keyboard streams are the same session, offset in time

Both captures have exactly 1216 keyboard reports, with timestamps offset by a constant ~2.6 seconds - the same physical typing session, recorded twice, a couple of seconds apart. That makes the two streams directly comparable index by index: 1176 of 1216 reports are byte-identical, and 40 differ.

Insight

Of those 40 mismatches, exactly 25 change byte 2 (the first pressed- key usage), and in every one the player's capture holds a different usage than the reference - mostly values above 0x65, outside the range the device's own report descriptor declares, which is what makes them stand out as tampered rather than genuine keypresses. Subtracting the rewritten usage from the reference usage gives the ASCII code of one flag character:

output
frame 144   player=0x53  reference=0x07   0x53-0x07=0x4c 'L'
frame 218   player=0x3a  reference=0x07   0x3a-0x07=0x33 '3'
frame 294   player=0x87  reference=0x1a   0x87-0x1a=0x6d 'm'
...
frame 1096  player=0x91  reference=0x14   0x91-0x14=0x7d '}'

Reading all 25 in frame order spells L3m0n{jus7_g4mesens3_br0} - leetspeak for "just gamesense bro," a fitting last word from a cheater whose own peripherals caught him.

Pitfall

The remaining 15 of the 40 mismatches never touch byte 2 at all: nine flip bit 1 of the modifier byte (a phantom left shift), six drop 0x80 or 0x55 into the byte that's supposed to always be zero. Their differences are [2, 85, 128] - not printable characters. They're decoration, there specifically so a diff that only ever touched the keycode byte wouldn't look "too tidy to be real." Don't assume every differing byte in a diff carries payload; check which subset actually decodes to something before trusting all of it.

output
L3m0n{jus7_g4mesens3_br0}

Note

Sanity checks worth keeping: diffing either file against itself gives zero differing reports, confirming the 40 mismatches are a property of the pair, not noise amplified from one file. And only the 25 keycode rewrites decode to printable text - the 15 modifier/reserved-byte differences don't, which is exactly what you'd expect if they're filler and the keycode channel is real.