CTF Writeup 250 pts

Prehistoric Tree

Recovering a tree species and concealed coordinates from JPEG metadata, then matching the photographed landscape in Google Street View to identify the exact road.

Suraj Vishwanath
4 min read

Introduction

Prehistoric Tree was a medium-difficulty challenge by Rebel🦖, worth 250 points. The attachment, tree.jpeg, showed trees growing in a dry, rocky landscape.
The description highlighted a resilient plant with silvery-green foliage and asked for its scientific identity and location:
BREACH{Tree_name_Location_Latitude_Longitude}
The solution combined metadata analysis with a visual match in Google Street View.

Initial Reconnaissance

The landscape provided a broad environmental clue, but identifying an exact species and road from appearance alone would be unreliable. The first useful step was examining the original JPEG's embedded metadata.
JPEG Metadata Inspection
$exiftool -a -u -G1 'tree(1).jpeg'
The relevant findings were:
Metadata fieldRecovered valueSignificance
ArtistAcacia aneuraScientific name of the tree
XMP descriptionAustraliaGeographic context
XResolution20573568Encoded latitude magnitude
YResolution143654870Encoded longitude
Commentjust go in the street view to see the treeExplicit instruction to verify the scene
Metadata Over Visual Guessing
The attachment explicitly supplied the species and country. These clues provided a stronger starting point than identifying the tree from foliage alone.

Vulnerability Analysis

This challenge involved deliberate information concealment rather than a software vulnerability. The author placed geographic clues in fields normally used to describe image resolution.
The unusually large resolution values were the key anomaly:
text
XResolution = 20573568
YResolution = 143654870
Interpreting both integers as coordinates scaled by one million produced:
text
20573568  / 1000000 = 20.573568
143654870 / 1000000 = 143.654870
The latitude required an additional interpretation. The metadata named Australia, so the latitude magnitude was assigned a negative sign:
text
Latitude:  -20.573568
Longitude: 143.654870
Coordinate Interpretation
The minus sign was inferred from the Australian location; it was not stored in the resolution value. The scaling and hemisphere interpretation needed confirmation against the actual photographed scene.

Exploitation / Solver

Reconstructing the coordinates

The following script reproduces the coordinate-decoding step using the recovered metadata values. It generates a map link for inspection; identifying the road still requires checking Street View.
python
#!/usr/bin/env python3
"""
Prehistoric Tree — coordinate reconstruction
Author: Suraj Vishwanath

Uses the metadata values recovered from tree(1).jpeg.
"""

from decimal import Decimal
from urllib.parse import urlencode


def main():
    species = "Acacia aneura"
    country = "Australia"

    # Resolution fields contain coordinate magnitudes scaled by 10^6.
    x_resolution = Decimal("20573568")
    y_resolution = Decimal("143654870")
    scale = Decimal("1000000")

    # Southern latitude is inferred from the Australian context.
    latitude = -(x_resolution / scale)
    longitude = y_resolution / scale

    latitude_text = f"{latitude:.6f}"
    longitude_text = f"{longitude:.6f}"

    query = urlencode({
        "api": "1",
        "query": f"{latitude_text},{longitude_text}",
    })

    print(f"Species: {species}")
    print(f"Country: {country}")
    print(f"Coordinates: {latitude_text}, {longitude_text}")
    print(f"Map: https://www.google.com/maps/search/?{query}")


if __name__ == "__main__":
    main()

Matching the scene in Street View

The decoded coordinates led to Riverside Poseidon Rd, Dutton River, Queensland.
Following the embedded comment, the next step was to inspect nearby Street View imagery. The matching panorama showed the silvery tree and curved cluster of rocks visible in the challenge image.
Google mapOpen source
This visual comparison connected the metadata-derived coordinates to the photographed landscape.

Selecting the location field

The species and coordinates were only part of the answer. The accepted flag used the road label, Riverside Poseidon Rd, as its location field.
Earlier candidates using Australia or Dutton_River were rejected. The successful submission retained the road label and replaced spaces with underscores.
Evidence Chain
The Artist field supplied the species, the resolution fields supplied the coordinate magnitudes, and Street View confirmed the scene and road label. The resulting flag was confirmed accepted.

Solution & Flag Capture

The recovered components were:
Flag componentValue
Tree nameAcacia_aneura
LocationRiverside_Poseidon_Rd
Latitude-20.573568
Longitude143.654870
BREACH{•••••••••••••••••••••••••••••••••••••••••••••••••••••••••}
Login