[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EPMFG4TCDB6RZXCR86ENMN":3,"skill-same:01M7EPMFG4TCDB6RZXCR86ENMN":92},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M7EPMFG4TCDB6RZXCR86ENMN","performing-ai-driven-osint-correlation",null,"Use AI\u002FLLM-based reasoning with Sherlock, theHarvester, and SpiderFoot to correlate OSINT findings—usernames, emails, social profiles, domain records, breach databases, and dark-web mentions—into unified, confidence-scored intelligence profiles with link analysis. Use when raw OSINT data from multiple sources needs merging into one target profile or resolving identity linkage across platforms.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-ai-driven-osint-correlation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-ai-driven-osint-correlation\ndescription: Use AI\u002FLLM-based reasoning with Sherlock, theHarvester, and SpiderFoot\n  to correlate OSINT findings—usernames, emails, social profiles, domain records,\n  breach databases, and dark-web mentions—into unified, confidence-scored intelligence\n  profiles with link analysis. Use when raw OSINT data from multiple sources needs\n  merging into one target profile or resolving identity linkage across platforms.\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\natlas_techniques:\n- AML.T0051\n- AML.T0054\n- AML.T0056\nnist_ai_rmf:\n- MEASURE-2.7\n- MEASURE-2.5\n- GOVERN-6.1\n- MAP-5.1\nd3fend_techniques:\n- Identifier Analysis\n- URL Analysis\n- Identifier Reputation Analysis\n- User Behavior Analysis\n- Content Validation\nnist_csf:\n- ID.RA-01\n- ID.RA-05\n- DE.CM-01\n- DE.AE-02\nmitre_attack:\n- T1591\n- T1592\n- T1593\n- T1589\n- T1595\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":24,"author":35,"domain":36,"license":15,"version":37,"nist_csf":38,"subdomain":27,"description":7,"nist_ai_rmf":43,"mitre_attack":48,"atlas_techniques":54,"d3fend_techniques":58},[25,26,27,28,29,30,31,32,33,34],"osint","ai-correlation","threat-intelligence","reconnaissance","link-analysis","target-profiling","sherlock","theharvester","spiderfoot","maltego","juliosuas","cybersecurity","1.0",[39,40,41,42],"ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02",[44,45,46,47],"MEASURE-2.7","MEASURE-2.5","GOVERN-6.1","MAP-5.1",[49,50,51,52,53],"T1591","T1592","T1593","T1589","T1595",[55,56,57],"AML.T0051","AML.T0054","AML.T0056",[59,60,61,62,63],"Identifier Analysis","URL Analysis","Identifier Reputation Analysis","User Behavior Analysis","Content Validation","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fperforming-ai-driven-osint-correlation",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-ai-driven-osint-correlation",{"tool":78,"command":79},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-ai-driven-osint-correlation",{"tool":81,"command":82},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-ai-driven-osint-correlation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-ai-driven-osint-correlation\u002FSKILL.md",true,[86],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fapi-reference.md","REFERENCE","参考文档",5068,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-ai-driven-osint-correlation\u002Freferences\u002Fapi-reference.md",[93,102,107,114,121,128],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":101},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":103,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":101},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":101},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":101},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":101},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":101},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]