Exploitable Security Architecture Mistakes We Just Keep Making
William
Where
Talks
ShmooCon 2024
Duration
20 min
Shows how untrusted build code escapes SaaS trust boundaries through PATH, environment variables, git hooks, and LD_PRELOAD.
Summary
The talk examines a recurring design problem in software-as-a-service products: the platform runs code that customers supply, such as build steps, plugins or dynamically generated content, on infrastructure that holds privileged access. The speaker frames the real boundary as one between an untrusted user and a root process, since attackers gain value by crossing it to reach internal systems or third-party credentials.
Drawing on real engagements, the speaker walks through several hijack patterns. A build could plant a directory high in the PATH order, so a cleanup step that called a tool without an absolute path ran the attacker's binary. Environment variables such as PYTHONPATH and LD_PRELOAD let a customer inject code into an interpreter or program. Git hooks like post-merge and post-checkout ran planted scripts when the service updated a repository or its submodules, especially where working directories persisted between jobs. Suggested fixes include absolute paths, setting variables at the last responsible moment, enforcing checks that fail early, and avoiding running git as root.
For defenders, the talk notes that a host-based Kubernetes detection tool did not fire when a payload was loaded through LD_PRELOAD, so runtime coverage can be bypassed. Recommended detections include canary tokens, decoy Kubernetes service account credentials with no real permissions that alert when the API is touched, and infrastructure-specific threat detections. The takeaway is to verify how tools actually behave rather than trusting assumptions.
Related talks
Main Stage·45 min
Nick Powers
Shows how Windows app packaging features like MSIX, AppContainers and package capabilities can be abused for initial access, lateral movement and SYSTEM privilege escalation.
Talks·44 min
EVM
Explores the undocumented Elbrus processor architecture and a C++ vtable overflow exploit ported to its compiler.
Talks·38 min
Jarno Niemelä
Shows how misconfigured file permissions in Windows software let a low-privileged user escalate to admin rights.


