ãã®æªæã®ããããã°ã©ã ã®æ°ããããŒãžã§ã³ã§ã¯ãæ»æè ã¯JavaScriptã§å®è¡ãããè£å©ã³ã³ããŒãã³ããè¿œå ããŸããã Twitterãä»ããŠãªã¢ãŒãã®CïŒCãµãŒããŒãšé£æºããããã«èšèšãããŠããŸãã
å³ ãšã¯ã¹ããã€ãCVE-2014-1761ãæèŒãããRTFããã¥ã¡ã³ãã
äžèšã®ææžã¯Proposal-Cover-Sheet-English.rtfãšåŒã°ããŠããŸããã æ°ããMiniDukeå®è¡å¯èœãã¡ã€ã«ãã³ã³ãã€ã«ãããŠããããã3æ¥åŸã®4æ8æ¥ã«å ¥æããŸããïŒ4æ5æ¥ã®PEããããŒããã®ã¿ã€ã ã¹ã¿ã³ãïŒã ãã®å®è¡å¯èœãã¡ã€ã«ã¯ãšã¯ã¹ããã€ãã«ãã£ãŠé ä¿¡ããããµã€ãºã¯24 KBã§ãã
è匱æ§ãããªã¬ãŒãããåŸã«å®è¡ãããã·ã§ã«ã³ãŒãã®æ©èœã¯ãéåžžã«ã·ã³ãã«ã§ç解ãããããã®ã§ãã ã³ãŒãã解èªããkernel32.dllã©ã€ãã©ãªã«ãã£ãŠãšã¯ã¹ããŒããããããã€ãã®é¢æ°ã®ã¢ãã¬ã¹ãåãåã£ãåŸããã€ããŒããã¡ã€ã«ã解èªããïŒ TEMPïŒ ãã£ã¬ã¯ããªãšãalããã¡ã€ã«ã«é 眮ããŸãã ãã£ã¹ã¯ã«ãã³ãããããã®ãã¡ã€ã«ã¯ã©ã€ãã©ãªã§ãããæšæºã®kernel32ïŒLoadLibraryAé¢æ°ã䜿çšããŠã¡ã¢ãªã«ããŒããããŸãã
ã·ã§ã«ã³ãŒãã«ã¯ã¢ã³ããããã°ã¡ã«ããºã ãå«ãŸããŠããããããã¬ãŒã䜿çšããã€ã³ã¿ãŒã»ãããŸãã¯ãã¬ãŒã¯ãã€ã³ãã®ååšã«ã€ããŠãåŒã³åºãããAPIã®æåã®ãã€ãããã§ãã¯ããŸãã ç°åžžãããå ŽåïŒé¢æ°ããããŒã°ãå ã®ããããŒã°ãšäžèŽããªãå ŽåïŒãã·ã§ã«ã³ãŒãã¯ã³ãŒãããããããŒã°ïŒmov ediãediãpush ebpãmov ebpãespïŒãæåã§å®è¡ããããšã«ãããé¢æ°ã®æåã®5ãã€ããã¹ãããããŸãã
å³ ã·ã§ã«ã³ãŒãã¯ãå¶åŸ¡ããµãŒãããŒãã£ã®ã³ãŒãã«è»¢éããæé ã«ã€ããŠãé¢æ°ããããŒã°ããã§ãã¯ããŸãã å€æŽãååšããå ŽåãããããŒã°ã¯ã·ã§ã«ã³ãŒãããçŽæ¥å®è¡ãããããšãããããŸãã
次ã®å³ã¯ãè匱æ§ã®æªçšã«æåããå Žåã®æªæã®ããã³ãŒãã®å®è¡ãããŒã瀺ããŠããŸãã åè¿°ããããã«ããã®ããŒãžã§ã³ã®MiniDukeãã€ããŒãã¯ãã¡ã€ã³ã¢ãžã¥ãŒã«ãšTwitterJSã¢ãžã¥ãŒã«ãšåŒã°ãã2ã€ã®ã³ã³ããŒãã³ãã§æ§æãããŠããŸãã
å³ ãã«ãŠã§ã¢ã¢ã¯ã·ã§ã³ã
æªæã®ããMiniDuke DLLãå¶åŸ¡ãååŸãããšããã«ãrundll32.exeã«å±ããããã»ã¹ã®ã³ã³ããã¹ããšãïŒ TEMPïŒ ã®çŸåšã®ãã£ã¬ã¯ããªããã§ãã¯ããŸãã ãããã®æ¡ä»¶ãæºããããŠããå Žåãæªæã®ããããã°ã©ã ã¯åããŠèµ·åããããšæ³å®ããã·ã¹ãã ãžã®ã€ã³ã¹ããŒã«ããã»ã¹ãéå§ããŸãã MiniDukeã¯ã·ã¹ãã æ å ±ãåéãããã®æ å ±ã«åºã¥ããŠæ§æããŒã¿ãæå·åããŸãã ãã®æ¹æ³ã¯OSX / Flashbackã§äœ¿çšããããŠã©ãŒã¿ãŒããŒã¯ïŒBitdefenderïŒãšããååãä»ããããŸããã ããã«ãããDLLã«æ ŒçŽãããŠããæ§æããŒã¿ãå¥ã®ã³ã³ãã¥ãŒã¿ãŒã§ååŸã§ããªããšããäºå®ã«ã€ãªãããŸãã ããŒã¿ã®æå·åã«åºã¥ããŠæªæã®ããã³ãŒãã«ãã£ãŠåéãããæ å ±ã¯ã以åã®ããŒãžã§ã³ããå€æŽãããŠãããã次ã®å€ã«åºã¥ããŠããŸãã
- ããªã¥ãŒã ã·ãªã¢ã«çªå·ïŒ kernel32ïŒGetVolumeInformationAã䜿çšïŒã
- CPUã«é¢ããæ å ±ïŒcpuidåœä»€ã䜿çšïŒã
- ã³ã³ãã¥ãŒã¿ãŒåïŒ kernel32ïŒGetComputerNameA ïŒã
MiniDukeã¯ãDLLã®æå·åããŒãžã§ã³ãçæãããšããïŒ ALLUSERSPROFILEïŒ \ Application Dataããã£ã¬ã¯ããªå ã®ãã¡ã€ã«ã«æžã蟌ã¿ãŸãã ãã¡ã€ã«åã¯ãæ¡åŒµåãšåæ§ã«ã ããã«ãªã¹ããããŠããå€ã«åºã¥ããŠéžæãããŸã ã åèµ·ååŸã®åç¶ã確ä¿ããããã«ãMiniDukeã¯ãã«ãŠã§ã¢ã®ã³ã³ããŒãã³ããæãé ã.LNKã·ã§ãŒãã«ãããã¡ã€ã«ãã¹ã¿ãŒãã¢ãããã£ã¬ã¯ããªã«äœæããŸãã ã·ã§ãŒãã«ãããã¡ã€ã«ã®ååã¯ã次ã®å€ã®ããããã䜿çšããŠçæãããŸãã
ãæ³åã®ãšãããrundll32.exeã¯.LNKãä»ããŠdllãå®è¡ããããã«äœ¿çšãããŸãã ãã®å Žåãã³ãã³ãã¯æ¬¡ã®ããã«ãªããŸãã
ãCïŒ\ Windows \ system32 \ rundll32.exeïŒ path_to_main_moduleïŒ ãexport_functionã
ãCïŒ\ Windows \ system32 \ rundll32.exe CïŒ\ DOCUMEã1 \ ALLUSEã1 \ APPLICã1 \ data.catãIlqUennã
rundll32ãMiniDuke DLLãå®è¡ãããšãããã®ã©ã€ãã©ãªã®ã³ãŒãã¯ãã§ã«å¥ã®ã·ããªãªã§å®è¡ãããŸãïŒãããèµ·åãããã®ã¯åããŠã§ã¯ãããŸããïŒã ãã®ããŒã¿ã解èªããããã«ãæªæã®ããã³ãŒãã¯äžèšã®ã·ã¹ãã ã«é¢ããæ å ±ãåéãå§ããŸãã MiniDukeã®ä»¥åã®ããŒãžã§ã³ãšåæ§ã«ããã®ããŒãžã§ã³ã¯ã·ã¹ãã ã§å®è¡äžã®æ¬¡ã®ããã»ã¹ããã§ãã¯ããŸãã
ãããã®ããã»ã¹ã®ãããããã·ã¹ãã ã§æ€åºããããšãæªæã®ããã³ãŒãããã®ããŒã¿ã誀ã£ãŠåŸ©å·åããããããªã¢ãŒãã®CïŒCãµãŒããŒã§äœæ¥ããããšãã§ããªããªããŸãã ããŒã¿ãæ£ãã埩å·åãããäžèšã®ãªã¹ãããå®è¡äžã®ããã»ã¹ããªãå ŽåãMiniDukeã¯@FloydLSchwartzã¢ã«ãŠã³ãã®TwitterãµãŒãã¹ããŒãžãåä¿¡ããŠââããªã¢ãŒãCïŒCãµãŒããŒã®URLãæ€çŽ¢ããŸãã ããŒãžãæ€çŽ¢ããã«ã¯ãã¿ã°ãXïŒïŒïŒãã䜿çšããŸãïŒã¿ã°ãuriïŒãã§æ€çŽ¢ãããæªæã®ããããã°ã©ã ã®ä»¥åã®å€æŽïŒã ã¿ã°ãèŠã€ãã£ãå Žåãæªæã®ããã³ãŒãã¯ã¿ã°ã«ç¶ãããŒã¿ããURLã解èªããŸãã èŠã€ãã@FloydLSchwartz Twitterã¢ã«ãŠã³ãã«ã¯ãäžèšã®ã¿ã°ã«èšåããã«ãããŒãžäžã®ãªãã€ãŒãã®ã¿ãå«ãŸããŠããŸãã
å³ æªæã®ããããã°ã©ã ã®CïŒCãµãŒããŒã«é¢ããæ å ±ãååŸããããã«äœ¿çšãããTwitterã¢ã«ãŠã³ãã
次ã®ã¹ãããã§ãMiniDukeã¯ææããã·ã¹ãã ã«é¢ãã次ã®æ å ±ãåéããŸãã
- ã³ã³ãã¥ãŒã¿ãŒåãšãã¡ã€ã³ã
- www.geoiptool.comããååŸããææããã³ã³ãã¥ãŒã¿ãŒã®IPã¢ãã¬ã¹ã®åœã³ãŒãã
- OSããŒãžã§ã³æ å ±
- ãã¡ã€ã³ã³ã³ãããŒã©ãŒã®ååããŠãŒã¶ãŒã®ååããŠãŒã¶ãŒã«å±ããã°ã«ãŒãã
- ã·ã¹ãã ã«ã€ã³ã¹ããŒã«ãããŠããAV補åã®ãªã¹ãã
- ã€ã³ã¿ãŒããããããã·æ§æã
- ãã«ãŠã§ã¢ã®ããŒãžã§ã³ã
ãã®æ å ±ã¯ããã€ããŒãã®ç¹å¥ãªèŠæ±ãšãšãã«CïŒCãµãŒããŒã«éä¿¡ãããŸãã CïŒCãµãŒããŒãšã®å¯Ÿè©±ã«äœ¿çšãããæçµURLã¯ãã <url_start> /create.phpïŒ<rnd_param> = <system_info> ãã§ãã
- url_start -Twitterã¢ã«ãŠã³ãçµç±ã§åä¿¡ããURLã
- rnd_param-ã©ã³ãã ã«çæãããå°æåã
- system_info-æå·åãããŠããbase64ã§ãšã³ã³ãŒããããã·ã¹ãã æ å ±ã
ãã®ãããªURLã®äŸã以äžã«ç€ºããŸãã
ãã€ããŒãã¯ã urlmonïŒURLDownloadToFileA APIã䜿çšããŠããŒãããããfdbywuããšãããã¡ã€ã«ã§ãã
å³ ãã€ããŒãæ©èœã
ããŒãããããã€ããŒãã¯ãåœã®GIF8ç»åãã¡ã€ã«ã§ãã ãã®ãã¡ã€ã«ã«ã¯ãæå·åãããå®è¡å¯èœã³ãŒããå«ãŸããŠããŸãã MiniDukeã¯ããã®ããŠã³ããŒãããããã¡ã€ã«ã以åã®ããŒãžã§ã³ãšåãæ¹æ³ã§åŠçããŸãã ããŒã¿ã®æŽåæ§ã¯RSA-2048ã䜿çšããŠãã§ãã¯ãããå®è¡å¯èœãã¡ã€ã«ã®ããŒã¿ã¯åŸ©å·åãããå¥ã®ãã¡ã€ã«ã«ä¿åãããŸãã 次ã«ããã¡ã€ã«ãå®è¡ã®ããã«èµ·åãããŸãã GIFå ã®å®è¡å¯èœãã¡ã€ã«ã®æŽåæ§ãæ€èšŒããããã«ãRSA-2048å ¬éããŒã䜿çšãããŸããããã¯ã以åã®ããŒãžã§ã³ã®ãã«ãŠã§ã¢ã§äœ¿çšããããã®ãšé¡äŒŒããŠããŸãã
MiniDukeã¯ãTwitterã¢ã«ãŠã³ãããCïŒCãµãŒããŒã®ã¢ãã¬ã¹ãååŸã§ããªãå ŽåãçŸåšã®æ¥ä»ã«åºã¥ããŠæ€çŽ¢çšã®ç¹å¥ãªãŠãŒã¶ãŒåãçæããŸãã æ€çŽ¢ã¯ãšãªã¯7æ¥ããšã«å€æŽãããGoogleæ€çŽ¢ã䜿çšãã以åã®ããŒãžã§ã³ã®ãã«ãŠã§ã¢ã®ããã¯ã¢ããã¡ã«ããºã ã«äŒŒãŠããŸãã Pythonã§ã®ãã®DGAã¢ã«ãŽãªãºã ã®å®è£ ã«ã€ããŠã¯ã ãã¡ããã芧ãã ãã ã
TwitterJSã¢ãžã¥ãŒã«ã¯ãWindowsã·ã¹ãã ãã¡ã€ã«cryptdll.dllã®ã³ããŒã«åã蟌ãŸããŠããŸãã æªæã®ããã³ãŒãã¯ãã®ã·ã¹ãã dllã«ã³ãŒãã®ãããã¯ãæ¿å ¥ãããšã¯ã¹ããŒããããé¢æ°ã®1ã€ããã®ã³ãŒãã«ãªãã€ã¬ã¯ãããŸãã 以äžã®ã¹ã¯ãªãŒã³ã·ã§ããã¯ããã®ã©ã€ãã©ãªã®ä¿®æ£ããŒãžã§ã³ã®ãšã¯ã¹ããŒãããŒãã«ã瀺ããŠããŸãã
ãã®ãã¡ã€ã«ïŒcryptdll.dllã®å€æŽãããã³ããŒïŒã¯ãïŒ USERPROFILEïŒ ãã£ã¬ã¯ããªïŒã·ã¹ãã ã¬ãžã¹ããªã®äžéšã§ããã·ã¹ãã ãã¡ã€ã«ïŒã«NTUSER.DATãã¡ã€ã«ã®NTFSããŒã¿ã¹ããªãŒã ïŒADSïŒãšããŠä¿åãããŸãã 次ã«ããã®ã©ã€ãã©ãªã®åŒã³åºãããã£ã¹ã¯ã®Openã³ãã³ããšããŠç»é²ãããŸãã ãããã£ãŠããŠãŒã¶ãŒããšã¯ã¹ãããŒã©ãŒã§è«çãã©ã€ããéãããšãããã³ã«åŒã³åºãããŸãã 以äžã¯ããã«ãŠã§ã¢ãã·ã¹ãã ã«TwitterJSã¢ãžã¥ãŒã«ïŒcryptdll.dllïŒãã€ã³ã¹ããŒã«ããããã«äœ¿çšããinit.cmdã¹ã¯ãªãããã¡ã€ã«ã®å 容ã§ãã
èªã¿èŸŒãŸãããšãTwitterJSã¯JScript COMãªããžã§ã¯ãã®ã€ã³ã¹ã¿ã³ã¹ã®äœæãéå§ããã¢ãžã¥ãŒã«ã®ããžãã¯ãå«ãJScriptãã¡ã€ã«èªäœã埩å·åããŸãã
MiniDukeã¯ãèµ·åããåã«é£èªåãé©çšããŸãã 以äžã®ã¹ã¯ãªãŒã³ã·ã§ããã¯ã2ã€ã®ç°ãªãé£èªåã®çµæã瀺ããŠããŸãã å€æ°ã«ã¯ç°ãªãæå³ãããããšãããããŸãã ãããããããã¯ãJScriptãšã³ããªãã€ã³ãã§ã³ãŒããã¹ãã£ã³ããããŸããŸãªæ€åºã·ã¹ãã ã«ãã£ãŠæ€æ»ãããªãããã«ããããã«è¡ãããŸãã
å³ æåã®é£èªåã®çµæã
å³ 2åç®ã®é£èªåã®çµæã
ãã®ã¹ã¯ãªããã®ç®çã¯ãTwitterã䜿çšããŠCïŒCãèŠã€ããå®è¡ã®ããã«JScriptã³ãŒããæœåºããããšã§ãã æ å ±ãæ€çŽ¢ããããã®TwitterãŠãŒã¶ãŒã¢ã«ãŠã³ããçæããŸãã æ€çŽ¢ã¯ã7æ¥ããšã«å€åããåŒã䜿çšããŠå®è¡ãããŸãã 次ã«ããããã¯æ€çŽ¢ã¯ãšãªã®çµæãšããŠååŸãããTwitterãŠãŒã¶ãŒãããã¡ã€ã«ã«ã¢ã¯ã»ã¹ããããxhtmlãã§çµãããã€ãŒããæ€çŽ¢ããŸãã ãã®ãããªURLãèŠã€ãããšããããã¯ãªã³ã¯æååãååŸããããxhtmlããã.phpãã«çœ®ãæããŸãã ã³ã³ãã¥ãŒã¿ãŒã«é¢ããæ å ±ã¯ãHTTPããããŒã®Acceptãã©ã¡ãŒã¿ãŒã«åã蟌ãŸããŠããŸãã
çµæã®ããŒãžã®æåã®ãªã³ã¯ã«ã¯ãbase64ãšã³ã³ãŒãããŒã¿ãå«ãŸããŠããå¿ èŠããããŸãã ãªã³ã¯å±æ§åã¯ãJScriptã®è§£èªã«äœ¿çšãããXORã¢ã«ãŽãªãºã ã®ããŒãšããŠäœ¿çšãããŸãã æåŸã«ãMinidukeã¯æœåºãããã¹ã¯ãªããã®ããã·ã¥ãèšç®ããTwitterJSã³ãŒãã«çž«ãä»ããããããã·ã¥ãšæ¯èŒããŸãã äžèŽããå Žåãçµæã®ã¹ã¯ãªããã¯evalïŒïŒã®åŒã³åºãã䜿çšããŠå®è¡ãããŸãã
ãã®ã³ã³ããŒãã³ãã§äœ¿çšãããããã·ã¥ã¢ã«ãŽãªãºã ã¯SHA-1ã«éåžžã«äŒŒãŠããŸãããåºåã«ç°ãªãããã·ã¥ããããããSHA-1ãšã¯ç°ãªããŸãã ãªãªãžãã«ã®ã¢ã«ãŽãªãºã ã§èè ãäœãå€æŽããããæ£ç¢ºã«èª¿ã¹ãããšã«ããŸããã èãããã仮説ã®1ã€ã¯ãèããããè¡çªïŒãã°ïŒã蚱容ãããããªæ¹æ³ã§ã¢ã«ãŽãªãºã ãä¿®æ£ãããããšã§ãã ãã ããå€èŠçã«ã¯ããã¹ãŠãå ã®ã¹ããŒã ã«äŒŒãŠããŸããåãæ°åŠçãªæé ãšå®æ°ã䜿çšãããŸãã ããšãã°ãããã·ã¥å ã®2çªç®ã®32ãããããã«ã¯ãŒãã¯ãéåžžã®SHA-1ã«ãã£ãŠçæããããã®ãšã¯ç°ãªããŸãã
SHA1ïŒããã¹ããïŒïŒa94a8fe5 ccb19ba6 1c4c0873d391e987982fbbd3
TwitterJS_SHA1ïŒããã¹ããïŒïŒa94a8fe5 dce4f01c 1c4c0873d391e987982fbbd3
ããã·ã¥ã®2çªç®ã®ããã«ã¯ãŒããå ã®ã¢ã«ãŽãªãºã ãšäžèŽããªãçç±ãèŠã€ããŸããã ãã®åé¡ã¯ãå€æ°ã®ã¹ã³ãŒãã®èª€çšãåå ã§ãã 以äžã«ç€ºãããã«ãSHA-1ã³ãŒãã§ã¯ãå€æ°fã 2å䜿çšãããŸãã ãããã Zé¢æ°ã§ã¯ã䜿çšããåã«varããŒã¯ãŒããæ¬ èœããŠãããããŒã«ã«å€æ°ãšããŠå®£èšãããŸãã é¢æ°Zã¯ãé¢æ°èªäœã«ãã£ãŠæ¢ã«åæåãããŠããã°ããŒãã«å€æ°fã䜿çšããŠå床åŒã³åºãããããšãããããŸãã
ãã®ãšã©ãŒã®èª¬æãšããŠã¯ãã¹ã¯ãªããããã€ããŒãã«çŽæ¥æ¿å ¥ããåã«ãèªåããŒã«ã«ãã£ãŠå€æ°åãçæãããããšãèããããŸãã ãããããã¹ã¯ãªããã®å ã®ããŒãžã§ã³ã§ã¯ãããã2ã€ã®å€æ°ã®ååã¯ç°ãªã£ãŠããŸããã
2013-2014幎ã®Twitterã¢ã«ãŠã³ãã®æšå®åãçæããããšãã§ããŸããã ããããçŸåšã¢ã¯ãã£ããã©ããã確èªããŸãã 調æ»ã®æç¹ã§ã¯ãAA2ADcAOAAã®ã¢ã«ãŠã³ãã1ã€ã ãã¢ã¯ãã£ãã§ããã ãã®ã¢ã«ãŠã³ãã¯ã2013幎8æ21æ¥ãã27æ¥ã«ãããŠèšåãããã¹ã¯ãªããã«ãã£ãŠçæããããã®ã§ããã€ãŒãã¯ãããŸããã§ããã
ãã®æªæã®ããã³ãŒãã®æœåšçãªè¢«å®³è ãæ€åºããããšããŠãç¹å¥ãªTwitterã¢ã«ãŠã³ããç»é²ããããããžã®ãªã³ã¯ãå«ããã€ãŒããçæããŸããã ãã«ã®ãŒããã©ã³ã¹ãè±åœã«ãã4å°ã®ã³ã³ãã¥ãŒã¿ãŒããè€æ°ã®æ¥ç¶ãååŸã§ããŸããã ãããã®åœã®CERTã¯ã€ãã¯ã¬ã¹ãã³ã¹ã»ã³ã¿ãŒã«é£çµ¡ããŠãææããã³ã³ãã¥ãŒã¿ãŒãéç¥ããŸããã
Win32 / Exploit.CVE-2014-1761.DãšããŠã®ãšã¯ã¹ããã€ããšWin32 / SandyEva.GãšããŠã®MiniDukeã³ã³ããŒãã³ããå«ãRTFããã¥ã¡ã³ããèŠã€ããŸãã