{"id":21167,"date":"2023-02-06T11:20:54","date_gmt":"2023-02-06T19:20:54","guid":{"rendered":"https:\/\/www.palada.net\/index.php\/2023\/02\/06\/news-14899\/"},"modified":"2023-02-06T11:20:54","modified_gmt":"2023-02-06T19:20:54","slug":"news-14899","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2023\/02\/06\/news-14899\/","title":{"rendered":"Qakbot mechanizes distribution of malicious OneNote notebooks"},"content":{"rendered":"<p><strong>Credit to Author: Andrew Brandt| Date: Mon, 06 Feb 2023 18:17:20 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\">\n<p>Since the beginning of the year, we&#8217;ve been tracking the growth of malware threat actors taking advantage of a (previously) rarely abused Office file format &#8211; the <strong>.one<\/strong> files used by the OneNote application. So have <a href=\"https:\/\/www.trustwave.com\/en-us\/resources\/blogs\/spiderlabs-blog\/trojanized-onenote-document-leads-to-formbook-malware\/\" target=\"_blank\" rel=\"noopener\">a few other<\/a> <a href=\"https:\/\/www.proofpoint.com\/us\/blog\/threat-insight\/onenote-documents-increasingly-used-to-deliver-malware\" target=\"_blank\" rel=\"noopener\">security<\/a> <a href=\"https:\/\/blog.cyble.com\/2023\/02\/01\/qakbots-evolution-continues-with-new-strategies\/\" target=\"_blank\" rel=\"noopener\">companies<\/a>.<\/p>\n<p>Our initial look at this threat vector revealed a number of small-scale malware attacks, but now a more prominent malware group &#8212; Qakbot &#8212; has begun using the method in their campaigns in a much more automated, streamlined fashion.<\/p>\n<figure id=\"attachment_89645\" aria-describedby=\"caption-attachment-89645\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89645\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image1.png\" alt=\"\" width=\"640\" height=\"366\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image1.png 999w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image1.png?resize=300,172 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image1.png?resize=768,440 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-89645\" class=\"wp-caption-text\">The malicious OneNote &#8220;notebook&#8221; is a single page document that looks like this<\/figcaption><\/figure>\n<p>In <a href=\"https:\/\/news.sophos.com\/en-us\/2022\/03\/10\/qakbot-decoded\/\">our previous research into Qakbot<\/a>, we noted that the threat actors typically use email messages as their initial attack vector. The botnet is capable of &#8220;injecting&#8221; a malicious email into the middle of existing conversational threads, hijacking the email account(s) on previously infected machines to reply to all parties in a message with either a malicious attachment or a link to a website hosting a malicious file.<\/p>\n<h3>How the attacks started<\/h3>\n<p>Qakbot began using OneNote .one documents (also called &#8220;Notebooks&#8221; by Microsoft) in their attacks on January 31. On Tuesday, we observed two parallel spam campaigns: In one, the malicious emails embed a link, prompting the recipient to download a weaponized .one file. In these versions of the malspam, the recipient&#8217;s last name is repeated on the subject line of the message, but the messages are pretty impersonal otherwise.<\/p>\n<figure id=\"attachment_89647\" aria-describedby=\"caption-attachment-89647\" style=\"width: 446px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89647\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image2.png\" alt=\"\" width=\"446\" height=\"315\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image2.png 446w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image2.png?resize=300,212 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/a><figcaption id=\"caption-attachment-89647\" class=\"wp-caption-text\">A Qakbot-transmitted malspam with an embedded link to a OneNote document<\/figcaption><\/figure>\n<p>The other involves so-called &#8220;message thread injections&#8221; where parties to an existing communication receive a reply-to-all (ostensibly from the user of the infected computer) with an attached, malicious OneNote notebook.<\/p>\n<p>Subject matter in these messages can be as varied as whatever happens to be in the infected computer&#8217;s email inbox. But despite that, these were easy to find because all the attachments were named either <strong>ApplicationReject_#####(Jan31).one<\/strong> or <strong>ComplaintCopy_#####(Feb01).one<\/strong> (where the ##### was a random, five-digit number).<\/p>\n<figure id=\"attachment_89648\" aria-describedby=\"caption-attachment-89648\" style=\"width: 507px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89648\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image3.png\" alt=\"\" width=\"507\" height=\"402\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image3.png 507w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image3.png?resize=300,238 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/a><figcaption id=\"caption-attachment-89648\" class=\"wp-caption-text\">A Qakbot-transmitted malspam with a OneNote attachment<\/figcaption><\/figure>\n<p>In tests, only browsers that transmit a Windows-computer&#8217;s User-Agent string in the query get the weaponized .one Notebook. All other User-Agent strings receive a 404 from the server hosting the malicious .one file.<\/p>\n<p>We tested by alternating the User-Agent strings between common Windows browsers (Chrome, Firefox, Edge) and User-Agents from browsers on other platforms (Mac\/iOS, Linux, and Android). Only the requests sent with a Windows User-Agent string would work. Every request to the same URL delivered a unique sample.<\/p>\n<figure id=\"attachment_89649\" aria-describedby=\"caption-attachment-89649\" style=\"width: 219px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89649\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image4.png\" alt=\"\" width=\"219\" height=\"406\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image4.png 219w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image4.png?resize=162,300 162w\" sizes=\"auto, (max-width: 219px) 100vw, 219px\" \/><\/a><figcaption id=\"caption-attachment-89649\" class=\"wp-caption-text\">Malicious OneNote notebook files enclosed in Zip archives, as delivered by Qakbot payload servers<\/figcaption><\/figure>\n<figure id=\"attachment_89650\" aria-describedby=\"caption-attachment-89650\" style=\"width: 333px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89650\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image5.png\" alt=\"\" width=\"333\" height=\"427\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image5.png 333w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image5.png?resize=234,300 234w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/a><figcaption id=\"caption-attachment-89650\" class=\"wp-caption-text\">Selected &#8220;ApplicationReject&#8221; malicious OneNote notebooks, delivered as email attachments.<\/figcaption><\/figure>\n<p>Email vector aside, all the OneNote documents in this case contain a static image that prompts the user to click a button in response to text that says &#8220;This document contains attachments from the cloud, to receive them, double click &#8216;open.&#8217;&#8221; If a user hovers the mouse pointer over the &#8220;Open&#8221; button, a tooltip appears that calls attention to the HTML application embedded in the document, named <strong>attachment.hta<\/strong>.<\/p>\n<figure id=\"attachment_89651\" aria-describedby=\"caption-attachment-89651\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89651\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png\" alt=\"\" width=\"640\" height=\"363\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png 1048w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png?resize=300,170 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png?resize=768,435 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image6.png?resize=1024,580 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-89651\" class=\"wp-caption-text\">The malicious OneNote files contain an embedded .hta that&#8217;s made apparent when you hover your mouse pointer over the Open button<\/figcaption><\/figure>\n<h3>How to weaponize a notebook<\/h3>\n<p>Clicking the &#8220;Open&#8221; button embedded in the page executes the HTML Application (attachment.hta file) embedded in the OneNote file. The .hta file retrieves a sample of Qakbot from a remote server and executes it.<\/p>\n<p>Most of the .hta files contained identical scripting language, with the main difference being that some pointed to different URLs.<\/p>\n<figure id=\"attachment_89652\" aria-describedby=\"caption-attachment-89652\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89652\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png\" alt=\"\" width=\"640\" height=\"371\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png 1264w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png?resize=300,174 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png?resize=768,445 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image7.png?resize=1024,594 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-89652\" class=\"wp-caption-text\">A comparison of two different application.hta files used in this attack<\/figcaption><\/figure>\n<p>The first line of the script is a long, obfuscated line of code that other parts of the script decode. It contains the instructions for the rest of the attack to follow:<\/p>\n<figure id=\"attachment_89653\" aria-describedby=\"caption-attachment-89653\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image8.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89653\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image8.png\" alt=\"\" width=\"640\" height=\"206\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image8.png 692w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image8.png?resize=300,97 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-89653\" class=\"wp-caption-text\">The decoded script from the .hta that performs the payload download<\/figcaption><\/figure>\n<p>This script code passes a hardcoded URL to the curl.exe application, which retrieves the file at the other end. The samples on the servers had image-format file suffixes, such as .png or .gif, but they were actually DLLs.<\/p>\n<p>The script then copies the downloaded file to the <strong>C:ProgramData<\/strong> folder and then launches the DLL using the function &#8220;Wind&#8221; in the command to execute it.<\/p>\n<p>On this test system, the Qakbot malware payload injected itself into <strong>AtBroker.exe<\/strong>, the Windows Assistive Technology manager, a standard Windows application.<\/p>\n<figure id=\"attachment_89654\" aria-describedby=\"caption-attachment-89654\" style=\"width: 640px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image9.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-89654\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image9.png\" alt=\"\" width=\"640\" height=\"54\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image9.png 784w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image9.png?resize=300,25 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image9.png?resize=768,65 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-89654\" class=\"wp-caption-text\">Qakbot injected itself into AtBroker.exe<\/figcaption><\/figure>\n<p>We also noticed a unique characteristic in some of the malicious OneNote notebooks: If we tried to right-click and save the graphic elements in the notebook to the test system, the dialog box pre-populates with the filename that was assigned to the image when it was embedded in the document. In this case, the filename originally used when the &#8220;Open&#8221; button was created is \u0411\u0435\u0437\u044b\u043c\u044f\u043d\u043d\u044b\u0439 \u0440\u0438\u0441\u0443\u043d\u043e\u043a (bezymyanny risunok, Russian for &#8220;Anonymous drawing&#8221;) &#8212; a curious detail.<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-89656\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png\" alt=\"\" width=\"640\" height=\"371\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png 1030w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png?resize=300,174 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png?resize=768,445 768w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image10.png?resize=1024,594 1024w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h3>Don&#8217;t open files, even if you know the sender?<\/h3>\n<p>It should come as no surprise that a threat actor would attempt to exploit a novel file format in order to spread an infection. If you&#8217;re not in the habit of working with OneNote or its document format, you might not be familiar with how these files can be abused.<\/p>\n<p>Email administrators have, over the years, set up rules that either outright prevent, or throw severe-sounding warnings, on any inbound messages originating from outside the organization with a variety of abusable file formats attached. It looks likely that OneNote .one notebooks will be the next file format to end up on the email-attachment chopping block, but for now, it remains a persistent risk.<\/p>\n<p>We saw at least two warning dialog boxes appear, spawned by OneNote, upon opening the documents. One of these warnings issued sage advice we will repeat here: &#8220;Opening attachments could harm your computer and data. Don&#8217;t open it unless you trust the person who created the file.&#8221;<\/p>\n<p><a href=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-89657\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image11.png\" alt=\"\" width=\"640\" height=\"262\" srcset=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image11.png 837w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image11.png?resize=300,123 300w, https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/image11.png?resize=768,315 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Of course, the caveat to this advice is that the person who &#8220;sent&#8221; the file didn&#8217;t actually send it &#8211; it just appears to come from their account. When you&#8217;re unsure, and you see popups warning of dire consequences if you proceed, take a moment and call or text the sender and make sure they actually sent it to you before you open any OneNote document you might unexpectedly receive over email.<\/p>\n<h3>Sophos protection<\/h3>\n<p>Despite the fact that this is a new tactic by the Qakbot authors, Sophos customers had proactive behavioral protection at several points in the attack chain:<\/p>\n<ul>\n<li>Evade_25a (T1218.011)<\/li>\n<li>Evade_7a (T1055.012, mem\/qakbot-h)<\/li>\n<li>Discovery_2b (T1018)<\/li>\n<li>Persist_3a (T1547.001)<\/li>\n<\/ul>\n<p>Additionally, we&#8217;ve updated our static coverage with Mal\/DrodZp-A (Zip containing OneNote notebook), Troj\/DocDl-AGVC (malicious OneNote notebook files), and Troj\/HTMLDL-VS (malicious .hta file). Furthermore, context-based coverage for email with attached OneNote files with embedded HTA content has been added to our email protection feature as CXmail\/OneNo-B.<\/p>\n<p>Indicators of compromise relating to these files can be found <a href=\"https:\/\/github.com\/sophoslabs\/IoCs\/blob\/master\/Qakbot-onenote-attacks.csv\" target=\"_blank\" rel=\"noopener\">on the SophosLabs Github<\/a>.<\/p>\n<h3>Acknowledgments<\/h3>\n<p>Sophos X-Ops acknowledges the contributions of Colin Cowie and Benjamin Sollman from Sophos MDR, and Stephen Ormandy from SophosLabs.<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2023\/02\/06\/qakbot-onenote-attacks\/\" target=\"bwo\" >http:\/\/feeds.feedburner.com\/sophos\/dgdY<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2023\/02\/qaknote-top-graphic.png\"\/><\/p>\n<p><strong>Credit to Author: Andrew Brandt| Date: Mon, 06 Feb 2023 18:17:20 +0000<\/strong><\/p>\n<p>A large-scale &#8220;QakNote&#8221; attack deploys malicious .one files as a novel infection vector <\/p>\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":[10378,10377],"tags":[28515,28516,28517,129,3764,28518,23802,24552,16771],"class_list":["post-21167","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-one","tag-applicationreject","tag-complaintcopy","tag-featured","tag-malware","tag-onenote","tag-qakbot","tag-security-operations","tag-threat-research"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=21167"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/21167\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=21167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=21167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=21167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}