¼ÇÒ»´ÎVMwareµÄÍß½âµ÷ÊÔÆÊÎöÀú³Ì

Ðû²¼Ê±¼ä 2020-08-11

1.Ñо¿Åä¾°


VMware WorkstationÊÇÒ»¿îÖ÷Á÷µÄÐéÄâ»úÈí¼þ £¬½üÆÚÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøADLabÇå¾²Ñо¿Ô±ÔÚʹÓÃVMwareÐéÄâ»úµÄÀú³ÌÖÐÓöµ½ÐéÄâ»úÒì³£Íß½âµÄÎÊÌâ £¬µ±´Ó7zipÖÐÖ±½Ó½«ÎļþÍÏקµ½VMwareÐéÄâ»úÖÐ £¬»áÔì³ÉÐéÄâ»úÒì³£¹Ø±Õ¡£ÏÖÔÚÒѲâÊÔ¹ýVMware 15.5.0¡¢15.5.2¡¢15.5.5 ÒÔ¼°7zip 19.0¡¢20.02µÈ°æ±¾¡£±¾ÎĽ«Í¨¹ý¶ÔVMwareºÍ7zip³ÌÐò¾ÙÐиú×ÙÆÊÎö £¬×îÖÕ¶¨Î»ÐéÄâ»úÒì³£¹Ø±ÕÔµ¹ÊÔ­ÓÉ¡£

2.VMware¶Ëµ÷ÊÔÆÊÎö

ʹÓÃWinDbg-IÖ¸ÁWinDbgÉèÖÃΪ¼´Ê±µ÷ÊÔÆ÷ £¬VMware-vmx.exe³ÌÐòÍß½âºó×Ôת¶¯³öWinDbg¡£¿ÍÕ»ÐÅÏ¢ÈçÏ£º



µ÷ÊÔÐÅÏ¢ÏÔʾstack buffer overrunÒì³£ £¬×î³õÍƶϿÉÄÜÊÇ»º³åÇøÒç³öÎó²î¡£



ͨ¹ýÅÌÎÊ×ÊÁϺó·¢Ã÷ £¬´ÓWindows 8×îÏÈ £¬WindowsÉè¼ÆÁËÒ»¸öеÄÖÐÖ¹INT 29H £¬ÓÃÒÔ¿ìËÙÅ׳öʧ°Ü £¬ÔÚsdkÖб»ÉùÃ÷Ϊ__fastfail £¬ __fastfailÄÚ²¿º¯Êý²»»á·µ»Ø¡£


ϵͳ½á¹¹
Ö¸Áî
´úÂë²ÎÊýµÄλÖÃ
x86
int 0x29
ecx
x64
int 0x29
rcx
ARM
²Ù×÷Âë 0xDEFB
r0


ÔÚÉÏͼÖÐ £¬³ÌÐòÖÕÖ¹ÓÚint 29h £¬¶øËüµÄ²ÎÊýΪ0xa £¬¶ÔÓ¦FAST_FAIL_GUARD_ICALL_CHECK_FAILURE £¬ÓÉ´ËÍƶÏÎÊÌâ¿ÉÄÜ·ºÆðÔÚCFGµÄ¼ì²éÀú³ÌÖС£



´Óº¯ÊýŲÓÃÕ»ÖÐvmware_vmx+0x58b21µØµãÏòÉÏ×·ËÝ £¬¶¯Ì¬µ÷ÊÔ³ÌÐò £¬½ÏÁ¿³ÌÐòÕý³£ÔËÐÐÓëÒì³£Íß½âµÄº¯ÊýŲÓÃÇø±ð £¬¶¨Î»µ½Óë³ÌÐòÍß½âÏà¹ØµÄº¯Êýsub_1400965A0¡£


ʹÓÃWindbg Attach vmware-vmx.exe³ÌÐò £¬ÔÚsub_1400965A0º¯ÊýÉèÖöϵã £¬×îÏȶ¯Ì¬µ÷ÊÔ¡£´Ó7z·­¿ªµÄѹËõÎļþÖÐÍÏקcdp.pcapngµÄÎļþ £¬³ÌÐòÔڶϵ㴦ͣÏ¡£Í¨¹ý¶¯Ì¬µ÷ÊÔ¿ÉÖª¸Ãº¯ÊýÖÐcalloc·ÖÅÉÁËÈý¸ö¶Ñ¿Õ¼ä £¬»®·ÖÓÃÓÚ´æ·Å£ºÖ÷»úÔÝʱÎļþ·¾¶temp_path¡¢Ä¿µÄÎļþÃûfile_nameÒÔ¼°VMwareÖеĻº´æĿ¼Ãûvm_cache_dir_name¡£



¿ÉÊÇ·­¿ªÖ÷»úTempĿ¼ÏÂȴûÓз¢Ã÷¸ÃÎļþ £¬ÓÚÊÇÆðÔ´¶Ï¶¨ÕâÊdzÌÐòÍß½âÔµ¹ÊÔ­ÓÉ¡£¼ÌÐøÍùÏ¿´ £¬3¸öÎļþÏà¹Ø²ÎÊýÈ«¶¼´«ÈëÁËsub_140579b30º¯Êý¡£



½øÈ뺯Êýsub_140579b30 £¬¶¨Î»temp_path²ÎÊýµÄ´¦Öóͷ£¡£ÆäÖÐ £¬sub_14057FF90º¯Êý¶Ô´«ÈëµÄtemp_path¾ÙÐÐÁËÖðÒ»±éÀú £¬sub_1405B2080º¯Êý¶Ô´«ÈëµÄtemp_path¾ÙÐÐÁ˲»·¨ÐÔ¼ì²é¡£ÏÂÃæÖصãÆÊÎösub_140576460º¯Êý¡£



sub_140576460º¯Êý½«Â·¾¶²ÎÊýtemp_path´«ÈëÁËsub_14049DA50¡£



Ê×ÏÈ £¬º¯Êýsub_14049DA50ͨ¹ýsub_140477C70¶Ô×Ö·û´®¾ÙÐÐÁË´¦Öóͷ£¡£È»ºó £¬Å²ÓÃwstat64»ñÈ¡ÏìӦ·¾¶µÄÎļþ״̬ £¬ÈôÊÇÀֳɻñÈ¡ÔòÉúÑĵ½Ò»¸ö½á¹¹ÌåÖÐ £¬²»È»·µ»Ø0xffffffff¡£ÓÉÓÚTempĿ¼Ï²¢Î´·¢Ã÷±¸·ÝÎļþ £¬µ¼Ö»ñȡ״̬ʧ°Ü £¬´Ó¶ø·µ»Ø0xffffffff¡£



·µ»Ø0xffffffffºó £¬ÖØлص½sub_140579b30º¯ÊýÖÐ £¬³ÌÐòÌø³öwhileÑ­»·µÖ´ïÈçÏÂλÖà £¬ÊäÍÉ»¯ÎóÐÅÏ¢²¢ÌøתÖÁsub_140572A70¡£



´Ósub_140572A70×îÖÕÖ´Ðе½sub_1400960C0 £¬µÖ´ïÈçÏÂλÖý«vmware_vmx+0xb1ed90´¦µÄÖµ¸³¸øÁËrsi £¬¼´Îª0¡£



¼ÌÐøÍùÏÂÖ´ÐÐ £¬½«rsiÖÐ0Öµ¸³Öµµ½raxÖÐ £¬È»ºóŲÓÃ0x7ff8fab0c510´¦ £¬¼´ntdll!LdrpDispatchUserCallTarget¡£



´Ë´¦Ó뾲̬ϵÄÀú³ÌÓÐÒ»µã²î±ð £¬¾²Ì¬Ï¸ô¦Å²ÓÃÈçÏ£º



ÈôÊÇƾ֤¾²Ì¬Àú³ÌÖ´ÐÐ £¬Ó¦µ±µÖ´ïsub_1407C7650,¼´ÈçÏÂλÖãº


ÔÚntdll.dll±»¼ÓÔØ֮ǰ £¬¸Ã´¦Êý¾ÝÒÀ¾ÉΪÉÏͼËùʾµØµã£º



