
Descripción
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.
OS command injection, simple case writeup
Al iniciar el laboratorio encontraremos una tienda online:

Buscaremos la función para comprobar el stock, la cual se encuentra en cualquier producto, y la capturaremos con el logger de BurpSuite:

Para ejecutar el comando añadiremos a ‘storeId’ ‘| whoami’, haciendo que la aplicación web lo ejecute después del storeId:

Resolviendo así el laboratorio:
