Skip to content
Pwnversity
RECON-METADATOSbasic · 4 min · upd. 2026-10

Document Metadata

The documents an organization publishes (PDFs, Word, Excel, PowerPoint, images) carry hidden metadata: who created them, with what software, on which machine, sometimes internal paths, usernames, printers, and even GPS coordinates in photos. Collecting a company’s public documents and extracting their metadata reveals internal users, naming conventions, software in use, and network structure —all useful for the attack phase.

Each field is a clue about the inside of the organization:

  • Author / last editor → internal usernames (jdoe, a.perez).
  • Software and version → which office suite and OS they use (concrete vectors and exploits).
  • Machine name → internal hostname convention.
  • File paths → folder structure and network drives.
  • Printers / servers → internal infrastructure.
  • Dates → activity and reused templates.
  • GPS (EXIF in photos) → physical locations.

The extracted usernames directly feed password spraying (see Password Spraying), phishing, and email enumeration.

The first step is to locate and download the public documents, usually via file-type dorking with site:target.com filetype:pdf (and the same for docx, xlsx, pptx); see Google Dorking.

exiftool extracts metadata from almost any file; metagoofil automates downloading and extraction from a domain:

Ventana de terminal
metagoofil -d target.com -t pdf,docx,xlsx -o ./docs
exiftool document.pdf
exiftool -r ./docs/ | grep -iE 'author|creator|producer|company'
exiftool photo.jpg | grep -i gps # coordinates in images

On Windows, FOCA is the classic tool: it downloads a domain’s documents and extracts and correlates their metadata visually.

  1. Author names → list of internal users → deduce emails (see Email Enumeration).
  2. Software and versions → look for CVEs of that office suite or OS.
  3. Paths and hostnames → understand the internal network (useful in post-exploitation).
  4. GPS in photos → physical locations (physical red team).

Just as you extract others’, don’t leak yours in reports or deliverables:

Ventana de terminal
exiftool -all= photo.jpg # images: rewrites and strips EXIF/GPS
# PDF caveat: exiftool appends a REVERSIBLE incremental update; the original stays in the file.
# To truly sanitize, rewrite the PDF (drop old objects) then clean:
qpdf --linearize dirty.pdf tmp.pdf && exiftool -all= tmp.pdf
  • Looking only at PDFs and forgetting images (EXIF/GPS) and old Office files (very metadata-rich).
  • Stopping at one document: the value is in correlating dozens to see user and software patterns.
  • Not cross-referencing author names with the employee list from People OSINT.
  • Delivering your report with your own metadata inside (real name, paths, machine).

Prevention: strip metadata before publishing any document (sanitization tools, Office’s “document inspector”), configure the office suite not to embed author or paths, train on what files reveal, and periodically audit which public documents leak metadata (run FOCA or metagoofil against your own domain).

  • Public documents collected (file-type dorking).
  • Metadata extracted (exiftool / metagoofil / FOCA).
  • Author names → list of internal users.
  • Software and versions → look for CVE.
  • Internal paths and hostnames noted.
  • GPS in images (if applicable).
  • Users cross-referenced with recon-email / ad-spray.
  • My own documents stripped of metadata.