Supply Chain Attackers Abuse Package Entry Points for Covert Command-Jacking
Security researchers at Checkmarx disclosed an evasion vector where adversaries weaponize package entry points—including Python console_scripts and manifest definitions across npm, RubyGems, NuGet, and Crates—to execute persistent command-jacking. While scanners flag install-time lifecycle hooks (such as setup.py or npm postinstall), precompiled wheel (.whl) archives generate binary wrappers via entry_points.txt without running installation-phase code. Once installed, the package manager links the rogue executable into local environment paths that take precedence over system directories in PATH.
Attackers shadow critical developer utilities (aws, docker, kubectl, terraform) or POSIX binaries (curl, touch). Through “command wrapping,” the entry point executes the genuine utility with original arguments and returns authentic stdout, while an asynchronous subshell siphons cloud tokens, SSH keys, and environment secrets to adversary infrastructure. Because the authentic command runs transparently and standard build hooks remain untouched, the vector evades runtime sandboxes and traditional Software Composition Analysis (SCA) scanners that rely solely on known vulnerability databases.
Why it matters:
- Bullet 1 — Technical & Architecture Risk: Entry point hijacking decouples malicious execution from package installation, subverting build-time security gates, package-manager script disabling flags, and hash verification by weaponizing PATH precedence to intercept trusted binary calls.
- Bullet 2 — Strategic & Defender Imperative: Engineering teams must enforce strict dependency pinning via immutable hash-locked manifests, audit virtual environment PATH hierarchies, and monitor execution paths of cloud CLI utilities and developer toolchains within CI/CD pipelines.