Skip to main contentSkip to main content
Room Banner
Back to all walkthroughs
Room Icon

Command Injection

Premium room

Learn about a vulnerability allowing you to execute commands through a vulnerable app, and its remediations.

easy

20 min

127,025

User profile photo.
User profile photo.

To access material, start machines and answer questions login.


In this room, we’re going to be covering the web vulnerability that is . Once we understand what this vulnerability is, we will then showcase its impact and the risk it imposes on an application.

Then, you’re going to be able to put this knowledge into practice, namely:

  • How to discover the vulnerability
  • How to test and exploit this vulnerability using payloads designed for different operating systems
  • How to prevent this vulnerability in an application
  • Lastly, you’ll get to apply theory into practice learning in a practical at the end of the room.

To begin with, let’s first understand what is. is the abuse of an application's behaviour to execute commands on the operating system, using the same privileges that the application on a device is running with. For example, achieving on a web server running as a user named joe will execute commands under this joe user - and therefore obtain any permissions that joe has.

Command injection is also often known as “Remote Code Execution” (RCE) because of the ability to remotely execute code within an application. These vulnerabilities are often the most lucrative to an attacker because it means that the attacker can directly interact with the vulnerable system. For example, an attacker may read system or user files, data, and things of that nature.

For example, being able to abuse an application to perform the command whoami to list what user account the application is running will be an example of .

was one of the top ten vulnerabilities reported by Contrast Security’s AppSec intelligence report in 2019. (Contrast Security AppSec., 2019 (opens in new tab)). Moreover, the framework constantly proposes vulnerabilities of this nature as one of the top ten vulnerabilities of a web application ( framework (opens in new tab)).

Answer the questions below
Read me!

Ready to learn Cyber Security?

The Command Injection room is only available for premium users. Signup now to access more than 500 free rooms and learn cyber security through a fun, interactive learning environment.

Already have an account? Log in

We use cookies to ensure you get the best user experience. For more information see our cookie policy.