Gen-Z Found My Registry
Gen-Z Found My Registry
Platform: metactf | Category: Forensics | Type: Challenge | Difficulty: Easy | OS: Windows | Author: XESXOR | Date: 2026-04-10 | Status: Solved Techniques: alternating_ascii_shift_decoding, hidden_value_extraction, registry_service_triage
Summary
Task: inspect a Windows Services registry export containing rogue persistence entries and hidden one-character values scattered across legitimate keys. Solution: collect the numbered characters, then decode them with the position-based +7/-6 ASCII shifts hinted by the malicious +7 and -6 services to recover the flag.
Gen-Z Found My Registry — metactf
Description
No separate organizer description was provided with the artifact beyond the registry export
chal.reg.
English summary: the challenge provides a Windows registry export for the Services hive. The goal is to identify the malicious persistence entries, recover the hidden payload spread across legitimate service keys, and decode it into the flag.
Analysis
Artifact triage shows that chal.reg is a UTF-16 Windows Registry export of HKLM\SYSTEM\CurrentControlSet\Services. Most of the file contains normal service definitions, but three added services stand out immediately as malicious persistence:
HKLM\SYSTEM\CurrentControlSet\Services\+7ImagePath = cmd.exe /c start cmdObjectName = LocalSystemParameters\evens = ""
HKLM\SYSTEM\CurrentControlSet\Services\-6ImagePath = cmd.exe /c start cmdObjectName = LocalSystemParameters\odds = ""
HKLM\SYSTEM\CurrentControlSet\Services\MALWARESVCImagePath = cmd /c start cmd.exeObjectName = LocalSystem
The ImagePath values clearly launch a command shell as LocalSystem, so these keys are suspicious on persistence grounds alone. The more important clue is the naming and parameter scheme of +7 and -6: they strongly suggest a decoding rule based on position parity.
The registry also contains hidden numbered single-character string values inserted into legitimate service keys. Ordered by number, the payload is:
text read-only • copy allowed1=J, 2=Z, 3=}, 4=`, 5=I, 6=M, 7=L, 8=t, 9=w, 10=n, 11=9, 12=,, 13=t, 14=X, 15=6, 16=_, 17=e, 18=m, 19=n, 20=,, 21=e, 22=a, 23=7, 24=o, 25=9, 26=v
Exact locations of the hidden values:
WinRM = JBALLOON = ZGoogleChromeElevationService = }- `EhStorTcgDrv = ``
DeviceAssociationService = IFileCrypt = MCmBatt = LLicenseManager = tbowser = wadsi = napplockerfltr = 9CompositeBus = ,UGatherer = tDsRoleSvc = XSynth3dVsc = 6LanmanServer = _Ramdisk = eMsRPC = mPimIndexMaintenanceSvc_7ad40 = npercsas3i = ,mshidumdf = ePhoneSvc = aKPSSVC = 7ql2300i = ohvservice = 9Winsock = v
Concatenating those characters gives the encoded string:
text read-only • copy allowedJZ}`IMLtwn9,tX6_emn,ea7o9v
The malicious services provide the decode logic:
+7withParameters\evensmeans apply ASCII+7to even positions.-6withParameters\oddsmeans apply ASCII-6to odd positions.
Applying that alternating rule to the 26-character payload yields the flag.
Solution
- Confirm that
chal.regis a UTF-16 export ofHKLM\SYSTEM\CurrentControlSet\Services. - Triage service entries and identify the obviously malicious additions
+7,-6, andMALWARESVCbecause they launchcmdasLocalSystem. - Notice that
+7referencesevensand-6referencesodds, which suggests a parity-based transform rather than just persistence. - Extract the hidden numbered single-character values scattered across legitimate service keys and sort them from
1through26. - Join the characters into
JZ}\IMLtwn9,tX6_emn,ea7o9v`. - Decode odd positions with ASCII
-6and even positions with ASCII+7. - Read the recovered plaintext flag.
Full working solve script:
python read-only • copy allowed#!/usr/bin/env python3 payload = { 1: "J", 2: "Z", 3: "}", 4: "`", 5: "I", 6: "M", 7: "L", 8: "t", 9: "w", 10: "n", 11: "9", 12: ",", 13: "t", 14: "X", 15: "6", 16: "_", 17: "e", 18: "m", 19: "n", 20: ",", 21: "e", 22: "a", 23: "7", 24: "o", 25: "9", 26: "v", } encoded = "".join(payload[i] for i in range(1, 27)) decoded = [] for pos, ch in enumerate(encoded, start=1): code = ord(ch) if pos % 2 == 0: decoded.append(chr(code + 7)) else: decoded.append(chr(code - 6)) flag = "".join(decoded) print(encoded) print(flag)
Expected output:
text read-only • copy allowedJZ}`IMLtwn9,tX6_emn,ea7o9v DawgCTF{REDACTED}