HackPath Academy

Web Application Hacking (Hands-On)

Command Injection — Concept + Live Lab

Turn a web feature into a shell by injecting OS commands.

Intermediate · 16 min · Hands-on lab

Open the interactive lesson & lab →

Command injection occurs when an app passes user input into an operating-system command. Shell metacharacters let you append your own commands — potentially full control of the server.

A 'ping this host' feature might run:

ping -c 1 <user_input>

Input like 127.0.0.1; cat /flag makes the shell run two commands: the ping, then your cat. The ; chains them.

Chaining operators to try

Take the quiz and try the live lab →