<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Rat</title><link>https://research.intezer.com/tags/rat/</link><description>Recent content in Rat on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 17 Jun 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/rat/index.xml" rel="self" type="application/rss+xml"/><item><title>Klingon RAT Holding on for Dear Life</title><link>https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/</link><pubDate>Thu, 17 Jun 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/</guid><description>
&lt;p&gt;With more malware written in Golang than ever before, the threat from Go-based
Remote Access Trojans (RATs) has never been higher. Not only has the number of
Go malware increased but also the sophistication of these threats. This is a
technical analysis of an advanced RAT written in Go that we are calling Klingon
RAT. The RAT is well-featured and resilient due to its multiple methods of
persistence and privilege escalation. It was determined that the RAT is being
used by cybercriminals for financial gain. It is important to stay on top of
this threat as it will degrade Antivirus security through killing targeted
processes and hiding communications through encrypted channels.&lt;/p&gt;
&lt;h2&gt;Technical Analysis&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When searching our various hunting platforms for malware one particular sample
caught our eye. This Go sample, active since at least 2019, was flagged as
malicious but mostly unique code by our platform. It is not common to find RATs
with very few code reuse. Threat actors reuse code all the time to expedite
malware development. Since it is rare to see a RAT with such a large amount of
code written from scratch, we dug deeper down the gopher hole. This RAT is full
of tactics to combat Antiviruses, maintain persistence and escalate privileges.
It communicates encrypted with its Command and Control (C2) server using TLS
and can receive commands allowing the attacker to fully control the infected
machine.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig1.png" title="Figure 1: Old analysis with unique code" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: Old analysis with unique code&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Initialization&lt;span class="hx:absolute hx:-mt-20" id="initialization"&gt;&lt;/span&gt;
&lt;a href="#initialization" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The malware starts by creating an object whose purpose is to store information
about the victim machine, controller setup and paths to dropped utilities.&lt;/p&gt;
&lt;p&gt;It will then run a WMI command
(&lt;code&gt;wmic process get Caption,ParentProcessId,ProcessId&lt;/code&gt;) to get all running
processes. The returned value is parsed and stored in a slice. The malware will
check this process list and match it against a list of targeted Antivirus
processes. The &lt;code&gt;taskkill&lt;/code&gt; command is used to kill matching processes and child
processes. The targeted processes are
&lt;a href="https://gist.github.com/aslefhewqiwbepqwefbpqsciwueh/a72fc5fee38a479e48d79710cd64d7c0"target="_blank" rel="noopener"&gt;linked here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To start gathering the information on the victim machine, it will get the OS
version using the &lt;code&gt;ver&lt;/code&gt; command, then grab the username. A GET request is made
to &lt;a href="https://api.ipify.org"target="_blank" rel="noopener"&gt;https://api.ipify.org&lt;/a&gt; to get the public IP address.
Finally in this function, it will fetch the machine ID from the registry key
&lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography&lt;/code&gt; as shown in Figure 2. This
ID will later be sent in a beacon to the Command and Control (C2) server.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig2.png" title="Figure 2: Function that fetches the key" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: Function that fetches the key&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Dependency Deployment&lt;span class="hx:absolute hx:-mt-20" id="dependency-deployment"&gt;&lt;/span&gt;
&lt;a href="#dependency-deployment" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The malware will decompress and drop three Gzip embedded files into the
&lt;code&gt;%temp%&lt;/code&gt; directory. The dropped files are utilities for the threat actor to use
once a C2 channel has been established. The files dropped are &lt;code&gt;Foxmail&lt;/code&gt;,
&lt;code&gt;PAExec&lt;/code&gt; and &lt;code&gt;LSASS&lt;/code&gt;, shown below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig3.png" title="Figure 3: Head of embedded Foxmail.exe file, Gzip compressed" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 3: Head of embedded Foxmail.exe file, Gzip compressed&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig4.png" title="Figure 4: Dropped dependencies" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 4: Dropped dependencies&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Next, the malware will check to see if it is installed at
&lt;code&gt;C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe&lt;/code&gt;. If not installed,
the malware will be relocated to the path.&lt;/p&gt;
&lt;h3&gt;Persistence&lt;span class="hx:absolute hx:-mt-20" id="persistence"&gt;&lt;/span&gt;
&lt;a href="#persistence" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Persistence can be set up in multiple ways, some of which require admin
privileges. Privilege escalation will be covered in a later section.&lt;/p&gt;
&lt;h4&gt;Registry Run Key: Current User&lt;span class="hx:absolute hx:-mt-20" id="registry-run-key-current-user"&gt;&lt;/span&gt;
&lt;a href="#registry-run-key-current-user" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The following registry entry is created:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Key:&lt;/strong&gt;
&lt;code&gt;Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;Windows Updater&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Value:&lt;/strong&gt;
&lt;code&gt;&amp;quot;C:\Users\{USER}\AppData\Local\Windows Update\updater10.exe&amp;quot; -1 -0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig5.png" title="Figure 5: Registry Run Key" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 5: Registry Run Key&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Registry Run Key: Local Machine&lt;span class="hx:absolute hx:-mt-20" id="registry-run-key-local-machine"&gt;&lt;/span&gt;
&lt;a href="#registry-run-key-local-machine" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;A similar entry as the above is created at:
&lt;code&gt;Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;Image File Execution Options Injection&lt;span class="hx:absolute hx:-mt-20" id="image-file-execution-options-injection"&gt;&lt;/span&gt;
&lt;a href="#image-file-execution-options-injection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Image File Execution Options are configured by the Windows registry with the
intention of being used for debugging. This can be leveraged for persistence as
any executable can be used as a &amp;ldquo;debugger.&amp;rdquo; The malware ensures the following
keys exist:
&lt;code&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Accessibility&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\magnify.exe&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The Image File Execution Options key has the following entries set:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Data&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Configuration&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mangnifierpane&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Debugger&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;quot;C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe&amp;quot; -1 -0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This causes the binary for Microsoft Screen Magnifier (&lt;code&gt;magnify.exe&lt;/code&gt;)
accessibility tool to be backdoored and execute the malware.&lt;/p&gt;
&lt;h4&gt;WMI Event Subscription&lt;span class="hx:absolute hx:-mt-20" id="wmi-event-subscription"&gt;&lt;/span&gt;
&lt;a href="#wmi-event-subscription" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;In this option the malware utilizes &lt;code&gt;WMIC&lt;/code&gt; to create an event subscription for
persistence. Three commands are executed to create events in the
&lt;code&gt;root\subscription&lt;/code&gt; namespace that will start the payload within 60 seconds of
Windows booting up. The commands executed are:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-batch" data-lang="batch"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wmic /namespace:&amp;#39;\root\subscription&amp;#39; PATH __EventFilter CREATE Name=&amp;#39;GuacBypassFilter&amp;#39;, EventNameSpace=&amp;#39;root\cimv2&amp;#39;, QueryLanguage=&amp;#39;WQL&amp;#39;, Query=&amp;#39;SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA &amp;#39;Win32_PerfFormattedData_PerfOS_System&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wmic /namespace:&amp;#39;\root\subscription&amp;#39; PATH CommandLineEventConsumer CREATE Name=&amp;#39;GuacBypassConsumer&amp;#39;, ExecutablePath=&amp;#39;&lt;span class="s2"&gt;&amp;#34;C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe&amp;#34;&lt;/span&gt; -1 -0&amp;#39;, CommandLineTemplate=&amp;#39;&lt;span class="s2"&gt;&amp;#34;C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe&amp;#34;&lt;/span&gt; -1 -0&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wmic /namespace:&amp;#39;\root\subscription&amp;#39; PATH __FilterToConsumerBinding CREATE Filter=&amp;#39;__EventFilter.Name=&amp;#39;GuacBypassFilter&lt;span class="s2"&gt;&amp;#34;, Consumer=&amp;#39;CommandLineEventConsumer.Name=&amp;#39;GuacBypassConsomer&amp;#34;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;Winlogon Helper DLL&lt;span class="hx:absolute hx:-mt-20" id="winlogon-helper-dll"&gt;&lt;/span&gt;
&lt;a href="#winlogon-helper-dll" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The malware can modify the &lt;code&gt;Winlogon&lt;/code&gt; key in order to run itself during Windows
logon. The path of the executable is appended to the &lt;code&gt;Userinit&lt;/code&gt; entry.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig6.png" title="Figure 6: Winlogon registry modified" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 6: Winlogon registry modified&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Scheduled Task&lt;span class="hx:absolute hx:-mt-20" id="scheduled-task"&gt;&lt;/span&gt;
&lt;a href="#scheduled-task" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The malware can create a scheduled task called &lt;code&gt;OneDriveUpdate&lt;/code&gt; to maintain
persistence. The task is configured from an XML file, &lt;code&gt;elevator.xml&lt;/code&gt; dropped to
&lt;code&gt;APPDATA&lt;/code&gt;, to trigger upon logon.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig7.png" title="Figure 7: Task configuration file" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 7: Task configuration file&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig8.png" title="Figure 8: Action of triggering the task" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 8: Action of triggering the task&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The file &lt;code&gt;elevator.xml&lt;/code&gt; is then removed from the disk.&lt;/p&gt;
&lt;h3&gt;Privilege Escalation&lt;span class="hx:absolute hx:-mt-20" id="privilege-escalation"&gt;&lt;/span&gt;
&lt;a href="#privilege-escalation" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;There are multiple avenues that the malware can take for privilege escalation.
It will first test to see if it already has admin privileges and if it is a
Windows server. To check if the process has admin privileges, it will attempt
to open &lt;code&gt;\\.\PHYSICALDRIVE0&lt;/code&gt;; if unsuccessful, the malware will attempt to open
&lt;code&gt;\\.\SCSI0&lt;/code&gt;. If successful for either of these, it will return &lt;code&gt;True&lt;/code&gt; from the
function. If &lt;code&gt;False&lt;/code&gt;, the program will check to see if it is a Windows server
by running the command &lt;code&gt;systeminfo&lt;/code&gt;, and parsing for the string
&lt;code&gt;Microsoft Windows Server&lt;/code&gt;, as shown in Figure 9.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig9.png" title="Figure 9: Check for Windows Server" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 9: Check for Windows Server&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The malware has four options for privilege escalation, one of which is not
implemented properly:&lt;/p&gt;
&lt;h4&gt;UAC Bypass: Computer Defaults&lt;span class="hx:absolute hx:-mt-20" id="uac-bypass-computer-defaults"&gt;&lt;/span&gt;
&lt;a href="#uac-bypass-computer-defaults" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;This exploit starts by opening the following registry key:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;HKEY_CURRENT_USER (0x80000001)\Software\Classes\ms-settings\shell\open\command&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The default entry is set to the path of the malware, and an entry
&lt;code&gt;DelegateExecute&lt;/code&gt; has an empty string value added. Next, the program
&lt;code&gt;computerdefaults.exe&lt;/code&gt; is executed to complete the exploit.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig10.png" title="Figure 10: Registry set for exploit" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 10: Registry set for exploit&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The key is deleted after exploitation.&lt;/p&gt;
&lt;h4&gt;UAC Bypass: Fodhelper&lt;span class="hx:absolute hx:-mt-20" id="uac-bypass-fodhelper"&gt;&lt;/span&gt;
&lt;a href="#uac-bypass-fodhelper" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;This exploit is similar to the Computer Defaults UAC bypass but this time it
leverages the program &amp;ldquo;Features on Demand Helper&amp;rdquo; (&lt;code&gt;Fodhelper.exe&lt;/code&gt;), a binary
with the &lt;code&gt;autoelevate&lt;/code&gt; setting set to true. The same registry entries are used.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig11.png" title="Figure 11: UAC bypass with Fodhelper.exe" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 11: UAC bypass with Fodhelper.exe&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;UAC Bypass: Disk Cleanup&lt;span class="hx:absolute hx:-mt-20" id="uac-bypass-disk-cleanup"&gt;&lt;/span&gt;
&lt;a href="#uac-bypass-disk-cleanup" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;This UAC bypass works by leveraging the scheduled task named &lt;code&gt;SilentCleanup&lt;/code&gt;.
This task runs with the highest privileges but is configured to have the
ability to be executed by unprivileged users.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig12.png" title="Figure 12: Config for SilentCleanup" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 12: Config for SilentCleanup&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The malware attempts to leverage the environment variable &lt;code&gt;%windir%&lt;/code&gt; to execute
itself with higher privileges. The scheduled task runs an action
&lt;code&gt;%windir%\system32\cleanmgr.exe&lt;/code&gt;, therefore the malware tries to set the
&lt;code&gt;windir&lt;/code&gt; variable to the path of the malware.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig13.png" title="Figure 13: Action of the scheduled task (SilentCleanup)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 13: Action of the scheduled task (SilentCleanup)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig14.png" title="Figure 14: windir variable set in the registry" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 14: windir variable set in the registry&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;After setting the registry, the malware runs the scheduled task.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig15.png" title="Figure 15: Execution of the scheduled task" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 15: Execution of the scheduled task&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The resulting process:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig16.png" title="Figure 16: The elevated process" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 16: The elevated process&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;UAC Bypass: Event Viewer&lt;span class="hx:absolute hx:-mt-20" id="uac-bypass-event-viewer"&gt;&lt;/span&gt;
&lt;a href="#uac-bypass-event-viewer" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Based on the strings in this path, it appears that the malware intended to
leverage the &amp;ldquo;Event Viewer&amp;rdquo; UAC bypass. But this does not appear to be properly
implemented in the program.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig17.png" title="Figure 17: References to eventvwr in a function called by MakeAdmin parent" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 17: References to eventvwr in a function called by MakeAdmin parent&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Command and Control&lt;span class="hx:absolute hx:-mt-20" id="command-and-control"&gt;&lt;/span&gt;
&lt;a href="#command-and-control" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Before Command and Control (C2) is established the malware initiates a
controller struct:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;control&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Controller&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;struct&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Bot&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;socksSessions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="nx"&gt;control&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SocksProxy&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shellSessions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="nx"&gt;control&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Conn&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;keepAlive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Conn&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;First, a x509 keypair is decoded from Base64 and loaded by the function
&lt;code&gt;tls.x509KeyPair&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig18.png" title="Figure 18: Loading x509 key pair" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 18: Loading x509 key pair&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The decoded keypair is
&lt;a href="https://gist.github.com/aslefhewqiwbepqwefbpqsciwueh/b283988a0bf4f2d51f9a3f4697055901"target="_blank" rel="noopener"&gt;linked here&lt;/a&gt;
and
&lt;a href="https://gist.github.com/aslefhewqiwbepqwefbpqsciwueh/bd0ec3fbbf3b1bb1496dd8a53c4fb7e6"target="_blank" rel="noopener"&gt;here&lt;/a&gt;.
Strings from this certificate can be matched to strings in the Issuer DN of a
similar certificate with subject
&amp;ldquo;&lt;a href="https://search.censys.io/certificates/226a9e9c05935884da5507c7647c5e404faf349bdbaf170b9a4c064f7cc697fe"target="_blank" rel="noopener"&gt;UrbanCulture, Inc.&lt;/a&gt;&amp;rdquo;
A further PEM certificate is decoded and appended to the cert pool. A TLS
handshake is performed with the C2 server &lt;code&gt;185.188.183[.]144&lt;/code&gt; on the port
&lt;code&gt;1141&lt;/code&gt; and then creates a Goroutine called &lt;code&gt;Controller.WaitCommands&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The malware is able to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start a SOCKS proxy (&lt;code&gt;proxy&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Start a reverse shell (&lt;code&gt;shell&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Start an RDP server (&lt;code&gt;rdp&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Start a binary (&lt;code&gt;binary&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Update binary (&lt;code&gt;update&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Run PowerShell command (&lt;code&gt;cmd&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The malware will initiate further Goroutines to collect information from the
system. If running as administrator, it will run the &lt;code&gt;Lsass&lt;/code&gt; binary previously
dropped into the temp folder.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig19.png" title="Figure 19: Path of the Lsass binary to be executed" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 19: Path of the Lsass binary to be executed&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The results are stored in a file called &lt;code&gt;Andrew.dmp&lt;/code&gt; inside the temp folder.
This information is sent to the C2 server through a HTTP POST request.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig20.png" title="Figure 20: Location of dump file" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 20: Location of dump file&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another routine will take a fingerprint of the machine, concatenating the
results into a string, and send this off in a HTTP POST request. It runs the
following commands in this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;systeminfo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ipconfig&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;net view /all&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;net view /all domain&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;net users /domain&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nltest /domain_trusts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nltest /domain_trusts /all_trusts&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Finally, the malware will periodically get information about the local network
and adapters.&lt;/p&gt;
&lt;h2&gt;Detect and Respond to Klingon RAT&lt;span class="hx:absolute hx:-mt-20" id="detect-and-respond-to-klingon-rat"&gt;&lt;/span&gt;
&lt;a href="#detect-and-respond-to-klingon-rat" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Detect if your Windows machine or server has been compromised by Klingon RAT or
any variant that reuses code using the Intezer Analyze
&lt;a href="https://analyze.intezer.com/endpoint-analyses?utm_campaign=research-blog&amp;amp;utm_content=klingon-rat-holding-on-for-dear-life&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Live Endpoint Scanner&lt;/a&gt;
available via the &lt;a href="https://intezer.com/pricing/?utm_campaign=research-blog&amp;amp;utm_content=klingon-rat-holding-on-for-dear-life&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;enterprise edition&lt;/a&gt;. Running
the scanner will classify all binary code residing in your machine&amp;rsquo;s memory.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/06/klingon-rat-holding-on-for-dear-life/images/fig21.png" title="Figure 21: Endpoint scan of an infected system" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 21: Endpoint scan of an infected system&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Indicators of Compromise&lt;span class="hx:absolute hx:-mt-20" id="indicators-of-compromise"&gt;&lt;/span&gt;
&lt;a href="#indicators-of-compromise" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;MD5&lt;/th&gt;
&lt;th&gt;C2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;8d44ccac6b5512a416339984ad664d79&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;185.188.183[.]144&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;14471a353788bb6cdb6071d0e0a83004&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;94.177.123[.]134&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;327090cbddf94fc901662f0e863ba0cb&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;88.214.27[.]40&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;39d550fd902ca4c1461961d01ad1aeb6&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;51.83.216[.]211&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;MITRE ATT&amp;amp;CK&lt;span class="hx:absolute hx:-mt-20" id="mitre-attck"&gt;&lt;/span&gt;
&lt;a href="#mitre-attck" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tactic&lt;/th&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0002/"target="_blank" rel="noopener"&gt;Execution&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1059/001/"target="_blank" rel="noopener"&gt;T1059.001&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1059/001/"target="_blank" rel="noopener"&gt;PowerShell&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1059/003/"target="_blank" rel="noopener"&gt;T1059.003&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1059/003/"target="_blank" rel="noopener"&gt;Windows Command Shell&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1047/"target="_blank" rel="noopener"&gt;T1047&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1047/"target="_blank" rel="noopener"&gt;Windows Management Instrumentation&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0003/"target="_blank" rel="noopener"&gt;Persistence&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1547/001/"target="_blank" rel="noopener"&gt;T1547.001&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1547/001/"target="_blank" rel="noopener"&gt;Registry Run Keys / Startup Folder&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1547/004/"target="_blank" rel="noopener"&gt;T1547.004&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1547/004/"target="_blank" rel="noopener"&gt;Winlogon Helper DLL&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1546/003/"target="_blank" rel="noopener"&gt;T1546.003&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1546/003/"target="_blank" rel="noopener"&gt;Windows Management Instrumentation Event Subscription&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1546/012/"target="_blank" rel="noopener"&gt;T1546.012&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1546/012/"target="_blank" rel="noopener"&gt;Image File Execution Options Injection&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1053/005/"target="_blank" rel="noopener"&gt;T1053.005&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1053/005/"target="_blank" rel="noopener"&gt;Scheduled Task&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0004/"target="_blank" rel="noopener"&gt;Privilege Escalation&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1548/002/"target="_blank" rel="noopener"&gt;T1548.002&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1548/002/"target="_blank" rel="noopener"&gt;Bypass User Account Control&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0005/"target="_blank" rel="noopener"&gt;Defense Evasion&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1562/001/"target="_blank" rel="noopener"&gt;T1562.001&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1562/001/"target="_blank" rel="noopener"&gt;Disable or Modify Tools&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1070/004/"target="_blank" rel="noopener"&gt;T1070.004&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1070/004/"target="_blank" rel="noopener"&gt;File Deletion&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0006/"target="_blank" rel="noopener"&gt;Credential Access&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1003/001/"target="_blank" rel="noopener"&gt;T1003.001&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1003/001/"target="_blank" rel="noopener"&gt;LSASS Memory&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0007/"target="_blank" rel="noopener"&gt;Discovery&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1082/"target="_blank" rel="noopener"&gt;T1082&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1082/"target="_blank" rel="noopener"&gt;System Information Discovery&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1016/"target="_blank" rel="noopener"&gt;T1016&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1016/"target="_blank" rel="noopener"&gt;System Network Configuration Discovery&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1018/"target="_blank" rel="noopener"&gt;T1018&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1018/"target="_blank" rel="noopener"&gt;Remote System Discovery&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/tactics/TA0011/"target="_blank" rel="noopener"&gt;Command and Control&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1571/"target="_blank" rel="noopener"&gt;T1571&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1571/"target="_blank" rel="noopener"&gt;Non-Standard Port&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1071/001/"target="_blank" rel="noopener"&gt;T1071.001&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://attack.mitre.org/techniques/T1071/001/"target="_blank" rel="noopener"&gt;Web Protocols&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description></item><item><title>HabitsRAT Used to Target Linux and Windows Servers</title><link>https://research.intezer.com/blog/2021/04/habitsrat-used-to-target-linux-and-windows-servers/</link><pubDate>Tue, 20 Apr 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/04/habitsrat-used-to-target-linux-and-windows-servers/</guid><description>
&lt;p&gt;We have discovered a new malware written in Go, which we are calling HabitsRAT,
targeting both Windows and Linux machines. The Windows version of the malware
was first reported on by
&lt;a href="https://krebsonsecurity.com/2021/03/no-i-did-not-hack-your-ms-exchange-server/"target="_blank" rel="noopener"&gt;Brian Krebs&lt;/a&gt;
and
&lt;a href="https://www.shadowserver.org/news/shadowserver-special-report-exchange-scanning-5/"target="_blank" rel="noopener"&gt;The Shadowserver Foundation&lt;/a&gt;
in attacks against Microsoft Exchange servers. In addition to this version, we
have identified a newer Windows variant and a variant targeting Linux
environments. As of this writing, the Linux version is undetected by all
Antivirus engines on VirusTotal. We assess that the Linux version is used to
target Linux servers in an adjacent campaign to the one reported by The
Shadowserver Foundation. The malware allows the attacker to control the
compromised machine remotely. To protect themself from being taken over by
others, the attacker&amp;rsquo;s commands are signed by a private key that only the
attacker has access to. The malware does not execute commands that are not
signed by the correct key, suggesting that the malware has been developed by a
sophisticated programmer.&lt;/p&gt;
&lt;h2&gt;Intro&lt;span class="hx:absolute hx:-mt-20" id="intro"&gt;&lt;/span&gt;
&lt;a href="#intro" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;On March 28th, Brian Krebs published a
&lt;a href="https://krebsonsecurity.com/2021/03/no-i-did-not-hack-your-ms-exchange-server/"target="_blank" rel="noopener"&gt;blog post&lt;/a&gt;
about attacks against Microsoft Exchange servers. In one of those attacks, a
webshell called &amp;ldquo;Babydraco&amp;rdquo; was deployed. The webshell was used to deploy a new
malware. The binary had the filename &lt;code&gt;krebsonsecurity.exe&lt;/code&gt; and used a Command
and Control (C2) server located at &lt;code&gt;brian[.]krebsonsecurity[.]top&lt;/code&gt;. This
malware turns out to be a remote access trojan (RAT) that has been written to
target both Windows and Linux machines. Based on strings found in the malware,
we have named it HabitsRAT.&lt;/p&gt;
&lt;p&gt;While the Windows version of the RAT has been documented being installed on
compromised Microsoft Exchange servers, it is not known what type of servers
the Linux version is used against. Still, in the last couple of months,
numerous remote code execution (RCE) vulnerabilities have been disclosed in
hardware and services running on top of Linux. About a month ago, CISA released
an advisory urging users of F5 BIG-IP to apply patches to address RCE
vulnerabilities.&lt;/p&gt;
&lt;h2&gt;Technical Analysis&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The HabitsRAT is a simple backdoor that allows the malware operator to execute
arbitrary code on the infected machine. While the backdoor is simple in design,
the malware has functionality making the attack more complex than what is
normally seen. The malware is written in Go and targets at least both Windows
and Linux machines. The structure for the Windows version of the malware,
&lt;a href="https://github.com/goretk/redress/"target="_blank" rel="noopener"&gt;generated by redress&lt;/a&gt;, is shown in the
code snippet below. Most of the code is shared between the Windows version and
the Linux version. The operating system-specific code has been placed in the
files &lt;code&gt;commandplatform_windows.go&lt;/code&gt;, &lt;code&gt;keyplatform_windows.go&lt;/code&gt; and
&lt;code&gt;persistencehandler_windows.go&lt;/code&gt;. The rest of the files are shared with the
Linux version.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;Package main: C:/Users/user/habits/habits-client
File: commandhandler.go
RunSignedCommand Lines: 17 to 35 (18)
File: commandplatform_windows.go
RunCommand Lines: 8 to 13 (5)
File: keyhandler.go
GetOrGenerateKey Lines: 13 to 23 (10)
GenerateKey Lines: 23 to 42 (19)
GetKeyStore Lines: 42 to 50 (8)
SetKey Lines: 50 to 68 (18)
GetKey Lines: 68 to 77 (9)
File: keyplatform_windows.go
GetRootKeyStore Lines: 11 to 19 (8)
GetUserKeyStore Lines: 19 to 27 (8)
IsRoot Lines: 27 to 49 (22)
File: main.go
main Lines: 17 to 34 (17)
File: persistencehandler.go
InstallPersistence Lines: 9 to 17 (8)
CopyBinary Lines: 17 to 22 (5)
File: persistencehandler_windows.go
CheckPersistence Lines: 11 to 21 (10)
GetBinStoreRoot Lines: 21 to 29 (8)
GetBinStoreUser Lines: 29 to 37 (8)
InstallPersistRoot Lines: 37 to 98 (61)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Linux source code structure is shown in the code snippet below. The Linux
specific code has been placed in the files &lt;code&gt;commandplatform_linux.go&lt;/code&gt;,
&lt;code&gt;keyplatform_linux.go&lt;/code&gt; and &lt;code&gt;persistencehandler_systemd_linux.go&lt;/code&gt;.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;Package main: C:/Users/user/habits/habits-client
File: commandhandler.go
RunSignedCommand Lines: 17 to 35 (18)
File: commandplatform_linux.go
RunCommand Lines: 8 to 13 (5)
File: keyhandler.go
GetOrGenerateKey Lines: 13 to 23 (10)
GenerateKey Lines: 23 to 46 (23)
GetKeyStore Lines: 46 to 54 (8)
SetKey Lines: 54 to 72 (18)
GetKey Lines: 72 to 84 (12)
IsRootAsString Lines: 84 to 86 (2)
File: keyplatform_linux.go
GetRootKeyStore Lines: 9 to 16 (7)
GetUserKeyStore Lines: 16 to 17 (1)
File: main.go
main Lines: 17 to 34 (17)
File: persistencehandler.go
InstallPersistence Lines: 9 to 17 (8)
CopyBinary Lines: 17 to 20 (3)
File: persistencehandler_systemd_linux.go
Systemd_CheckPersistence Lines: 11 to 25 (14)
Systemd_GetBinStoreUser Lines: 25 to 33 (8)
Systemd_InstallPersistRoot Lines: 33 to 64 (31)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Installation&lt;span class="hx:absolute hx:-mt-20" id="installation"&gt;&lt;/span&gt;
&lt;a href="#installation" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When the binary is run, it installs itself into a folder. The Windows version&amp;rsquo;s
location is &lt;code&gt;%SystemDrive%\Windows\Defender\MsMpEng.exe&lt;/code&gt; while the Linux version
is &lt;code&gt;$HOME/.config/polkitd/polkitd&lt;/code&gt;. This will result in the malware being
installed under &lt;code&gt;/root&lt;/code&gt; if it&amp;rsquo;s being run with root privileges.&lt;/p&gt;
&lt;p&gt;After the malware has installed itself, it checks if the persistence method has
been set up. If it hasn&amp;rsquo;t, it goes ahead and sets it up. On Linux, it uses a
&amp;ldquo;systemd&amp;rdquo; unit file. The malware checks if it&amp;rsquo;s already configured by executing
the command &lt;code&gt;systemctl status polkitd&lt;/code&gt;, as shown in Figure 1.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/04/habitsrat-used-to-target-linux-and-windows-servers/images/fig1.png" title="Figure 1: Linux version of the malware checks if persistence has been configured already." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: Linux version of the malware checks if persistence has been configured already.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The systemd unit file is created at &lt;code&gt;/etc/systemd/system/polkitd.service&lt;/code&gt; and
its content is shown in the code snippet below.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;[Unit]
Description=Authorization Manager
After=network.target
[Service]
GuessMainPID=no
ExecStart=&amp;#34;/path/to/binary&amp;#34;
Restart=always
[Install]
WantedBy=multi-user.target&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Windows version of HabitsRAT uses scheduled tasks for persistence. First,
it writes the scheduled task &amp;ldquo;xml&amp;rdquo; to a file located at
&lt;code&gt;%TEMP%\krebsonsecurity.xml&lt;/code&gt;. The content of the file is shown in the snippet
below. The task is added by executing the shell command:
&lt;code&gt;sCHtAsks.exe /create /xml %TEMP%\krebsonsecurity.xml /tn WindowsDefenderScan&lt;/code&gt;&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-16&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;Task&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;1.2&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;http://schemas.microsoft.com/windows/2004/02/mit/task&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;RegistrationInfo&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Date&amp;gt;&lt;/span&gt;2020-12-18T09:56:46.3915265&lt;span class="nt"&gt;&amp;lt;/Date&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Author&amp;gt;&lt;/span&gt;Microsoft Corporation&lt;span class="nt"&gt;&amp;lt;/Author&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;URI&amp;gt;&lt;/span&gt;\Microsoft\MicrosoftUpdater&lt;span class="nt"&gt;&amp;lt;/URI&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/RegistrationInfo&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Triggers&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;BootTrigger&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Enabled&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/Enabled&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Delay&amp;gt;&lt;/span&gt;PT1M&lt;span class="nt"&gt;&amp;lt;/Delay&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/BootTrigger&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Triggers&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Principals&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Principal&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Author&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;UserId&amp;gt;&lt;/span&gt;S-1-5-18&lt;span class="nt"&gt;&amp;lt;/UserId&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;RunLevel&amp;gt;&lt;/span&gt;HighestAvailable&lt;span class="nt"&gt;&amp;lt;/RunLevel&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Principal&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Principals&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Settings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;MultipleInstancesPolicy&amp;gt;&lt;/span&gt;IgnoreNew&lt;span class="nt"&gt;&amp;lt;/MultipleInstancesPolicy&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;DisallowStartIfOnBatteries&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/DisallowStartIfOnBatteries&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;StopIfGoingOnBatteries&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/StopIfGoingOnBatteries&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;AllowHardTerminate&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/AllowHardTerminate&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;StartWhenAvailable&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/StartWhenAvailable&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;RunOnlyIfNetworkAvailable&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/RunOnlyIfNetworkAvailable&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;IdleSettings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;StopOnIdleEnd&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/StopOnIdleEnd&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;RestartOnIdle&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/RestartOnIdle&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/IdleSettings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;AllowStartOnDemand&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/AllowStartOnDemand&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Enabled&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/Enabled&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Hidden&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/Hidden&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;RunOnlyIfIdle&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/RunOnlyIfIdle&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;WakeToRun&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/WakeToRun&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;ExecutionTimeLimit&amp;gt;&lt;/span&gt;PT0S&lt;span class="nt"&gt;&amp;lt;/ExecutionTimeLimit&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Priority&amp;gt;&lt;/span&gt;7&lt;span class="nt"&gt;&amp;lt;/Priority&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Settings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Actions&lt;/span&gt; &lt;span class="na"&gt;Context=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Author&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Exec&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;Command&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; pathtobinary
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Command&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Exec&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/Actions&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/Task&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Command and Control Communication&lt;span class="hx:absolute hx:-mt-20" id="command-and-control-communication"&gt;&lt;/span&gt;
&lt;a href="#command-and-control-communication" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The RAT uses public-key cryptography to both encrypt and authenticate the
commands from the C2 server. The malware generates a public-private key pair
using an open-source library provided by Proton Mail. Figure 2 shows the call
to the
&lt;a href="https://pkg.go.dev/github.com/ProtonMail/gopenpgp/v2@v2.1.7/helper#GenerateKey"target="_blank" rel="noopener"&gt;GenerateKey&lt;/a&gt;
function and its arguments. The malware uses the machine&amp;rsquo;s hostname as the name
and an email address of &amp;ldquo;&lt;a href="mailto:a@a.a"&gt;a@a.a&lt;/a&gt;&amp;rdquo;. No password is provided and it&amp;rsquo;s requesting a
2048-bit RSA key to be used.&lt;/p&gt;
&lt;p&gt;The key is stored and written to disk. The Linux version of HabitsRAT writes to
&lt;code&gt;$HOME/.config/.accounts-daemon/accounts-daemon.login.conf&lt;/code&gt; if it is running as
a normal user or to &lt;code&gt;/usr/share/accounts-daemon/accounts-daemon.so&lt;/code&gt;. The
Windows version uses &lt;code&gt;%SystemDrive%\Windows\Defender\MsMpEng.dll&lt;/code&gt; or
&lt;code&gt;%APPDATA%\Windows NT\Defender\MsMpEng.dll&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/04/habitsrat-used-to-target-linux-and-windows-servers/images/fig2.png" title="Figure 2: Generation of public-private key pair using the open-source library from Proton Mail." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: Generation of public-private key pair using the open-source library from Proton Mail.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;HabitsRAT sends a &amp;ldquo;check-in&amp;rdquo; POST request to the C2 server to see if it should
execute a command. As part of the request, it sends some data about the
infected machine. The form data of the request is shown below. The data
includes the &lt;code&gt;no_replay&lt;/code&gt; field that holds the sha256 hash of some random data.
This acts like a nonce to prevent executing the same request multiple times.
The request also includes the public key for the malware instance. This is to
allow the C2 server to encrypt the commands to it. It also has a version value
that is hardcoded to 11.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;no_replay: [sha256 hash of random data]
public_key: public key in ascii armour
hostname: [machine hostname]
goos: [linux or window]
goarch: amd64
shell: [$SHELL expanded]
root: [true or false]
version: 11&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The data is sent to &lt;code&gt;https://brian.krebsonsecurity[.]top/checkin&lt;/code&gt;. If no
command is returned, the malware sleeps for 10 seconds and sends the request
again. If the C2 responds with data, the malware checks that the threat actor&amp;rsquo;s
key has signed it. A hardcoded public key is included in the binary. Extracted
information from the key shows that it was generated in December 2020 and
includes a name and a Gmail address.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;pub rsa3072 2020-12-03 [SC] [expires: 2022-12-03]
uid [REDACTED] &amp;lt;[REDACTED]@gmail.com&amp;gt;
sub rsa3072 2020-12-03 [E] [expires: 2022-12-03]&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If the correct key has signed the response, HabitsRAT uses its private key to
decrypt the payload. The data has been serialized to JSON and the malware
unmarshals it to the data structure shown below.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CommandList&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;struct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;No_replay&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Commands&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The Commands field is passed as arguments to either &lt;code&gt;bash -c&lt;/code&gt; for the Linux
version or &lt;code&gt;cmd /c&lt;/code&gt; for the Windows version.&lt;/p&gt;
&lt;h3&gt;HabitsRAT Version 12&lt;span class="hx:absolute hx:-mt-20" id="habitsrat-version-12"&gt;&lt;/span&gt;
&lt;a href="#habitsrat-version-12" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;A newer Windows version of HabitsRAT has also been found. Much of the
functionality is the same as version 11. The main difference is that it&amp;rsquo;s using
a different C2 public key and supports multiple C2 addresses. As can be seen
from the snippet below, this key was generated on the 2nd of April.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;pub rsa3072 2021-04-02 [SC] [expires: 2023-04-02]
uid Brian Krebs &amp;lt;krebsonsecurity@gmail.com&amp;gt;
sub rsa3072 2021-04-02 [E] [expires: 2023-04-02]&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The malware uses four different C2 addresses and picks one out of random. The
addresses are as follows, which includes a domain of Brian Krebs&amp;rsquo;s leaked
social security number:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;https://brian-krebs-erectile-dysfunction[.]com
https://krebsonfellatio[.]net
http://XXX-XX-XXXX.com (Redacted)
hxxp://185.193.126.198&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The addresses are stored at:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;%SystemDrive%\Windows\Defender\Defender.dll
%APPDATA%\Windows NT\Defender\Defender.dll&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Conclusion&lt;span class="hx:absolute hx:-mt-20" id="conclusion"&gt;&lt;/span&gt;
&lt;a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The HabitsRAT is a multi-operating system malware targeting both Windows and
Linux environments. There is a lot of code reuse between the two variants. It
provides the attacker with the capability to execute arbitrary code on the
infected machine. To protect its C2 communication, the data is encrypted and
signed using PGP. Ensure internet facing servers are patched to prevent being
infected by HabitsRAT. Indicators of Compromise (IoCs) below can be used to
detect if a server has been compromised. Go malware has been hard to detect by
Antivirus products so it&amp;rsquo;s likely this trend will continue. We have seen threat
actors pivot and target different operating systems with the same codebase for
the malware, resulting in low or undetected malware samples, especially for
Linux—which has a large presence in the cloud. Since the malware is derived
from the same codebase, detection based on
&lt;a href="https://analyze.intezer.com/files/338e41f1a8be56339b039835b06d815a3666c8b0d5725b63be7bf54c8745704a?utm_campaign=research-blog&amp;amp;utm_content=habitsrat-used-to-target-linux-and-windows-servers&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;code reuse&lt;/a&gt;
has proven to be very effective.&lt;/p&gt;
&lt;h2&gt;IoCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Hashes&lt;span class="hx:absolute hx:-mt-20" id="hashes"&gt;&lt;/span&gt;
&lt;a href="#hashes" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Windows version of HabitsRAT&lt;span class="hx:absolute hx:-mt-20" id="windows-version-of-habitsrat"&gt;&lt;/span&gt;
&lt;a href="#windows-version-of-habitsrat" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;29ebf9771e52cde90776eeccd89aaf4c19577ef136258daef1a17c767ce88c9d
37a16e79e5be132d7e6c2e1ee482d80d93ad942af7110a4bc3a05f0b575236b0
5f7d898ade3162bfb0c8d3006c42e934ff81fab3b4ad3b51c13441fd63e438cb
9e840be4b4ab358bc3405e2c688f3ab1a9d286bd4fb9edb4468dc688962b4893
f556c9b4e5bb463be84dead45a9aedcf8bec41c1c2b503ea52719357943750e7&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;Linux version of HabitsRAT&lt;span class="hx:absolute hx:-mt-20" id="linux-version-of-habitsrat"&gt;&lt;/span&gt;
&lt;a href="#linux-version-of-habitsrat" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;338e41f1a8be56339b039835b06d815a3666c8b0d5725b63be7bf54c8745704a&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;File paths&lt;span class="hx:absolute hx:-mt-20" id="file-paths"&gt;&lt;/span&gt;
&lt;a href="#file-paths" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;%SystemDrive%\Windows\Defender\MsMpEng.exe
$HOME/.config/polkitd/polkitd
/etc/systemd/system/polkitd.service
%TEMP%\krebsonsecurity.xml
$HOME/.config/.accounts-daemon/accounts-daemon.login.conf
/usr/share/accounts-daemon/accounts-daemon.so
%SystemDrive%\Windows\Defender\MsMpEng.dll
%APPDATA%\Windows NT\Defender\MsMpEng.dll
%SystemDrive%\Windows\Defender\Defender.dll
%APPDATA%\Windows NT\Defender\Defender.dll&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Network indicators&lt;span class="hx:absolute hx:-mt-20" id="network-indicators"&gt;&lt;/span&gt;
&lt;a href="#network-indicators" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;brian[.]krebsonsecurity[.]top
brian-krebs-erectile-dysfunction[.]com
krebsonfellatio[.]net
185.193.126.198&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;C2 public keys&lt;span class="hx:absolute hx:-mt-20" id="c2-public-keys"&gt;&lt;/span&gt;
&lt;a href="#c2-public-keys" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Version 11&lt;span class="hx:absolute hx:-mt-20" id="version-11"&gt;&lt;/span&gt;
&lt;a href="#version-11" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF/I9bUBDACtHQlddPduY2DXMrQHxsh&amp;#43;jCP2ojeMi&amp;#43;08VmuC/eCG3&amp;#43;x0815p
ymssBejVcCckahu0EIJZIl5WaRY&amp;#43;nOJKF9VOdLoegpVmqPmX3GE0FJBR/cGGLSqQ
bofuDbWBIwQPVwHT&amp;#43;QriDpAK9M80H5f6FPm2HqcXJV2fI7FJ5pLWSTMRGhnTjt5D
aSiZqbXhYuq1W3S4zWSsh0TZPn0a4J44N/MwrlrPtr&amp;#43;Q&amp;#43;p31diEHPhQVQZ7a6QKD
ysM3SAx5hSUueli6nawRt6UkOhTbeL1SaGA1dv3PHliTLvOt&amp;#43;OZ6oEAU8aKp3Y2S
PQ3jKkR7x6jzkRNbu3DoXz70Te97f5ZS0qS6WFWSnpTXWC8JN0NG0cG3tDZ9ClyH
NhNnMKl040y33BzBzhQmQmHaX7NwwqEB54HIYsfE4fiSrKovxOkBBXcmS8sPhuhH
Hk6ZiXqEzlB&amp;#43;pIMvtXvNWT3qqhOC/ggmCUpt1YNHnOYoI93A&amp;#43;dlpbRSbmFOkSwL0
Zvd3RhzddtTIUf8AEQEAAbQnTWF0dCBIYXluaWUgPHBhemVyZnJvbXNpbHZlckBn
bWFpbC5jb20&amp;#43;iQHUBBMBCAA&amp;#43;FiEEmgXO4h7loKvki421YmZthezMP4EFAl/I9bUC
GwMFCQPCtQsFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQYmZthezMP4Ex/gv9
FHhkSKm9u5REhdCF&amp;#43;Ez8jk4LzoLGOaNdA8hcMCVHBWCMeE3yTGHec1P16WAqJhG&amp;#43;
LmlfpS7r0QIANeZC2W0rFI2b/lMBFzpzynR2Fi/Gpph4chNlzqlQJWgSvlBPsw0M
nnNwpzRfQhbcSdS/j&amp;#43;zFPE01bSkpm93TczcIvXvdFqJQfpU03pHrAFAvA1pmBkEW
NOmZ8JgLn&amp;#43;HReJQCeCteUbiBdGVIDPneyENZzRcO3fuXzlg3yysPIFKRBbGAqiCt
gtf&amp;#43;RsoyQ19k5vTSjXHK1KYWVvE9dA4levuN8iYKLhPxpBDNGSkY0n5NqECQpkJW
oG0dTDzMDtbAAdjhsoFIv4vH3aGr3iuoYv1ax5WxBSRb2h4Zno0Np4emo91p8FS4
KQXuNivYO5SXcEiXNRfDbUSN3J51b6v&amp;#43;SZGmdDhQUEWrEQ7MGl8eBT7DH3&amp;#43;ioZtO
qtezE/MnDzRIZW&amp;#43;o7yeryF9/aqLCa5oEFKNKgHM6n9Jmh4KAip1oiJArCJUHUQkI
uQGNBF/I9bUBDADrDvqlvnPjMQNXCWdlKjBgmiVAcWxRe5NmdIe4d43GdLXEOsWI
eTNY1/L5g4ZLXTeTgMo9ugU9bhwviWq6gro2hPXZVmBhHEVEAtICNjFTlHBOUhab
U&amp;#43;riCEeNzE3jneqfS/x04eNirM7hAplSOMOtag49TPwjzqnqGr1r/oe8L1BXHcUP
Cl6EQzk4NSGrNVO8E7Ppm7yeDnK9C0&amp;#43;4LXaMu19np/r43lg1FBk6O4d/q4/S7p&amp;#43;q
P/TILTDC0hPSQw&amp;#43;aAjQPKlfWAjZUQ0CcJT1A5x5SIVWqlpL85ltphdJzCmCiTtmm
kMIvX86OxZkzhligkJ1r1QM8OL&amp;#43;t9Mzq9mglc6PHUXIISiaVvwI3ZWH1OxI6ate3
znV8n3wfAbURDoTmPCMSNziSrvT39zsUCxY7zQoKoeNUBmx8AWW0Sgms2z1oK8ti
&amp;#43;JekSBbxLNVElglwDgtSLkgA4dOnfTUtCDstZouxVnenhLD7jUSmhbS&amp;#43;XIkjsOUY
&amp;#43;mXshXvqEb1rD5cAEQEAAYkBvAQYAQgAJhYhBJoFzuIe5aCr5IuNtWJmbYXszD&amp;#43;B
BQJfyPW1AhsMBQkDwrULAAoJEGJmbYXszD&amp;#43;BbzUMAIviQCxye0jQVnHwT1JjnyjF
7JaiJlU2nOQave16DmyHcu0rejJLhJoQXaA28Qgkv&amp;#43;6mOK4fXWyPV&amp;#43;iAcr3AKuTV
EVY6EDwwUwGn/RxcIYVt8qSZanj&amp;#43;cd6g9iJR3UMb9//25ggIW618NvW0zODowwNu
GDF5ei4cyhvA3NjCCqIvwxO&amp;#43;XRJynp&amp;#43;0lQl0ulOCS&amp;#43;Y&amp;#43;/V3H0&amp;#43;0EhIrJ8x5TvnE9
yC8CtagR0S53mNtmbS3A8INV/Gj6M7/7BZ2eVkbZRVEoQkhmr/lvJ/n4QhYcgre9
1iboJ75TorVEOH1B0Q/3IACBD/fEnSogjij8Vf/bdb4W/8LHpeV8bbtDzkzMfh7i
SxoF8y1kBl/YXrbs4mFcwgQ8KKqKkYkMp9p527LF/gglE54xMMXdp2WG65oh5jZz
0vzASRgwAI&amp;#43;K0LuN1&amp;#43;McUJwWtWQlcnQEEDlvbHVe1jKOrdqqf&amp;#43;BRxl2rNDU0P&amp;#43;u&amp;#43;
mtrn7vMinEja8k6O2N2RsL0TvLyGD&amp;#43;sAPKUZG7Q/Bg==
=gbms
-----END PGP PUBLIC KEY BLOCK-----&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;Version 12&lt;span class="hx:absolute hx:-mt-20" id="version-12"&gt;&lt;/span&gt;
&lt;a href="#version-12" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGBm0jYBDAC83QCJbnqPtHUfazjzNEeNmHY2zUeV8tXaKUkFyeIG9QmSSZ4u
0Y&amp;#43;uNR3p5CkexQC0C6STIkDE43fYU92N&amp;#43;Olt7jFcYK718vPv6ieGSuuztJqnrOKX
9jY/22iRPYFNjcw&amp;#43;LPQzm4CXyD3gugfp3Jm1JO99y5D5PDbP6yVpG6Fm6TmzOXku
grLoWBLWBn5Z6BJAB1YYM35vJpjC22eY6uFF6fhAW7K8mZNUKYHGwZOfkK5F&amp;#43;27Y
lxiaOHjh0mjfisWWvcvlImd5dd7614Pu5Yl3PfH4p7fUZJsGofj&amp;#43;hyiZHd9luIM1
yc9TWSQBSeBKIFM9iU7a4i0vB4rbY355tYBckuCVyt4NNBnDO0/zgVOZkf/qjTm&amp;#43;
JUZlxQJ54Gs7aWueo/aWSaqCN/TIqD909coDbw&amp;#43;sUA1CojLsw&amp;#43;ghPJBBzB/sSjzA
OCvGOVn&amp;#43;TCr8hV8OBpONXRQFUO4do6VALE/tqBlMMy12Lq/DunM87Mrb9zpJGZyh
JkqGP05xdT9omIEAEQEAAbQnQnJpYW4gS3JlYnMgPGtyZWJzb25zZWN1cml0eUBn
bWFpbC5jb20&amp;#43;iQHUBBMBCgA&amp;#43;FiEEOQFTY4snpri84X9c/wQVl3dsa2QFAmBm0jYC
GwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ/wQVl3dsa2QgEQv&amp;#43;
Px8Vl1WxzlWWoZsAkmLsXZzPuudAAFWai97g89/D3&amp;#43;D8kxKAiqq2mam9YKx/Cimn
B4HwGhE7ildWfVcJUx63t30Vm8rMIg1M63PQJ&amp;#43;CSIIU8cNEsWSOr8RIcfCTcenDZ
ZdK761c1xNXypag/oToTdDTOCRlfeLFkw2fgcHVsxJoIH00MtAT1utqo7xl15kGk
0jodlv6mDp17E4JBcg2aT4HpzVUIgeDOzCi5b8QPj0X1iDes8DolYu1wHnNaVAXg
SNshR5v5VbrFXvKfyx7sRA8lxQn4HkmnOH18drG&amp;#43;gsE0msFoveqf2M5BCzItY2bI
wG&amp;#43;GQwUTAwciIh5AehbpKOqrk2m588PI11i0x8bc5z3/I3YZbWhdpyJAmNErE/Et
X5nSqVn2lDoooDA9AwE6fRr2oNNxDLE0yREt88cD2EE3/iweQbpeGBSneIFKGdW3
b8zQdJi30gAe7kVS3FFnYXqNaHNhKm/WvODzwRNLSAN6Z1KwJZ79Q3uh19vkl6vr
uQGNBGBm0jYBDACxBNtcNethMzVIig0BIQbrCJ4wVS01waB3WWe71s9RUbJn/LFd
pey/f0NQrMdoUJP75Do91cS6SFI956F7l5AMWAWTDrNkiCQTG8ptegdAJQ81qWAd
V0L2YH&amp;#43;8CNYmfmTOqh3L&amp;#43;cOya6yanNMMM1&amp;#43;c1zjQjCLWzOZog7tBm&amp;#43;1891Gwy8nT
m1jf&amp;#43;oETqUcVV&amp;#43;ePrGaaNLWOB&amp;#43;U69/q6XOScaV/HeQrYLE6MTsoiFgKNEirrDDzj
rd3bjFZzttD8Cuknt7rsOtZC393JHMSu4f2SPy2Wct1r77z2PxBIkKjTJS3Ax2Lf
3rZ3Yt08v1Bmjyxq&amp;#43;zXoIUuSwSNnAP7AJyBKaOtZ/BRjT4xYL9uf0LaIC/a840SB
B3f9N3YzfYgL6GeRib6vv6OrWRPjs/ld8kaj1/l6m2Ry&amp;#43;VIs/433AWMp6b0nQqnS
EMy/72RuSxQogRbgNnwjk6mIBpEyeTQ7mXHslxK5fJVAOPdOGIVAQziQ82BdA9Yw
92ha17TJ1nKz/x8AEQEAAYkBvAQYAQoAJhYhBDkBU2OLJ6a4vOF/XP8EFZd3bGtk
BQJgZtI2AhsMBQkDwmcAAAoJEP8EFZd3bGtkCZAL/ioNDjl54jiVARfIdqSZPS77
tkkB&amp;#43;dGSuJgeZ&amp;#43;60/1gDpGXaWEyx73Mfbp&amp;#43;DT80k2JQ86Cls9S5xuy95gECMo/JI
Jxc5gPdXEH&amp;#43;II&amp;#43;wmfVbQerf1cPmjlSliaRDczJKdO5R14i7IEnD56c&amp;#43;MYDqBvTvH
NAyjFqPrVXBUcqiuDva8PvUN&amp;#43;dcLGBYwGemlNHCt0L7kQ6TPjldjqSjyeUragJYO
Ak4lz&amp;#43;E4cl&amp;#43;V5xKWjFw81S2&amp;#43;sHVLUNmR4KaY5iyfSBSDgNDFW5xQrnClJBg0&amp;#43;4cv
QqDJRd4JJOYjBp/dLjmGeXmxuVyshGePUBYrOCsm1GTf3Razr&amp;#43;lgpn4OzW78MRVv
JFfcpGhafyTvZQrV7qa7Na8fjSLr&amp;#43;drbDDxm3WP2Tz9Un0tuDvayLhTU/AnWY2MT
v&amp;#43;LlwbUDmdrZx&amp;#43;VwMCj4ZwtYkVSqHUd1yfZ5s6I&amp;#43;yPcN6700Kw0dea628GEC&amp;#43;g9V
QE&amp;#43;GLOcciRHTBgzaL16trl40wZQ8iMpgnn/FEz&amp;#43;grw==
=6v1j
-----END PGP PUBLIC KEY BLOCK-----&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Operation ElectroRAT: Attacker Creates Fake Companies to Drain Your Crypto Wallets</title><link>https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/</link><pubDate>Tue, 05 Jan 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/</guid><description>
&lt;h2&gt;Intro&lt;span class="hx:absolute hx:-mt-20" id="intro"&gt;&lt;/span&gt;
&lt;a href="#intro" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;With Bitcoin on the rise and a market exceeding billions of dollars,
cryptocurrency has attracted threat actors wishing to leverage these capitals
for their own financial gain.&lt;/p&gt;
&lt;p&gt;In December, we discovered a wide-ranging operation targeting cryptocurrency
users, estimated to have initiated in January 2020. This extensive operation is
composed of a full-fledged marketing campaign, custom cryptocurrency-related
applications and a new Remote Access Tool (RAT) written from scratch.&lt;/p&gt;
&lt;p&gt;The campaign includes: Domain registrations, websites, trojanized applications,
fake social media accounts and a new undetected remote access trojan that we
have named ElectroRAT. ElectroRAT is written in Golang and compiled to target
multiple operating systems: Windows, Linux and MacOS.&lt;/p&gt;
&lt;p&gt;It is rather common to see various information stealers trying to collect
private keys to access victims&amp;rsquo; wallets. However, it is rare to see tools
written from scratch and used to target multiple operating systems for these
purposes.&lt;/p&gt;
&lt;p&gt;The attacker behind this operation has lured cryptocurrency users to download
trojanized applications by promoting them in dedicated online forums and on
social media. We estimate this campaign has already infected thousands of
victims—based on the number of unique visitors to the pastebin pages used to
locate the command and control servers.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;The Operation&lt;span class="hx:absolute hx:-mt-20" id="the-operation"&gt;&lt;/span&gt;
&lt;a href="#the-operation" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The attacker has created three different trojanized applications, each with a
Windows, Linux and Mac version. The binaries are hosted on websites built
specifically for this campaign.&lt;/p&gt;
&lt;p&gt;These applications are directly related to cryptocurrency. &amp;ldquo;Jamm&amp;rdquo; and &amp;ldquo;eTrade&amp;rdquo;
are cryptocurrency trade management applications and &amp;ldquo;DaoPoker&amp;rdquo; is a
cryptocurrency poker app. Figures 1 and 2 are the homepages of the &amp;ldquo;Jamm&amp;rdquo; and
&amp;ldquo;eTrade&amp;rdquo; websites. Figure 3 shows what the &amp;ldquo;eTrade&amp;rdquo; application looks like once
it runs on an Ubuntu desktop.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig2.png" title="Figure 1: Kintum homepage which hosts eTrade&amp;#39;s Windows, Linux and MacOS trojans" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: Kintum homepage which hosts eTrade&amp;#39;s Windows, Linux and MacOS trojans&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig3.png" title="Figure 2: Jamm homepage which hosts Jamm&amp;#39;s Windows, Linux and MacOS trojans" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: Jamm homepage which hosts Jamm&amp;#39;s Windows, Linux and MacOS trojans&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig4.png" title="Figure 3: eTrade (Kintum) application on Ubuntu desktop" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 3: eTrade (Kintum) application on Ubuntu desktop&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;These applications were promoted in cryptocurrency and blockchain-related
forums such as &lt;a href="https://bitcointalk.org/"target="_blank" rel="noopener"&gt;bitcointalk&lt;/a&gt; and
&lt;a href="https://www.steemcoinpan.com/"target="_blank" rel="noopener"&gt;SteemCoinPan&lt;/a&gt;. The promotional posts, published
by fake users, tempted readers to browse the applications&amp;rsquo; web pages, where
they could download the application without knowing they were actually
installing malware. Figures 4 and 5 are examples of the promotions posted in
these forums.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig5.png" title="Figure 4: The user anri.rixardinh posting in a Chinese Hive forum in PeakD promoting eTrade application" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 4: The user anri.rixardinh posting in a Chinese Hive forum in PeakD promoting eTrade application&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig6.png" title="Figure 5: Jamm application promoted in bitcointalk forum" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 5: Jamm application promoted in bitcointalk forum&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The attacker went the extra mile to create Twitter and Telegram personas for
the &amp;ldquo;DaoPoker&amp;rdquo; application, in addition to paying a social media influencer for
advertisement. Figure 6 shows the DaoPoker Twitter page. Figure 7 shows eTrade
promoted by a social media advertiser with over 25K followers on Twitter.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig7.png" title="Figure 6: DaoPoker&amp;#39;s Twitter page" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 6: DaoPoker&amp;#39;s Twitter page&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig8.png" title="Figure 7: eTrade (Kintum) promoted via a social media advertiser on Twitter" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 7: eTrade (Kintum) promoted via a social media advertiser on Twitter&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Victims of the Operation&lt;span class="hx:absolute hx:-mt-20" id="victims-of-the-operation"&gt;&lt;/span&gt;
&lt;a href="#victims-of-the-operation" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As part of its behavioral flow, ElectroRAT contacts raw pastebin pages to
retrieve the C&amp;amp;C IP address. The pastebin pages are published by the same user
called &amp;ldquo;Execmac&amp;rdquo;. Browsing the user&amp;rsquo;s page, we have more visibility into the
number of victims subject to this campaign. In Figure 8, we can see that the
amount of unique visitors to the user&amp;rsquo;s pastes is approximately 6.5K [at the
time of this writing]. We can also see the first pastebin pages were posted on
January 8 2020, which indicates the operation has been active for at least a
year.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig9.png" title="Figure 8: https[:]//pastebin[.]com/u/execmac pastebin page" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 8: https[:]//pastebin[.]com/u/execmac pastebin page&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We also saw evidence of victims who were compromised by these applications
commenting on posts related to MetaMask. See Figures 9 and 10.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig10.png" title="Figure 9: A user commenting on a MetaMask Tweet" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 9: A user commenting on a MetaMask Tweet&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig11.png" title="Figure 10: A user alerting on DaoPoker" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 10: A user alerting on DaoPoker&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Opening a Can of Stealers&lt;span class="hx:absolute hx:-mt-20" id="opening-a-can-of-stealers"&gt;&lt;/span&gt;
&lt;a href="#opening-a-can-of-stealers" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The above-mentioned pastebin page reveals more insights. Other pastes published
by the same user contain C&amp;amp;Cs directly tied to
&lt;a href="https://malpedia.caad.fkie.fraunhofer.de/details/win.amadey"target="_blank" rel="noopener"&gt;Amadey&lt;/a&gt; and
&lt;a href="https://malpedia.caad.fkie.fraunhofer.de/details/win.kpot_stealer"target="_blank" rel="noopener"&gt;KPOT&lt;/a&gt;.
These malware are stealers mainly purchased on the Dark Web as off-the-shelf
malware. ElectroRAT shares similar functionalities to these well-known trojans,
however, it&amp;rsquo;s written from scratch in Golang. We assume a reason for this is to
target multiple operating systems, since Golang is incredibly efficient for
multi-platform use. Writing the malware from scratch has also allowed the
campaign to fly under the radar for almost a year by evading all Antivirus
detections.&lt;/p&gt;
&lt;h2&gt;Technical Analysis&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jamm, DaoPoker and eTrade were built using
&lt;a href="https://www.electronjs.org/"target="_blank" rel="noopener"&gt;Electron&lt;/a&gt;, an app building platform. ElectroRAT
is embedded inside each application. Once a victim runs the application, an
innocent GUI will open, while ElectroRat runs hidden in the background as
&amp;ldquo;mdworker&amp;rdquo;. Figure 3 above shows eTrade app GUI upon runtime on an infected
Ubuntu desktop machine. Figure 11 shows what the infection looks like behind
the scenes using Intezer&amp;rsquo;s Cloud Workload Protection Platform, Intezer Protect.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig12.png" title="Figure 11: ElectroRAT alert in Intezer Protect" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 11: ElectroRAT alert in Intezer Protect&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The trojanized application and the ElectroRAT binaries are either low detected
or completely undetected in VirusTotal at the time of this writing. Figure 12
shows the signed DaoPoker application&amp;rsquo;s detection rate in VirusTotal.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig13.png" title="Figure 12: DaoPoker application in VirusTotal (2c35bfabc6f441a90c8cc584e834eb59)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 12: DaoPoker application in VirusTotal (2c35bfabc6f441a90c8cc584e834eb59)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;ElectroRAT is extremely intrusive. It has various capabilities such as
keylogging, taking screenshots, uploading files from disk, downloading files
and executing commands on the victim&amp;rsquo;s console. The malware has similar
capabilities for its Windows, Linux and MacOS variants.&lt;/p&gt;
&lt;h2&gt;Detection &amp;amp; Response&lt;span class="hx:absolute hx:-mt-20" id="detection--response"&gt;&lt;/span&gt;
&lt;a href="#detection--response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Detect if a Machine in Your Network Has Been Compromised&lt;span class="hx:absolute hx:-mt-20" id="detect-if-a-machine-in-your-network-has-been-compromised"&gt;&lt;/span&gt;
&lt;a href="#detect-if-a-machine-in-your-network-has-been-compromised" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;You can quickly detect if your machine, or a machine in your network, has been
compromised by malware using Intezer Protect and Intezer Analyze Endpoint
Scanner.&lt;/p&gt;
&lt;h3&gt;Linux Machines&lt;span class="hx:absolute hx:-mt-20" id="linux-machines"&gt;&lt;/span&gt;
&lt;a href="#linux-machines" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Linux threats are on the rise. Use Intezer Protect to gain full runtime
visibility over the code in your Linux-based systems and get alerted on any
malicious or unauthorized code.&lt;/p&gt;
&lt;p&gt;Figure 10 above emphasizes an Intezer Protect alert on a compromised machine.
The alert provides you with full context about the malicious code including
threat classification, binary&amp;rsquo;s path on the disk, process tree, command and
hash.&lt;/p&gt;
&lt;h3&gt;Windows Machines&lt;span class="hx:absolute hx:-mt-20" id="windows-machines"&gt;&lt;/span&gt;
&lt;a href="#windows-machines" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Running Intezer&amp;rsquo;s Endpoint Scanner will provide you with visibility into the
type and origin of all binary code that resides in your machine&amp;rsquo;s memory.
Figure 13 shows an example of an endpoint infected with ElectroRAT.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig14.png" title="Figure 13: Endpoint infected with ElectroRAT" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 13: Endpoint infected with ElectroRAT&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Response&lt;span class="hx:absolute hx:-mt-20" id="response"&gt;&lt;/span&gt;
&lt;a href="#response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;If you were, or suspect that you are a victim of this scam, take the following
steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kill the process and delete all files related to the malware.&lt;/li&gt;
&lt;li&gt;Make sure your machine is clean and running 100% trusted code using Intezer&amp;rsquo;s
tools mentioned above.&lt;/li&gt;
&lt;li&gt;Move your funds to a new wallet.&lt;/li&gt;
&lt;li&gt;Change all of your passwords.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also run this
&lt;a href="https://github.com/intezer/yara-rules/blob/master/ElectroRAT"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
against in-memory artifacts to detect ElectroRAT. Wrap-Up&lt;/p&gt;
&lt;p&gt;It is very uncommon to see a RAT written from scratch and used to steal
personal information from cryptocurrency users. It is even more rare to see
such a wide-ranging and targeted campaign that includes various components such
as fake apps/websites and marketing/promotional efforts via relevant forums and
social media.&lt;/p&gt;
&lt;p&gt;ElectroRAT is the latest example of attackers using Golang to develop
multi-platform malware. We touched upon this trend in the
&lt;a href="https://intezer.com/blog/cloud-security/top-linux-cloud-threats-of-2020/?utm_campaign=research-blog&amp;amp;utm_content=operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Top Linux Cloud Threats of 2020&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://analyze.intezer.com/families/bf6fb1b6-b8d0-44f2-8d08-f1a6668dce29?utm_campaign=research-blog&amp;amp;utm_content=operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;ElectroRAT&lt;/a&gt;&amp;rsquo;s
PE and ELF versions are indexed in Intezer Analyze so that you can quickly
classify any samples that are genetically similar.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/01/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;IoCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;C&amp;amp;C&lt;span class="hx:absolute hx:-mt-20" id="cc"&gt;&lt;/span&gt;
&lt;a href="#cc" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;193[.]38[.]55[.]131
193[.]38[.]55[.]4
213[.]226[.]100[.]140
kintum[.]io
daopoker[.]com
jamm[.]to
pastebin.com/raw/r12wBrC7
pastebin.com/raw/DF8Gikrk
pastebin.com/raw/bfQiiqyv
pastebin.com/raw/UbTZx6kd
pastebin.com/raw/U45SvK4K
pastebin.com/raw/zrZA4L3e&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;ElectroRAT&lt;span class="hx:absolute hx:-mt-20" id="electrorat"&gt;&lt;/span&gt;
&lt;a href="#electrorat" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Windows&lt;span class="hx:absolute hx:-mt-20" id="windows"&gt;&lt;/span&gt;
&lt;a href="#windows" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;170cb5ea1a6b4af3c27358ba267a1309ed5118481619fc874f717262cb91fb77
881be95a9632fa44deeeca23e4e19390d600ad817b2f66671d3f21453a16c7b7
41ad7a6b8c410738ea8e826e503ec9bdd222a490db097b643cd94bbd62a12276
a4a68a51ed0a6ecf9146f75d405e50cfc58473d20220915b489b5fece03c4f55
ddd15dcc89416a61001c10ed9002df854fb4d92089e5388264b8af02654c778e
568326883f9157fe8f1a7c681e2df341973a75205cf81d627040d101ce24f1bb
2ad12f75695ec4f63d7b35a79d118d7ed2eccc42f9cfa8fb75ec738f86f6ab99
13ac090fa99b1dce7f45e4aed07a0359b73815fc38dbe02bf976e088060990a8
da7c4975d75ffe17d6ff1352e239c6841d4b1523f9ea43c8124d732c48dfabba
1416f8c40663d51191e8bd03c885e1f4f1c6b7c63d3068721bf386d621783917
c1aaf691608f1f2a0517e2c57cc4c6ff4e46d3ae1b592e939a0bc9b89a3a04cf
cf77727aa2cfcd3d6dd85cb492ddee28ff9191def60a9e00ea08ccddf817d143
a32ef780ba235f8222c05302f7537b4123c41b048449c6ec8744d64103d428a3&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;Linux&lt;span class="hx:absolute hx:-mt-20" id="linux"&gt;&lt;/span&gt;
&lt;a href="#linux" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;e9b83d5cdefd4486b32a927d7505cdeebb43e6977759ba069d9373e46ca7d0f2
e547872761d81c3afc9c2a42cac3931e2a1defc2c56a0a3c57b28ea91e7686cd&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;MacOS&lt;span class="hx:absolute hx:-mt-20" id="macos"&gt;&lt;/span&gt;
&lt;a href="#macos" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;17b0b1a9271683f30e5bfd92eec9c0a917755f54060ef40d9bd0f12e927f540f
5c884be3635eb55ce02e141d6fb07f760b6dbcace54f2217c69f287292ce59f6&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;KPOT Stealer&lt;span class="hx:absolute hx:-mt-20" id="kpot-stealer"&gt;&lt;/span&gt;
&lt;a href="#kpot-stealer" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;f33c78cddcf99dd999b065644a17dcbac1b222a7f3342b3fe3293ddb6ecf0060
2f83e130e52cb13944899e81f4ecf49decf52e3949f6d41b45e8b1a19a658ed6
587a4463673093554cd75b5c9ccb6c254a9d6e8769b1e45ea0390eb2b9d57bff
adeba13b358ea8be691fd7f4d025a6ea27b9b120d97d312ea875d6067434d77e
dd1792bcdf560ebaa633f72de4037e78fe1ada5c8694b9d4879554aedc323ac9&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Amadey&lt;span class="hx:absolute hx:-mt-20" id="amadey"&gt;&lt;/span&gt;
&lt;a href="#amadey" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;279524f17f8dd8753f57c2e3e91d21ad84db10316dfbf925cc19556cef55b99d
18fd6b193be1d5416a3188f5d9e4047cca719fa067d7d0169cf2df5c7fed54c0
5545f31c832c8bde6cf7563cdc0f4a4b9b15416480e14f15420b1691444c376d&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>APT37: Final1stspy Reaping the FreeMilk</title><link>https://research.intezer.com/blog/2018/10/apt37-final1stspy-reaping-the-freemilk/</link><pubDate>Wed, 03 Oct 2018 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2018/10/apt37-final1stspy-reaping-the-freemilk/</guid><description>
&lt;p&gt;Researchers at Palo Alto Networks recently published a report regarding the
&lt;a href="https://researchcenter.paloaltonetworks.com/2018/09/unit42-new-konni-malware-attacking-eurasia-southeast-asia/"target="_blank" rel="noopener"&gt;NOKKI&lt;/a&gt;
malware, which has shared code with KONNI and, although not in the report by
Palo Alto,
&lt;a href="https://malware.lu/assets/files/articles/RAP003_KimJongRAT-Stealer_Analysis.1.0.pdf"target="_blank" rel="noopener"&gt;KimJongRAT&lt;/a&gt;
(discovered by &lt;a href="https://twitter.com/r00tbsd"target="_blank" rel="noopener"&gt;Paul Rascagnères&lt;/a&gt; of Cisco Talos
in 2013), and another report on how there is evidence of the
&lt;a href="https://researchcenter.paloaltonetworks.com/2018/10/unit42-nokki-almost-ties-the-knot-with-dogcall-reaper-group-uses-new-malware-to-deploy-rat/"target="_blank" rel="noopener"&gt;NOKKI malware connecting to the North Korean threat actor&lt;/a&gt;
known as APT37, Reaper, or Group123.&lt;/p&gt;
&lt;p&gt;The malicious document related to NOKKI, using VBScript, downloads a newly
discovered malware named Final1stspy, due to the PDB string inside. As noted by
Palo Alto Networks, Final1stspy comes in 2 components, the EXE named &amp;ldquo;LoadDll&amp;rdquo;
with the sole purpose of loading up a DLL payload, internally named
&amp;ldquo;hadowexecute.&amp;rdquo; After collecting information about the infected computer, the
end result is that the DOGCALL malware, also known as ROKRAT, is downloaded as
the final payload, thus being one of the links between NOKKI and APT37.&lt;/p&gt;
&lt;h2&gt;Links Through Code Reuse&lt;span class="hx:absolute hx:-mt-20" id="links-through-code-reuse"&gt;&lt;/span&gt;
&lt;a href="#links-through-code-reuse" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The DLL payload component under the hash that was listed in the report was not
available on VirusTotal. We created some YARA signatures from the code of
“LoadDll” and did a hunt via VirusTotal. Since the EXE component shares code
with the DLL, the YARA hunt led us to find an earlier version of the DLL
component of Final1stspy with 2/67 detections, compilation timestamp of May 21,
2018, and first upload to VirusTotal date of July 11, 2018. This is an earlier
version than described in the Palo Alto report. After obtaining the
hadowexecute DLL component, we checked to see if there was any code reuse in
the Intezer Analyze™ system.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/10/apt37-final1stspy-reaping-the-freemilk/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We see that there is some code shared between the EXE component of Final1stspy
and other code that has been seen before in the FreeMilk campaign which
utilized ROKRAT.&lt;/p&gt;
&lt;p&gt;Let’s see the shared code between ROKRAT and Final1stspy by doing comparison of
these functions in IDA. If you take a look, there is an identical match between
them.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/10/apt37-final1stspy-reaping-the-freemilk/images/fig2.png" title="ROKRAT &amp;amp; Final1stspy hadowexecute function comparison" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;ROKRAT &amp;amp; Final1stspy hadowexecute function comparison&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This function is unique code that has only been seen before in Group123’s
ROKRAT and the DLL component of Final1stspy. The identical function gathers
information about the operating system and stores it in the same format.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;span class="hx:absolute hx:-mt-20" id="conclusion"&gt;&lt;/span&gt;
&lt;a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The evidence in Group123 being the threat actor involved here does not only lie
in the final delivered payload, but in the code itself. This code reuse
provides more evidence towards the relationship of KimJongRAT, KONNI, NOKKI,
Final1stspy, ROKRAT, and APT37.&lt;/p&gt;
&lt;h2&gt;IoCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Final1stspy&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;2011b9aa61d280ca9397398434af94ec26ddb6ab51f5db269f1799b46cf65a76 (DLL)
0669c71740134323793429d10518576b42941f9eee0def6057ed9a4ba87a3a9a (DLL)
fb94a5e30de7afd1d9072ccedd90a249374f687f16170e1986d6fd43c143fb3a (EXE)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Group 123 (FreeMilk / ROKRAT Samples)&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;99c1b4887d96cb94f32b280c1039b3a7e39ad996859ffa6dd011cf3cca4f1ba5
01045aeea5198cbc893066d7e496f1362c56a154f093d1a8107cecad8d4e4df2
26ad5f8889d10dc45dcf1d3c626416eb604f5fe4a7268e044f17a3ab6ff14e53
65ec544841dbe666d20de086495158128ddffb8b076ddb801a3f2dc250481135
7f35521cdbaa4e86143656ff9c52cef8d1e5e5f8245860c205364138f82c54df
ef40f7ddff404d1193e025081780e32f88883fa4dd496f4189084d772a435cb2&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>New Variants of Agent.BTZ/ComRAT Found: The Threat That Hit The Pentagon In 2008 Still Evolving; Part 2/2</title><link>https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/</link><pubDate>Wed, 13 Sep 2017 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/</guid><description>
&lt;p&gt;&lt;a href="../../../2017/08/new-variants-of-agent-btz-comrat-found/"&gt;Our previous blog&lt;/a&gt;
post was a short brief of new Agent.BTZ variants that we found. This second
part in the series will demonstrate in greater detail exactly how we discovered
these new variants.&lt;/p&gt;
&lt;h2&gt;Methodology&lt;span class="hx:absolute hx:-mt-20" id="methodology"&gt;&lt;/span&gt;
&lt;a href="#methodology" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;To begin, we used our hunting methodology, which consist of four main parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Collection: Collect multiple samples from different versions.&lt;/li&gt;
&lt;li&gt;Analysis: Mark functions that have stayed consistent across all versions that
are likely to be a part of the next version.&lt;/li&gt;
&lt;li&gt;Creating a signature: Create a robust yet flexible YARA rule for these
functions.&lt;/li&gt;
&lt;li&gt;Hunting: Search a large repository of files with that YARA rule (VirusTotal,
for example).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Why focus on Agent.BTZ?&lt;span class="hx:absolute hx:-mt-20" id="why-focus-on-agentbtz"&gt;&lt;/span&gt;
&lt;a href="#why-focus-on-agentbtz" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We chose to focus on Agent.BTZ for several reasons: First, This is one of the
oldest state-sponsored threat, developed and operated by the Turla group since
(at least) 2007 for dozens of targeted attacks.&lt;/p&gt;
&lt;p&gt;Second, there is also a lot of public knowledge regarding
&lt;a href="../../../2017/08/new-variants-of-agent-btz-comrat-found/"&gt;Agent.BTZ&lt;/a&gt;
specifically and Turla group in general available online, including intel
reports, technical analyses and malware samples, which we used for our
research.&lt;/p&gt;
&lt;p&gt;Third is the fact that this specific malware has remained out of public view
for the last two to three years; however, we recognized that it wasn’t likely
to disappear–it has just continued to fly under the radar.&lt;/p&gt;
&lt;h2&gt;Do the math&lt;span class="hx:absolute hx:-mt-20" id="do-the-math"&gt;&lt;/span&gt;
&lt;a href="#do-the-math" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We based our research on an earlier publication from three years ago:
&amp;ldquo;Evolution of sophisticated spyware: from Agent.BTZ to ComRAT&amp;rdquo; by Paul
Rascagnères of GDATA (at the time). In this excellent blog post, Paul described
the evolution of Agent.BTZ to ComRAT between 2007-2014 by manually diffing
(BinDiff) two different candidates from each major internal hard-coded version
(referred by the authors as &amp;ldquo;Ch&amp;rdquo; or &amp;ldquo;PVer&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;The following table shows the code’s similarity between each version to its
direct neighbors. By summing up the data in this table we can conclude that, in
general, about ~30% of the original code has been used in every version up to
the latest known version as of 2014 (marked in red).&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/images/fig1.png" title="https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Obviously this 30% isn’t comprised of totally unique code made by Agent.BTZ’s
developers; rather, it is a mixture made of mostly common code that can be
found in many more software products (both legit and malware). For example,
these could include C Runtime Library or any other 3rd party library such as
zlib. Using Intezer’s technology, we were able to do a ‘deep dive’ into this
code, automatically mapping all of the common, library and (most importantly)
unique pieces of code created by the malware’s authors.&lt;/p&gt;
&lt;h2&gt;Mysterious magic number&lt;span class="hx:absolute hx:-mt-20" id="mysterious-magic-number"&gt;&lt;/span&gt;
&lt;a href="#mysterious-magic-number" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After filtering out all of the common and library code, we were left with
several unique functions that can be found in every version of the malware
since 2007. The most prominent is the following function:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/images/fig2.png" title="Mysterious magic number" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Mysterious magic number&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In the picture you can see the two, almost identical functions from the first
version (Ch 1.0) on the right and the latest version (Ch 3.26) of Agent.BTZ on
the left. This function is initially reading first four bytes of a given file,
and then comparing them for the magic number 0xAAFF1290 (marked in red). If it
matches, the function will return true; otherwise, it is false.&lt;/p&gt;
&lt;p&gt;So, what is this magic number? Which file is it? We were actually unable to
find the function that creates this file within the same binary (ver 3.26). The
function shown above is the only reference to that magic number. Luckily, while
re-reading old ThreatExpert’s Agent.BTZ analysis from 2008 we happened to
notice the following paragraph:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/images/fig3.png" title="http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;So now we know that this function is used to verify thumb.dd files, which are
log/config files leaked over newly-connected USB drives (to overcome air-gapped
networks, like those of the Pentagon). But wait… why didn’t we found the
function which creates these files? Because the USB-infection vector was
removed few years earlier! &lt;strong&gt;And yet the adversary is still looking for these
valuable thumb.dd files…&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Hunting for new variants&lt;span class="hx:absolute hx:-mt-20" id="hunting-for-new-variants"&gt;&lt;/span&gt;
&lt;a href="#hunting-for-new-variants" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;So far, we know that this function exists, and it has stayed consistent across
all versions of the malware; we know what it does (verify certain magic number)
and why (detect thumb.dd files leaked from internal network by older versions
of the malware). By that information, we can tell that it’s likely to be used
in future versions as well.&lt;/p&gt;
&lt;p&gt;The next step involves writing a dedicated YARA rule(see appendix) for that
specific function and searching for new samples. The rule has to be tolerant to
minor changes between versions (mainly due to different compilation flags).
Using the VirusTotal Intelligence service, we were able to scan about 2-3
months’ worth of file uploads. As soon as the scan finished, we dug into the
results and &lt;strong&gt;discovered this first new variant of Agent.BTZ that wasn’t yet
mentioned in any public report&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/09/new-variants-of-agent-btz-comrat-found-part-2/images/fig5.png" title="A screenshot from the Intezer Analyze™ product displaying partial code connections between new sample to old samples of Agent.BTZ(Turla group)." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;A screenshot from the Intezer Analyze™ product displaying partial code connections between new sample to old samples of Agent.BTZ(Turla group).&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This
&lt;a href="https://www.virustotal.com/en/file/6ad78f069c3619d0d18eef8281219679f538cfe0c1b6d40b244beb359762cf96/analysis/"target="_blank" rel="noopener"&gt;specific file&lt;/a&gt;
was supposedly compiled at 2016-07-13 (the timestamp was modified in some of
the earlier samples) and uploaded to VT 2017-05-11, which means that this
sample is at least two years newer than any previous sample.&lt;/p&gt;
&lt;h2&gt;Main differences between old(3.26) &amp;amp; new samples&lt;span class="hx:absolute hx:-mt-20" id="main-differences-between-old326--new-samples"&gt;&lt;/span&gt;
&lt;a href="#main-differences-between-old326--new-samples" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Filename
&lt;ul&gt;
&lt;li&gt;New file names
&lt;ul&gt;
&lt;li&gt;activeds.dll – proxy dll&lt;/li&gt;
&lt;li&gt;stdole2.tlb – main payload&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Exports&lt;/li&gt;
&lt;li&gt;AddAtomS removed
&lt;ul&gt;
&lt;li&gt;Legacy stub function&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;AddAtomT removed
&lt;ul&gt;
&lt;li&gt;Legacy installation function&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;UnInstallW added
&lt;ul&gt;
&lt;li&gt;Force delete file. Used by new dropper for self delete.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;PVer(internal version tracking)
&lt;ul&gt;
&lt;li&gt;random version id(see following picture) instead of incremental, might be
due to GDATA’s 2014 publications.
&lt;ul&gt;
&lt;li&gt;For example:
&lt;ul&gt;
&lt;li&gt;0.8.1529506101&lt;/li&gt;
&lt;li&gt;0.9.1528434231&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Persistence(COM Hijacking)
&lt;ul&gt;
&lt;li&gt;New CLSID
&lt;ul&gt;
&lt;li&gt;{DFFACDC5-679F-4156-8947-C5C76BC0B67F}&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;C2 Infrastructure&lt;/li&gt;
&lt;li&gt;Both using “Satellite Turla” infrastructure&lt;/li&gt;
&lt;li&gt;Config &amp;amp; Log Files&lt;/li&gt;
&lt;li&gt;Same 512 bytes encryption key as 3.26&lt;/li&gt;
&lt;li&gt;Different file paths:&lt;/li&gt;
&lt;li&gt;config: &lt;code&gt;%appdata%\Microsoft\Windows\PrivacIE\High\desktop.ini&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;log: &lt;code&gt;%appdata%\Microsoft\Windows\PrivacIE\High\index.dat&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Indicators of Compromise&lt;span class="hx:absolute hx:-mt-20" id="indicators-of-compromise"&gt;&lt;/span&gt;
&lt;a href="#indicators-of-compromise" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Files&lt;span class="hx:absolute hx:-mt-20" id="files"&gt;&lt;/span&gt;
&lt;a href="#files" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;69690f609140db503463daf6a3699f1bf3e2a5a6049cefe7e6437f762040e548 dropper
6798b3278ae926b0145ee342ee9840d0b2e6ba11ff995c2bc84d3c6eb3e55ff4 dropper
73db4295c5b29958c5d93c20be9482c1efffc89fc4e5c8ba59ac9425a4657a88 activeds.dll
50067ebcc2d2069b3613a20b81f9d61f2cd5be9c85533c4ea34edbefaeb8a15f activeds.dll
380b0353ba8cd33da8c5e5b95e3e032e83193019e73c71875b58ec1ed389bdac activeds.dll
9c163c3f2bd5c5181147c6f4cf2571160197de98f496d16b38c7dc46b5dc1426 activeds.dll
628d316a983383ed716e3f827720915683a8876b54677878a7d2db376d117a24 activeds.dll
f27e9bba6a2635731845b4334b807c0e4f57d3b790cecdc77d8fef50629f51a2 activeds.dll
a093fa22d7bc4ee99049a29b66a13d4bf4d1899ed4c7a8423fbb8c54f4230f3c activeds.dll
6ad78f069c3619d0d18eef8281219679f538cfe0c1b6d40b244beb359762cf96 stdole2.tlb
49c5c798689d4a54e5b7099b647b0596fb96b996a437bb8241b5dd76e974c24e stdole2.tlb
e88970fa4892150441c1616028982fe63c875f149cd490c3c910a1c091d3ad49 stdole2.tlb
89db8a69ff030600f26d5c875785d20f15d45331d007733be9a2422261d16cea stdole2.tlb
0e0045d2c4bfff4345d460957a543e2e7f1638de745644f6bf58555c1d287286 other
bdcc7e900f10986cdb6dc7762de35b4f07f2ee153a341bef843b866e999d73a3 other
fac13f08afe2745fc441ada37120cebce0e0aa16d03a03e9cda3ec9384dd40f2 backdoor
bae62f7f96c4cc300ec685f42eb451388cf50a13aa624b3f2a019d071fddaeb1 other&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Network&lt;span class="hx:absolute hx:-mt-20" id="network"&gt;&lt;/span&gt;
&lt;a href="#network" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;81.199.34[.]150
elephant.zzux[.]com
angrybear.ignorelist[.]com
bigalert.mefound[.]com
bughouse.yourtrap[.]com
getfreetools.strangled[.]net
news100top.diskstation[.]org
pro100sport.mein-vigor[.]de
redneck.yourtrap[.]com
savage.2waky[.]com
tehnologtrade.4irc[.]com
81.199.160[.]11
forums.chatnook[.]com
goodengine.darktech[.]org
locker.strangled[.]net
simple-house.zzux[.]com
specialcar.mooo[.]com
sunseed.strangled[.]net
whitelibrary.4irc[.]com
bloodpearl.strangled[.]net
getlucky.ignorelist[.]com
proriot.zzux[.]com
fourapi.mooo[.]com
nopasaran.strangled[.]net
78.138.25[.]29
showme.twilightparadox[.]com
mouses.strangled[.]net
82.146.175[.]69
mouses.strangled[.]net
178.219.68[.]242
ftp.fueldust.compress[.]to
ftp.linear.wikaba[.]com
ftp.mysterysoft.epac[.]to
ftp.scroller.longmusic[.]com
ftp.spartano.mefound[.]com
fueldust.compress[.]to
linear.wikaba[.]com
mysterysoft.epac.to
safety.deaftone[.]com
salary.flnet[.]org
scroller.longmusic[.]com
spartano.mefound[.]com
88.83.25[.]122
robot.wikaba[.]com
41.223.91[.]217
smileman.compress[.]to
decent.ignorelist[.]com
dekka.biz[.]tm
disol.strangled[.]net
eraser.2waky[.]com
filelord.epac[.]to
justsoft.epac[.]to
smuggler.zzux[.]com
sport-journal.twilightparadox[.]com
sportinfo.yourtrap[.]com
stager.ignorelist[.]com
tankos.wikaba[.]com
grandfathers.mooo[.]com
homeric.mooo[.]com
jamming.mooo[.]com
pneumo.mooo[.]com
razory.mooo[.]com
anger.scieron[.]com
gantama.mefound[.]com
letgetbad.epac[.]to
rowstate.epac[.]to
memento.info[.]tm
196.43.240[.]177
bughouse.yourtrap[.]com
news100top.diskstation[.]org
169.255.102[.]240
harm17.zzux[.]com
mountain8.wikaba[.]com&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Related articles&lt;span class="hx:absolute hx:-mt-20" id="related-articles"&gt;&lt;/span&gt;
&lt;a href="#related-articles" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2014/11/23937-the-uroburos-case-new-sophisticated-rat-identified"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2014/11/23937-the-uroburos-case-new-sophisticated-rat-identified&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html"target="_blank" rel="noopener"&gt;http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://securelist.com/satellite-turla-apt-command-and-control-in-the-sky/72081/"target="_blank" rel="noopener"&gt;https://securelist.com/satellite-turla-apt-command-and-control-in-the-sky/72081/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/waterbug-attack-group.pdf"target="_blank" rel="noopener"&gt;https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/waterbug-attack-group.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://securelist.com/the-epic-turla-operation/65545/"target="_blank" rel="noopener"&gt;https://securelist.com/the-epic-turla-operation/65545/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://artemonsecurity.com/snake_whitepaper.pdf"target="_blank" rel="noopener"&gt;http://artemonsecurity.com/snake_whitepaper.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2015/01/23926-analysis-of-project-cobra"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2015/01/23926-analysis-of-project-cobra&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>New Variants of Agent.BTZ/ComRAT Found: The Threat That Hit The Pentagon In 2008 Still Evolving; Part 1/2</title><link>https://research.intezer.com/blog/2017/08/new-variants-of-agent-btz-comrat-found/</link><pubDate>Mon, 07 Aug 2017 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2017/08/new-variants-of-agent-btz-comrat-found/</guid><description>
&lt;p&gt;Agent.BTZ–also known as ComRAT–is one of the world’s oldest known
state-sponsored threats, mainly known for the
&lt;a href="http://articles.latimes.com/2008/nov/28/nation/na-cyberattack28"target="_blank" rel="noopener"&gt;2008 Pentagon breach&lt;/a&gt;.
Technically speaking, Agent.BTZ is a sophisticated user-mode RAT developed and
operated by the Turla group in conjunction with Snake/Uroburos rootkit. In the
past few months, we conducted research on Agent.BTZ’s code-base and how it
evolved using Intezer Code Intelligence™ technology. &lt;strong&gt;Based on our research
conclusions, we were able to hunt about a dozen new samples and more than
seventy previously unknown live IP &amp;amp; DNS addresses indicating the ongoing abuse
of
&lt;a href="https://securelist.com/satellite-turla-apt-command-and-control-in-the-sky/72081/"target="_blank" rel="noopener"&gt;satellite internet providers&lt;/a&gt;
operating in both Africa &amp;amp; the Middle East&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This is a short memo regarding our findings from the past few months; get more
details in Part 2 of this blog,
&lt;a href="../../../2017/09/new-variants-of-agent-btz-comrat-found-part-2"&gt;a whitepaper we wrote on Agent.BTZ/ComRAT&lt;/a&gt;
describing in more details how we found these new variants using our
technology, along with a thorough analysis of the new samples.&lt;/p&gt;
&lt;h2&gt;Dropper&lt;span class="hx:absolute hx:-mt-20" id="dropper"&gt;&lt;/span&gt;
&lt;a href="#dropper" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Although the code itself was written from scratch and has nothing to do with
WinRAR, the adversary tried to mimic WinRAR’s SFX installer. Resource data was
duplicated, including icons and layouts used by the original installer, as you
can see in the following screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/08/new-variants-of-agent-btz-comrat-found/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once executed, the dropper installs activeds.dll – a proxy dll which is loaded
directly to explorer.exe once the machine reboots. The purpose of this proxy
dll is to load the malware’s main payload – stdole2.tlb. The dropper then also
deletes any previous installation of Agent.BTZ if it exists. This is done using
a hard-coded file path:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C:\Documents and Settings\&amp;lt;USER&amp;gt;\Application Data\Microsoft\Windows\Themes\termsvr32.dll&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C:\Documents and Settings\&amp;lt;USER&amp;gt;\Application Data\Microsoft\Windows\Themes\pcasrc.tlb&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;**Note: These file names were first used by Agent.BTZ in late 2014, as you
can see in this
&lt;a href="https://vms.drweb.ru/virus/?i=4268384"target="_blank" rel="noopener"&gt;automatic Dr.WEB report&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once finished, the dropper renames and self delete using the following command
line:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;C:\WINDOWS\system32\rundll32.exe C:\DOCUME~1\&amp;lt;USER&amp;gt;~1\APPLIC~1\MICROS~1\Windows\stdole2.tlb,UnInstall C:\~$.tmp&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Samples found:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;69690f609140db503463daf6a3699f1bf3e2a5a6049cefe7e6437f762040e548&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;6798b3278ae926b0145ee342ee9840d0b2e6ba11ff995c2bc84d3c6eb3e55ff4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;stdole2.tlb&lt;span class="hx:absolute hx:-mt-20" id="stdole2tlb"&gt;&lt;/span&gt;
&lt;a href="#stdole2tlb" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As previously mentioned, this file is the main component installed by the
fake-sfx dropper and loaded by activeds.dll. We extracted the configuration
from each sample in order to obtain the c2 address and inner version
(&amp;quot;&lt;code&gt;PVer&lt;/code&gt;&amp;quot;), which is built into every Agent.BTZ sample. In the past,
Agent.BTZ’s developers have used an incremental value to indicate the inner
build version, the last known value is 3.26 as
&lt;a href="https://www.gdatasoftware.com/blog/2014/11/23937-the-uroburos-case-new-sophisticated-rat-identified"target="_blank" rel="noopener"&gt;published by G-Data in late 2014&lt;/a&gt;,
It seems that the developers have reacted to G-Data’s publication and have
stopped using an incremental value. New variants are now using a different
numbering system of &lt;code&gt;0.8/9.&amp;lt;RANDOM_VALUE&amp;gt;&lt;/code&gt;, making it more difficult for
researchers to track the exact version of the samples.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/08/new-variants-of-agent-btz-comrat-found/images/fig2.png" title="Example configuration extracted from one of the samples – PVer 0.9.1528434231." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Example configuration extracted from one of the samples – PVer 0.9.1528434231.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Even without the PVer numbering, we were able to determine using our technology
that these samples are from a newer version, which is based on the latest known
versions of Agent.BTZ – 3.25 / 3.26. These are the two top files you can see in
the following screenshot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.virustotal.com/en/file/4e553bce90f0b39cd71ba633da5990259e185979c2859ec2e04dd8efcdafe356/analysis/"target="_blank" rel="noopener"&gt;4e553bce90f0b39cd71ba633da5990259e185979c2859ec2e04dd8efcdafe356 (VirusTotal)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.virustotal.com/en/file/3a6c1aa367476ea1a6809814cf534e094035f88ac5fb759398b783f3929a0db2/analysis/"target="_blank" rel="noopener"&gt;3a6c1aa367476ea1a6809814cf534e094035f88ac5fb759398b783f3929a0db2 (VirusTotal)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both of these files were uploaded almost three years ago to VT(!)&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/08/new-variants-of-agent-btz-comrat-found/images/fig3.png" title="A screenshot from the Intezer Analyze™ product displaying a list of files in our database that share pieces of code with one of the new samples. These pieces of code are specific to the Turla malware family, and were not seen in any other malicious or legitimate software." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;A screenshot from the Intezer Analyze™ product displaying a list of files in our database that share pieces of code with one of the new samples. These pieces of code are specific to the Turla malware family, and were not seen in any other malicious or legitimate software.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Samples found:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;6ad78f069c3619d0d18eef8281219679f538cfe0c1b6d40b244beb359762cf96&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;49c5c798689d4a54e5b7099b647b0596fb96b996a437bb8241b5dd76e974c24e&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;e88970fa4892150441c1616028982fe63c875f149cd490c3c910a1c091d3ad49&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;89db8a69ff030600f26d5c875785d20f15d45331d007733be9a2422261d16cea&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Indicators of Compromise&lt;span class="hx:absolute hx:-mt-20" id="indicators-of-compromise"&gt;&lt;/span&gt;
&lt;a href="#indicators-of-compromise" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Files&lt;span class="hx:absolute hx:-mt-20" id="files"&gt;&lt;/span&gt;
&lt;a href="#files" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;69690f609140db503463daf6a3699f1bf3e2a5a6049cefe7e6437f762040e548 dropper
6798b3278ae926b0145ee342ee9840d0b2e6ba11ff995c2bc84d3c6eb3e55ff4 dropper
73db4295c5b29958c5d93c20be9482c1efffc89fc4e5c8ba59ac9425a4657a88 activeds.dll
50067ebcc2d2069b3613a20b81f9d61f2cd5be9c85533c4ea34edbefaeb8a15f activeds.dll
380b0353ba8cd33da8c5e5b95e3e032e83193019e73c71875b58ec1ed389bdac activeds.dll
9c163c3f2bd5c5181147c6f4cf2571160197de98f496d16b38c7dc46b5dc1426 activeds.dll
628d316a983383ed716e3f827720915683a8876b54677878a7d2db376d117a24 activeds.dll
f27e9bba6a2635731845b4334b807c0e4f57d3b790cecdc77d8fef50629f51a2 activeds.dll
a093fa22d7bc4ee99049a29b66a13d4bf4d1899ed4c7a8423fbb8c54f4230f3c activeds.dll
6ad78f069c3619d0d18eef8281219679f538cfe0c1b6d40b244beb359762cf96 stdole2.tlb
49c5c798689d4a54e5b7099b647b0596fb96b996a437bb8241b5dd76e974c24e stdole2.tlb
e88970fa4892150441c1616028982fe63c875f149cd490c3c910a1c091d3ad49 stdole2.tlb
89db8a69ff030600f26d5c875785d20f15d45331d007733be9a2422261d16cea stdole2.tlb
0e0045d2c4bfff4345d460957a543e2e7f1638de745644f6bf58555c1d287286 other
bdcc7e900f10986cdb6dc7762de35b4f07f2ee153a341bef843b866e999d73a3 other
fac13f08afe2745fc441ada37120cebce0e0aa16d03a03e9cda3ec9384dd40f2 backdoor
bae62f7f96c4cc300ec685f42eb451388cf50a13aa624b3f2a019d071fddaeb1 other&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Network&lt;span class="hx:absolute hx:-mt-20" id="network"&gt;&lt;/span&gt;
&lt;a href="#network" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;81.199.34[.]150
elephant.zzux[.]com
angrybear.ignorelist[.]com
bigalert.mefound[.]com
bughouse.yourtrap[.]com
getfreetools.strangled[.]net
news100top.diskstation[.]org
pro100sport.mein-vigor[.]de
redneck.yourtrap[.]com
savage.2waky[.]com
tehnologtrade.4irc[.]com
81.199.160[.]11
forums.chatnook[.]com
goodengine.darktech[.]org
locker.strangled[.]net
simple-house.zzux[.]com
specialcar.mooo[.]com
sunseed.strangled[.]net
whitelibrary.4irc[.]com
bloodpearl.strangled[.]net
getlucky.ignorelist[.]com
proriot.zzux[.]com
fourapi.mooo[.]com
nopasaran.strangled[.]net
78.138.25[.]29
showme.twilightparadox[.]com
mouses.strangled[.]net
82.146.175[.]69
mouses.strangled[.]net
178.219.68[.]242
ftp.fueldust.compress[.]to
ftp.linear.wikaba[.]com
ftp.mysterysoft.epac[.]to
ftp.scroller.longmusic[.]com
ftp.spartano.mefound[.]com
fueldust.compress[.]to
linear.wikaba[.]com
mysterysoft.epac.to
safety.deaftone[.]com
salary.flnet[.]org
scroller.longmusic[.]com
spartano.mefound[.]com
88.83.25[.]122
robot.wikaba[.]com
41.223.91[.]217
smileman.compress[.]to
decent.ignorelist[.]com
dekka.biz[.]tm
disol.strangled[.]net
eraser.2waky[.]com
filelord.epac[.]to
justsoft.epac[.]to
smuggler.zzux[.]com
sport-journal.twilightparadox[.]com
sportinfo.yourtrap[.]com
stager.ignorelist[.]com
tankos.wikaba[.]com
grandfathers.mooo[.]com
homeric.mooo[.]com
jamming.mooo[.]com
pneumo.mooo[.]com
razory.mooo[.]com
anger.scieron[.]com
gantama.mefound[.]com
letgetbad.epac[.]to
rowstate.epac[.]to
memento.info[.]tm
196.43.240[.]177
bughouse.yourtrap[.]com
news100top.diskstation[.]org
169.255.102[.]240
harm17.zzux[.]com
mountain8.wikaba[.]com&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Related articles&lt;span class="hx:absolute hx:-mt-20" id="related-articles"&gt;&lt;/span&gt;
&lt;a href="#related-articles" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2014/11/23937-the-uroburos-case-new-sophisticated-rat-identified"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2014/11/23937-the-uroburos-case-new-sophisticated-rat-identified&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2015/01/23927-evolution-of-sophisticated-spyware-from-agent-btz-to-comrat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html"target="_blank" rel="noopener"&gt;http://blog.threatexpert.com/2008/11/agentbtz-threat-that-hit-pentagon.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://securelist.com/satellite-turla-apt-command-and-control-in-the-sky/72081/"target="_blank" rel="noopener"&gt;https://securelist.com/satellite-turla-apt-command-and-control-in-the-sky/72081/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/waterbug-attack-group.pdf"target="_blank" rel="noopener"&gt;https://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/waterbug-attack-group.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://securelist.com/the-epic-turla-operation/65545/"target="_blank" rel="noopener"&gt;https://securelist.com/the-epic-turla-operation/65545/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://artemonsecurity.com/snake_whitepaper.pdf"target="_blank" rel="noopener"&gt;http://artemonsecurity.com/snake_whitepaper.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gdatasoftware.com/blog/2015/01/23926-analysis-of-project-cobra"target="_blank" rel="noopener"&gt;https://www.gdatasoftware.com/blog/2015/01/23926-analysis-of-project-cobra&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>