{"id":88206,"date":"2019-11-02T18:26:15","date_gmt":"2019-11-02T12:56:15","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=88206"},"modified":"2019-11-02T18:50:43","modified_gmt":"2019-11-02T13:20:43","slug":"attacker-uses-tricky-technique-excel-4-0-malspam-campaign","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/attacker-uses-tricky-technique-excel-4-0-malspam-campaign\/","title":{"rendered":"Attacker uses tricky technique of Excel 4.0 in Malspam campaign"},"content":{"rendered":"<p>Use of Phishing emails is not new for cyber-attack and is still one of the classic strategies to compromise a victim\u2019s machine. Cyber criminals lure victims to open email attachments (mostly Doc and XLS files) by faking them to look like important one using keywords like invoice, payment, finance, order etc. Quick Heal Security Labs observed one such type of attack to compromise the victim.<\/p>\n<p><strong>Overview:<\/strong><\/p>\n<p>In this attack, attacker first sends a phishing email disguised as an important one\u00a0 and containing an excel document as attachment. Here is a Phishing email which was tracked during this research.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88226 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.1-Phishing-email-with-excel-file-as-attachment-1.png\" alt=\"\" width=\"695\" height=\"469\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.1-Phishing-email-with-excel-file-as-attachment-1.png 695w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.1-Phishing-email-with-excel-file-as-attachment-1-300x202.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.1-Phishing-email-with-excel-file-as-attachment-1-578x390.png 578w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/p>\n<p style=\"text-align: center\">Fig.1: Phishing email with excel file as attachment<\/p>\n<p>On opening this excel document, it asks victim to \u201cenable macro\u201d content to execute malicious VBA macro code in background.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88208 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.2-Prompt-requesting-to-enable-Macros.png\" alt=\"\" width=\"650\" height=\"348\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.2-Prompt-requesting-to-enable-Macros.png 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.2-Prompt-requesting-to-enable-Macros-300x161.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<p style=\"text-align: center\">Fig.2: Prompt requesting to enable Macros<\/p>\n<p>There has been a rise in the use of VBA macro in Phishing attacks and this trend is not new. There are ways to detect this attack easily. Hence attackers have changed their exploitation technique and are using Excel 4.0 macro these days.<\/p>\n<p>Excel 4.0 Macro technique is old but still effective as all versions of Excel can run Excel 4.0 macros. In this technique, macros are not stored in a VBA project, but are placed inside cells of a spreadsheet containing functions like Exec(), Halt(), Auto_Open() etc. To trick the victim, attackers leverage hiding feature of spreadsheet and store the macros inside it.<\/p>\n<p>Following is an example that shows the actual macro code is hidden inside other excel sheet and using unhide option that sheet can be seen as shown in Fig 3.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88212 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/3.png\" alt=\"\" width=\"608\" height=\"420\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/3.png 608w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/3-300x207.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/3-565x390.png 565w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/3-229x158.png 229w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/p>\n<p style=\"text-align: center\">Fig.3: Unhiding Excel Sheet<\/p>\n<p>Below figure shows the exact code and flow of execution.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88214 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/4b.png\" alt=\"\" width=\"501\" height=\"451\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/4b.png 501w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/4b-300x270.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/4b-433x390.png 433w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/p>\n<p style=\"text-align: center\">Fig.4: Macro Code Execution<\/p>\n<p>Auto_Open() is a function used to execute a code as soon as workbook is opened.<\/p>\n<p>We can see in Fig.4, Auto_Open function will execute Macro1() which means code execution will start from Row 4 which is Macro1. After that, it will call Macro2 (step 2) and then next instruction which is 33 (on Row 14) is executed. In step 3, 1<sup>st<\/sup> stage payload is being downloaded at <em>%temp%<\/em> folder using <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/msiexec\"><em>msiexec.exe<\/em><\/a> process as shown in Fig 5.<\/p>\n<p>While <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/msiexec\"><em>msiexec.exe<\/em><\/a> is a legitimate Microsoft process, it is one of the binary from <a href=\"https:\/\/github.com\/api0cradle\/LOLBAS\">living of the land<\/a> which belongs to the Windows Installer Component. Hackers are making use of this process to download payload as many security solutions treat this as Whitelisted process which makes it difficult to detect using behaviour detection technique.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88215 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.5-Download-of-1st-Stage-Payload.png\" alt=\"\" width=\"534\" height=\"163\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.5-Download-of-1st-Stage-Payload.png 534w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.5-Download-of-1st-Stage-Payload-300x92.png 300w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><\/p>\n<p style=\"text-align: center\">Fig.5: Download of 1<sup>st<\/sup> Stage Payload<\/p>\n<p><strong>Executable Analysis:<\/strong><\/p>\n<p>After downloading a payload, <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/msiexec\"><em>msiexec.exe<\/em><\/a> is also responsible to execute the payload and performs further activity. The 1<sup>st<\/sup> stage payload is just a dropper which is used to drop multiple files in the <em>%temp% <\/em>folder. Finally, it drops a .dll file which acts as final stage payload and it is used to perform further malicious activities.<\/p>\n<p>The final stage payload is executed by Rundll32.exe with argument of function name as \u201csega\u201d. It starts collecting system information such as number of running tasks, system id, user is part of domain or not, drive usages etc.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88216 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.6-Execution-flow-of-Attack.png\" alt=\"\" width=\"454\" height=\"186\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.6-Execution-flow-of-Attack.png 454w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.6-Execution-flow-of-Attack-300x123.png 300w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/p>\n<p style=\"text-align: center\">Fig.6: Execution flow of Attack<\/p>\n<p>Final payload drops a PowerShell script which is responsible to check whether user is part of domain or not. The dropped PowerShell script is stored at <em>%temp%<\/em> location in obfuscated format.<\/p>\n<p>After collecting required information from victim\u2019s machine, payload starts encoding data using simple URL encoding and sends data using POST method to its C2 server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88217 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.-7-Data-send-using-POST-method.png\" alt=\"\" width=\"568\" height=\"108\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-7-Data-send-using-POST-method.png 568w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-7-Data-send-using-POST-method-300x57.png 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/p>\n<p style=\"text-align: center\">Fig. 7: Data send using POST method<\/p>\n<p>Here is the screenshot of the decoded data:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88218 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.-8-Decoded-data.png\" alt=\"\" width=\"677\" height=\"318\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-8-Decoded-data.png 677w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-8-Decoded-data-300x141.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-8-Decoded-data-650x305.png 650w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/p>\n<p style=\"text-align: center\">Fig. 8: Decoded data<\/p>\n<p>C2 Server responds with a command after getting the details.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-88222\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/9c.png\" alt=\"\" width=\"165\" height=\"18\" \/><\/p>\n<p>According to response, payload performs action on victim\u2019s machine as it executes a net.exe with command \u201c<em>net user \/domain<\/em>\u201d and collects the information and sends back to C2 server.<\/p>\n<p>Some of following functions are used while sending data to C2 server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-88220 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.-9-C2-communication-API-calls.png\" alt=\"\" width=\"745\" height=\"258\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-9-C2-communication-API-calls.png 745w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-9-C2-communication-API-calls-300x104.png 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-9-C2-communication-API-calls-650x225.png 650w\" sizes=\"(max-width: 745px) 100vw, 745px\" \/><\/p>\n<p style=\"text-align: center\">Fig. 9: C2 communication API calls<\/p>\n<p>This payload also creates a global mutex to execute payload only for one occurrence.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-88221 aligncenter\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2019\/11\/Fig.-10-Create-global-mutex.png\" alt=\"\" width=\"341\" height=\"68\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-10-Create-global-mutex.png 321w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2019\/11\/Fig.-10-Create-global-mutex-300x60.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/p>\n<p style=\"text-align: center\">Fig. 10: Create global mutex<\/p>\n<p>The main purpose of this malware is to create a backdoor which can be used to steal system data and if system is in domain, it may perform a lateral movement to create a backdoor network.<\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p>Use of social engineering tricks to compromise victim is a typical method and hackers always keep changing their techniques to evade AV detections by using new ideas like Excel 4.0 macro and genuine windows process like msiexec.exe. Quick Heal and Seqrite enterprise security solutions protect its users from such malicious email attachments and can also help in identifying remote Command and Control server communication. So, remember to keep the endpoint security solutions always updated.<\/p>\n<p><strong>IOCs:<\/strong><\/p>\n<p>78EA9835C2D7F6760315EA043807B8C8<\/p>\n<p>34B769FA431AC1945BE9CC33D4CC2426<\/p>\n<p>DDAE8B7AA9A93CE17610EB063F5838CE<\/p>\n<p>6675C63A2534FD65B3B2DA751F2B393F<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Subject Matter Expert:<\/strong><\/p>\n<p>Anjali Raut, Aniruddha Dolas<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use of Phishing emails is not new for cyber-attack and is still one of the classic strategies to compromise a victim\u2019s machine. Cyber criminals lure victims to open email attachments (mostly Doc and XLS files) by faking them to look like important one using keywords like invoice, payment, finance, order etc. Quick Heal Security Labs [&hellip;]<\/p>\n","protected":false},"author":62,"featured_media":88224,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,303,304],"tags":[22,25,29],"class_list":["post-88206","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email","category-phishing","category-social-engineering-2","tag-email-malware","tag-phishing","tag-social-engineering"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/88206"}],"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\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=88206"}],"version-history":[{"count":13,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/88206\/revisions"}],"predecessor-version":[{"id":88242,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/88206\/revisions\/88242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/88224"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=88206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=88206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=88206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}