####################################################################### Luigi Auriemma Application: Trend Micro Control Manager http://us.trendmicro.com/us/products/enterprise/control-manager/ Versions: <= 5.5 1250 Platforms: Windows Bug: stack overflow Exploitation: remote, versus server Date: probably found 11 Jan 2011 Author: Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org ####################################################################### 1) Introduction 2) Bug 3) The Code 4) Fix ####################################################################### =============== 1) Introduction =============== ??? ####################################################################### ====== 2) Bug ====== CmdProcessor.exe is a child service of ProcessManager.exe running on port 20101 and automatically restarted everytime it crashes or terminates. The service is vulnerable to a buffer overflow during the handling of the opcode 0x915 in the CGenericScheduler::AddTask function of cmdHandlerRedAlertController.dll where a stack buffer of about 350 bytes is passed as destination to a copying function: 0B6012E0 /$ 6A FF PUSH -1 0B6012E2 |. 68 83B5690B PUSH 0B69B583 0B6012E7 |. 64:A1 0000000>MOV EAX,DWORD PTR FS:[0] 0B6012ED |. 50 PUSH EAX 0B6012EE |. 81EC D8010000 SUB ESP,1D8 ...skip... 0B60145D |. 51 PUSH ECX 0B60145E |. 8B8C24 080200>MOV ECX,DWORD PTR SS:[ESP+208] 0B601465 |. 52 PUSH EDX 0B601466 |. 8B9424 080200>MOV EDX,DWORD PTR SS:[ESP+208] 0B60146D |. 50 PUSH EAX 0B60146E |. 51 PUSH ECX 0B60146F |. 52 PUSH EDX 0B601470 |. 55 PUSH EBP 0B601471 |. 8D4C24 68 LEA ECX,DWORD PTR SS:[ESP+68] 0B601475 |. E8 E6ECFFFF CALL 0B600160 ; copying function below ... 0B6001BB |. 8B4424 14 MOV EAX,DWORD PTR SS:[ESP+14] 0B6001BF |. 8BD3 MOV EDX,EBX 0B6001C1 |. 83C4 04 ADD ESP,4 0B6001C4 |. 2BD0 SUB EDX,EAX 0B6001C6 |> 8A08 /MOV CL,BYTE PTR DS:[EAX] ; strcpy 0B6001C8 |. 880C02 |MOV BYTE PTR DS:[EDX+EAX],CL 0B6001CB |. 83C0 01 |ADD EAX,1 0B6001CE |. 84C9 |TEST CL,CL 0B6001D0 |.^ 75 F4 \JNZ SHORT 0B6001C6 ####################################################################### =========== 3) The Code =========== http://aluigi.org/poc/tmcm_2.zip ####################################################################### ====== 4) Fix ====== http://www.zerodayinitiative.com/advisories/ZDI-11-345/ #######################################################################