Overview
The challenge delivers a PDF document with black boxes redactions overlaying crucial text (redacted emails). Copy-pasting text from the PDF returns empty space, indicating custom font maps or outlines.
Reconnaissance
Examining the PDF file structure in raw byte form reveals two %%EOF markers. This means it was incrementally modified. The original PDF holds vector paths for font glyphs, and the update section overlays annotation objects (black rectangles) on top of the graphics.
Exploitation Strategy
Since the black boxes are just layers added inside page /Annots array references in the incremental update stream, we can remove the annotations reference programmatically. This restores the visibility of the underlying vector outlines.
Solution Code
with open('emails.pdf', 'rb') as f:
data = f.read()
import re
eof1 = 691507
original = data[:eof1 + 5]
appended = data[eof1 + 5:]
modified = re.sub(b'/Annots\\[[^\\]]*\\]', b'', appended)
with open('no_redaction.pdf', 'wb') as f:
f.write(original + modified)Flag
Kaal{l3dg3r_acc3$$_granted_m2}