Skip to content

DEF CON 34 talks are here: 354 talks, summarized and searchable.

Browse DEF CON 34

A Quick Story Of Security Pitfalls With Exec Commands In Software Integrations

Lenin Alevski

AppSecGround Floor24 minIntermediateOpen on YouTube ↗

Where

Ground Floor
BSides Las Vegas

Duration

24 min

Walks through a command injection flaw in an open-source automation UI, from code review to exploitation and mitigation.

Summary

The talk opens with the choices developers face when connecting software: use a library or SDK, call an external API, or run another program directly through an exec-style system call. The speaker argues that the last option carries the most risk, because it opens the door to command injection, a long-standing weakness that still drives major breaches.

The core example is an open-source web interface for Ansible, a popular automation tool. While reading the Go code, the speaker found that the project launched playbooks through a system call. The binary path was hardcoded, but several arguments still came from users. A low-privileged account could supply extra variables that were evaluated at run time, so arbitrary commands could execute on the host and on other machines the tool managed. The speaker reported the issue responsibly, the project patched it, and it was assigned CVE-2023-39059 with high severity.

To close, the speaker offers a red-team view of what to examine in this kind of code: injectable commands, arguments, environment variables, working directories, and output that may leak secrets. The defensive guidance favors APIs over exec, threat modeling each integration, dropping privileges, sanitizing input with allowlists, reviewing risky flags, and combining static analysis with developer training.

Related talks