-
Once we navigate to the website, all we see is
command executed: ping -c 2displayed on the main page. -
However, in the address bar, we can see that the
hostparameter is visible.
http://34.159.31.74:30043/index.php?host=127.0.0.1-
Considering the name of the CTF, I tried replacing the localhost with the
lscommand. -
It gave no results, and I have tried using
; ls.
flag.phpindex.php
Command executed: ping -c 2 ;ls- We see that the webpage is vulnerable to command injection.
- Replace the
lspayload withcat flag.phpto retrieve the flag.
FLAG: CTF{C0mm4{REDACTED}4sy}
NOTE: the flag is visible only in the page source