« Phase 10

Lab 02 — OSINT Surface Mapper

Operation Cedar Lattice, Phase 10.

Map synthetic OSINT findings about Meridian Freight International to vendor-impersonation pretext opportunities, exposed infrastructure, and expected detection capabilities. This lab models the structured analysis step that converts raw OSINT data into an actionable engagement plan — and simultaneously shows the defender exactly what that analysis reveals.

Safety. This lab operates entirely on synthetic org data. There are no live OSINT queries, no DNS lookups, no web requests, no real employee data, and no connection to any external system. Input and output are Python dicts and lists.


What You Will Build

Five public functions that together implement an OSINT-to-pretext analysis pipeline:

FunctionInputOutput
email_patterns(github_emails)list of email stringssorted list of pattern strings
pretext_angles(job_postings, technologies)two lists of stringssorted list of pretext descriptions
exposed_infrastructure(subdomains)list of subdomain stringssorted list of {subdomain, service_type, risk_note}
detection_evasion_notes(target)target dictsorted list of detection-capability strings
osint_summary(target)target dictcombined result dict

Target Dict Schema

target = {
    "domain":         str,          # primary domain, e.g., "meridianfreight.com"
    "subdomains":     list[str],    # known subdomains
    "github_emails":  list[str],    # email addresses from git commit metadata
    "job_postings":   list[str],    # job posting text snippets
    "technologies":   list[str],    # technology names from job postings / LinkedIn
}

Pattern Logic

Email Pattern Inference

Given a list of email addresses, infer the naming convention:

Local partInferred pattern
Contains . and both parts length > 1 (e.g., john.smith)first.last@domain
Contains . and first part is single char (e.g., a.jones)f.last@domain
No ., length > 1 (e.g., jdoe)flast@domain

Vendor Impersonation

Match job postings and technologies against the built-in VENDOR_MAP dict (case-insensitive). Return sorted unique list of pretext angle descriptions.

Subdomain Sensitivity

Match each subdomain string against SENSITIVE_SUBDOMAIN_KEYWORDS (keyword must appear anywhere in the subdomain, case-insensitive). Return sorted list of {subdomain, service_type, risk_note}.

Detection Capabilities

Match technologies and job posting text against TECH_DETECTION_MAP keys (case-insensitive). Return sorted list of detection-capability descriptions.


Files

FilePurpose
lab.pyYour implementation — public functions stubbed with NotImplementedError
solution.pyComplete reference solution
test_lab.py12 pytest tests
requirements.txtpytest>=7.0

Running the Tests

# Run against your implementation (should fail with NotImplementedError)
pytest -q

# Run against reference solution (all 12 should pass)
LAB_MODULE=solution pytest -q

Learning Objectives

After completing this lab you should be able to:

  1. Infer an organization's email naming convention from a small sample of known addresses.
  2. Map job-posting technology mentions to specific vendor-impersonation pretext angles.
  3. Identify sensitive subdomain patterns that indicate high-value infrastructure.
  4. Derive the target organization's detection capabilities from its technology stack.
  5. Explain why understanding detection capabilities is as important as finding attack opportunities when planning a red team engagement.

« Phase 10 README | Lab 01 — Email Auth Analyzer