{
  "attack_id": "socket-litellm-supply-chain-2026-10",
  "status": "catalog_recommendations_not_validated_coverage",
  "stages": [
    {
      "node_id": "supply-chain",
      "profile": "repository",
      "title": "Private access → public repository artifact",
      "hypothesis": "A token or agent reads private material and creates a public issue, repository, commit or visibility change inconsistent with the approved task.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Git-provider organization / enterprise audit",
        "Repository and token permission inventory",
        "Agent tool and secret-scanning / DLP records"
      ],
      "investigate": [
        "Join access and public-write actions by actor / token and time; inspect visibility changes and newly created repositories.",
        "Verify whether the artifact contains sensitive data using approved scanning, retaining original source qualifications."
      ],
      "limitation": "Git-provider audit completeness depends on product and plan. Not every file read or issue body is present in organization audit logs.",
      "queries": {
        "sigma": "title: Hunt - Private access → public repository artifact\nid: b7b2d3f0-8170-4225-accb-c20633364ef4\nstatus: experimental\ndescription: A token or agent reads private material and creates a public issue,\n  repository, commit or visibility change inconsistent with the approved task.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - repository.public.write\n      - repository.visibility.change\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"repository.public.write\", \"repository.visibility.change\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"repository.public.write\", \"repository.visibility.change\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/repository.yaml",
      "query_downloads": {
        "sigma": "/api/detections/repository.sigma.yml",
        "kql": "/api/detections/repository.kql",
        "spl": "/api/detections/repository.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "distribution",
      "profile": "package",
      "title": "Dependency / CI trust boundary",
      "hypothesis": "A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Package-manager and CI job logs",
        "Lockfile / manifest / workflow diffs",
        "Runner process trees, secret access and egress"
      ],
      "investigate": [
        "Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.",
        "Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise."
      ],
      "limitation": "Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.",
      "queries": {
        "sigma": "title: Hunt - Dependency / CI trust boundary\nid: 5fa9c45a-ac1c-4666-a598-e80626320997\nstatus: experimental\ndescription: A package or workflow change introduces a lifecycle hook, remote\n  dependency or new command that accesses secrets or external services.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - package.install\n      - ci.workflow.change\n      - package.lifecycle.exec\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"package.install\", \"ci.workflow.change\", \"package.lifecycle.exec\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/package.yaml",
      "query_downloads": {
        "sigma": "/api/detections/package.sigma.yml",
        "kql": "/api/detections/package.kql",
        "spl": "/api/detections/package.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "installation",
      "profile": "python-startup-persistence",
      "title": "Python startup-hook persistence",
      "hypothesis": "A package or installer creates sitecustomize.py, usercustomize.py, or a .pth startup hook in a Python environment, causing code to run during later interpreter starts.",
      "visibility": "Endpoint file telemetry where collected",
      "telemetry": [
        "File creation and modification events for Python library directories",
        "Package-manager and installer process trees",
        "Subsequent Python process and network activity"
      ],
      "investigate": [
        "Inspect the hook contents, owner, package provenance, and creating process.",
        "Correlate later Python launches with child processes, credential access, or unexpected egress."
      ],
      "limitation": "Legitimate packages use .pth files and customization hooks. File telemetry must cover the relevant environment, and the rule does not establish that the hook later executed.",
      "queries": {
        "sigma": "title: Hunt - Python Startup Hook Creation\nid: e229b088-94e8-4254-8bfb-fc1e03173def\nstatus: experimental\ndescription: Detects creation of Python customization or path startup hooks.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-11-06\nreferences:\n  - https://github.com/elastic/detection-rules/blob/main/rules/linux/persistence_site_and_user_customize_file_creation.toml\n  - https://github.com/splunk/security_content/blob/develop/detections/endpoint/python_site_hooks_creation_during_package_installation.yml\nfalsepositives:\n  - Legitimate Python package installation and environment management\nlevel: medium\nlogsource:\n  category: file_event\ndetection:\n  selection_named_hook:\n    TargetFilename|endswith:\n      - /sitecustomize.py\n      - /usercustomize.py\n  selection_pth:\n    TargetFilename|contains:\n      - /site-packages/\n      - /dist-packages/\n    TargetFilename|endswith: .pth\n  condition: 1 of selection_*\n",
        "kql": "DeviceFileEvents\n| where Timestamp > ago(7d)\n| where ActionType in (\"FileCreated\", \"FileModified\", \"FileRenamed\")\n| where FileName in~ (\"sitecustomize.py\", \"usercustomize.py\")\n    or (FileName endswith \".pth\" and FolderPath has_any (\"/site-packages/\", \"/dist-packages/\", \"\\\\site-packages\\\\\"))\n| project Timestamp, DeviceName, InitiatingProcessAccountName, FolderPath, FileName,\n    InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1\n| order by Timestamp desc",
        "spl": "sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon/Operational\" EventCode=11\n(TargetFilename=\"*\\\\sitecustomize.py\" OR TargetFilename=\"*\\\\usercustomize.py\"\n  OR TargetFilename=\"*\\\\site-packages\\\\*.pth\")\n| table _time host User Image TargetFilename ProcessGuid\n| sort - _time"
      },
      "query_scope": "Python startup-hook file candidates. Tune approved packages and environments, then correlate the file event with interpreter execution.",
      "query_kind": "native",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/python-startup-persistence.yaml",
      "query_downloads": {
        "sigma": "/api/detections/python-startup-persistence.sigma.yml",
        "kql": "/api/detections/python-startup-persistence.kql",
        "spl": "/api/detections/python-startup-persistence.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-11-06",
      "upstream_matches": [
        {
          "name": "Python Site or User Customize File Creation",
          "id": "d788313c-9e0b-4c5a-8c4b-c3f05a47d5a8",
          "source": "Elastic detection-rules",
          "url": "https://github.com/elastic/detection-rules/blob/main/rules/linux/persistence_site_and_user_customize_file_creation.toml"
        },
        {
          "name": "Python Site Hooks Creation During Package Installation",
          "id": "efaf40f5-779f-4b48-a941-b7d1a7c931ed",
          "source": "Splunk Security Content",
          "url": "https://github.com/splunk/security_content/blob/develop/detections/endpoint/python_site_hooks_creation_during_package_installation.yml"
        }
      ]
    },
    {
      "node_id": "collection",
      "profile": "credentials",
      "title": "Sensitive store access → credential use",
      "hypothesis": "An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "File-read / API access telemetry for relevant secret stores",
        "Process identity and command lines",
        "Identity, token and outbound-network audit logs"
      ],
      "investigate": [
        "Identify the actor, process and exact store touched, then pivot to token use from new devices or infrastructure.",
        "Correlate reads with egress and rotate affected credentials after confirming exposure."
      ],
      "limitation": "Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.",
      "queries": {
        "sigma": "title: Hunt - Sensitive store access → credential use\nid: 46c46c62-2d83-4198-a8bf-d6637094527b\nstatus: experimental\ndescription: An unexpected process or tool accesses credential stores and is\n  followed by token use or outbound transfer inconsistent with the owner.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - secret.read\n      - credential.store.read\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"secret.read\", \"credential.store.read\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"secret.read\", \"credential.store.read\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/credentials.yaml",
      "query_downloads": {
        "sigma": "/api/detections/credentials.sigma.yml",
        "kql": "/api/detections/credentials.kql",
        "spl": "/api/detections/credentials.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "exfiltration",
      "profile": "exfil",
      "title": "Sensitive data → unusual destination",
      "hypothesis": "Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.",
      "visibility": "Defender-side logs where collected",
      "telemetry": [
        "Sensitive resource access / DLP records",
        "Proxy, egress and cloud upload events",
        "Agent / SaaS audit with correlation IDs"
      ],
      "investigate": [
        "Join the resource read and outbound action by session, identity or process, preserving a bounded time window.",
        "Inspect destination ownership, payload classification and the user's intended action; baseline sanctioned sharing."
      ],
      "limitation": "An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.",
      "queries": {
        "sigma": "title: Hunt - Sensitive data → unusual destination\nid: 04b60968-3179-4b1f-ae13-6f57c2446077\nstatus: experimental\ndescription: Sensitive reads are followed by outbound transfer, a public\n  artifact, or a tool call to a destination outside the approved workflow.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-10-23\nfalsepositives:\n  - Authorized activity matching this broad hunt; baseline and investigate\n    before alerting.\nlevel: low\nlogsource:\n  category: application\n  product: openattacks_audit\n  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,\n    Target and CorrelationId from the required source logs first.\ndetection:\n  selection:\n    EventType:\n      - data.export\n      - agent.external.send\n  condition: selection\n",
        "kql": "// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.\n// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).\n// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.\nOpenAttacksAudit_CL\n| where TimeGenerated > ago(7d)\n| where EventType in (\"data.export\", \"agent.external.send\")\n| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId\n| order by TimeGenerated desc",
        "spl": "sourcetype=\"openattacks:audit\"\nEventType IN (\"data.export\", \"agent.external.send\")\n| table _time EventType Actor Asset Action Target CorrelationId\n| sort - _time"
      },
      "query_scope": "Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.",
      "query_kind": "custom_schema",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/exfil.yaml",
      "query_downloads": {
        "sigma": "/api/detections/exfil.sigma.yml",
        "kql": "/api/detections/exfil.kql",
        "spl": "/api/detections/exfil.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-10-23",
      "upstream_matches": []
    },
    {
      "node_id": "persistence",
      "profile": "python-startup-persistence",
      "title": "Python startup-hook persistence",
      "hypothesis": "A package or installer creates sitecustomize.py, usercustomize.py, or a .pth startup hook in a Python environment, causing code to run during later interpreter starts.",
      "visibility": "Endpoint file telemetry where collected",
      "telemetry": [
        "File creation and modification events for Python library directories",
        "Package-manager and installer process trees",
        "Subsequent Python process and network activity"
      ],
      "investigate": [
        "Inspect the hook contents, owner, package provenance, and creating process.",
        "Correlate later Python launches with child processes, credential access, or unexpected egress."
      ],
      "limitation": "Legitimate packages use .pth files and customization hooks. File telemetry must cover the relevant environment, and the rule does not establish that the hook later executed.",
      "queries": {
        "sigma": "title: Hunt - Python Startup Hook Creation\nid: e229b088-94e8-4254-8bfb-fc1e03173def\nstatus: experimental\ndescription: Detects creation of Python customization or path startup hooks.\nauthor: MagicSword OpenAttacks catalog\ndate: 2026-11-06\nreferences:\n  - https://github.com/elastic/detection-rules/blob/main/rules/linux/persistence_site_and_user_customize_file_creation.toml\n  - https://github.com/splunk/security_content/blob/develop/detections/endpoint/python_site_hooks_creation_during_package_installation.yml\nfalsepositives:\n  - Legitimate Python package installation and environment management\nlevel: medium\nlogsource:\n  category: file_event\ndetection:\n  selection_named_hook:\n    TargetFilename|endswith:\n      - /sitecustomize.py\n      - /usercustomize.py\n  selection_pth:\n    TargetFilename|contains:\n      - /site-packages/\n      - /dist-packages/\n    TargetFilename|endswith: .pth\n  condition: 1 of selection_*\n",
        "kql": "DeviceFileEvents\n| where Timestamp > ago(7d)\n| where ActionType in (\"FileCreated\", \"FileModified\", \"FileRenamed\")\n| where FileName in~ (\"sitecustomize.py\", \"usercustomize.py\")\n    or (FileName endswith \".pth\" and FolderPath has_any (\"/site-packages/\", \"/dist-packages/\", \"\\\\site-packages\\\\\"))\n| project Timestamp, DeviceName, InitiatingProcessAccountName, FolderPath, FileName,\n    InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1\n| order by Timestamp desc",
        "spl": "sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon/Operational\" EventCode=11\n(TargetFilename=\"*\\\\sitecustomize.py\" OR TargetFilename=\"*\\\\usercustomize.py\"\n  OR TargetFilename=\"*\\\\site-packages\\\\*.pth\")\n| table _time host User Image TargetFilename ProcessGuid\n| sort - _time"
      },
      "query_scope": "Python startup-hook file candidates. Tune approved packages and environments, then correlate the file event with interpreter execution.",
      "query_kind": "native",
      "origin": "catalog_authored",
      "definition_url": "https://github.com/magicsword-io/openattacks/blob/main/detections/python-startup-persistence.yaml",
      "query_downloads": {
        "sigma": "/api/detections/python-startup-persistence.sigma.yml",
        "kql": "/api/detections/python-startup-persistence.kql",
        "spl": "/api/detections/python-startup-persistence.spl"
      },
      "validation": "draft",
      "evidence": [
        "https://socket.dev/blog/litellm-compromise"
      ],
      "reviewed": "2026-11-06",
      "upstream_matches": [
        {
          "name": "Python Site or User Customize File Creation",
          "id": "d788313c-9e0b-4c5a-8c4b-c3f05a47d5a8",
          "source": "Elastic detection-rules",
          "url": "https://github.com/elastic/detection-rules/blob/main/rules/linux/persistence_site_and_user_customize_file_creation.toml"
        },
        {
          "name": "Python Site Hooks Creation During Package Installation",
          "id": "efaf40f5-779f-4b48-a941-b7d1a7c931ed",
          "source": "Splunk Security Content",
          "url": "https://github.com/splunk/security_content/blob/develop/detections/endpoint/python_site_hooks_creation_during_package_installation.yml"
        }
      ]
    }
  ],
  "attack_flow": {
    "nodes": [
      {
        "id": "supply-chain",
        "title": "Compromised release workflow",
        "description": "Project release workflow used lookalike repository Berri-AI/litellm (hyphenated) instead of legitimate BerriAI/litellm; malicious commit added Maturin data directory; build provenance recorded source-owner override",
        "kind": "access",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      },
      {
        "id": "distribution",
        "title": "Malicious package distribution",
        "description": "Published litellm 1.107.0 to PyPI (7 wheels across macOS/Linux/Windows) and Docker images to GHCR with floating tags (latest, main-latest, main-stable)",
        "kind": "execution",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      },
      {
        "id": "installation",
        "title": "Python startup hook installation",
        "description": "Wheels install cook.pth, cook.py, sitecustomize.py to environment's Python library directory; triggered automatically on any Python startup",
        "kind": "execution",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      },
      {
        "id": "collection",
        "title": "Credential collection",
        "description": "Collects AWS/Azure/GCP/K8s, AI tools (Codex/Claude/Gemini/Cursor/Copilot/Windsurf), SSH/GPG keys, browser data, LiteLLM proxy DB credentials, environment variables; 16 collection modules with individual error handling",
        "kind": "ai",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      },
      {
        "id": "exfiltration",
        "title": "Encrypted exfiltration",
        "description": "Data encrypted with AES-256-CBC, key wrapped with RSA-4096 public key, packaged in gzip tar; POSTed to www.litellm.dev/healthcheck with X-Token header; up to 4 retry attempts",
        "kind": "impact",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      },
      {
        "id": "persistence",
        "title": "Remote code loader",
        "description": "sitecustomize.py forks detached process; downloads domain.txt from GitHub repo letters9813/pythonclient-test; if domain resolves, downloads and executes Python from /codepy endpoint; 1-hour loop",
        "kind": "execution",
        "source_urls": [
          "https://socket.dev/blog/litellm-compromise"
        ]
      }
    ],
    "edges": [
      {
        "source": "supply-chain",
        "target": "distribution"
      },
      {
        "source": "distribution",
        "target": "installation"
      },
      {
        "source": "installation",
        "target": "collection"
      },
      {
        "source": "collection",
        "target": "exfiltration"
      },
      {
        "source": "installation",
        "target": "persistence"
      },
      {
        "source": "persistence",
        "target": "collection",
        "loop": true
      }
    ]
  }
}