C:\Seyi\Portfolio\writeups\enhance_ Y:0000PX
...\writeups\enhance Y:0000PX

< back to write-ups

CTF // MEDIUM enhance.md

// 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 , 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 format. SVG is text that describes shapes.
Ctrl+U / open in a text editor — element holding several <tspan> tags.
Read the <tspan> attributes — Font size 0.00352781px; #ffffff on a white shape; flag text split across separate tags with spaces.

// Deduction

  1. SVG is text, not pixels → zooming adds nothing → read the source.
  2. The text is near zero size and white on white → it exists in the file but is invisible when rendered.
  3. Searching for the flag format finds nothing → the string is split → join the <tspan> contents in order.

// Solve

  1. Open the .svg source (Ctrl+U, or cat <file>.svg).
  2. 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).
  3. 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: 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

  1. 1SVGScalable Vector Graphics: an image stored as text instructions for drawing shapes and text.
  2. 2Vector vs rasterVector images are drawing instructions; raster images (PNG, JPG) are grids of coloured dots (pixels).
  3. 3XMLA text format that marks up content with tags like <text>...</text>. SVG is written in it.
  4. 4<text>, <tspan>SVG tags for drawn text; <tspan> holds one piece of a line of text.
  5. 5Fill #ffffffThe colour used to draw a shape or text. #ffffff is white.
  6. 6ForensicsRecovering and examining data from files or devices.