FOCA: Complete Guide to Metadata Analysis and Information Gathering Using Kali Linux

FOCA: Complete Guide to Metadata Analysis and Information Gathering Using Kali Linux

FOCA (Fingerprinting Organizations with Collected Archives) is a metadata-extraction and document-analysis tool originally developed by Informática 64 (Chema Alonso’s team) for Windows. FOCA automates the process of searching for publicly available documents (PDF, DOCX, XLSX, PPTX, and older Office formats) on a target domain via search engines, then downloads and parses their embedded metadata — author names, software versions, internal usernames, printer paths, and even internal server names/IP addresses that can leak through document properties. It also performs analysis to fingerprint the client’s network topology based on patterns found across many documents.

Installation

FOCA is a Windows-only .NET application and is not natively available on Kali Linux. It is typically run on a Windows VM/host alongside a Kali-based penetration testing setup, or via Wine on Linux (with limited compatibility).

# On Windows:
# 1. Download the FOCA installer from the official GitHub releases page:
#    https://github.com/ElevenPaths/FOCA/releases
# 2. Run the installer (requires .NET Framework, prompted automatically if missing)
# 3. Launch FOCA.exe

# On Kali Linux via Wine (unofficial, limited support):
sudo apt update && sudo apt install wine -y
wine FOCA_Installer.exe

For a native Linux/Kali workflow, most practitioners use metagoofil (covered in section 2.16) as FOCA’s functional equivalent, since it performs similar metadata extraction directly on Linux.

Syntax

FOCA is a GUI-driven Windows application; there is no traditional command-line syntax for its core workflow. The general operational flow is:

  1. File → New Project — enter the target domain name and a project folder location.
  2. Search tab — select search engines (Google, Bing, DuckDuckGo) and document types to search for.
  3. Click Search All to discover publicly indexed documents on the target domain.
  4. Select discovered documents and click Download to retrieve them locally.
  5. Right-click downloaded documents → Extract All Metadata to parse embedded metadata.
  6. Use the Network, Users, Software, and Folders tabs to review aggregated findings across all analyzed documents.

Command-Line Options

FOCA does not expose a standard CLI, but its GUI panels function as configuration “options”:

GUI Panel/OptionDescription
Search Engines panelToggle Google, Bing, DuckDuckGo as document discovery sources
Document Type filtersSelect which file types to search for: pdf, doc/docx, xls/xlsx, ppt/pptx, odt
Download optionsConfigure proxy settings and download throttling for bulk document retrieval
Metadata ExtractionExtract Author, Company, Software Version, Creation/Modification dates, and embedded paths
Network tabAggregates discovered internal hostnames, IPs, and domain names found across all metadata
Users tabAggregates discovered usernames found in document “Author”/”Last Saved By” metadata fields
Software tabAggregates discovered software names/versions used to create documents (fingerprinting client OS/Office versions)
DNS Search / DNS SnoopingBuilt-in DNS enumeration module (similar to dnsrecon)
PDF AnalysisAdditional deep parsing specific to PDF metadata and embedded objects

Basic Usage

  1. Launch FOCA and create a new project targeting example.com.
  2. In the Search tab, enable Google and Bing, select “PDF” and “DOCX” file types, and click Search All.

Expected result (GUI file list view):

Project: example.com
Discovered Documents:
  https://example.com/files/annual-report-2025.pdf
  https://example.com/hr/employee-handbook.docx
  https://example.com/finance/budget-2026.xlsx
  1. Select all documents → Download → then Extract All Metadata.

Practical Examples

Example 1 — Basic document discovery via Google

Example 2 — Multi-engine search across PDF, DOCX, and XLSX

Example 3 — Bulk downloading discovered documents

Example 4 — Extracting metadata from a downloaded PDF

File: annual-report-2025.pdf
Author: J.Smith
Creator Software: Microsoft Word 2019
Creation Date: 2025-11-02
Last Modified By: j.smith@example.com

Example 5 — Aggregating discovered usernames across many documents

Example 6 — Fingerprinting internal network paths from metadata

Example 7 — Software fingerprinting across the organization

Common Use Cases

Automation with Bash

Since FOCA itself is GUI/Windows-only, Linux-based automation typically wraps around exporting its results or replicating its core function using command-line tools. A common Linux-native workflow uses exiftool alongside document-discovery via search dorking:

#!/bin/bash
# foca_alt_metadata.sh - Linux alternative metadata extraction workflow
# (companion to FOCA when working from a Kali host)
DOMAIN=$1
mkdir -p foca_docs

echo "[*] Search manually via: site:$DOMAIN filetype:pdf OR filetype:docx OR filetype:xlsx"
echo "[*] After manually downloading files into ./foca_docs/, run:"

for file in foca_docs/*; do
    echo "=== $file ==="
    exiftool "$file" | grep -iE "Author|Creator|Last Modified By|Software"
done

Exporting FOCA’s own project results (via its built-in “Export” feature to XML/CSV) can then be parsed further with bash:

#!/bin/bash
# Parse an exported FOCA project XML for unique authors
grep -oP '(?<=<Author>).*?(?=</Author>)' foca_export.xml | sort -u

Tips and Best Practices

Troubleshooting

ProblemCauseFix
FOCA fails to launch on WindowsMissing .NET Framework dependencyInstall the required .NET Framework version prompted by the installer
No documents found during searchSearch engine API/scraping blocked, or target has no indexed documents of the selected typeTry alternate search engines within FOCA; manually verify with a browser search using site: and filetype: operators
Metadata extraction shows empty/blank fieldsDocument was scrubbed of metadata before publishing (e.g., via “Document Inspector” in Office, or PDF sanitization)This indicates good target OPSEC; note it as a positive finding in the report rather than a tool failure
Wine compatibility issues on KaliFOCA relies on Windows-specific APIs not fully supported by WineRun FOCA on an actual Windows VM instead of relying on Wine
Network tab shows no internal hostnames/IPsTarget’s documents were created with modern Office formats that don’t embed such metadata by defaultExpected for organizations using up-to-date Office 365; rely more on other recon tools for network mapping

References

Exit mobile version