I am accessing an intentionally vulnerable VM hosting an older version of Wordpress. I have admin access to the Wordpress site and have been trying to use pentestmonkey's php-reverse-shell script to gain access to the box. As directed, I updated the $ip and $port to my attacker IP and set the port to 7777 (have also tried 1234 and 4321), then replaced the 404.php code in the template with the php-reverse-shell code. My netcat call is as follows:
nc -lvp 7777
When trying to hit the site, it finds the 404.php page in less than a second instead of hanging on the site and waiting for netcat to respond.
I have tried changing the 404.php code to other options, such as 'test' or a simple php script to wait for 10 seconds, both of which work appropriately in the browser. I have also tried turning off the firewall on my host machine (which has the guest, attacker VM installed and running through VMWare Workstation). Any other ideas as why this won't connect back to netcat?
**I have successfully used netcat to communicate from my host to guest (Windows to Linux). The issue is from the web app hosted elswhere back to my guest (Linux) box.