OS command injection - gachikuku/portswigger GitHub Wiki

This lab contains an OS command injection vulnerability in the product stock checker.
The application executes a shell command containing user-supplied product and store IDs, and returns the raw output from the command in its response.
To solve the lab, execute the whoami command to determine the name of the current user.

  • Solution

    1. mitmproxy is used to intercept when pressing Check stock.
    2. Modify the POST request in the parameters by adding &whoami. The lab is completed.

NOTE:
Simply setting the parameter to the command does not work.

Practitioner lab:
Blind OS command injection with out-of-band interaction (Pro)


Practitioner lab:
Blind OS command injection with out-of-band data exfiltration (Pro)


⚠️ **GitHub.com Fallback** ⚠️