CyberKit

Command Injection

Also called OS command injection.

Injecting attacker commands into a shell call the app builds.

What it is

A vulnerability where untrusted input is incorporated into an operating-system command that the application executes. Shell metacharacters in the input let the attacker run additional commands of their choosing.

Why it matters

Command injection yields direct code execution on the host and is among the most damaging web flaws. In IR, the resulting child processes spawned by a web service are a strong indicator of exploitation.

In practice

A diagnostic page passes a hostname into a ping command, and an attacker appends a semicolon and a second command that is also executed.

What to look for

  • Shell characters such as ;, | and $() in parameters.
  • Web server processes spawning shells.
  • Input passed to system or exec calls.

Common mistake

Escaping input by hand. Use APIs that pass arguments without a shell.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • Burp Suite Commercial

    An intercepting proxy for testing web apps by hand and with its scanner.

  • ZAP Open source

    An open source web app scanner and proxy, often run in CI pipelines.

  • Cloudflare WAF Commercial

    Blocks common web attacks at the edge while the code gets fixed.

Read next

Sources