Poisoned Pipeline / Techniques / T0237
Resolve a dangerous call by name to miss a signature scan
A scanner that identifies dangerous behaviour by the name of the function
being called is matching text, and the language will let the caller
supply that name at runtime. getattr(os, "system")(cmd) runs exactly what
os.system(cmd) runs, and the literal "system" that the rule looks for is
now an argument rather than the attribute being read. The same trick
works in JavaScript with a computed property or a table of method names,
and in shell by assembling the command string.
Checkmarx used it against SkillSpector's deterministic pass, which flags
dangerous functions by name; the reflective version scored under the
Safe threshold with the LLM disabled. The LLM pass caught the same Skill
at 84 out of 100 with reflective execution at 97 percent confidence, and
commit cb5e8c8 added literal getattr detection in 2.5.0. So the evasion
defeats the cheap pass and not the expensive one, which is the useful
fact: a static-only run of a scanner is a different control from the same
scanner with its model enabled, and only one of them applies.
The countermeasure is not a longer list of function names. Look for the
reflection itself — getattr with a string literal, bracket access on a
module object, a table of method names — and for the string that names
the dangerous call, which has to appear somewhere.
Distinct from T0170, where the compiler or interpreter itself is
malicious, and from T0191, where the malicious code is present and
visible in the artifact. Here the code is ordinary and readable; only
the identifier is indirect.
Where this idea came from
Same report. getattr(os, "system")(cmd) does what os.system(cmd) does, and SkillSpector's deterministic pass matched the literal name, so the reflective version scored under the Safe threshold with the LLM disabled; the LLM pass caught it at 97 percent confidence, and 2.5.0 added literal getattr detection. Distinct from T0170 (malicious interpreter) and T0191 (malicious code visibly present).
Mitigations
None linked yet.
Detections
None linked yet.