{"id":84990,"date":"2017-10-16T12:26:40","date_gmt":"2017-10-16T06:56:40","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=84990"},"modified":"2017-10-24T12:02:46","modified_gmt":"2017-10-24T06:32:46","slug":"recent-net-framework-zero-day-vulnerability-cve-2017-8759-dropping-infostealer-malware","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/recent-net-framework-zero-day-vulnerability-cve-2017-8759-dropping-infostealer-malware\/","title":{"rendered":"A recent .NET Framework zero day Vulnerability (CVE-2017-8759) is dropping Infostealer malware- An analysis by Quick Heal Security Labs"},"content":{"rendered":"<p>.NET Framework Remote Code Execution Vulnerability (<a href=\"https:\/\/portal.msrc.microsoft.com\/en-US\/security-guidance\/advisory\/CVE-2017-8759\">CVE-2017-8759<\/a>) is a code injection vulnerability in the SOAP <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/ms996486.aspx\">WSDL<\/a> parser of .net framework. This vulnerability was a zero-day when it was spotted in the wild. Quick Heal Security Labs had released <a href=\"https:\/\/blogs.quickheal.com\/cve-2017-8759-net-framework-remote-code-execution-vulnerability-analysis-quick-heal-security-labs\/\">advisory<\/a> in the month of September 2017 to address it. This vulnerability when exploited allows attacker to inject and execute remote code when WSDL parser handles the malicious SOAP response. This vulnerability was <a href=\"https:\/\/portal.msrc.microsoft.com\/en-US\/security-guidance\/advisory\/CVE-2017-8759\">patched<\/a> by Microsoft on 12th Sep 2017. Quick Heal Security Lab is observing an ongoing malspam campaign which is exploiting this vulnerability, this malspam campaign makes use of malicious RTF file as attachment exploiting CVE-2017-8759 to deliver Infostealer malware.<\/p>\n<p><strong>Attack Chain<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84991\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/1-650x341.jpg\" alt=\"1\" width=\"650\" height=\"341\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/1-650x341.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/1-300x157.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/1-768x403.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/1-789x414.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/1.jpg 1284w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 1. Attack Chain<\/strong><\/p>\n<p><strong>Technical details<\/strong><\/p>\n<p>This vulnerability (CVE-2017-8759) triggers due to improper handling of SOAP WSDL response and leads to remote code execution. Attackers are using crafted RTF files to exploit the vulnerability. This RTF file contains an embedded OLE object contains SOAP Moniker CLSID and link to remotely hosted SOAP WSDL definition file as shown in Fig 2. In this case, attacker had hosted all payloads on the compromised <a href=\"https:\/\/en.wikipedia.org\/wiki\/WordPress\">WordPress<\/a> website.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84992\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/2-650x290.jpg\" alt=\"2\" width=\"650\" height=\"290\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/2-650x290.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/2-300x134.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/2-768x342.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/2-789x351.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/2.jpg 1275w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 2. RTF doc with embedded OLE object points to WSDL SOAP definition<\/strong><\/p>\n<p><strong>RTF exploit analysis<\/strong><\/p>\n<p style=\"text-align: left;\">The attack in this campaign starts with a spam email with the exploit RTF doc as an attachment. This RTF file has similar contents as shown in fig 2. When RTF is opened by winword.exe, it issues request to malicious SOAP WSDL definition from compromised website as shown in Fig 3.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84993\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/3-650x48.jpg\" alt=\"3\" width=\"650\" height=\"48\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/3-650x48.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/3-300x22.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/3-768x56.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/3-789x58.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/3.jpg 1323w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig3. HTTP Request to SOAP WSDL definition<\/strong><\/p>\n<p>In response WSDL definition get downloaded and processed by WSDL parser module. As shown in below fig 4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84994\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/4-650x308.jpg\" alt=\"4\" width=\"650\" height=\"308\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/4-650x308.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/4-300x142.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/4-768x364.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/4-789x374.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/4.jpg 1181w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 4. SOAP WSDL response with injected code<\/strong><\/p>\n<p>Fig 4. Shows injected code which is executed by WSDL SOAP parser. Due to lack of proper validation it executes injected code. It then downloads and executes remotely hosted <em>\u201ctoZ.hta\u201d<\/em> file with the help of <em><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/aa940701(v=winembedded.5).aspx\">\u201cmshta.exe\u201d<\/a><\/em>. This .hta script is obfuscated, Fig 5 shows obfuscated script and Fig 6 shows script after deobfuscation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84995\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/5-650x302.jpg\" alt=\"5\" width=\"650\" height=\"302\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/5-650x302.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/5-300x140.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/5-768x357.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/5-789x367.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/5.jpg 1346w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 5 Obfuscated HTA script<\/strong><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84996\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/6-650x168.png\" alt=\"6\" width=\"650\" height=\"168\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/6-650x168.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/6-300x78.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/6-768x199.png 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/6-789x204.png 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/6.png 1077w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 6 Deobfucated part of HTA script<\/strong><\/p>\n<p>As shown in deobfuscated script powershell.exe is executed to download and execute malware \u201cImage0072.exe\u201d from the \u00a0compromised website.<\/p>\n<p><strong>Payload Analysis<\/strong><\/p>\n<p>The downloaded <em>\u201cImage0072.exe\u201d<\/em> is .NET executable obfuscated with custom obfuscator. It hides two malicious component inside bitmap resources in the form of compressed and encrypted data. Upon execution it decrypts and decompresses the first module \u2018rp.dll\u2019. The second module which is actually an Infostealer is decrypted and decompressed by rp.dll. This second module is created with a random name.<\/p>\n<p><strong>Overview of Infostealer Components<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-84997\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/7.png\" alt=\"7\" width=\"463\" height=\"321\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/7.png 463w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/7-300x208.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/7-229x158.png 229w\" sizes=\"(max-width: 463px) 100vw, 463px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 7. Malware Components<\/strong><\/p>\n<p><strong>rp.dll component <\/strong><\/p>\n<p>It copies <em>\u201cImage0072.exe\u201d<\/em> in %APPDATA% and sets it for auto-execution by creating \u201crun\u201d entry in the registry. It creates a new process with the name <em>\u201cImage0072.exe\u201d<\/em>. Then it decrypts and decompresses the &lt;random name&gt;.exe component and injects it into newly created process i.e <em>\u201cImage0072.exe\u201d<\/em>.<\/p>\n<p><strong>&lt;random name&gt;.exe<\/strong><\/p>\n<p>This component performs the actual tasks of Infostealer. It steals the victim\u2019s credentials saved in browsers, keystrokes and takes screen shots. The stolen data is then sent to the attacker through e-mail or by FTP. While doing the analysis we did not see the stolen data sent over FTP but we found out e-mail address and its credentials on which the data was being pushed.<\/p>\n<p>To make the analysis part difficult the raw strings related to stealing activity were kept encrypted using AES algorithm.<\/p>\n<p>The multistage operation, obfuscation, encryption and compression, anti-vm techniques are used to hinder the analysis and bypass static detection.<\/p>\n<p><strong>Stolen data at attacker mailbox<\/strong><\/p>\n<p>Following images shows stolen data at attacker\u2019s mailbox.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84998\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/8-631x390.jpg\" alt=\"8\" width=\"631\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/8-631x390.jpg 631w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/8-300x186.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/8-768x475.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/8-789x488.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/8.jpg 1153w\" sizes=\"(max-width: 631px) 100vw, 631px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 8. Attacker\u2019s mailbox<\/strong><\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-84999\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/9-650x382.jpg\" alt=\"9\" width=\"650\" height=\"382\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/9-650x382.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/9-300x176.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/9-768x451.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/9-789x463.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/9.jpg 1163w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 9. Stolen user credentials<\/strong><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-85000\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/10\/10-615x390.jpg\" alt=\"10\" width=\"615\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/10-615x390.jpg 615w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/10-300x190.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/10-768x487.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/10-789x500.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/10\/10.jpg 943w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Fig 10. Stolen Keystrokes<\/strong><\/p>\n<p>Thus the victim\u2019s activity is continuously monitored and recorded by the malware and sent to the attacker.<\/p>\n<p>This is another incident where we have seen recent zero-day exploits being integrated rapidly in ongoing malicious campaigns. We strongly advice our users to stay protected by applying latest security updates released by Microsoft and by keeping Quick Heal\/Seqrite updated with latest updates.<\/p>\n<p><strong>Indicators of compromise<\/strong><\/p>\n<p>9A8DE9ABC33FD8EE8BCA3D3673A92915<br \/>\nBEF17C7B359BCA2285311FB335951DD4<br \/>\nbali-accommodation[.]co\/wp-admin\/Image0072[.]exe<\/p>\n<p><strong>Also Read<\/strong><\/p>\n<p><a href=\"https:\/\/blogs.quickheal.com\/cve-2017-8759-net-framework-remote-code-execution-vulnerability-analysis-quick-heal-security-labs\/\">https:\/\/blogs.quickheal.com\/cve-2017-8759-net-framework-remote-code-execution-vulnerability-analysis-quick-heal-security-labs\/<\/a><\/p>\n<p><a href=\"https:\/\/blogs.seqrite.com\/cve-2017-8759-net-framework-remote-code-execution-vulnerability\/\">https:\/\/blogs.seqrite.com\/cve-2017-8759-net-framework-remote-code-execution-vulnerability\/<\/a><\/p>\n<p><strong>Subject Matter Experts<\/strong><\/p>\n<ul>\n<li>Pawan Chaudhari, Amar Patil, Aniruddha Dolas | Quick Heal Security Labs<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>.NET Framework Remote Code Execution Vulnerability (CVE-2017-8759) is a code injection vulnerability in the SOAP WSDL parser of .net framework. This vulnerability was a zero-day when it was spotted in the wild. Quick Heal Security Labs had released advisory in the month of September 2017 to address it. This vulnerability when exploited allows attacker to [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":85001,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-84990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84990"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=84990"}],"version-history":[{"count":2,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84990\/revisions"}],"predecessor-version":[{"id":85004,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84990\/revisions\/85004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/85001"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=84990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=84990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=84990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}