[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7558N47ZJW9RZXCV0TKFDHW":3,"skill-same:01M7558N47ZJW9RZXCV0TKFDHW":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":39,"commitSha":40,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7558N47ZJW9RZXCV0TKFDHW","performing-ai-driven-osint-correlation",null,"Use AI and LLM-based reasoning to correlate findings across multiple OSINT sources—username enumeration, email lookups, social media profiles, domain records, breach databases, and dark-web mentions—into unified intelligence profiles with confidence scoring and link analysis.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-ai-driven-osint-correlation\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-ai-driven-osint-correlation\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: performing-ai-driven-osint-correlation\ndescription: >-\n  Use AI and LLM-based reasoning to correlate findings across multiple OSINT\n  sources—username enumeration, email lookups, social media profiles, domain\n  records, breach databases, and dark-web mentions—into unified intelligence\n  profiles with confidence scoring and link analysis.\ndomain: cybersecurity\nsubdomain: threat-intelligence\ntags:\n  - osint\n  - ai-correlation\n  - threat-intelligence\n  - reconnaissance\n  - link-analysis\n  - target-profiling\n  - sherlock\n  - theharvester\n  - spiderfoot\n  - maltego\nversion: \"1.0\"\nauthor: juliosuas\nlicense: Apache-2.0\n---\n\n# Performing AI-Driven OSINT Correlation\n\n## When to Use\n\n- You have collected raw OSINT data from multiple tools and sources but need to identify connections, contradictions, and patterns across them.\n- You need to build a unified intelligence profile for a target entity (person, organization, or infrastructure) from fragmented data.\n- Traditional manual correlation is too slow or error-prone for the volume of data collected.\n- You want confidence-scored assessments of identity linkage across platforms rather than simple keyword matching.\n\n## Prerequisites\n\n- Python 3.10+ with `requests`, `json`, and `csv` libraries\n- [Sherlock](https:\u002F\u002Fgithub.com\u002Fsherlock-project\u002Fsherlock) installed (`pip install sherlock-project`)\n- [theHarvester](https:\u002F\u002Fgithub.com\u002Flaramies\u002FtheHarvester) installed (`pip install theHarvester`)\n- [SpiderFoot](https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot) 4.0+ running on localhost:5001\n- Access to an LLM API (OpenAI, Anthropic, or local model via Ollama)\n- Optional: Maltego CE for graph visualization of correlation results\n- Optional: API keys for Shodan, VirusTotal, HaveIBeenPwned, Hunter.io\n\n## Workflow\n\n### Legal & Ethical Requirements\n\n- Obtain documented written authorization before any investigation\n- Establish lawful basis for data processing (law enforcement, corporate policy, etc.)\n- Define PII retention limits and data handling procedures\n- Comply with local privacy regulations (GDPR, CCPA, etc.)\n\n### Phase 1 — Multi-Source OSINT Collection\n\n0. **Create the working directory for all OSINT outputs:**\n\n   ```bash\n   mkdir -p \u002Ftmp\u002Fosint\n   ```\n\n1. **Enumerate usernames across platforms with Sherlock:**\n\n   ```bash\n   sherlock \"targetusername\" --output \u002Ftmp\u002Fosint\u002Fsherlock-results.txt --csv\n   ```\n\n2. **Harvest emails, subdomains, and hosts with theHarvester:**\n\n   ```bash\n   theHarvester -d targetdomain.com -b all -f \u002Ftmp\u002Fosint\u002Fharvester-results.json\n   ```\n\n3. **Run a SpiderFoot passive scan via REST API:**\n\n   ```bash\n   curl -s http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fscan\u002Fstart \\\n     -d \"scanname=target-recon&scantarget=targetdomain.com&usecase=passive\" \\\n     | jq '.scanid'\n   ```\n\n4. **Export SpiderFoot results when scan completes:**\n\n   ```bash\n   SCAN_ID=\"\u003Cscanid_from_step_3>\"\n   curl -s \"http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fscan\u002F${SCAN_ID}\u002Fresults?type=all\" \\\n     -o \u002Ftmp\u002Fosint\u002Fspiderfoot-results.json\n   ```\n\n5. **Query breach databases for email exposure (example with HIBP API):**\n\n   ```bash\n   curl -s -H \"hibp-api-key: ${HIBP_KEY}\" \\\n     -H \"User-Agent: OSINT-Correlation-Skill\" \\\n     \"https:\u002F\u002Fhaveibeenpwned.com\u002Fapi\u002Fv3\u002Fbreachedaccount\u002Ftarget@example.com\" \\\n     -o \u002Ftmp\u002Fosint\u002Fbreach-results.json\n   ```\n\n### Phase 2 — Data Normalization\n\n6. **Normalize all collected data into a common schema.** Create a unified JSON structure that tags each finding with its source, timestamp, and data type:\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fnormalize.py \u003C\u003C 'EOF'\n   import json, csv, sys, os\n   from datetime import datetime\n\n   findings = []\n\n   # Normalize Sherlock CSV results\n   sherlock_path = \"\u002Ftmp\u002Fosint\u002Fsherlock-results.txt\"\n   if os.path.exists(sherlock_path):\n       with open(sherlock_path) as f:\n           for row in csv.DictReader(f):\n               findings.append({\n                   \"source\": \"sherlock\",\n                   \"type\": \"social_profile\",\n                   \"platform\": row.get(\"name\", \"\"),\n                   \"url\": row.get(\"url_user\", \"\"),\n                   \"username\": row.get(\"username\", \"\"),\n                   \"status\": row.get(\"status\", \"\"),\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   # Normalize theHarvester JSON results\n   harvester_path = \"\u002Ftmp\u002Fosint\u002Fharvester-results.json\"\n   if os.path.exists(harvester_path):\n       with open(harvester_path) as f:\n           data = json.load(f)\n           for email in data.get(\"emails\", []):\n               findings.append({\n                   \"source\": \"theHarvester\",\n                   \"type\": \"email\",\n                   \"value\": email,\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n           for host in data.get(\"hosts\", []):\n               findings.append({\n                   \"source\": \"theHarvester\",\n                   \"type\": \"hostname\",\n                   \"value\": host,\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   # Normalize SpiderFoot results\n   sf_path = \"\u002Ftmp\u002Fosint\u002Fspiderfoot-results.json\"\n   if os.path.exists(sf_path):\n       with open(sf_path) as f:\n           for item in json.load(f):\n               findings.append({\n                   \"source\": \"spiderfoot\",\n                   \"type\": item.get(\"type\", \"unknown\"),\n                   \"value\": item.get(\"data\", \"\"),\n                   \"module\": item.get(\"module\", \"\"),\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fnormalized-findings.json\", \"w\") as f:\n       json.dump(findings, f, indent=2)\n\n   print(f\"Normalized {len(findings)} findings from {len(set(f['source'] for f in findings))} sources\")\n   EOF\n   python3 \u002Ftmp\u002Fosint\u002Fnormalize.py\n   ```\n\n### Phase 3 — AI-Driven Correlation\n\n7. **Send normalized findings to an LLM for cross-source correlation analysis:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fcorrelate.py \u003C\u003C 'PYEOF'\n   import json, os\n   from openai import OpenAI  # or anthropic, ollama, etc.\n\n   client = OpenAI(api_key=os.environ[\"OPENAI_API_KEY\"])\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fnormalized-findings.json\") as f:\n       findings = json.load(f)\n\n   correlation_prompt = f\"\"\"You are an OSINT analyst. Analyze these findings collected\n   from multiple sources and produce a correlation report.\n\n   For each identity or entity you detect:\n   1. List all linked accounts\u002Fprofiles with the evidence connecting them.\n   2. Assign a confidence score (0.0-1.0) for each linkage based on:\n      - Exact username match across platforms (high)\n      - Similar usernames with shared metadata (medium)\n      - Same email in breach data and registration (high)\n      - Co-occurring infrastructure (IP, domain) (medium)\n      - Temporal correlation of account creation dates (low-medium)\n   3. Identify contradictions or potential false positives.\n   4. Flag high-risk exposures (breached credentials, PII leaks, infrastructure overlaps).\n   5. Produce a structured JSON report.\n\n   Raw findings:\n   {json.dumps(findings[:500], indent=2)}\n   \"\"\"\n\n   response = client.chat.completions.create(\n       model=\"gpt-4o\",\n       messages=[\n           {\"role\": \"system\", \"content\": \"You are an expert OSINT analyst specializing in identity correlation and link analysis.\"},\n           {\"role\": \"user\", \"content\": correlation_prompt}\n       ],\n       temperature=0.1,\n       response_format={\"type\": \"json_object\"}\n   )\n\n   report = json.loads(response.choices[0].message.content)\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\", \"w\") as f:\n       json.dump(report, f, indent=2)\n\n   print(json.dumps(report, indent=2))\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Fcorrelate.py\n   ```\n\n8. **Perform entity resolution — deduplicate and merge related identities:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fresolve.py \u003C\u003C 'PYEOF'\n   import json\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n       report = json.load(f)\n\n   # Extract entities and build a link graph\n   entities = report.get(\"entities\", [])\n   print(f\"Identified {len(entities)} distinct entities\")\n   for entity in entities:\n       name = entity.get(\"identifier\", \"unknown\")\n       confidence = entity.get(\"confidence\", 0)\n       links = entity.get(\"linked_accounts\", [])\n       risk = entity.get(\"risk_level\", \"unknown\")\n       print(f\"  [{confidence:.0%}] {name} — {len(links)} linked accounts — risk: {risk}\")\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Fresolve.py\n   ```\n\n### Phase 4 — Reporting and Visualization\n\n9. **Generate a final intelligence profile in Markdown:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Freport.py \u003C\u003C 'PYEOF'\n   import json\n   from datetime import datetime\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n       report = json.load(f)\n\n   md = f\"# OSINT Correlation Report\\n\\n\"\n   md += f\"**Generated:** {datetime.utcnow().isoformat()}Z\\n\\n\"\n   md += \"## Entity Profiles\\n\\n\"\n\n   for entity in report.get(\"entities\", []):\n       eid = entity.get(\"identifier\", \"Unknown\")\n       conf = entity.get(\"confidence\", 0)\n       md += f\"### {eid} (Confidence: {conf:.0%})\\n\\n\"\n       md += \"| Source | Platform | Evidence |\\n|--------|----------|----------|\\n\"\n       for link in entity.get(\"linked_accounts\", []):\n           md += f\"| {link.get('source','')} | {link.get('platform','')} | {link.get('evidence','')} |\\n\"\n       md += f\"\\n**Risk Level:** {entity.get('risk_level', 'N\u002FA')}\\n\\n\"\n       for flag in entity.get(\"flags\", []):\n           md += f\"- ⚠️ {flag}\\n\"\n       md += \"\\n\"\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fintelligence-profile.md\", \"w\") as f:\n       f.write(md)\n\n   print(\"Report written to \u002Ftmp\u002Fosint\u002Fintelligence-profile.md\")\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Freport.py\n   ```\n\n10. **Optional — Import correlation graph into Maltego for visualization:**\n\n    ```bash\n    # Export entities as Maltego-compatible CSV for manual import\n    cat > \u002Ftmp\u002Fosint\u002Fmaltego_export.py \u003C\u003C 'PYEOF'\n    import json, csv\n\n    with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n        report = json.load(f)\n\n    with open(\"\u002Ftmp\u002Fosint\u002Fmaltego-import.csv\", \"w\", newline=\"\") as f:\n        writer = csv.writer(f)\n        writer.writerow([\"Entity Type\", \"Value\", \"Linked To\", \"Link Label\", \"Confidence\"])\n        for entity in report.get(\"entities\", []):\n            for link in entity.get(\"linked_accounts\", []):\n                writer.writerow([\n                    link.get(\"type\", \"Alias\"),\n                    link.get(\"value\", \"\"),\n                    entity.get(\"identifier\", \"\"),\n                    link.get(\"evidence\", \"\"),\n                    link.get(\"confidence\", \"\")\n                ])\n\n    print(\"Maltego CSV exported to \u002Ftmp\u002Fosint\u002Fmaltego-import.csv\")\n    PYEOF\n    python3 \u002Ftmp\u002Fosint\u002Fmaltego_export.py\n    ```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Cross-Source Correlation | Matching identifiers (usernames, emails, IPs) across independent OSINT sources to establish entity linkage |\n| Confidence Scoring | Assigning probabilistic confidence (0.0–1.0) to each linkage based on evidence strength and corroboration |\n| Entity Resolution | Deduplicating and merging records that refer to the same real-world entity across fragmented datasets |\n| False Positive Detection | Using AI reasoning to identify coincidental matches versus genuine identity links |\n| Multi-Vector Intelligence | Combining findings from social media, DNS, breach data, and infrastructure into a single threat picture |\n| Link Analysis | Graph-based examination of relationships between entities, accounts, and infrastructure |\n\n## Tools & Systems\n\n| Tool | Role in Workflow |\n|------|-----------------|\n| Sherlock | Username enumeration across 400+ social platforms |\n| theHarvester | Email, subdomain, and host discovery from public sources |\n| SpiderFoot | Automated OSINT collection across 200+ modules |\n| Maltego | Graph-based visualization of entity relationships |\n| LLM API (GPT-4, Claude, Ollama) | Cross-source reasoning, pattern detection, and confidence scoring |\n| HaveIBeenPwned | Breach exposure and credential leak detection |\n\n## Common Scenarios\n\n- **Threat Actor Attribution:** Correlate a suspicious username found in a phishing campaign with social media profiles, domain registrations, and breach data to build an attribution profile.\n- **Attack Surface Mapping:** Link discovered subdomains, emails, and employee social accounts to understand an organization's full external exposure.\n- **Insider Threat Investigation:** Cross-reference an employee's known accounts with dark web marketplace activity and breach databases.\n- **Brand Impersonation Detection:** Identify accounts across platforms mimicking a target brand by correlating registration patterns, naming conventions, and temporal signals.\n\n## Output Format\n\nThe final output is a structured JSON correlation report and a Markdown intelligence profile containing:\n\n```json\n{\n  \"meta\": {\n    \"target\": \"targetdomain.com\",\n    \"sources_used\": [\"sherlock\", \"theHarvester\", \"spiderfoot\", \"hibp\"],\n    \"total_findings\": 247,\n    \"generated_at\": \"2025-01-15T14:30:00Z\"\n  },\n  \"entities\": [\n    {\n      \"identifier\": \"john.target\",\n      \"confidence\": 0.92,\n      \"linked_accounts\": [\n        {\n          \"source\": \"sherlock\",\n          \"platform\": \"GitHub\",\n          \"value\": \"john.target\",\n          \"evidence\": \"Exact username match, bio references targetdomain.com\",\n          \"confidence\": 0.95\n        }\n      ],\n      \"risk_level\": \"high\",\n      \"flags\": [\n        \"Credentials exposed in 2 breaches (2022, 2023)\",\n        \"Admin email for targetdomain.com found in public WHOIS\"\n      ]\n    }\n  ],\n  \"contradictions\": [],\n  \"recommendations\": []\n}\n```\n\n## Verification\n\n- Confirm that each linked account has been independently verified against at least two sources before assigning confidence > 0.8.\n- Cross-check AI-generated correlations manually for a random sample (10–20%) to validate accuracy.\n- Verify that no false positives from common usernames (e.g., \"admin\", \"test\") inflated entity profiles.\n- Ensure breach data timestamps are current and from reputable aggregators.\n- Validate that the final report does not include stale or retracted OSINT data.\n","# Performing AI-Driven OSINT Correlation\n\n## When to Use\n\n- You have collected raw OSINT data from multiple tools and sources but need to identify connections, contradictions, and patterns across them.\n- You need to build a unified intelligence profile for a target entity (person, organization, or infrastructure) from fragmented data.\n- Traditional manual correlation is too slow or error-prone for the volume of data collected.\n- You want confidence-scored assessments of identity linkage across platforms rather than simple keyword matching.\n\n## Prerequisites\n\n- Python 3.10+ with `requests`, `json`, and `csv` libraries\n- [Sherlock](https:\u002F\u002Fgithub.com\u002Fsherlock-project\u002Fsherlock) installed (`pip install sherlock-project`)\n- [theHarvester](https:\u002F\u002Fgithub.com\u002Flaramies\u002FtheHarvester) installed (`pip install theHarvester`)\n- [SpiderFoot](https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot) 4.0+ running on localhost:5001\n- Access to an LLM API (OpenAI, Anthropic, or local model via Ollama)\n- Optional: Maltego CE for graph visualization of correlation results\n- Optional: API keys for Shodan, VirusTotal, HaveIBeenPwned, Hunter.io\n\n## Workflow\n\n### Legal & Ethical Requirements\n\n- Obtain documented written authorization before any investigation\n- Establish lawful basis for data processing (law enforcement, corporate policy, etc.)\n- Define PII retention limits and data handling procedures\n- Comply with local privacy regulations (GDPR, CCPA, etc.)\n\n### Phase 1 — Multi-Source OSINT Collection\n\n0. **Create the working directory for all OSINT outputs:**\n\n   ```bash\n   mkdir -p \u002Ftmp\u002Fosint\n   ```\n\n1. **Enumerate usernames across platforms with Sherlock:**\n\n   ```bash\n   sherlock \"targetusername\" --output \u002Ftmp\u002Fosint\u002Fsherlock-results.txt --csv\n   ```\n\n2. **Harvest emails, subdomains, and hosts with theHarvester:**\n\n   ```bash\n   theHarvester -d targetdomain.com -b all -f \u002Ftmp\u002Fosint\u002Fharvester-results.json\n   ```\n\n3. **Run a SpiderFoot passive scan via REST API:**\n\n   ```bash\n   curl -s http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fscan\u002Fstart \\\n     -d \"scanname=target-recon&scantarget=targetdomain.com&usecase=passive\" \\\n     | jq '.scanid'\n   ```\n\n4. **Export SpiderFoot results when scan completes:**\n\n   ```bash\n   SCAN_ID=\"\u003Cscanid_from_step_3>\"\n   curl -s \"http:\u002F\u002Flocalhost:5001\u002Fapi\u002Fscan\u002F${SCAN_ID}\u002Fresults?type=all\" \\\n     -o \u002Ftmp\u002Fosint\u002Fspiderfoot-results.json\n   ```\n\n5. **Query breach databases for email exposure (example with HIBP API):**\n\n   ```bash\n   curl -s -H \"hibp-api-key: ${HIBP_KEY}\" \\\n     -H \"User-Agent: OSINT-Correlation-Skill\" \\\n     \"https:\u002F\u002Fhaveibeenpwned.com\u002Fapi\u002Fv3\u002Fbreachedaccount\u002Ftarget@example.com\" \\\n     -o \u002Ftmp\u002Fosint\u002Fbreach-results.json\n   ```\n\n### Phase 2 — Data Normalization\n\n6. **Normalize all collected data into a common schema.** Create a unified JSON structure that tags each finding with its source, timestamp, and data type:\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fnormalize.py \u003C\u003C 'EOF'\n   import json, csv, sys, os\n   from datetime import datetime\n\n   findings = []\n\n   # Normalize Sherlock CSV results\n   sherlock_path = \"\u002Ftmp\u002Fosint\u002Fsherlock-results.txt\"\n   if os.path.exists(sherlock_path):\n       with open(sherlock_path) as f:\n           for row in csv.DictReader(f):\n               findings.append({\n                   \"source\": \"sherlock\",\n                   \"type\": \"social_profile\",\n                   \"platform\": row.get(\"name\", \"\"),\n                   \"url\": row.get(\"url_user\", \"\"),\n                   \"username\": row.get(\"username\", \"\"),\n                   \"status\": row.get(\"status\", \"\"),\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   # Normalize theHarvester JSON results\n   harvester_path = \"\u002Ftmp\u002Fosint\u002Fharvester-results.json\"\n   if os.path.exists(harvester_path):\n       with open(harvester_path) as f:\n           data = json.load(f)\n           for email in data.get(\"emails\", []):\n               findings.append({\n                   \"source\": \"theHarvester\",\n                   \"type\": \"email\",\n                   \"value\": email,\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n           for host in data.get(\"hosts\", []):\n               findings.append({\n                   \"source\": \"theHarvester\",\n                   \"type\": \"hostname\",\n                   \"value\": host,\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   # Normalize SpiderFoot results\n   sf_path = \"\u002Ftmp\u002Fosint\u002Fspiderfoot-results.json\"\n   if os.path.exists(sf_path):\n       with open(sf_path) as f:\n           for item in json.load(f):\n               findings.append({\n                   \"source\": \"spiderfoot\",\n                   \"type\": item.get(\"type\", \"unknown\"),\n                   \"value\": item.get(\"data\", \"\"),\n                   \"module\": item.get(\"module\", \"\"),\n                   \"collected_at\": datetime.utcnow().isoformat()\n               })\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fnormalized-findings.json\", \"w\") as f:\n       json.dump(findings, f, indent=2)\n\n   print(f\"Normalized {len(findings)} findings from {len(set(f['source'] for f in findings))} sources\")\n   EOF\n   python3 \u002Ftmp\u002Fosint\u002Fnormalize.py\n   ```\n\n### Phase 3 — AI-Driven Correlation\n\n7. **Send normalized findings to an LLM for cross-source correlation analysis:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fcorrelate.py \u003C\u003C 'PYEOF'\n   import json, os\n   from openai import OpenAI  # or anthropic, ollama, etc.\n\n   client = OpenAI(api_key=os.environ[\"OPENAI_API_KEY\"])\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fnormalized-findings.json\") as f:\n       findings = json.load(f)\n\n   correlation_prompt = f\"\"\"You are an OSINT analyst. Analyze these findings collected\n   from multiple sources and produce a correlation report.\n\n   For each identity or entity you detect:\n   1. List all linked accounts\u002Fprofiles with the evidence connecting them.\n   2. Assign a confidence score (0.0-1.0) for each linkage based on:\n      - Exact username match across platforms (high)\n      - Similar usernames with shared metadata (medium)\n      - Same email in breach data and registration (high)\n      - Co-occurring infrastructure (IP, domain) (medium)\n      - Temporal correlation of account creation dates (low-medium)\n   3. Identify contradictions or potential false positives.\n   4. Flag high-risk exposures (breached credentials, PII leaks, infrastructure overlaps).\n   5. Produce a structured JSON report.\n\n   Raw findings:\n   {json.dumps(findings[:500], indent=2)}\n   \"\"\"\n\n   response = client.chat.completions.create(\n       model=\"gpt-4o\",\n       messages=[\n           {\"role\": \"system\", \"content\": \"You are an expert OSINT analyst specializing in identity correlation and link analysis.\"},\n           {\"role\": \"user\", \"content\": correlation_prompt}\n       ],\n       temperature=0.1,\n       response_format={\"type\": \"json_object\"}\n   )\n\n   report = json.loads(response.choices[0].message.content)\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\", \"w\") as f:\n       json.dump(report, f, indent=2)\n\n   print(json.dumps(report, indent=2))\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Fcorrelate.py\n   ```\n\n8. **Perform entity resolution — deduplicate and merge related identities:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Fresolve.py \u003C\u003C 'PYEOF'\n   import json\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n       report = json.load(f)\n\n   # Extract entities and build a link graph\n   entities = report.get(\"entities\", [])\n   print(f\"Identified {len(entities)} distinct entities\")\n   for entity in entities:\n       name = entity.get(\"identifier\", \"unknown\")\n       confidence = entity.get(\"confidence\", 0)\n       links = entity.get(\"linked_accounts\", [])\n       risk = entity.get(\"risk_level\", \"unknown\")\n       print(f\"  [{confidence:.0%}] {name} — {len(links)} linked accounts — risk: {risk}\")\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Fresolve.py\n   ```\n\n### Phase 4 — Reporting and Visualization\n\n9. **Generate a final intelligence profile in Markdown:**\n\n   ```bash\n   cat > \u002Ftmp\u002Fosint\u002Freport.py \u003C\u003C 'PYEOF'\n   import json\n   from datetime import datetime\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n       report = json.load(f)\n\n   md = f\"# OSINT Correlation Report\\n\\n\"\n   md += f\"**Generated:** {datetime.utcnow().isoformat()}Z\\n\\n\"\n   md += \"## Entity Profiles\\n\\n\"\n\n   for entity in report.get(\"entities\", []):\n       eid = entity.get(\"identifier\", \"Unknown\")\n       conf = entity.get(\"confidence\", 0)\n       md += f\"### {eid} (Confidence: {conf:.0%})\\n\\n\"\n       md += \"| Source | Platform | Evidence |\\n|--------|----------|----------|\\n\"\n       for link in entity.get(\"linked_accounts\", []):\n           md += f\"| {link.get('source','')} | {link.get('platform','')} | {link.get('evidence','')} |\\n\"\n       md += f\"\\n**Risk Level:** {entity.get('risk_level', 'N\u002FA')}\\n\\n\"\n       for flag in entity.get(\"flags\", []):\n           md += f\"- ⚠️ {flag}\\n\"\n       md += \"\\n\"\n\n   with open(\"\u002Ftmp\u002Fosint\u002Fintelligence-profile.md\", \"w\") as f:\n       f.write(md)\n\n   print(\"Report written to \u002Ftmp\u002Fosint\u002Fintelligence-profile.md\")\n   PYEOF\n   python3 \u002Ftmp\u002Fosint\u002Freport.py\n   ```\n\n10. **Optional — Import correlation graph into Maltego for visualization:**\n\n    ```bash\n    # Export entities as Maltego-compatible CSV for manual import\n    cat > \u002Ftmp\u002Fosint\u002Fmaltego_export.py \u003C\u003C 'PYEOF'\n    import json, csv\n\n    with open(\"\u002Ftmp\u002Fosint\u002Fcorrelation-report.json\") as f:\n        report = json.load(f)\n\n    with open(\"\u002Ftmp\u002Fosint\u002Fmaltego-import.csv\", \"w\", newline=\"\") as f:\n        writer = csv.writer(f)\n        writer.writerow([\"Entity Type\", \"Value\", \"Linked To\", \"Link Label\", \"Confidence\"])\n        for entity in report.get(\"entities\", []):\n            for link in entity.get(\"linked_accounts\", []):\n                writer.writerow([\n                    link.get(\"type\", \"Alias\"),\n                    link.get(\"value\", \"\"),\n                    entity.get(\"identifier\", \"\"),\n                    link.get(\"evidence\", \"\"),\n                    link.get(\"confidence\", \"\")\n                ])\n\n    print(\"Maltego CSV exported to \u002Ftmp\u002Fosint\u002Fmaltego-import.csv\")\n    PYEOF\n    python3 \u002Ftmp\u002Fosint\u002Fmaltego_export.py\n    ```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Cross-Source Correlation | Matching identifiers (usernames, emails, IPs) across independent OSINT sources to establish entity linkage |\n| Confidence Scoring | Assigning probabilistic confidence (0.0–1.0) to each linkage based on evidence strength and corroboration |\n| Entity Resolution | Deduplicating and merging records that refer to the same real-world entity across fragmented datasets |\n| False Positive Detection | Using AI reasoning to identify coincidental matches versus genuine identity links |\n| Multi-Vector Intelligence | Combining findings from social media, DNS, breach data, and infrastructure into a single threat picture |\n| Link Analysis | Graph-based examination of relationships between entities, accounts, and infrastructure |\n\n## Tools & Systems\n\n| Tool | Role in Workflow |\n|------|-----------------|\n| Sherlock | Username enumeration across 400+ social platforms |\n| theHarvester | Email, subdomain, and host discovery from public sources |\n| SpiderFoot | Automated OSINT collection across 200+ modules |\n| Maltego | Graph-based visualization of entity relationships |\n| LLM API (GPT-4, Claude, Ollama) | Cross-source reasoning, pattern detection, and confidence scoring |\n| HaveIBeenPwned | Breach exposure and credential leak detection |\n\n## Common Scenarios\n\n- **Threat Actor Attribution:** Correlate a suspicious username found in a phishing campaign with social media profiles, domain registrations, and breach data to build an attribution profile.\n- **Attack Surface Mapping:** Link discovered subdomains, emails, and employee social accounts to understand an organization's full external exposure.\n- **Insider Threat Investigation:** Cross-reference an employee's known accounts with dark web marketplace activity and breach databases.\n- **Brand Impersonation Detection:** Identify accounts across platforms mimicking a target brand by correlating registration patterns, naming conventions, and temporal signals.\n\n## Output Format\n\nThe final output is a structured JSON correlation report and a Markdown intelligence profile containing:\n\n```json\n{\n  \"meta\": {\n    \"target\": \"targetdomain.com\",\n    \"sources_used\": [\"sherlock\", \"theHarvester\", \"spiderfoot\", \"hibp\"],\n    \"total_findings\": 247,\n    \"generated_at\": \"2025-01-15T14:30:00Z\"\n  },\n  \"entities\": [\n    {\n      \"identifier\": \"john.target\",\n      \"confidence\": 0.92,\n      \"linked_accounts\": [\n        {\n          \"source\": \"sherlock\",\n          \"platform\": \"GitHub\",\n          \"value\": \"john.target\",\n          \"evidence\": \"Exact username match, bio references targetdomain.com\",\n          \"confidence\": 0.95\n        }\n      ],\n      \"risk_level\": \"high\",\n      \"flags\": [\n        \"Credentials exposed in 2 breaches (2022, 2023)\",\n        \"Admin email for targetdomain.com found in public WHOIS\"\n      ]\n    }\n  ],\n  \"contradictions\": [],\n  \"recommendations\": []\n}\n```\n\n## Verification\n\n- Confirm that each linked account has been independently verified against at least two sources before assigning confidence > 0.8.\n- Cross-check AI-generated correlations manually for a random sample (10–20%) to validate accuracy.\n- Verify that no false positives from common usernames (e.g., \"admin\", \"test\") inflated entity profiles.\n- Ensure breach data timestamps are current and from reputable aggregators.\n- Validate that the final report does not include stale or retracted OSINT data.\n",{"name":5,"tags":25,"author":36,"domain":37,"license":15,"version":38,"subdomain":28,"description":7},[26,27,28,29,30,31,32,33,34,35],"osint","ai-correlation","threat-intelligence","reconnaissance","link-analysis","target-profiling","sherlock","theharvester","spiderfoot","maltego","juliosuas","cybersecurity","1.0","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill performing-ai-driven-osint-correlation",{"tool":51,"command":52},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill performing-ai-driven-osint-correlation",{"tool":54,"command":55},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill performing-ai-driven-osint-correlation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-ai-driven-osint-correlation\u002FSKILL.md",true,[59,63,69],{"path":60,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fapi-reference.md","REFERENCE","参考文档",5068,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-ai-driven-osint-correlation\u002Freferences\u002Fapi-reference.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fagent.py","SCRIPT","脚本",15667,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-ai-driven-osint-correlation\u002Fscripts\u002Fagent.py",[76,84,91,98,105,112],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]