// Enhance!
Forensics · Medium · CyLab Security Academy (picoCTF 2022)
// Summary
An image of a donut is given with the instruction to "enhance" it. Most images are a grid of coloured dots, but this one is an SVG1, which is a text file describing shapes for the computer to draw. The flag is written in that text, but set to be drawn microscopically small, white on a white shape, and split into pieces. Opening the file as text instead of as a picture shows the pieces, and joining them gives the flag. Comparable to a blueprint whose drawing hides a message that is plainly written in the blueprint's notes.
// Objective
Given: an .svg image of a donut, with the instruction to "enhance" it.
Asked: the flag, format academy{...}.
Type: implied.
// Recon
Check the file type — .svg, a vector2 format. SVG is XML3 text that describes shapes.Ctrl+U / open in a text editor — <text>4 element holding several <tspan> tags.
Read the <tspan> attributes — Font size 0.00352781px; fill5 #ffffff on a white shape; flag text split across separate tags with spaces.
// Deduction
- SVG is text, not pixels → zooming adds nothing → read the source.
- The text is near zero size and white on white → it exists in the file but is invisible when rendered.
- Searching for the flag format finds nothing → the string is split → join the
<tspan>contents in order.
// Solve
- Open the
.svgsource (Ctrl+U, orcat <file>.svg). - Copy the contents of each
<tspan>in document order, or select all on the rendered page and paste into a text editor (hidden SVG text is still selectable). - Remove the spaces between pieces.
Result: the flag.
// Answer
Plain: the flag is a line of text stored inside the image file that is never visibly drawn. It is too small and the same colour as its background.
Technical: the flag is the concatenated text content of the <tspan> children of a <text> element, rendered at 0.00352781px with fill:#ffffff. Splitting it across <tspan> elements defeats a search for the flag format.
// Dead ends
Zooming the image — The text is effectively zero-sized. Zooming does not reach it.
// Root cause
Skill tested: inspecting a file's real format instead of how it renders. Data hidden by size, colour, and splitting.
Real-world use: forensic6 investigators read documents and images as raw data to find content hidden from normal viewing, such as white text or leftover metadata.
// Transfer
- Image challenge → check the format first. Vector (SVG) = read it as text. Raster (PNG/JPG) =
exiftool,strings,binwalk. - Searching for the flag format finds nothing → the string may be split or encoded. Read the structure.
// Index
- 1SVGScalable Vector Graphics: an image stored as text instructions for drawing shapes and text.
- 2Vector vs rasterVector images are drawing instructions; raster images (PNG, JPG) are grids of coloured dots (pixels).
- 3XMLA text format that marks up content with tags like
<text>...</text>. SVG is written in it. - 4
<text>,<tspan>SVG tags for drawn text;<tspan>holds one piece of a line of text. - 5Fill
#ffffffThe colour used to draw a shape or text.#ffffffis white. - 6ForensicsRecovering and examining data from files or devices.