Template Manipulation
PHP
PHP
Navigate to
site templates
Look for writable files (Normally
error.php
is a good one to look at)Add this code at the beginning of the file:
Visiting a page that doesn't exist will raise a error page, if the argument passed is
tokyo
, it will be run withsystem
; allowing to code execution:
From here you can spawn a
reverse shell
by passing it as an argument:
Alternatively, you can write the reverse shell directly on the template:
Then, create
rev.sh
Setup a python web server, get your listener ready and trigger the
error.php
Last updated