ØʺóÔÚntdll.dllÖÐʵÑéCFG£¨ControlFlowGuard£©± £»¤»úÖÆ £¬½«vmware_vmx+0x7c9668µØµã´¦Êý¾Ý¾ÙÐÐÁ˸Äд £¬´Ó¶øÖ´Ðе½ntdll!LdrpDispatchUserCallTargetÖС£



ÔÚntdll!LdrpDispatchUserCallTargetº¯ÊýÖÐ £¬È¡r11+r10*8´¦µÄÖµ¸³Öµ¸ør11ʱ·ºÆðÁËÎÊÌâ £¬¸ÃµØµãΪ¿Õ £¬¾ÍÔì³ÉÁË¿ÕÖ¸ÕëÒýÓà £¬´Ó¶øÖ´ÐÐÁËint 29h £¬Ôì³ÉÒì³£¡£È»¶ø £¬×ÝȻûÓÐCFG»úÖÆ £¬³ÌÐòÒ²»áÔÚÖ´ÐС°jmp rax¡±´¦Í߽⠣¬Í¨¹ýÏÂͼ¿ÉÒÔ¿´³ö £¬CFG»úÖƽö½öÊÇÔÚÔ­±¾³ÌÐòÌøתָÁîÇ°Ìí¼ÓÁËһЩ¼ì²é¡£



ÖÁ´Ë £¬VMwareÍß½âµÄÔµ¹ÊÔ­ÓÉ»ùÌìÖ°ÎöÇåÎúÁË¡£ÁíÒ»¸öÒÉÎÊÊÇ £¬ÎªÊ²Ã´7zipÒѾ­ÔÚϵͳTempÏÂÌìÉúÁËÎļþ £¬²¢ÇÒVMwareÒ²ÒѾ­»ñÈ¡µ½ÁË·¾¶²ÎÊý £¬È´ÔÚÒƶ¯Ç°×Ô¶¯É¾³ýÁËÎļþÄØ¡£Õâ¾ÍÐèÒª´Ó7zipÖÐÑ°ÕÒÃյס£


3.7zip¶Ëµ÷ÊÔÆÊÎö

ÓÉÉÏÒ»½ÚÆÊÎö¿ÉÖª £¬Vmware crashÔµ¹ÊÔ­ÓÉÊÇTempĿ¼ÏÂÎļþ±»É¾³ý¡£ÔĶÁ7zipÔ´Âë £¬Ëø¶¨ÁËCPP/Windows/FileDir.cppÖеÄÎļþɾ³ýº¯Êý¡£



ʹÓÃWinDbg¼ÓÔØ7zip £¬È»ºóÔÚRemoveº¯ÊýλÖþÙÐÐ϶Ï £¬³ÌÐòÔËÐкó¾ÙÐÐÍÏק²Ù×÷ £¬ÔÚRemoveº¯ÊýÖÐÖ¹ºó¶ÔÓ¦µÄŲÓÿÍÕ»ÈçÏÂËùʾ¡£



¿ÍÕ»ÖÐ7zFM+0x5b212µØµãλÓÚº¯ÊýCPanel::OnDragÖÐ £¬¸Ãº¯ÊýΪÊó±êÍÏק²Ù×÷º¯Êý¡£µ±¼ì²âµ½¶Ô7zip·­¿ªµÄĿ¼¾ÙÐвÙ×÷ʱ £¬±ã»áÔÚTempĿ¼ÏÂÌìÉúÒ»¸öÒÔ7zE¿ªÍ·µÄËæ»úÃüÃûÎļþ¼Ð¡£



È»ºó £¬½«¸ÃÎļþ¼ÐÉèÖÃΪĿµÄĿ¼ £¬²¢ÇÒÉèÖÃÁËһЩÊý¾Ý¼°IpDropSourse½á¹¹Ìå¡£



¼ÌÐøÍùÏ¿ÉÒÔ¿´µ½Ò»¸öDoDragDropº¯Êý £¬¸Ãº¯Êý¹¦Ð§ÊǾÙÐÐOLEÍÏ·ÅÏà¹Ø²Ù×÷ £¬Í¨¹ý¼ì²â¹â±êµÄÐÐΪ»®·ÖŲÓÃһЩҪÁì²¢·µ»Ø¶ÔÓ¦µÄÊýÖµ¡£



