[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M751K5EEZ3937Q8J0P04ZNDR":3,"skill-same:01M751K5EEZ3937Q8J0P04ZNDR":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},"01M751K5EEZ3937Q8J0P04ZNDR","implementing-soar-automation-with-phantom",null,"Implements Security Orchestration, Automation, and Response (SOAR) workflows using Splunk SOAR (formerly Phantom) to automate alert triage, IOC enrichment, containment actions, and incident response playbooks. Use when SOC teams need to reduce manual analyst work, standardize response procedures, or integrate multiple security tools into automated workflows.","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\u002Fimplementing-soar-automation-with-phantom\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-soar-automation-with-phantom\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: implementing-soar-automation-with-phantom\ndescription: >\n  Implements Security Orchestration, Automation, and Response (SOAR) workflows using Splunk SOAR\n  (formerly Phantom) to automate alert triage, IOC enrichment, containment actions, and incident\n  response playbooks. Use when SOC teams need to reduce manual analyst work, standardize response\n  procedures, or integrate multiple security tools into automated workflows.\ndomain: cybersecurity\nsubdomain: soc-operations\ntags: [soc, soar, phantom, splunk-soar, automation, playbook, orchestration, incident-response]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n# Implementing SOAR Automation with Phantom\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to automate repetitive triage and enrichment tasks for high-volume alerts\n- Manual response times exceed SLA requirements and automation can reduce MTTR\n- Multiple security tools (SIEM, EDR, firewall, TIP) need orchestrated response actions\n- Playbook standardization is required to ensure consistent analyst response across shifts\n\n**Do not use** for fully autonomous containment without human approval gates — always include analyst decision points for high-impact actions like account disabling or host isolation.\n\n## Prerequisites\n\n- Splunk SOAR (Phantom) 6.x+ deployed with web interface access\n- App connectors configured: VirusTotal, CrowdStrike, ServiceNow, Active Directory, Splunk ES\n- Splunk ES integration for ingesting notable events as SOAR events\n- API credentials for each integrated tool stored in SOAR asset configuration\n- Python knowledge for custom playbook actions\n\n## Workflow\n\n### Step 1: Configure Asset Connections\n\nSet up integrations with security tools via SOAR Apps:\n\n**VirusTotal Asset Configuration:**\n```json\n{\n  \"app\": \"VirusTotal v3\",\n  \"asset_name\": \"virustotal_prod\",\n  \"configuration\": {\n    \"api_key\": \"YOUR_VT_API_KEY\",\n    \"rate_limit\": true,\n    \"max_requests_per_minute\": 4\n  },\n  \"product_vendor\": \"VirusTotal\",\n  \"product_name\": \"VirusTotal\"\n}\n```\n\n**CrowdStrike Falcon Asset:**\n```json\n{\n  \"app\": \"CrowdStrike Falcon\",\n  \"asset_name\": \"crowdstrike_prod\",\n  \"configuration\": {\n    \"client_id\": \"CS_CLIENT_ID\",\n    \"client_secret\": \"CS_CLIENT_SECRET\",\n    \"base_url\": \"https:\u002F\u002Fapi.crowdstrike.com\"\n  }\n}\n```\n\n**Active Directory Asset:**\n```json\n{\n  \"app\": \"Active Directory\",\n  \"asset_name\": \"ad_prod\",\n  \"configuration\": {\n    \"server\": \"dc01.company.com\",\n    \"username\": \"soar_service@company.com\",\n    \"password\": \"SERVICE_ACCOUNT_PASSWORD\",\n    \"ssl\": true\n  }\n}\n```\n\n### Step 2: Build Phishing Triage Playbook\n\nCreate an automated phishing response playbook in Python (Phantom playbook format):\n\n```python\n\"\"\"\nPhishing Triage Automation Playbook\nTrigger: New phishing email reported via Splunk ES notable or email ingestion\n\"\"\"\n\nimport phantom.rules as phantom\nimport json\n\ndef on_start(container):\n    # Extract artifacts (URLs, file hashes, sender) from the container\n    artifacts = phantom.get_artifacts(container_id=container[\"id\"])\n\n    for artifact in artifacts:\n        artifact_type = artifact.get(\"cef\", {}).get(\"type\", \"\")\n\n        if artifact_type == \"url\":\n            phantom.act(\"url reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=url_reputation_callback,\n                        name=\"url_reputation\")\n\n        elif artifact_type == \"hash\":\n            phantom.act(\"file reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=hash_reputation_callback,\n                        name=\"file_reputation\")\n\n        elif artifact_type == \"ip\":\n            phantom.act(\"ip reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=ip_reputation_callback,\n                        name=\"ip_reputation\")\n\ndef url_reputation_callback(action, success, container, results, handle):\n    if not success:\n        phantom.comment(container, \"URL reputation check failed\")\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious_count = data.get(\"summary\", {}).get(\"malicious\", 0)\n        total_engines = data.get(\"summary\", {}).get(\"total_engines\", 0)\n\n        if malicious_count > 5:\n            # High confidence malicious — auto-block and escalate\n            phantom.act(\"block url\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_url\")\n\n            phantom.set_severity(container, \"high\")\n            phantom.set_status(container, \"open\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Blocked on firewall. Escalating to Tier 2.\")\n\n            # Create ServiceNow ticket\n            phantom.act(\"create ticket\", targets=container,\n                        assets=[\"servicenow_prod\"],\n                        parameters=[{\n                            \"short_description\": f\"Phishing - Malicious URL detected\",\n                            \"urgency\": \"2\",\n                            \"impact\": \"2\"\n                        }],\n                        name=\"create_incident_ticket\")\n\n        elif malicious_count > 0:\n            # Medium confidence — request analyst review\n            phantom.promote(container, template=\"Phishing Investigation\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Requires analyst review.\")\n\n        else:\n            # Clean — close with comment\n            phantom.set_status(container, \"closed\")\n            phantom.comment(container,\n                f\"URL clean: 0\u002F{total_engines} engines flagged. Auto-closed.\")\n\ndef hash_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        positives = data.get(\"summary\", {}).get(\"positives\", 0)\n\n        if positives > 10:\n            # Known malware — quarantine and block\n            phantom.act(\"quarantine device\", targets=result,\n                        assets=[\"crowdstrike_prod\"],\n                        name=\"isolate_endpoint\")\n            phantom.set_severity(container, \"high\")\n\ndef ip_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious = data.get(\"summary\", {}).get(\"malicious\", 0)\n\n        if malicious > 3:\n            phantom.act(\"block ip\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_ip\")\n```\n\n### Step 3: Build Alert Enrichment Playbook\n\nAutomate enrichment for all incoming SIEM alerts:\n\n```python\n\"\"\"\nUniversal Alert Enrichment Playbook\nRuns on every new event to add context before analyst review\n\"\"\"\n\nimport phantom.rules as phantom\n\ndef on_start(container):\n    # Get all artifacts\n    success, message, artifacts = phantom.get_artifacts(\n        container_id=container[\"id\"], full_data=True\n    )\n\n    ip_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"sourceAddress\")]\n    domain_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"destinationDnsDomain\")]\n\n    # Enrich IPs in parallel\n    for artifact in ip_artifacts:\n        ip = artifact[\"cef\"][\"sourceAddress\"]\n\n        # VirusTotal lookup\n        phantom.act(\"ip reputation\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"virustotal_prod\"],\n                    callback=enrich_ip_callback,\n                    name=f\"vt_ip_{ip}\")\n\n        # GeoIP lookup\n        phantom.act(\"geolocate ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"maxmind_prod\"],\n                    callback=geoip_callback,\n                    name=f\"geo_{ip}\")\n\n        # Whois lookup\n        phantom.act(\"whois ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"whois_prod\"],\n                    name=f\"whois_{ip}\")\n\n    # Enrich domains\n    for artifact in domain_artifacts:\n        domain = artifact[\"cef\"][\"destinationDnsDomain\"]\n        phantom.act(\"domain reputation\",\n                    parameters=[{\"domain\": domain}],\n                    assets=[\"virustotal_prod\"],\n                    name=f\"vt_domain_{domain}\")\n\ndef enrich_ip_callback(action, success, container, results, handle):\n    \"\"\"Update container with enrichment data\"\"\"\n    if success:\n        for result in results:\n            summary = result.get(\"summary\", {})\n            phantom.add_artifact(container, {\n                \"cef\": {\n                    \"vt_malicious\": summary.get(\"malicious\", 0),\n                    \"vt_suspicious\": summary.get(\"suspicious\", 0),\n                    \"enrichment_source\": \"VirusTotal\"\n                },\n                \"label\": \"enrichment\",\n                \"name\": \"VT IP Enrichment\"\n            })\n```\n\n### Step 4: Implement Approval Gates for High-Impact Actions\n\nAdd human-in-the-loop for critical actions:\n\n```python\ndef containment_decision(action, success, container, results, handle):\n    \"\"\"Present analyst with containment options\"\"\"\n    phantom.prompt(\n        container=container,\n        user=\"soc_tier2\",\n        message=(\n            \"Confirmed malicious activity detected.\\n\"\n            f\"Host: {container['artifacts'][0]['cef'].get('sourceAddress')}\\n\"\n            f\"Threat: {results[0]['summary'].get('threat_name')}\\n\\n\"\n            \"Select containment action:\"\n        ),\n        respond_in_mins=15,\n        options=[\"Isolate Host\", \"Disable Account\", \"Both\", \"Monitor Only\"],\n        callback=execute_containment\n    )\n\ndef execute_containment(action, success, container, results, handle):\n    response = results.get(\"response\", \"Monitor Only\")\n\n    if response in [\"Isolate Host\", \"Both\"]:\n        phantom.act(\"quarantine device\",\n                    parameters=[{\"hostname\": container[\"artifacts\"][0][\"cef\"][\"sourceHostName\"]}],\n                    assets=[\"crowdstrike_prod\"],\n                    name=\"isolate_host\")\n\n    if response in [\"Disable Account\", \"Both\"]:\n        phantom.act(\"disable user\",\n                    parameters=[{\"username\": container[\"artifacts\"][0][\"cef\"][\"sourceUserName\"]}],\n                    assets=[\"ad_prod\"],\n                    name=\"disable_account\")\n\n    phantom.comment(container, f\"Analyst approved: {response}\")\n```\n\n### Step 5: Configure Playbook Scheduling and Triggers\n\nSet up event triggers in SOAR:\n\n```json\n{\n  \"playbook_name\": \"phishing_triage_automation\",\n  \"trigger\": {\n    \"type\": \"event_created\",\n    \"conditions\": {\n      \"label\": [\"phishing\", \"notable\"],\n      \"severity\": [\"high\", \"medium\"]\n    }\n  },\n  \"active\": true,\n  \"run_as\": \"automation_user\"\n}\n```\n\n### Step 6: Monitor Playbook Performance\n\nTrack automation effectiveness with SOAR metrics:\n\n```python\n# Query SOAR API for playbook execution stats\nimport requests\n\nheaders = {\"ph-auth-token\": \"YOUR_SOAR_TOKEN\"}\nresponse = requests.get(\n    \"https:\u002F\u002Fsoar.company.com\u002Frest\u002Fplaybook_run\",\n    headers=headers,\n    params={\n        \"page_size\": 100,\n        \"filter\": '{\"status\":\"success\"}',\n        \"sort\": \"create_time\",\n        \"order\": \"desc\"\n    }\n)\nruns = response.json()[\"data\"]\n\n# Calculate automation metrics\ntotal_runs = len(runs)\navg_duration = sum(r[\"end_time\"] - r[\"start_time\"] for r in runs) \u002F total_runs\nauto_closed = sum(1 for r in runs if r.get(\"auto_resolved\"))\nprint(f\"Total runs: {total_runs}\")\nprint(f\"Avg duration: {avg_duration:.1f}s\")\nprint(f\"Auto-resolved: {auto_closed}\u002F{total_runs} ({auto_closed\u002Ftotal_runs*100:.0f}%)\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **SOAR** | Security Orchestration, Automation, and Response — platform integrating security tools with automated playbooks |\n| **Playbook** | Automated workflow defining sequential and parallel actions triggered by security events |\n| **Asset** | SOAR configuration for a connected security tool (API endpoint, credentials, connection parameters) |\n| **Container** | SOAR event object containing artifacts (IOCs) from an ingested alert or incident |\n| **Artifact** | Individual IOC or data point within a container (IP, hash, URL, domain, email) |\n| **Approval Gate** | Human-in-the-loop step requiring analyst decision before executing high-impact automated actions |\n\n## Tools & Systems\n\n- **Splunk SOAR (Phantom)**: Enterprise SOAR platform with 300+ app integrations and visual playbook editor\n- **Splunk ES**: SIEM platform feeding notable events into SOAR as containers for automated triage\n- **CrowdStrike Falcon**: EDR platform integrated via SOAR for automated host isolation and threat hunting\n- **ServiceNow**: ITSM platform integrated for automated incident ticket creation and tracking\n- **Palo Alto NGFW**: Firewall integrated for automated IP\u002FURL blocking via SOAR playbooks\n\n## Common Scenarios\n\n- **Phishing Triage**: Auto-extract URLs\u002Fattachments, detonate in sandbox, block malicious, create ticket\n- **Malware Alert Enrichment**: Auto-enrich file hashes across VT\u002FMalwareBazaar, isolate if confirmed malicious\n- **Brute Force Response**: Auto-check if attack succeeded, disable account if compromised, block source IP\n- **Threat Intel IOC Processing**: Auto-ingest TI feed IOCs, check against internal logs, create blocks for matches\n- **Vulnerability Alert Response**: Auto-query asset database for affected systems, create patching ticket with priority\n\n## Output Format\n\n```\nSOAR PLAYBOOK EXECUTION REPORT\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPlaybook:     Phishing Triage Automation v2.3\nContainer:    SOAR-2024-08921\nTrigger:      Notable event from Splunk ES (phishing)\n\nActions Executed:\n  [1] URL Reputation (VirusTotal)     — 14\u002F90 engines malicious    [2.1s]\n  [2] IP Reputation (AbuseIPDB)       — Confidence: 85%            [1.3s]\n  [3] Block URL (Palo Alto)           — Blocked on PA-5260         [0.8s]\n  [4] Block IP (Palo Alto)            — Blocked on PA-5260         [0.7s]\n  [5] Create Ticket (ServiceNow)      — INC0012345 created         [1.5s]\n  [6] Prompt Analyst (Tier 2)         — Response: \"Isolate Host\"   [4m 12s]\n  [7] Quarantine Device (CrowdStrike) — WORKSTATION-042 isolated   [3.2s]\n\nTotal Duration:    4m 22s (vs 35min avg manual triage)\nTime Saved:        ~31 minutes\nDisposition:       True Positive — Escalated to IR\n```\n","# Implementing SOAR Automation with Phantom\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to automate repetitive triage and enrichment tasks for high-volume alerts\n- Manual response times exceed SLA requirements and automation can reduce MTTR\n- Multiple security tools (SIEM, EDR, firewall, TIP) need orchestrated response actions\n- Playbook standardization is required to ensure consistent analyst response across shifts\n\n**Do not use** for fully autonomous containment without human approval gates — always include analyst decision points for high-impact actions like account disabling or host isolation.\n\n## Prerequisites\n\n- Splunk SOAR (Phantom) 6.x+ deployed with web interface access\n- App connectors configured: VirusTotal, CrowdStrike, ServiceNow, Active Directory, Splunk ES\n- Splunk ES integration for ingesting notable events as SOAR events\n- API credentials for each integrated tool stored in SOAR asset configuration\n- Python knowledge for custom playbook actions\n\n## Workflow\n\n### Step 1: Configure Asset Connections\n\nSet up integrations with security tools via SOAR Apps:\n\n**VirusTotal Asset Configuration:**\n```json\n{\n  \"app\": \"VirusTotal v3\",\n  \"asset_name\": \"virustotal_prod\",\n  \"configuration\": {\n    \"api_key\": \"YOUR_VT_API_KEY\",\n    \"rate_limit\": true,\n    \"max_requests_per_minute\": 4\n  },\n  \"product_vendor\": \"VirusTotal\",\n  \"product_name\": \"VirusTotal\"\n}\n```\n\n**CrowdStrike Falcon Asset:**\n```json\n{\n  \"app\": \"CrowdStrike Falcon\",\n  \"asset_name\": \"crowdstrike_prod\",\n  \"configuration\": {\n    \"client_id\": \"CS_CLIENT_ID\",\n    \"client_secret\": \"CS_CLIENT_SECRET\",\n    \"base_url\": \"https:\u002F\u002Fapi.crowdstrike.com\"\n  }\n}\n```\n\n**Active Directory Asset:**\n```json\n{\n  \"app\": \"Active Directory\",\n  \"asset_name\": \"ad_prod\",\n  \"configuration\": {\n    \"server\": \"dc01.company.com\",\n    \"username\": \"soar_service@company.com\",\n    \"password\": \"SERVICE_ACCOUNT_PASSWORD\",\n    \"ssl\": true\n  }\n}\n```\n\n### Step 2: Build Phishing Triage Playbook\n\nCreate an automated phishing response playbook in Python (Phantom playbook format):\n\n```python\n\"\"\"\nPhishing Triage Automation Playbook\nTrigger: New phishing email reported via Splunk ES notable or email ingestion\n\"\"\"\n\nimport phantom.rules as phantom\nimport json\n\ndef on_start(container):\n    # Extract artifacts (URLs, file hashes, sender) from the container\n    artifacts = phantom.get_artifacts(container_id=container[\"id\"])\n\n    for artifact in artifacts:\n        artifact_type = artifact.get(\"cef\", {}).get(\"type\", \"\")\n\n        if artifact_type == \"url\":\n            phantom.act(\"url reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=url_reputation_callback,\n                        name=\"url_reputation\")\n\n        elif artifact_type == \"hash\":\n            phantom.act(\"file reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=hash_reputation_callback,\n                        name=\"file_reputation\")\n\n        elif artifact_type == \"ip\":\n            phantom.act(\"ip reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=ip_reputation_callback,\n                        name=\"ip_reputation\")\n\ndef url_reputation_callback(action, success, container, results, handle):\n    if not success:\n        phantom.comment(container, \"URL reputation check failed\")\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious_count = data.get(\"summary\", {}).get(\"malicious\", 0)\n        total_engines = data.get(\"summary\", {}).get(\"total_engines\", 0)\n\n        if malicious_count > 5:\n            # High confidence malicious — auto-block and escalate\n            phantom.act(\"block url\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_url\")\n\n            phantom.set_severity(container, \"high\")\n            phantom.set_status(container, \"open\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Blocked on firewall. Escalating to Tier 2.\")\n\n            # Create ServiceNow ticket\n            phantom.act(\"create ticket\", targets=container,\n                        assets=[\"servicenow_prod\"],\n                        parameters=[{\n                            \"short_description\": f\"Phishing - Malicious URL detected\",\n                            \"urgency\": \"2\",\n                            \"impact\": \"2\"\n                        }],\n                        name=\"create_incident_ticket\")\n\n        elif malicious_count > 0:\n            # Medium confidence — request analyst review\n            phantom.promote(container, template=\"Phishing Investigation\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Requires analyst review.\")\n\n        else:\n            # Clean — close with comment\n            phantom.set_status(container, \"closed\")\n            phantom.comment(container,\n                f\"URL clean: 0\u002F{total_engines} engines flagged. Auto-closed.\")\n\ndef hash_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        positives = data.get(\"summary\", {}).get(\"positives\", 0)\n\n        if positives > 10:\n            # Known malware — quarantine and block\n            phantom.act(\"quarantine device\", targets=result,\n                        assets=[\"crowdstrike_prod\"],\n                        name=\"isolate_endpoint\")\n            phantom.set_severity(container, \"high\")\n\ndef ip_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious = data.get(\"summary\", {}).get(\"malicious\", 0)\n\n        if malicious > 3:\n            phantom.act(\"block ip\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_ip\")\n```\n\n### Step 3: Build Alert Enrichment Playbook\n\nAutomate enrichment for all incoming SIEM alerts:\n\n```python\n\"\"\"\nUniversal Alert Enrichment Playbook\nRuns on every new event to add context before analyst review\n\"\"\"\n\nimport phantom.rules as phantom\n\ndef on_start(container):\n    # Get all artifacts\n    success, message, artifacts = phantom.get_artifacts(\n        container_id=container[\"id\"], full_data=True\n    )\n\n    ip_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"sourceAddress\")]\n    domain_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"destinationDnsDomain\")]\n\n    # Enrich IPs in parallel\n    for artifact in ip_artifacts:\n        ip = artifact[\"cef\"][\"sourceAddress\"]\n\n        # VirusTotal lookup\n        phantom.act(\"ip reputation\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"virustotal_prod\"],\n                    callback=enrich_ip_callback,\n                    name=f\"vt_ip_{ip}\")\n\n        # GeoIP lookup\n        phantom.act(\"geolocate ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"maxmind_prod\"],\n                    callback=geoip_callback,\n                    name=f\"geo_{ip}\")\n\n        # Whois lookup\n        phantom.act(\"whois ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"whois_prod\"],\n                    name=f\"whois_{ip}\")\n\n    # Enrich domains\n    for artifact in domain_artifacts:\n        domain = artifact[\"cef\"][\"destinationDnsDomain\"]\n        phantom.act(\"domain reputation\",\n                    parameters=[{\"domain\": domain}],\n                    assets=[\"virustotal_prod\"],\n                    name=f\"vt_domain_{domain}\")\n\ndef enrich_ip_callback(action, success, container, results, handle):\n    \"\"\"Update container with enrichment data\"\"\"\n    if success:\n        for result in results:\n            summary = result.get(\"summary\", {})\n            phantom.add_artifact(container, {\n                \"cef\": {\n                    \"vt_malicious\": summary.get(\"malicious\", 0),\n                    \"vt_suspicious\": summary.get(\"suspicious\", 0),\n                    \"enrichment_source\": \"VirusTotal\"\n                },\n                \"label\": \"enrichment\",\n                \"name\": \"VT IP Enrichment\"\n            })\n```\n\n### Step 4: Implement Approval Gates for High-Impact Actions\n\nAdd human-in-the-loop for critical actions:\n\n```python\ndef containment_decision(action, success, container, results, handle):\n    \"\"\"Present analyst with containment options\"\"\"\n    phantom.prompt(\n        container=container,\n        user=\"soc_tier2\",\n        message=(\n            \"Confirmed malicious activity detected.\\n\"\n            f\"Host: {container['artifacts'][0]['cef'].get('sourceAddress')}\\n\"\n            f\"Threat: {results[0]['summary'].get('threat_name')}\\n\\n\"\n            \"Select containment action:\"\n        ),\n        respond_in_mins=15,\n        options=[\"Isolate Host\", \"Disable Account\", \"Both\", \"Monitor Only\"],\n        callback=execute_containment\n    )\n\ndef execute_containment(action, success, container, results, handle):\n    response = results.get(\"response\", \"Monitor Only\")\n\n    if response in [\"Isolate Host\", \"Both\"]:\n        phantom.act(\"quarantine device\",\n                    parameters=[{\"hostname\": container[\"artifacts\"][0][\"cef\"][\"sourceHostName\"]}],\n                    assets=[\"crowdstrike_prod\"],\n                    name=\"isolate_host\")\n\n    if response in [\"Disable Account\", \"Both\"]:\n        phantom.act(\"disable user\",\n                    parameters=[{\"username\": container[\"artifacts\"][0][\"cef\"][\"sourceUserName\"]}],\n                    assets=[\"ad_prod\"],\n                    name=\"disable_account\")\n\n    phantom.comment(container, f\"Analyst approved: {response}\")\n```\n\n### Step 5: Configure Playbook Scheduling and Triggers\n\nSet up event triggers in SOAR:\n\n```json\n{\n  \"playbook_name\": \"phishing_triage_automation\",\n  \"trigger\": {\n    \"type\": \"event_created\",\n    \"conditions\": {\n      \"label\": [\"phishing\", \"notable\"],\n      \"severity\": [\"high\", \"medium\"]\n    }\n  },\n  \"active\": true,\n  \"run_as\": \"automation_user\"\n}\n```\n\n### Step 6: Monitor Playbook Performance\n\nTrack automation effectiveness with SOAR metrics:\n\n```python\n# Query SOAR API for playbook execution stats\nimport requests\n\nheaders = {\"ph-auth-token\": \"YOUR_SOAR_TOKEN\"}\nresponse = requests.get(\n    \"https:\u002F\u002Fsoar.company.com\u002Frest\u002Fplaybook_run\",\n    headers=headers,\n    params={\n        \"page_size\": 100,\n        \"filter\": '{\"status\":\"success\"}',\n        \"sort\": \"create_time\",\n        \"order\": \"desc\"\n    }\n)\nruns = response.json()[\"data\"]\n\n# Calculate automation metrics\ntotal_runs = len(runs)\navg_duration = sum(r[\"end_time\"] - r[\"start_time\"] for r in runs) \u002F total_runs\nauto_closed = sum(1 for r in runs if r.get(\"auto_resolved\"))\nprint(f\"Total runs: {total_runs}\")\nprint(f\"Avg duration: {avg_duration:.1f}s\")\nprint(f\"Auto-resolved: {auto_closed}\u002F{total_runs} ({auto_closed\u002Ftotal_runs*100:.0f}%)\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **SOAR** | Security Orchestration, Automation, and Response — platform integrating security tools with automated playbooks |\n| **Playbook** | Automated workflow defining sequential and parallel actions triggered by security events |\n| **Asset** | SOAR configuration for a connected security tool (API endpoint, credentials, connection parameters) |\n| **Container** | SOAR event object containing artifacts (IOCs) from an ingested alert or incident |\n| **Artifact** | Individual IOC or data point within a container (IP, hash, URL, domain, email) |\n| **Approval Gate** | Human-in-the-loop step requiring analyst decision before executing high-impact automated actions |\n\n## Tools & Systems\n\n- **Splunk SOAR (Phantom)**: Enterprise SOAR platform with 300+ app integrations and visual playbook editor\n- **Splunk ES**: SIEM platform feeding notable events into SOAR as containers for automated triage\n- **CrowdStrike Falcon**: EDR platform integrated via SOAR for automated host isolation and threat hunting\n- **ServiceNow**: ITSM platform integrated for automated incident ticket creation and tracking\n- **Palo Alto NGFW**: Firewall integrated for automated IP\u002FURL blocking via SOAR playbooks\n\n## Common Scenarios\n\n- **Phishing Triage**: Auto-extract URLs\u002Fattachments, detonate in sandbox, block malicious, create ticket\n- **Malware Alert Enrichment**: Auto-enrich file hashes across VT\u002FMalwareBazaar, isolate if confirmed malicious\n- **Brute Force Response**: Auto-check if attack succeeded, disable account if compromised, block source IP\n- **Threat Intel IOC Processing**: Auto-ingest TI feed IOCs, check against internal logs, create blocks for matches\n- **Vulnerability Alert Response**: Auto-query asset database for affected systems, create patching ticket with priority\n\n## Output Format\n\n```\nSOAR PLAYBOOK EXECUTION REPORT\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPlaybook:     Phishing Triage Automation v2.3\nContainer:    SOAR-2024-08921\nTrigger:      Notable event from Splunk ES (phishing)\n\nActions Executed:\n  [1] URL Reputation (VirusTotal)     — 14\u002F90 engines malicious    [2.1s]\n  [2] IP Reputation (AbuseIPDB)       — Confidence: 85%            [1.3s]\n  [3] Block URL (Palo Alto)           — Blocked on PA-5260         [0.8s]\n  [4] Block IP (Palo Alto)            — Blocked on PA-5260         [0.7s]\n  [5] Create Ticket (ServiceNow)      — INC0012345 created         [1.5s]\n  [6] Prompt Analyst (Tier 2)         — Response: \"Isolate Host\"   [4m 12s]\n  [7] Quarantine Device (CrowdStrike) — WORKSTATION-042 isolated   [3.2s]\n\nTotal Duration:    4m 22s (vs 35min avg manual triage)\nTime Saved:        ~31 minutes\nDisposition:       True Positive — Escalated to IR\n```\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":37,"description":38},[26,27,28,29,30,31,32,33],"soc","soar","phantom","splunk-soar","automation","playbook","orchestration","incident-response","mahipal","cybersecurity","1.0","soc-operations","Implements Security Orchestration, Automation, and Response (SOAR) workflows using Splunk SOAR (formerly Phantom) to automate alert triage, IOC enrichment, containment actions, and incident response playbooks. Use when SOC teams need to reduce manual analyst work, standardize response procedures, or integrate multiple security tools into automated workflows.\n","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 implementing-soar-automation-with-phantom",{"tool":51,"command":52},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-soar-automation-with-phantom",{"tool":54,"command":55},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill implementing-soar-automation-with-phantom","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-soar-automation-with-phantom\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","参考文档",2620,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-soar-automation-with-phantom\u002Freferences\u002Fapi-reference.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fagent.py","SCRIPT","脚本",9597,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fimplementing-soar-automation-with-phantom\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",[],[]]