[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A4TTB67DH4AX0GXE38ZPYJ":3,"skill-same:01M7A4TTB67DH4AX0GXE38ZPYJ":84},{"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":47,"commitSha":48,"skillDirectory":49,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M7A4TTB67DH4AX0GXE38ZPYJ","building-threat-actor-profile-from-osint",null,"Build threat actor profiles by collecting OSINT from vendor reports, paste sites, dark web forums, social media, and code repos, correlating indicators, mapping adversary infrastructure with tools like Maltego and SpiderFoot, and producing structured dossiers of motivations, capabilities, infrastructure, and TTPs. Use when performing attribution or building an adversary dossier from open-source intelligence.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: building-threat-actor-profile-from-osint\ndescription: Build threat actor profiles by collecting OSINT from vendor reports, paste sites, dark web forums, social media, and code repos, correlating indicators, mapping adversary infrastructure with tools like Maltego and SpiderFoot, and producing structured dossiers of motivations, capabilities, infrastructure, and TTPs. Use when performing attribution or building an adversary dossier from open-source intelligence.\ndomain: cybersecurity\nsubdomain: threat-intelligence\ntags:\n- osint\n- threat-actor\n- threat-actor-profiling\n- maltego\n- spiderfoot\n- attribution\n- threat-intelligence\n- reconnaissance\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- ID.RA-01\n- ID.RA-05\n- DE.CM-01\n- DE.AE-02\nmitre_attack:\n- T1591\n- T1589\n- T1593\n- T1590\n---\n# Building Threat Actor Profile from OSINT\n\n## Overview\n\nThreat actor profiling using OSINT systematically gathers and analyzes publicly available information to build comprehensive profiles of adversary groups. This skill covers collecting intelligence from public sources (security vendor reports, paste sites, dark web forums, social media, code repositories), correlating indicators across platforms, mapping adversary infrastructure using tools like Maltego and SpiderFoot, and producing structured threat actor dossiers that inform defensive strategies and attribution assessments.\n\n\n## When to Use\n\n- When deploying or configuring building threat actor profile from osint capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Python 3.9+ with `shodan`, `requests`, `beautifulsoup4`, `maltego-trx`, `stix2` libraries\n- SpiderFoot (https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot) or SpiderFoot HX\n- Maltego CE or Maltego XL for link analysis\n- API keys: Shodan, VirusTotal, AlienVault OTX, PassiveTotal\u002FRiskIQ\n- MITRE ATT&CK knowledge for TTP mapping\n- Understanding of STIX 2.1 Intrusion Set, Threat Actor, and Identity SDOs\n\n## Key Concepts\n\n### OSINT Sources for Threat Actor Profiling\n\nPrimary intelligence sources include vendor threat reports (Mandiant, CrowdStrike, Recorded Future, Talos), government advisories (CISA, NSA, FBI joint advisories), academic research papers, malware repositories (VirusTotal, MalwareBazaar, Malpedia), paste sites (Pastebin, GitHub Gists), code repositories, social media accounts, dark web forums, and certificate transparency logs.\n\n### Structured Analytical Techniques\n\nProfiling uses the Diamond Model (adversary, infrastructure, capability, victim), Analysis of Competing Hypotheses (ACH) for attribution confidence, and MITRE ATT&CK mapping for TTP documentation. Link analysis tools like Maltego visualize relationships between indicators, infrastructure, and actors.\n\n### Profile Components\n\nA complete threat actor profile includes: aliases and naming conventions across vendors, suspected origin and sponsorship, motivation (espionage, financial, hacktivism, disruption), targeted sectors and geographies, known campaigns and operations, TTPs mapped to ATT&CK, toolset and malware families, infrastructure patterns, and historical timeline.\n\n## Workflow\n\n### Step 1: Collect Intelligence from Multiple Sources\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\n\nclass OSINTCollector:\n    def __init__(self, vt_key=None, otx_key=None, shodan_key=None):\n        self.vt_key = vt_key\n        self.otx_key = otx_key\n        self.shodan_key = shodan_key\n        self.collected_data = {\"sources\": [], \"indicators\": [], \"reports\": []}\n\n    def search_alienvault_otx(self, actor_name):\n        \"\"\"Search AlienVault OTX for threat actor pulses.\"\"\"\n        headers = {\"X-OTX-API-KEY\": self.otx_key}\n        url = f\"https:\u002F\u002Fotx.alienvault.com\u002Fapi\u002Fv1\u002Fsearch\u002Fpulses?q={actor_name}&limit=20\"\n        resp = requests.get(url, headers=headers)\n        if resp.status_code == 200:\n            data = resp.json()\n            pulses = data.get(\"results\", [])\n            for pulse in pulses:\n                self.collected_data[\"reports\"].append({\n                    \"source\": \"AlienVault OTX\",\n                    \"title\": pulse.get(\"name\", \"\"),\n                    \"created\": pulse.get(\"created\", \"\"),\n                    \"description\": pulse.get(\"description\", \"\")[:500],\n                    \"tags\": pulse.get(\"tags\", []),\n                    \"indicators_count\": len(pulse.get(\"indicators\", [])),\n                    \"pulse_id\": pulse.get(\"id\", \"\"),\n                })\n                for ioc in pulse.get(\"indicators\", []):\n                    self.collected_data[\"indicators\"].append({\n                        \"type\": ioc.get(\"type\", \"\"),\n                        \"value\": ioc.get(\"indicator\", \"\"),\n                        \"source\": \"OTX\",\n                        \"pulse\": pulse.get(\"name\", \"\"),\n                    })\n            print(f\"[+] OTX: Found {len(pulses)} pulses for '{actor_name}'\")\n        return self.collected_data\n\n    def search_virustotal_collections(self, actor_name):\n        \"\"\"Search VirusTotal for threat actor collections.\"\"\"\n        headers = {\"x-apikey\": self.vt_key}\n        url = \"https:\u002F\u002Fwww.virustotal.com\u002Fapi\u002Fv3\u002Fintelligence\u002Fsearch\"\n        params = {\"query\": f\"tag:{actor_name.lower().replace(' ', '-')}\"}\n        resp = requests.get(url, headers=headers, params=params)\n        if resp.status_code == 200:\n            results = resp.json().get(\"data\", [])\n            print(f\"[+] VT: Found {len(results)} samples tagged '{actor_name}'\")\n            return results\n        return []\n\n    def query_shodan_infrastructure(self, indicators):\n        \"\"\"Query Shodan for infrastructure details on IPs.\"\"\"\n        results = []\n        for ip in indicators:\n            url = f\"https:\u002F\u002Fapi.shodan.io\u002Fshodan\u002Fhost\u002F{ip}?key={self.shodan_key}\"\n            resp = requests.get(url)\n            if resp.status_code == 200:\n                data = resp.json()\n                results.append({\n                    \"ip\": ip,\n                    \"org\": data.get(\"org\", \"\"),\n                    \"asn\": data.get(\"asn\", \"\"),\n                    \"country\": data.get(\"country_code\", \"\"),\n                    \"ports\": data.get(\"ports\", []),\n                    \"hostnames\": data.get(\"hostnames\", []),\n                    \"os\": data.get(\"os\", \"\"),\n                    \"last_update\": data.get(\"last_update\", \"\"),\n                })\n        print(f\"[+] Shodan: Enriched {len(results)} IPs\")\n        return results\n\ncollector = OSINTCollector(\n    vt_key=\"YOUR_VT_KEY\",\n    otx_key=\"YOUR_OTX_KEY\",\n    shodan_key=\"YOUR_SHODAN_KEY\",\n)\ndata = collector.search_alienvault_otx(\"APT29\")\n```\n\n### Step 2: Build Structured Threat Actor Profile\n\n```python\nfrom stix2 import ThreatActor, IntrusionSet, Identity, Relationship, Bundle\nfrom datetime import datetime\n\n# Create STIX 2.1 Threat Actor profile\nidentity = Identity(\n    name=\"Cybersecurity Analyst\",\n    identity_class=\"individual\",\n)\n\nthreat_actor = ThreatActor(\n    name=\"APT29\",\n    description=\"APT29 (also known as Cozy Bear, Midnight Blizzard, NOBELIUM, The Dukes) \"\n                \"is a Russian state-sponsored threat group attributed to Russia's Foreign \"\n                \"Intelligence Service (SVR). Active since at least 2008, the group conducts \"\n                \"cyber espionage targeting government, diplomatic, think tank, healthcare, \"\n                \"and energy organizations primarily in NATO countries.\",\n    aliases=[\"Cozy Bear\", \"Midnight Blizzard\", \"NOBELIUM\", \"The Dukes\",\n             \"Dark Halo\", \"UNC2452\", \"YTTRIUM\", \"Blue Kitsune\", \"Iron Ritual\"],\n    roles=[\"agent\"],\n    sophistication=\"strategic\",\n    resource_level=\"government\",\n    primary_motivation=\"organizational-gain\",\n    secondary_motivations=[\"ideology\"],\n    threat_actor_types=[\"nation-state\"],\n    goals=[\"Intelligence collection on foreign governments\",\n           \"Long-term persistent access to high-value targets\",\n           \"Supply chain compromise for broad access\"],\n    created_by_ref=identity.id,\n)\n\nintrusion_set = IntrusionSet(\n    name=\"APT29\",\n    description=\"Intrusion set tracked as APT29, attributed to Russian SVR.\",\n    aliases=[\"Cozy Bear\", \"Midnight Blizzard\"],\n    first_seen=\"2008-01-01T00:00:00Z\",\n    goals=[\"espionage\"],\n    resource_level=\"government\",\n    primary_motivation=\"organizational-gain\",\n)\n\nrelationship = Relationship(\n    relationship_type=\"attributed-to\",\n    source_ref=intrusion_set.id,\n    target_ref=threat_actor.id,\n)\n\nbundle = Bundle(objects=[identity, threat_actor, intrusion_set, relationship])\nwith open(\"apt29_profile.json\", \"w\") as f:\n    f.write(bundle.serialize(pretty=True))\nprint(\"[+] STIX profile saved: apt29_profile.json\")\n```\n\n### Step 3: Map TTPs to MITRE ATT&CK\n\n```python\nfrom attackcti import attack_client\n\nlift = attack_client()\napt29_techs = lift.get_techniques_used_by_group(\"G0016\")\n\nprofile_ttps = {\n    \"initial_access\": [],\n    \"execution\": [],\n    \"persistence\": [],\n    \"defense_evasion\": [],\n    \"credential_access\": [],\n    \"lateral_movement\": [],\n    \"collection\": [],\n    \"c2\": [],\n    \"exfiltration\": [],\n}\n\ntactic_mapping = {\n    \"initial-access\": \"initial_access\",\n    \"execution\": \"execution\",\n    \"persistence\": \"persistence\",\n    \"defense-evasion\": \"defense_evasion\",\n    \"credential-access\": \"credential_access\",\n    \"lateral-movement\": \"lateral_movement\",\n    \"collection\": \"collection\",\n    \"command-and-control\": \"c2\",\n    \"exfiltration\": \"exfiltration\",\n}\n\nfor tech in apt29_techs:\n    tech_id = \"\"\n    for ref in tech.get(\"external_references\", []):\n        if ref.get(\"source_name\") == \"mitre-attack\":\n            tech_id = ref.get(\"external_id\", \"\")\n            break\n    for phase in tech.get(\"kill_chain_phases\", []):\n        tactic = phase.get(\"phase_name\", \"\")\n        key = tactic_mapping.get(tactic)\n        if key:\n            profile_ttps[key].append({\n                \"id\": tech_id,\n                \"name\": tech.get(\"name\", \"\"),\n                \"description\": tech.get(\"description\", \"\")[:200],\n            })\n\nprint(\"=== APT29 TTP Profile ===\")\nfor tactic, techs in profile_ttps.items():\n    if techs:\n        print(f\"\\n{tactic.upper()} ({len(techs)} techniques):\")\n        for t in techs[:5]:\n            print(f\"  {t['id']}: {t['name']}\")\n```\n\n### Step 4: Correlate Infrastructure with SpiderFoot\n\n```python\nimport subprocess\nimport json\n\ndef run_spiderfoot_scan(target, scan_name=\"actor_recon\"):\n    \"\"\"Run SpiderFoot scan against target domain or IP.\"\"\"\n    cmd = [\n        \"python3\", \"-m\", \"spiderfoot\", \"-s\", target,\n        \"-m\", \"sfp_dns,sfp_whois,sfp_shodan,sfp_virustotal,sfp_certspotter\",\n        \"-o\", \"json\", \"-q\",\n    ]\n    result = subprocess.run(cmd, capture_output=True, text=True, timeout=300)\n    if result.returncode == 0:\n        findings = json.loads(result.stdout) if result.stdout else []\n        print(f\"[+] SpiderFoot: {len(findings)} findings for {target}\")\n        return findings\n    return []\n\ndef correlate_infrastructure(indicators):\n    \"\"\"Find relationships between infrastructure indicators.\"\"\"\n    ip_to_domains = {}\n    domain_to_ips = {}\n    registrar_patterns = {}\n\n    for indicator in indicators:\n        ioc_type = indicator.get(\"type\", \"\")\n        value = indicator.get(\"value\", \"\")\n\n        if ioc_type == \"IP_ADDRESS\":\n            if value not in ip_to_domains:\n                ip_to_domains[value] = set()\n        elif ioc_type == \"INTERNET_NAME\":\n            if value not in domain_to_ips:\n                domain_to_ips[value] = set()\n\n    # Identify shared hosting, registration patterns\n    shared_ips = {ip: domains for ip, domains in ip_to_domains.items() if len(domains) > 1}\n    print(f\"[+] Shared infrastructure IPs: {len(shared_ips)}\")\n    return {\"shared_ips\": shared_ips, \"registrar_patterns\": registrar_patterns}\n```\n\n### Step 5: Generate Threat Actor Dossier\n\n```python\ndef generate_dossier(actor_name, profile_data, ttp_data, infrastructure_data):\n    dossier = f\"\"\"# Threat Actor Dossier: {actor_name}\n## Generated: {datetime.now().isoformat()}\n\n## Executive Summary\n{profile_data.get('description', '')}\n\n## Attribution\n- **Suspected Origin**: {profile_data.get('origin', 'Unknown')}\n- **Sponsorship**: {profile_data.get('sponsorship', 'Unknown')}\n- **Confidence Level**: {profile_data.get('confidence', 'Medium')}\n- **First Observed**: {profile_data.get('first_seen', 'Unknown')}\n\n## Aliases\n{', '.join(profile_data.get('aliases', []))}\n\n## Targeting\n- **Sectors**: {', '.join(profile_data.get('sectors', []))}\n- **Regions**: {', '.join(profile_data.get('regions', []))}\n- **Motivation**: {profile_data.get('motivation', 'Unknown')}\n\n## TTP Summary (MITRE ATT&CK)\n\"\"\"\n    for tactic, techs in ttp_data.items():\n        if techs:\n            dossier += f\"\\n### {tactic.replace('_', ' ').title()}\\n\"\n            for t in techs:\n                dossier += f\"- **{t['id']}**: {t['name']}\\n\"\n\n    dossier += f\"\"\"\n## Infrastructure Patterns\n- Known C2 servers: {len(infrastructure_data.get('c2_servers', []))}\n- Domain patterns: {', '.join(infrastructure_data.get('domain_patterns', []))}\n- Hosting preferences: {', '.join(infrastructure_data.get('hosting', []))}\n\n## Recommendations\n1. Monitor for known TTPs in EDR\u002FSIEM\n2. Block known infrastructure indicators\n3. Hunt for behavioral patterns in network traffic\n4. Implement detections for top technique gaps\n\"\"\"\n    with open(f\"{actor_name.lower().replace(' ', '_')}_dossier.md\", \"w\") as f:\n        f.write(dossier)\n    print(f\"[+] Dossier saved for {actor_name}\")\n\ngenerate_dossier(\"APT29\", {\n    \"description\": \"Russian state-sponsored espionage group attributed to SVR\",\n    \"origin\": \"Russia\", \"sponsorship\": \"SVR (Foreign Intelligence Service)\",\n    \"confidence\": \"High\", \"first_seen\": \"2008\",\n    \"aliases\": [\"Cozy Bear\", \"Midnight Blizzard\", \"NOBELIUM\", \"The Dukes\"],\n    \"sectors\": [\"Government\", \"Diplomatic\", \"Think Tank\", \"Healthcare\", \"Energy\"],\n    \"regions\": [\"North America\", \"Europe\", \"NATO countries\"],\n    \"motivation\": \"Espionage\",\n}, profile_ttps, {\"c2_servers\": [], \"domain_patterns\": [], \"hosting\": []})\n```\n\n## Validation Criteria\n\n- Intelligence collected from at least 3 OSINT sources\n- STIX 2.1 Threat Actor and Intrusion Set objects created correctly\n- TTPs mapped to ATT&CK with technique IDs and procedure examples\n- Infrastructure indicators correlated across sources\n- Dossier includes attribution assessment with confidence levels\n- Profile is actionable for detection engineering and threat hunting\n\n## References\n\n- [Huntress: Threat Actor Profiling](https:\u002F\u002Fwww.huntress.com\u002Fcybersecurity-101\u002Ftopic\u002Fthreat-actor-profiling)\n- [CrowdStrike: OSINT in Cybersecurity](https:\u002F\u002Fwww.crowdstrike.com\u002Fen-us\u002Fcybersecurity-101\u002Fthreat-intelligence\u002Fopen-source-intelligence-osint\u002F)\n- [SpiderFoot OSINT Tool](https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot)\n- [MITRE ATT&CK Groups](https:\u002F\u002Fattack.mitre.org\u002Fgroups\u002F)\n- [ShadowDragon: OSINT Techniques](https:\u002F\u002Fshadowdragon.io\u002Fblog\u002Fosint-techniques\u002F)\n- [ISACA: Building a Threat-Led Cybersecurity Program](https:\u002F\u002Fwww.isaca.org\u002Fresources\u002Fwhite-papers\u002F2025\u002Fbuilding-a-threat-led-cybersecurity-program)\n","# Building Threat Actor Profile from OSINT\n\n## Overview\n\nThreat actor profiling using OSINT systematically gathers and analyzes publicly available information to build comprehensive profiles of adversary groups. This skill covers collecting intelligence from public sources (security vendor reports, paste sites, dark web forums, social media, code repositories), correlating indicators across platforms, mapping adversary infrastructure using tools like Maltego and SpiderFoot, and producing structured threat actor dossiers that inform defensive strategies and attribution assessments.\n\n\n## When to Use\n\n- When deploying or configuring building threat actor profile from osint capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Python 3.9+ with `shodan`, `requests`, `beautifulsoup4`, `maltego-trx`, `stix2` libraries\n- SpiderFoot (https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot) or SpiderFoot HX\n- Maltego CE or Maltego XL for link analysis\n- API keys: Shodan, VirusTotal, AlienVault OTX, PassiveTotal\u002FRiskIQ\n- MITRE ATT&CK knowledge for TTP mapping\n- Understanding of STIX 2.1 Intrusion Set, Threat Actor, and Identity SDOs\n\n## Key Concepts\n\n### OSINT Sources for Threat Actor Profiling\n\nPrimary intelligence sources include vendor threat reports (Mandiant, CrowdStrike, Recorded Future, Talos), government advisories (CISA, NSA, FBI joint advisories), academic research papers, malware repositories (VirusTotal, MalwareBazaar, Malpedia), paste sites (Pastebin, GitHub Gists), code repositories, social media accounts, dark web forums, and certificate transparency logs.\n\n### Structured Analytical Techniques\n\nProfiling uses the Diamond Model (adversary, infrastructure, capability, victim), Analysis of Competing Hypotheses (ACH) for attribution confidence, and MITRE ATT&CK mapping for TTP documentation. Link analysis tools like Maltego visualize relationships between indicators, infrastructure, and actors.\n\n### Profile Components\n\nA complete threat actor profile includes: aliases and naming conventions across vendors, suspected origin and sponsorship, motivation (espionage, financial, hacktivism, disruption), targeted sectors and geographies, known campaigns and operations, TTPs mapped to ATT&CK, toolset and malware families, infrastructure patterns, and historical timeline.\n\n## Workflow\n\n### Step 1: Collect Intelligence from Multiple Sources\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\n\nclass OSINTCollector:\n    def __init__(self, vt_key=None, otx_key=None, shodan_key=None):\n        self.vt_key = vt_key\n        self.otx_key = otx_key\n        self.shodan_key = shodan_key\n        self.collected_data = {\"sources\": [], \"indicators\": [], \"reports\": []}\n\n    def search_alienvault_otx(self, actor_name):\n        \"\"\"Search AlienVault OTX for threat actor pulses.\"\"\"\n        headers = {\"X-OTX-API-KEY\": self.otx_key}\n        url = f\"https:\u002F\u002Fotx.alienvault.com\u002Fapi\u002Fv1\u002Fsearch\u002Fpulses?q={actor_name}&limit=20\"\n        resp = requests.get(url, headers=headers)\n        if resp.status_code == 200:\n            data = resp.json()\n            pulses = data.get(\"results\", [])\n            for pulse in pulses:\n                self.collected_data[\"reports\"].append({\n                    \"source\": \"AlienVault OTX\",\n                    \"title\": pulse.get(\"name\", \"\"),\n                    \"created\": pulse.get(\"created\", \"\"),\n                    \"description\": pulse.get(\"description\", \"\")[:500],\n                    \"tags\": pulse.get(\"tags\", []),\n                    \"indicators_count\": len(pulse.get(\"indicators\", [])),\n                    \"pulse_id\": pulse.get(\"id\", \"\"),\n                })\n                for ioc in pulse.get(\"indicators\", []):\n                    self.collected_data[\"indicators\"].append({\n                        \"type\": ioc.get(\"type\", \"\"),\n                        \"value\": ioc.get(\"indicator\", \"\"),\n                        \"source\": \"OTX\",\n                        \"pulse\": pulse.get(\"name\", \"\"),\n                    })\n            print(f\"[+] OTX: Found {len(pulses)} pulses for '{actor_name}'\")\n        return self.collected_data\n\n    def search_virustotal_collections(self, actor_name):\n        \"\"\"Search VirusTotal for threat actor collections.\"\"\"\n        headers = {\"x-apikey\": self.vt_key}\n        url = \"https:\u002F\u002Fwww.virustotal.com\u002Fapi\u002Fv3\u002Fintelligence\u002Fsearch\"\n        params = {\"query\": f\"tag:{actor_name.lower().replace(' ', '-')}\"}\n        resp = requests.get(url, headers=headers, params=params)\n        if resp.status_code == 200:\n            results = resp.json().get(\"data\", [])\n            print(f\"[+] VT: Found {len(results)} samples tagged '{actor_name}'\")\n            return results\n        return []\n\n    def query_shodan_infrastructure(self, indicators):\n        \"\"\"Query Shodan for infrastructure details on IPs.\"\"\"\n        results = []\n        for ip in indicators:\n            url = f\"https:\u002F\u002Fapi.shodan.io\u002Fshodan\u002Fhost\u002F{ip}?key={self.shodan_key}\"\n            resp = requests.get(url)\n            if resp.status_code == 200:\n                data = resp.json()\n                results.append({\n                    \"ip\": ip,\n                    \"org\": data.get(\"org\", \"\"),\n                    \"asn\": data.get(\"asn\", \"\"),\n                    \"country\": data.get(\"country_code\", \"\"),\n                    \"ports\": data.get(\"ports\", []),\n                    \"hostnames\": data.get(\"hostnames\", []),\n                    \"os\": data.get(\"os\", \"\"),\n                    \"last_update\": data.get(\"last_update\", \"\"),\n                })\n        print(f\"[+] Shodan: Enriched {len(results)} IPs\")\n        return results\n\ncollector = OSINTCollector(\n    vt_key=\"YOUR_VT_KEY\",\n    otx_key=\"YOUR_OTX_KEY\",\n    shodan_key=\"YOUR_SHODAN_KEY\",\n)\ndata = collector.search_alienvault_otx(\"APT29\")\n```\n\n### Step 2: Build Structured Threat Actor Profile\n\n```python\nfrom stix2 import ThreatActor, IntrusionSet, Identity, Relationship, Bundle\nfrom datetime import datetime\n\n# Create STIX 2.1 Threat Actor profile\nidentity = Identity(\n    name=\"Cybersecurity Analyst\",\n    identity_class=\"individual\",\n)\n\nthreat_actor = ThreatActor(\n    name=\"APT29\",\n    description=\"APT29 (also known as Cozy Bear, Midnight Blizzard, NOBELIUM, The Dukes) \"\n                \"is a Russian state-sponsored threat group attributed to Russia's Foreign \"\n                \"Intelligence Service (SVR). Active since at least 2008, the group conducts \"\n                \"cyber espionage targeting government, diplomatic, think tank, healthcare, \"\n                \"and energy organizations primarily in NATO countries.\",\n    aliases=[\"Cozy Bear\", \"Midnight Blizzard\", \"NOBELIUM\", \"The Dukes\",\n             \"Dark Halo\", \"UNC2452\", \"YTTRIUM\", \"Blue Kitsune\", \"Iron Ritual\"],\n    roles=[\"agent\"],\n    sophistication=\"strategic\",\n    resource_level=\"government\",\n    primary_motivation=\"organizational-gain\",\n    secondary_motivations=[\"ideology\"],\n    threat_actor_types=[\"nation-state\"],\n    goals=[\"Intelligence collection on foreign governments\",\n           \"Long-term persistent access to high-value targets\",\n           \"Supply chain compromise for broad access\"],\n    created_by_ref=identity.id,\n)\n\nintrusion_set = IntrusionSet(\n    name=\"APT29\",\n    description=\"Intrusion set tracked as APT29, attributed to Russian SVR.\",\n    aliases=[\"Cozy Bear\", \"Midnight Blizzard\"],\n    first_seen=\"2008-01-01T00:00:00Z\",\n    goals=[\"espionage\"],\n    resource_level=\"government\",\n    primary_motivation=\"organizational-gain\",\n)\n\nrelationship = Relationship(\n    relationship_type=\"attributed-to\",\n    source_ref=intrusion_set.id,\n    target_ref=threat_actor.id,\n)\n\nbundle = Bundle(objects=[identity, threat_actor, intrusion_set, relationship])\nwith open(\"apt29_profile.json\", \"w\") as f:\n    f.write(bundle.serialize(pretty=True))\nprint(\"[+] STIX profile saved: apt29_profile.json\")\n```\n\n### Step 3: Map TTPs to MITRE ATT&CK\n\n```python\nfrom attackcti import attack_client\n\nlift = attack_client()\napt29_techs = lift.get_techniques_used_by_group(\"G0016\")\n\nprofile_ttps = {\n    \"initial_access\": [],\n    \"execution\": [],\n    \"persistence\": [],\n    \"defense_evasion\": [],\n    \"credential_access\": [],\n    \"lateral_movement\": [],\n    \"collection\": [],\n    \"c2\": [],\n    \"exfiltration\": [],\n}\n\ntactic_mapping = {\n    \"initial-access\": \"initial_access\",\n    \"execution\": \"execution\",\n    \"persistence\": \"persistence\",\n    \"defense-evasion\": \"defense_evasion\",\n    \"credential-access\": \"credential_access\",\n    \"lateral-movement\": \"lateral_movement\",\n    \"collection\": \"collection\",\n    \"command-and-control\": \"c2\",\n    \"exfiltration\": \"exfiltration\",\n}\n\nfor tech in apt29_techs:\n    tech_id = \"\"\n    for ref in tech.get(\"external_references\", []):\n        if ref.get(\"source_name\") == \"mitre-attack\":\n            tech_id = ref.get(\"external_id\", \"\")\n            break\n    for phase in tech.get(\"kill_chain_phases\", []):\n        tactic = phase.get(\"phase_name\", \"\")\n        key = tactic_mapping.get(tactic)\n        if key:\n            profile_ttps[key].append({\n                \"id\": tech_id,\n                \"name\": tech.get(\"name\", \"\"),\n                \"description\": tech.get(\"description\", \"\")[:200],\n            })\n\nprint(\"=== APT29 TTP Profile ===\")\nfor tactic, techs in profile_ttps.items():\n    if techs:\n        print(f\"\\n{tactic.upper()} ({len(techs)} techniques):\")\n        for t in techs[:5]:\n            print(f\"  {t['id']}: {t['name']}\")\n```\n\n### Step 4: Correlate Infrastructure with SpiderFoot\n\n```python\nimport subprocess\nimport json\n\ndef run_spiderfoot_scan(target, scan_name=\"actor_recon\"):\n    \"\"\"Run SpiderFoot scan against target domain or IP.\"\"\"\n    cmd = [\n        \"python3\", \"-m\", \"spiderfoot\", \"-s\", target,\n        \"-m\", \"sfp_dns,sfp_whois,sfp_shodan,sfp_virustotal,sfp_certspotter\",\n        \"-o\", \"json\", \"-q\",\n    ]\n    result = subprocess.run(cmd, capture_output=True, text=True, timeout=300)\n    if result.returncode == 0:\n        findings = json.loads(result.stdout) if result.stdout else []\n        print(f\"[+] SpiderFoot: {len(findings)} findings for {target}\")\n        return findings\n    return []\n\ndef correlate_infrastructure(indicators):\n    \"\"\"Find relationships between infrastructure indicators.\"\"\"\n    ip_to_domains = {}\n    domain_to_ips = {}\n    registrar_patterns = {}\n\n    for indicator in indicators:\n        ioc_type = indicator.get(\"type\", \"\")\n        value = indicator.get(\"value\", \"\")\n\n        if ioc_type == \"IP_ADDRESS\":\n            if value not in ip_to_domains:\n                ip_to_domains[value] = set()\n        elif ioc_type == \"INTERNET_NAME\":\n            if value not in domain_to_ips:\n                domain_to_ips[value] = set()\n\n    # Identify shared hosting, registration patterns\n    shared_ips = {ip: domains for ip, domains in ip_to_domains.items() if len(domains) > 1}\n    print(f\"[+] Shared infrastructure IPs: {len(shared_ips)}\")\n    return {\"shared_ips\": shared_ips, \"registrar_patterns\": registrar_patterns}\n```\n\n### Step 5: Generate Threat Actor Dossier\n\n```python\ndef generate_dossier(actor_name, profile_data, ttp_data, infrastructure_data):\n    dossier = f\"\"\"# Threat Actor Dossier: {actor_name}\n## Generated: {datetime.now().isoformat()}\n\n## Executive Summary\n{profile_data.get('description', '')}\n\n## Attribution\n- **Suspected Origin**: {profile_data.get('origin', 'Unknown')}\n- **Sponsorship**: {profile_data.get('sponsorship', 'Unknown')}\n- **Confidence Level**: {profile_data.get('confidence', 'Medium')}\n- **First Observed**: {profile_data.get('first_seen', 'Unknown')}\n\n## Aliases\n{', '.join(profile_data.get('aliases', []))}\n\n## Targeting\n- **Sectors**: {', '.join(profile_data.get('sectors', []))}\n- **Regions**: {', '.join(profile_data.get('regions', []))}\n- **Motivation**: {profile_data.get('motivation', 'Unknown')}\n\n## TTP Summary (MITRE ATT&CK)\n\"\"\"\n    for tactic, techs in ttp_data.items():\n        if techs:\n            dossier += f\"\\n### {tactic.replace('_', ' ').title()}\\n\"\n            for t in techs:\n                dossier += f\"- **{t['id']}**: {t['name']}\\n\"\n\n    dossier += f\"\"\"\n## Infrastructure Patterns\n- Known C2 servers: {len(infrastructure_data.get('c2_servers', []))}\n- Domain patterns: {', '.join(infrastructure_data.get('domain_patterns', []))}\n- Hosting preferences: {', '.join(infrastructure_data.get('hosting', []))}\n\n## Recommendations\n1. Monitor for known TTPs in EDR\u002FSIEM\n2. Block known infrastructure indicators\n3. Hunt for behavioral patterns in network traffic\n4. Implement detections for top technique gaps\n\"\"\"\n    with open(f\"{actor_name.lower().replace(' ', '_')}_dossier.md\", \"w\") as f:\n        f.write(dossier)\n    print(f\"[+] Dossier saved for {actor_name}\")\n\ngenerate_dossier(\"APT29\", {\n    \"description\": \"Russian state-sponsored espionage group attributed to SVR\",\n    \"origin\": \"Russia\", \"sponsorship\": \"SVR (Foreign Intelligence Service)\",\n    \"confidence\": \"High\", \"first_seen\": \"2008\",\n    \"aliases\": [\"Cozy Bear\", \"Midnight Blizzard\", \"NOBELIUM\", \"The Dukes\"],\n    \"sectors\": [\"Government\", \"Diplomatic\", \"Think Tank\", \"Healthcare\", \"Energy\"],\n    \"regions\": [\"North America\", \"Europe\", \"NATO countries\"],\n    \"motivation\": \"Espionage\",\n}, profile_ttps, {\"c2_servers\": [], \"domain_patterns\": [], \"hosting\": []})\n```\n\n## Validation Criteria\n\n- Intelligence collected from at least 3 OSINT sources\n- STIX 2.1 Threat Actor and Intrusion Set objects created correctly\n- TTPs mapped to ATT&CK with technique IDs and procedure examples\n- Infrastructure indicators correlated across sources\n- Dossier includes attribution assessment with confidence levels\n- Profile is actionable for detection engineering and threat hunting\n\n## References\n\n- [Huntress: Threat Actor Profiling](https:\u002F\u002Fwww.huntress.com\u002Fcybersecurity-101\u002Ftopic\u002Fthreat-actor-profiling)\n- [CrowdStrike: OSINT in Cybersecurity](https:\u002F\u002Fwww.crowdstrike.com\u002Fen-us\u002Fcybersecurity-101\u002Fthreat-intelligence\u002Fopen-source-intelligence-osint\u002F)\n- [SpiderFoot OSINT Tool](https:\u002F\u002Fgithub.com\u002Fsmicallef\u002Fspiderfoot)\n- [MITRE ATT&CK Groups](https:\u002F\u002Fattack.mitre.org\u002Fgroups\u002F)\n- [ShadowDragon: OSINT Techniques](https:\u002F\u002Fshadowdragon.io\u002Fblog\u002Fosint-techniques\u002F)\n- [ISACA: Building a Threat-Led Cybersecurity Program](https:\u002F\u002Fwww.isaca.org\u002Fresources\u002Fwhite-papers\u002F2025\u002Fbuilding-a-threat-led-cybersecurity-program)\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"nist_csf":37,"subdomain":32,"description":7,"mitre_attack":42},[26,27,28,29,30,31,32,33],"osint","threat-actor","threat-actor-profiling","maltego","spiderfoot","attribution","threat-intelligence","reconnaissance","mahipal","cybersecurity","1.0",[38,39,40,41],"ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02",[43,44,45,46],"T1591","T1589","T1593","T1590","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add NeelakshSaxena\u002FVayu --skill building-threat-actor-profile-from-osint",{"tool":60,"command":61},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill building-threat-actor-profile-from-osint",{"tool":63,"command":64},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill building-threat-actor-profile-from-osint","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint\u002FSKILL.md",true,[68,72,78],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fapi-reference.md","REFERENCE","参考文档",1839,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint\u002Freferences\u002Fapi-reference.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fagent.py","SCRIPT","脚本",6859,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbuilding-threat-actor-profile-from-osint\u002Fscripts\u002Fagent.py",[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]