Reflections on Trust in the Software Supply Chain
This talk explores the risks of malicious code injection during the build process, specifically focusing on the vulnerability of build plugins and dependencies. The speaker demonstrates how a compromised build plugin can inject a reverse shell into a project without modifying the source code, bypassing traditional static analysis. The presentation highlights the necessity of binary-source validation to ensure that build artifacts match the intended source code. The speaker also discusses the role of SBOMs and SLSA in improving supply chain security.
The Silent Build-Time Backdoor: Why Your CI/CD Pipeline Is Lying to You
TLDR: Modern supply chain security focuses heavily on vulnerable dependencies, but it ignores the risk of malicious build-time plugins. By compromising a build plugin, an attacker can inject a reverse shell into a production binary without ever touching the source code. This talk demonstrates that static analysis is insufficient because the malicious logic is injected during compilation, not authored in the repository.
Most security teams treat the software supply chain as a static inventory problem. They run Software Composition Analysis (SCA) tools to find outdated libraries, patch the CVEs, and call it a day. This approach assumes that if the source code is clean, the resulting binary is trustworthy. That assumption is a dangerous fallacy.
The real threat isn't just what your developers write; it is what your build tools do behind their backs. If an attacker compromises a build plugin—like a Maven plugin or a Gradle task—they can manipulate the compilation process itself. They don't need to commit malicious code to your repository. They just need to wait for your CI/CD pipeline to pull their compromised plugin, which then injects a payload into the binary at build time.
The Mechanics of Build-Time Injection
During his talk at Black Hat 2023, Jeremy Long demonstrated a proof-of-concept where a malicious build plugin compromised a standard Spring Boot application. The attack flow is elegant in its simplicity. The developer writes perfectly benign code. When the build starts, the malicious plugin hooks into the compilation lifecycle. It doesn't modify the source files on disk; instead, it injects malicious bytecode directly into the target classes during the build process.
By the time the compiler finishes, the resulting JAR file contains a backdoor that never existed in the source repository. Because the payload is injected into the compiled classes, traditional static analysis tools that scan the source code will report a clean bill of health. The vulnerability is effectively invisible to any scanner that doesn't perform binary-source validation.
To reproduce this, an attacker needs to influence the build environment. In a Java ecosystem, this often means targeting the pom.xml or build.gradle files. An attacker might submit a pull request that adds a "helpful" new plugin for code generation or documentation. If the maintainers don't pin the plugin version or verify the integrity of the plugin's source, they are effectively opening a door for arbitrary code execution.
Why Your Static Analysis Fails
Static analysis tools are designed to find patterns in source code. They look for hardcoded credentials, insecure API usage, or known vulnerable functions. They are not designed to detect a build plugin that is actively subverting the compiler.
When you run a build, you are executing code from dozens of third-party plugins. Each of these plugins runs with the same privileges as your build agent. If a plugin is compromised, it can modify the build output, exfiltrate environment variables, or inject backdoors into your production artifacts. This is a classic T1195.002 supply chain compromise.
The only way to detect this is through binary-source validation. You must be able to prove that the binary artifact you are deploying is a bit-for-bit match of what the source code should produce. If you build the same source code on two different, clean build agents and get different checksums, you have a massive problem.
Practical Steps for Pentesters and Developers
If you are testing a CI/CD pipeline, stop looking only at the application code. Start looking at the build configuration. Check if the build plugins are version-pinned. If they aren't, you can potentially swap a plugin for a malicious version. Check if the build process uses a Gradle Wrapper or Maven Wrapper that is checked into the repository. If it is, you can modify the wrapper to execute arbitrary code before the build even starts.
For developers, the defensive strategy is simple but painful: reduce your dependency surface. Every plugin you add to your build is a potential vector for a supply chain attack. If you must use code generators, run them locally, check the generated code into your repository, and then treat that generated code as first-class source code that needs to be audited. Do not let your build server generate code on the fly.
We are currently living in a world where we trust our build tools implicitly. That trust is being exploited. The next time you see a "build success" message in your Jenkins or GitHub Actions logs, ask yourself: did the compiler actually build what I wrote, or did it build what the plugins told it to build? The answer might be the difference between a secure release and a catastrophic compromise. Start auditing your build plugins with the same intensity you use to audit your application code. If you don't, you are just waiting for the next SolarWinds-style event to hit your own infrastructure.
Vulnerability Classes
Target Technologies
Attack Techniques
OWASP Categories
Up Next From This Conference

Chained to Hit: Discovering New Vectors to Gain Remote and Root Access in SAP Enterprise Software

Zero-Touch-Pwn: Abusing Zoom's Zero Touch Provisioning for Remote Attacks on Desk Phones

ODDFuzz: Hunting Java Deserialization Gadget Chains via Structure-Aware Directed Greybox Fuzzing
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Unmasking the Snitch Puck: The Creepy IoT Surveillance Tech in the School Bathroom

