TimeKORP [web]
Last updated
Last updated
Are you ready to unravel the mysteries and expose the truth hidden within Korp's digital domain? Join the challenge and prove your prowess in the world of cybersecurity. Remember, time is money, but in this case, the rewards may be far greater than you imagine.
Command Injection
In controllers/TimeController.php
, we see that the the application expects input through $_GET
's format
value. If there isn't one it default to '%H:%M:%S'
and then passes it to TimeModel
and displays the invoked getTime()
method to the view.
In models/TimeModel.php
, the function argument then constructs a variable called command
which is later going to be passed to exec
. Using the format
GET parameter, we can escape the context of the date
command and utilise command injection in order to get RCE.
HTB{t1m3_f0r_th3_ult1m4t3_pwn4g3}