Skip to content
All rooms
EasyWalkthrough

Command injection

A page that checks whether a server is up with ping. But what happens when you type more than an address?

25 min65 ptsWeb

Some applications take what the user types and put it inside a shell command. If they do not check it, the user can add commands of their own: this is command injection, one of the most dangerous flaws because it hands over control of the server itself.

0 of 5 · 0 of 65 points

Target machine

Ubuntu 24.04 + NetCheck (command injection) · Runs for 60 minutes, and you can extend it

Sign in to start your own machine.

Task 1 of 3

Task 1: Try the page

Press Start machine. Within a minute your own IP address appears. Run every command in this room from the AttackBox (the "Open AttackBox" button) or from your computer over the VPN. Replace IP with your machine's address.

This is an isolated training machine that is yours alone. Using these techniques on systems you have no written permission to test is a crime.

NetCheck

Open http://IP/ (in your browser over the VPN, or with curl from the AttackBox) and type an address, such as 127.0.0.1:

curl "http://IP/?host=127.0.0.1"

The page shows the output of ping. So the app runs something like ping -c 1 <what you typed> on the server.

1.1I opened NetCheck and checked an address

Command injection | Wethaq Iraq