pool party: a jar with its config in the constant pool

huntress ctf 2026, day 6 · binary reverse engineering · all three modes

tools used: binary-analysis toolkit and timed-attempt pipeline.

the cumulative bundle gained a d06- member that was not a native binary at all: d06--variant-000.jar, a java archive. it carried the same HCFG configuration blob as the day-2, day-4 and day-5 samples, stored as one base64 string constant inside the loader class.

the key insight: the "pool" is the class file's constant pool. every string literal of a java class lives there as a length-prefixed utf-8 entry, so the blob can be recovered by parsing the pool, decoding the base64 constants, and handing the bytes to the existing, validated HCFG decoder. no jvm and no decompiler are needed.

challenge shape

48 fields per set: the inherited d01_-d05_ fields plus eight d06_ ones. seven reused earlier names (the artifact's sha-256, format, and the decoded campaign, domain, url, mutex and crc). one was new: hcfg_version, the version byte of the blob header.

artifact anatomy

d06-<variant>.jar
├── META-INF/MANIFEST.MF     Main-Class: <loader>
├── <loader>.class           a config method: Base64.getDecoder().decode(<constant>)
└── <loader>$<record>.class  a record

both class files are major version 65 (java 21).

a class file starts with CA FE BA BE, two version shorts, then the constant pool: a count, then entries tagged by their first byte. strings are tag 1 (a two-byte length and that many bytes). every other tag has a fixed size, except that long and double entries take two pool slots.

the base64 text decodes to the familiar blob: HCFG, a version byte, a single-byte xor key, a little-endian length, a crc32 of the plaintext, then the xor'd json. the json carried more keys than were graded (host model, ipv4, service, windows and linux paths); the graded ones were campaign, domain, url and mutex.

extraction method

def utf8_constants(cls: bytes) -> list[bytes]:
    (count,) = struct.unpack_from(">H", cls, 8)
    out, i, k = [], 10, 1
    while k < count:
        tag = cls[i]
        if tag == 1:                                   # CONSTANT_Utf8
            (n,) = struct.unpack_from(">H", cls, i + 1)
            out.append(cls[i + 3 : i + 3 + n])
            i += 3 + n
        else:
            i += 1 + CP_SIZES[tag]                     # fixed-size entries
        k += 2 if tag in (5, 6) else 1                 # long/double: two slots
    return out

every utf-8 constant is scanned for base64 runs of 16 or more characters, each run is decoded, and the decoded bytes are concatenated with the jar's members into one buffer. the HCFG decoder then searches that buffer.

by hand, base64 of anything that starts with HCFG starts with SENGR, so one pipeline finds the constant (the jar inside the bundle is a plain, unencrypted zip):

unzip -p d06--variant-000.jar '*.class' | strings -n 16 \
  | grep -o 'SENGR[A-Za-z0-9+/=]*' | base64 -d > blob.bin

blob.bin then goes through the same header parse as day 2 (version at +4, key at +5, length and crc32 at +6, xor'd json from +12).

validation and answer formatting

the HCFG decoder accepts a candidate only when its bounds, its crc32 over the plaintext and its json all check out, so decoy strings that happen to contain HCFG lose. the jar's other base64-looking constants decode to noise and are ignored for the same reason.

format is jar. hcfg_version is the blob's version byte as a decimal integer; the question's kind was integer ("base-10 integer with no units, separators, or explanatory text"). the crc and key keep the lowercase 0x hex of earlier days, the mutex keeps its single backslash, and the sha-256 field hashes the jar's own bytes, not a class inside it.

failed approaches and pivots

the dispatcher groups bundle members by their dNN- tag and skips archives, because earlier days used zips only as containers. a jar is a zip, so the d06 tag ended up with no members at all, and every d06_ field failed with a missing-tag error. the race-time fix was a jar path inside the day's solver. on day 6 it then moved into the toolkit: a member that is a jar (a zip with a manifest or class files) is kept as the tag's member, the format producer answers jar, and the config producer reads the jar through the constant-pool expansion.

on the same day the fix was generalised beyond jars. a zip-based file is evidence when it is a member, and a container only when it is the delivered bundle itself:

automation across modes

the cumulative dispatcher answers every dNN_ field from that tag's main member through the producer registry, now "first elf or pe, else jar". with the jar path in the toolkit, the day-6 solver is the same few lines as day 5's, and day 1-6 fixtures all replay through it.

lessons

solve times

public scoreboard · day 6 finish: 1st

  • 1:40.9singlefirst blood, +11.1 s
  • 1:43.3time trialfirst blood, +28.0 s
  • 1:45.7masteryfirst blood, +39.0 s
  • #1team day finishof 182 teams that cleared it, in 1:45.7
  • #5single orderof the day's 5, 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 1m40s 2 0
time trial 3s 1 0
mastery 2s 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 7.0s 1.0s 6.0s
mastery 7.0s 1.1s 5.9s

where we got stuck

flags: single, time trial, and mastery [redacted].

{generated by a clanker}