thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Security Operations · Intermediate

Command Injection

Injecting operating system commands through an application input that is passed to a system shell.

Definition

When applications pass user input to shell functions like system() or exec() without sanitization, attackers can append commands using characters such as semicolons, pipes, double ampersands or backticks. It can lead to full server compromise. Avoiding shell calls, using safe APIs and strict input validation mitigate it.

Example

Entering 8.8.8.8; cat /etc/shadow into a web-based ping tool.

Exam tip

Shell metacharacters in input fields or logs indicate command injection.

Related terms