d4rk{1t5_n0t_r8b?}
A 500-point forensics challenge: a 122 MB PDF whose weight hides a byte-shifted XZ stream, an astronomy FITS file, and a flag drawn into the stars of a single Bayer channel.
Summary
A 5-page PDF weighs 122 MB. The weight is a fake font table inside the embedded
font: an invented GSUX table whose bytes are an xz stream shifted by +3. ROT3
it back, xz -d, and you get a FITS astronomy file. The flag is drawn among the
stars of the science frame, visible only in one Bayer sub-channel once the
quantised background is masked out — added at only +0.005 in the cube-root
domain, well under the 0.03 level spacing, so it is invisible in any normal
stretch of the image.
Challenge author: paramveer504. Description: "Old tongues call picture a
thousand words, Verily this scroll hath few words, yet it groaneth like a cart of
stones" (the scroll "groans" under its weight; "picture a thousand words" points
at the astronomy image).
Solution / Exploit
1. The PDF
paper.pdf is a ReportLab PDF (5 pages) of mock-archaic text listing forensic
techniques and disclaiming each one (kerning, metadata, incremental updates, ICC
profiles, LSB, attachments, JavaScript...). All of that is noise, as are the three
"ciphers" in section VIII:
VGhlIHNjcmliZSBsYXVnaHMgYXQgdGhlZQ==->The scribe laughs at theeQrw khuh, jrrg uhdghu-> ROT3 ->Not here, good reader6e6f7420686572652c206e6f7420796574->not here, not yet
The object layout shows where the size is:
19 0 obj << /Length1 122383664 /Length 122400820 /Filter /FlateDecode >>
Object 19 is the /FontFile2 of the embedded IM_FELL_English_Roman TrueType
font. Four stray bytes follow %%EOF: urw3.
2. The font
Inflating object 19 and reading the TrueType table directory:
GSUX offset 59844 length 122323820
OS/2, cmap, glyf, head, hhea, hmtx, loca, maxp, name, post (normal sizes)
GSUX is not a real table (a nod to GSUB). It starts:
00 3a 7d 5b 5d 03 03 07 ...
The xz magic is fd 37 7a 58 5a 00 00 04; every byte here is that plus 3. The
ROT3 cipher in the text hints at the shift, and the trailing urw3 is rot0
under the same shift.
1d = open('gsux.bin','rb').read()
2open('g.xz','wb').write(d.translate(bytes((i-3) % 256 for i in range(256))))
xz -d gives a 614,520,000-byte file.
3. The FITS file
| HDU | Name | Contents |
|---|---|---|
| 0 | primary | OBJECT = 'Lighthouse Nebula', TELESCOP = 'd4rk-scope' |
| 1 | PREVIEW |
1024x256 float32 image |
| 2 | SCI |
16512x9288 float32, BAYERPAT = 'GRBG' |
| 3 | LOG |
table: debias ok, flatfield ok, stack ok, calibrate skipped |
Two decoys:
PREVIEWrendersd4rk{n1c3_try_but_n0}.SCIhasCOMMENT ZDRya3tuMWMzX3RyeV9idXRfbjB9, base64 for the same string.
4. The science frame
Viewed whole, SCI is featureless noise. Splitting it into the four 2x2 Bayer
positions:
- Position (0,0) has mean ~1.77; the other three sit near 0.
- The other three contain only a few dozen distinct values each, with no outliers anywhere.
- Position (0,0) contains exactly 13 background levels,
(1.02 + 0.03k)^3for k = 0..12, each about 2.9 million times, plus about 33,000 pixels that are on none of those levels.
Masking out the 13 levels leaves only the off-level pixels:
1m = np.memmap('g.out', '>f4', 'r', offset=1056960+2880, shape=(9288,16512))
2c = np.asarray(m[0::2, 0::2])
3u, inv, n = np.unique(c, return_inverse=True, return_counts=True)
4rare = (n < 1000)[inv].reshape(c.shape)
The result is about 1,500 small star blobs (4-5 px square) and one line of text at roughly x 6100-6430, y 3000-3035 of the half-resolution channel:
d4rk{1t5_n0t_r8b?}
The text is added at only +0.005 in the cube-root domain, well under the 0.03
level spacing, so it is invisible in any normal stretch of the image.
Flag(s)
d4rk{1t5_n0t_r8b?}
Decoy flag. d4rk{n1c3_try_but_n0} is planted twice — once rendered in the
PREVIEW HDU and once as a base64 COMMENT in SCI — and is not the answer. The
genuine flag is the one drawn in the SCI Bayer (0,0) sub-channel:
d4rk{1t5_n0t_r8b?} ("it's not RGB" — the science frame is a single-channel
Bayer mosaic, not RGB).
Notes / Pitfalls
- The PDF text is a wall of decoys. Every technique the scroll "disclaims" (kerning, metadata, ICC, LSB, attachments, JavaScript) is a red herring, as are the three section-VIII ciphers.
- The size is in the font, not the pages. Object 19 is the
FontFile2; the fakeGSUXtable is 122 MB of the 122 MB file. - Shift is +3, not a XOR/magic patch.
urw3->rot0is the tell; the ROT3 in the text hints at it. - The other three Bayer channels are filler. They were checked for local statistical anomalies and found to be uniform random. The star positions are filler too — only the text line matters.
- The text is sub-quantisation.
+0.005in the cube-root domain vs0.03level spacing; without masking the 13 background levels it is invisible.
Provenance / what is and is not verified
- The challenge handout is served from a login-gated Dropbox share link
(
https://www.dropbox.com/scl/fi/k5h6tz3gwlppbadc7r7pa/paper.pdf). The analysis above is based on the local copydl/paper.pdfin this bundle — verified to be a real ReportLab PDF, 5 pages,File size: 122413927 bytes, with the trailingurw3bytes after%%EOFconfirmed directly from the file. The full mechanism (font table, xz shift, FITS HDUs, Bayer masking) is as recorded in the source writeup. - Not independently re-verified here: the FITS pixel extraction and the
13-level masking output. The source writeup records the run and the resulting
flag, but the intermediate FITS/
g.outartifacts are not preserved in this bundle (dl/contains onlypaper.pdf), so those steps are recorded from the source notes rather than reproduced from kept artifacts. - Tools used (per the source):
pdfinfo,binwalk,xz, Python with numpy/scipy/Pillow.