È»ºó £¬Æ¾Ö¤DoDragDropº¯ÊýµÄ·µ»ØÖµÀ´ÅжϹâ±êµÄÍÏקÊÇ·ñÓÐÓà £¬´Ó¶øÖ´ÐжÔÓ¦µÄ²Ù×÷¡£



´Ó7zipÖÐÍÏקÎļþµ½ÐéÄâ»ú £¬ÓÉÓÚÎÞ·¨»ñÖªÎļþÍÏקµÄÄ¿µÄ·¾¶ £¬Òò´ËDoDragDrop»á·µ»ØDRAGDROP_S_CANCEL(0x40101) £¬²»»áÖ´Ðп½±´²Ù×÷µÄ·ÖÖ§ £¬¶øÊÇÖ±½Ó½«TempĿ¼ÏÂÌìÉúµÄÔÝʱĿ¼ɾ³ý¡£



4.С ½á


7zipѹËõ°üÖÐÎļþÍÏק²Ù×÷»á´¥·¢DoDragDropº¯ÊýŲÓà £¬¸Ãº¯Êý»á»ñÈ¡ÎļþÊý¾Ý¼°¹â±ê×èÖ¹µÄλÖ᣿ÉÊǽ«ÎļþÍÏקµ½VMware´°¿Úʱ £¬DoDragDropº¯Êý²»¿É»ñȡ׼ȷµÄÄ¿µÄ·¾¶ £¬Òò´ËÎÞ·¨½«Îļþ¿½±´µ½Ä¿µÄλÖà £¬´Ó¶øÖ±½Óɾ³ýÔÝʱÎļþ £¬×îÖÕµ¼ÖÂVMwareÎÞ·¨»ñÈ¡Îļþ״̬Ôì³ÉÍ߽⡣


²Î¿¼Á´½Ó£º

[1]https://0cch.com/2016/12/13/int29h/

[2]https://docs.microsoft.com/en-us/windows/win32/api/ole2/nf-ole2-dodragdrop

[3]https://github.com/kornelski/7z/tree/20e38032e62bd6bb3a176d51bce0558b16dd51e2



ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÆð¾¢·ÀÓùʵÑéÊÒ£¨ADLab£©


ADLab½¨ÉèÓÚ1999Äê £¬ÊÇÖйúÇå¾²ÐÐÒµ×îÔ罨ÉèµÄ¹¥·ÀÊÖÒÕÑо¿ÊµÑéÊÒÖ®Ò» £¬Î¢ÈíMAPPÍýÏë½¹µã³ÉÔ± £¬¡°ºÚȸ¹¥»÷¡±¿´·¨Ê×ÍÆÕß¡£×èÖ¹ÏÖÔÚ £¬ADLabÒÑͨ¹ýCVEÀÛ¼ÆÐû²¼Çå¾²Îó²î½ü1100¸ö £¬Í¨¹ý CNVD/CNNVDÀÛ¼ÆÐû²¼Çå¾²Îó²î900Óà¸ö £¬Ò»Á¬¼á³Ö¹ú¼ÊÍøÂçÇå¾²ÁìÓòÒ»Á÷Ë®×¼¡£ÊµÑéÊÒÑо¿Æ«Ïòº­¸Ç²Ù×÷ϵͳÓëÓ¦ÓÃϵͳÇå¾²Ñо¿¡¢Òƶ¯ÖÇÄÜÖÕ¶ËÇå¾²Ñо¿¡¢ÎïÁªÍøÖÇÄÜ×°±¸Çå¾²Ñо¿¡¢WebÇå¾²Ñо¿¡¢¹¤¿ØϵͳÇå¾²Ñо¿¡¢ÔÆÇå¾²Ñо¿¡£Ñо¿Ð§¹ûÓ¦ÓÃÓÚ²úÆ·½¹µãÊÖÒÕÑо¿¡¢¹ú¼ÒÖصã¿Æ¼¼ÏîÄ¿¹¥¹Ø¡¢×¨ÒµÇå¾²·þÎñµÈ¡£


lab.jpg