Command Injection
IntermediateA web app runs ping <hostname> on the server using unsanitized user input. Inject shell commands to read files, run programs, and even open a reverse shell — then learn how to prevent it.
Progress:
1
Chain a Command2
Use Input Validation3
Reverse Shell Attempt⚡ Ping Utility
// server-side handler
app.post('/api/ping', (req, res) => {
exec(`ping -c 3 ${req.body.host}`, cb)
})
Try:
google.com; cat /etc/passwd or google.com && whoami🛡 Defenses
Terminal output — server console
Enter a hostname and click Run Ping…