Playbooks

T1195

Supply Chain Incident Response Playbook

A structured playbook for detecting, containing, and recovering from supply chain attacks — including software dependency compromises, third-party vendor breaches, and CI/CD pipeline attacks.

View on Graph

What This Playbook Covers

  • Supply chain attacks are categorized under MITRE ATT&CK T1195 (Supply Chain Compromise), with sub-techniques for software (T1195.002), hardware (T1195.003), and code repositories (T1195.001)
  • This playbook covers three common supply chain scenarios: software dependency compromise, third-party vendor/data breach, and CI/CD pipeline backdoor
  • Supply chain incidents require a different response than direct breaches because the attacker’s initial access point is outside your control — you are detecting the downstream effect

Supply Chain Attack Types

TypeAttack VectorDetection Challenge
Software dependencyMalicious package in npm, PyPI, Maven, or NuGetDependency scanning may not detect compromised packages
Vendor compromiseAttacker gains access through a trusted vendor/VPN/MSPTraffic from the vendor looks legitimate (trusted IP, valid VPN)
CI/CD pipelineAttacker backdoors the build pipeline to inject malicious codeThe code passes all automated checks because it comes from the build system
Hardware/firmwareCompromised hardware or firmware at manufacturingExtremely difficult to detect — no software signature

Phase 0: Determine the Supply Chain Attack Type (0-15 minutes)

Software Dependency Compromise Indicators

IndicatorWhere to CheckWhat It Means
Unexpected network connections from build processesBuild logs, Sysmon Event 3 — unusual outbound connections from CI/CD runnersThe compromised dependency is beaconing
New dependencies in lock filepackage-lock.json, requirements.txt, go.sumA dependency was swapped or added without a corresponding PR review
Anomalous code in build artifactSAST, code review — unexpected code in the compiled outputThe dependency injected code during the build
CVE for a direct or transitive dependencyDependency scanning (Snyk, Dependabot, Trivy)Known-vulnerable dependency — may already be exploited
Unexpected file writes during buildBuild system logs — artifacts writing to unexpected pathsMalicious package modifying the build environment

SPL query — detect anomalous network connections from build servers:

index=endpoints EventCode=3
| search ComputerName IN ("build-server*", "jenkins*", "gitlab-runner*")
| stats values(DestinationIp) as DstIPs, values(DestinationPort) as DstPorts by ComputerName, SourceIp
| where mvcount(DstIPs) > 3 AND NOT DstIPs IN (known_build_registry_ips)
| eval alert = "HIGH — build server " . ComputerName . " connected to " . mvjoin(DstIPs, ",") . " outside known registries"

Vendor Compromise Indicators

IndicatorWhere to CheckWhat It Means
Suspicious activity from vendor VPNVPN logs — vendor connects at unusual times, from unusual IPsVendor credentials compromised
Anomalous vendor access to sensitive dataFile audit, cloud logs — vendor accessing data outside their scopeLateral movement within the vendor’s network
Vendor support ticket escalationTicketing system — vendor requesting privileges outside their scopeSocial engineering via support channel
Unexpected vendor software updateChange management — vendor pushing an “emergency” patchAttacker using vendor update mechanism as delivery vector
Zero-day in vendor productCVE database, vendor advisoryThe vendor’s software itself is compromised

SIEM detection — vendor VPN anomalous access:

index=vpn VendorName="*" AND ConnectionType="VPN"
| eval is_off_hours = if(date_wday == 0 OR date_wday == 6 OR (date_hour < 6 OR date_hour > 18), 1, 0)
| stats count by VendorName, AccountName, is_off_hours, SourceIP
| where is_off_hours == 1 AND SourceIP NOT IN (known_vendor_ips)
| eval alert = "MEDIUM — vendor " . VendorName . " account " . AccountName . " connected from new IP " . SourceIP . " during off-hours"
| table _time, VendorName, AccountName, SourceIP, alert

CI/CD Pipeline Compromise Indicators

IndicatorWhere to CheckWhat It Means
Build process modification without PRCI/CD audit logs — pipeline config changed without code reviewPipeline configuration attack
Unexpected build output changeArtifact hash comparison — output hash changed without source code changeAttacker modified the build output independently of source
CI/CD credential usage anomaliesSecret vault logs — CI/CD service account accessing unusual resourcesStolen CI/CD credentials
Pre-built binary in repositoryCode review — committed binary files that should be built from sourceBackdoor injected via binary artifact
Compromised maintainer accountGitHub/GitLab audit logs — maintainer account with anomalous activityAttacker can push directly to the repository

Phase 1: Immediate Containment (15-30 minutes)

Critical Actions — Do These First

For software dependency compromise:

  • Pin the affected dependency version — lock the dependency to the last known good version
  • Stop the CI/CD pipeline — prevent further builds from using the compromised dependency
  • Block outbound connections from build servers — temporary network ACL to contain beaconing
  • Remove the malicious packagenpm uninstall, pip uninstall, or go module removal
  • Scan the dependency tree — check for other packages from the same author or registry

For vendor compromise:

  • Disable the vendor’s VPN access — temporary revocation pending investigation
  • Disable vendor service accounts — revoke any service accounts or API keys the vendor uses
  • Review vendor access scope — determine what data, systems, and networks the vendor could reach
  • Change shared secrets — rotate any shared credentials, API keys, or certificates
  • Contact the vendor — inform the vendor’s security team of suspected compromise

For CI/CD pipeline compromise:

  • Freeze the pipeline — prevent all deployments, not just production
  • Rotate all CI/CD secrets — every API key, token, and password stored in the CI/CD system
  • Reset CI/CD credentials — change the CI/CD service account and access tokens
  • Review recent builds — compare build output hash with source code hash for every build in the compromise window

What NOT to Do

ActionWhy It’s Dangerous
Continue builds from the same pipelineEvery build may produce compromised output
Assume only production is affectedIf the pipeline is compromised, staging, test, and dev artifacts are also compromised
Roll back without verifying the previous buildThe “last good build” may also have been compromised
Ignore transitive dependenciesThe vulnerability may be in a dependency-of-a-dependency (indirect)

Phase 2: Evidence Preservation (30-60 minutes)

Evidence to Capture

EvidenceMethodWhy Important
Build logs (90+ days)CI/CD system logs — all pipeline runs, commit hashes, output artifactsTimeline of when the compromised code was introduced
Dependency lock filespackage-lock.json, requirements.txt, go.sum at every point in timeShows when the malicious dependency was introduced
Vendor VPN logs (90+ days)VPN logs showing all vendor connectionsTimeline of vendor access — shows when the vendor was compromised
Artifact hashesSHA256 hashes of all build artifacts in the compromise windowCompare with known-good hashes from registry
Repository audit logsGitHub/GitLab push, PR, and merge auditShows who pushed code and when
Secrets usage logsHashiCorp Vault, AWS Secrets Manager, Azure Key Vault usage logsDetermine which secrets were accessed by the compromised system

Phase 3: Investigation — Determine Blast Radius (1-4 hours)

Questions to Answer

QuestionEvidence SourceHow to Determine
When was the supply chain compromised?Build logs, dependency lock file history, vendor VPN logsFirst evidence of anomalous activity
What systems received the compromised code?Deployment logs, release tags, build artifact distributionEvery system that ran code built during the compromise window
What data was accessed?File audit logs, cloud logs, database query logsData accessed by processes running the compromised code
Is the attacker still active in the environment?EDR alerts, network detection, authentication logsLook for post-deployment C2, lateral movement, data access
Are there other organizations affected?Vendor advisory, CISA alert, threat intelligenceCheck if the same vendor/dependency is in the news or CISA alerts
Can we prove the scope?All collected evidenceDocument for legal, regulatory, and PR response

Phase 4: Recovery and Remediation

ActionTimelineOwner
Remove compromised dependency1-2 hoursDev team
Rebuild all artifacts from clean state2-4 hoursCI/CD team
Redeploy all services with clean builds4-8 hoursDevOps
Rotate all secrets used by affected services2-4 hoursSecurity team
Restore from known-good backup on any compromised systems4-8 hoursIR team
Notify affected customersLegal to determinePR/Legal
Post-incident review1-2 weeksEngineering + Security

Long-Term Hardening

ControlWhat It PreventsImplementation
Software Bill of Materials (SBOM)Dependency-based supply chain visibilityGenerate SBOM for every build: cyclonedx-bom or syft
Dependency pinningAccidental malicious dependency upgradePin all dependencies to specific versions in lock files
Package registry mirroringRegistry compromiseRun a private proxy registry (Sonatype Nexus, JFrog Artifactory)
Code signingCompromised build artifact injectionSign all builds with hardware-backed keys. Verify signature at deployment.
Vendor access reviewsVendor credential compromiseQuarterly review of vendor access scope. JIT vendor access.
SLSA (Supply chain Levels for Software Artifacts)Build integrityImplement SLSA Level 2+ for all critical builds
Reproducible buildsVerification of build outputBuild should produce identical output from identical source

Sources