<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Loader</title><link>https://research.intezer.com/tags/loader/</link><description>Recent content in Loader on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 17 Nov 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/loader/index.xml" rel="self" type="application/rss+xml"/><item><title>Babble Babble Babble Babble Babble Babble BabbleLoader</title><link>https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/</link><pubDate>Sun, 17 Nov 2024 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/</guid><description>
&lt;h2&gt;Loaders, an Ever Evolving Market&lt;span class="hx:absolute hx:-mt-20" id="loaders-an-ever-evolving-market"&gt;&lt;/span&gt;
&lt;a href="#loaders-an-ever-evolving-market" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The pace of innovation and development in the malware detection market is
relentless, the same goes for the development of malware itself. Constantly
charging and adapting to create ever more evasive and capable payloads.&lt;/p&gt;
&lt;p&gt;One such sector of this market is the loader (also called crypter or packer)
market. In today’s threat landscape, loaders have become a critical tool in
cybercrime operations, serving as the backbone for delivering a range of
malicious payloads. Loaders are often the first stage in an attack chain,
designed to stealthily execute or inject malware, such as info-stealers or
ransomware, into a target system. Their prevalence reflects an evolution in
tactics, allowing threat actors to evade traditional antivirus defenses through
techniques like in-memory execution and anti-analysis features. Widely
available for purchase or lease on underground markets, loaders are now a
commodity in malware distribution, making sophisticated attack methods
accessible to a broader range of actors and adaptable across diverse campaigns
and targets.&lt;/p&gt;
&lt;p&gt;In this blog, we will introduce “BabbleLoader”, an extremely evasive loader,
packed with defensive mechanisms, that is designed to bypass antivirus and
sandbox environments to deliver stealers into memory.&lt;/p&gt;
&lt;h2&gt;BabbleLoader’s Techniques to Evade Traditional and AI Systems&lt;span class="hx:absolute hx:-mt-20" id="babbleloaders-techniques-to-evade-traditional-and-ai-systems"&gt;&lt;/span&gt;
&lt;a href="#babbleloaders-techniques-to-evade-traditional-and-ai-systems" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;BabbleLoader stands out for its array of sophisticated evasion techniques that
challenge &lt;strong&gt;both traditional and AI-based detection systems&lt;/strong&gt;. Key features
include junk code insertion and metamorphic transformations, which alter the
loader’s structure and flow, effectively evading signature-based, Artificial
Intelligence, and behavioral detections. Through dynamic API resolution, the
loader sidesteps common API monitoring by resolving necessary functions only at
runtime, preventing static analysis from identifying telltale Windows APIs.
Also bypassing sandbox injected DLLs that hook API calls. Shellcode loading and
decryption further obfuscate the payload by embedding and decrypting malicious
code in memory, bypassing file-based scanning. Additionally, anti-sandboxing
and anti-analysis measures detect virtual environments, impeding sandbox
analysis and automated AI defenses. Together, these techniques make this loader
a versatile tool, capable of subverting both static and dynamic security
layers.&lt;/p&gt;
&lt;p&gt;When investigating this loader, we have seen it used across multiple campaigns,
targeting both English and Russian speaking individuals. Lure themes suggest it
is targeting a vast range of users, from users looking to download generic
cracked software, such as video editing, gaming, VPN, browsers, and utilities.
We have also noticed campaigns that target with a particular focus on business
professionals in finance and administration, masquerading as accounting
software, and forms for filling out eligibility checks often used by HR or
payroll professionals.&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 sample used in this analysis is:
&lt;code&gt;a08db4c7b7bacc2bacd1e9a0ac7fbb91306bf83c279582f5ac3570a90e8b0f87&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Junk Code/Metamorphism&lt;span class="hx:absolute hx:-mt-20" id="junk-codemetamorphism"&gt;&lt;/span&gt;
&lt;a href="#junk-codemetamorphism" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;BabbleLoader makes diabolical use of junk code. This is done in an effort to
hamper analysis by confusing the analyst. This is achieved through multiple
means. There are many paths of code that are never actually accessed, but use
random imports with randomly generated hardcoded strings.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig1.png" title="Junk Code making rubbish calls" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Junk Code making rubbish calls&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The loader also makes excessive use of random instructions, adding values to
local variables and moving data around registers for no particular
functionality.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig2.png" title="Junk Code" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Junk Code&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The amount of junk code added into the sample greatly increases the amount of
code to the point where it starts to crash disassembly or decompilation tools
through its sheer mass alone. In the case of IDA needs to collapse nodes due to
them being so large.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig3.png" title="Collapsed Node in IDA" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Collapsed Node in IDA&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In Ghidra the function graph view will freeze and there are too many
instructions for the decompiler to show.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig4.png" title="Decompilation output in Ghidra" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Decompilation output in Ghidra&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We have even checked in Binary Ninja to see the effects of the junk code. The
user is required to manually force analysis of the function due to the size.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig5.png" title="Binary Ninja showing large function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Binary Ninja showing large function&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Each of these techniques also serve the purpose of making the loader
metamorphic. Each build of the loader will have unique strings, unique
metadata, unique code, unique hashes, unique encryption, and a unique control
flow. Each sample is structurally unique with only a few snippets of shared
code. Below is a very small snippet of the main method of two different
samples, showing very different control flow.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig6.png" title="Comparison of structure of two BabbleLoader samples" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Comparison of structure of two BabbleLoader samples&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Even the metadata of the file is randomized for each sample.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig7.png" title="Junk Metadata" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Junk Metadata&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;What This Means for AI-Based Analysis Techniques&lt;span class="hx:absolute hx:-mt-20" id="what-this-means-for-ai-based-analysis-techniques"&gt;&lt;/span&gt;
&lt;a href="#what-this-means-for-ai-based-analysis-techniques" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;These techniques also have large implications for AI based analysis techniques.
This constant variation in code structure forces AI models to continuously
re-learn what to look for—a process that often leads to missed detections or
false positives. By filling the code with junk instructions, the loader can
trick AI into interpreting irrelevant actions as meaningful ones, leading it to
predict that the malware will perform operations that it never actually
executes. Junk code also generates a large volume of “noise” in the program
flow, overwhelming the AI’s pattern-recognition capabilities and forcing it to
sift through thousands of extraneous actions that mask the true behavior of the
malware.&lt;/p&gt;
&lt;p&gt;Additionally, the inclusion of countless junk variables adds another layer of
complexity. AI models analyzing variable behavior to understand data flow must
now track thousands of decoy variables, each potentially obfuscated or
dynamically transformed to further confuse the analysis. This variable noise,
combined with the ever-shifting structure from metamorphism, makes it extremely
difficult for AI to reliably determine which variables are integral to the
malware’s function and which are simply junk.&lt;/p&gt;
&lt;p&gt;The sheer volume of junk code and variables also makes analyzing this loader
exceptionally costly. The sheer number of tokens AI must process to parse and
interpret the junk alone leads to high computational and financial costs,
effectively weaponizing the malware’s complexity against AI-driven defenses.
This combination of overwhelming data volume, misleading patterns, and high
processing requirements creates significant challenges in detecting and
analyzing the malware accurately.&lt;/p&gt;
&lt;h3&gt;Dynamic API Resolution&lt;span class="hx:absolute hx:-mt-20" id="dynamic-api-resolution"&gt;&lt;/span&gt;
&lt;a href="#dynamic-api-resolution" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;One of the first operations of the loader is to start the process of
dynamically resolving API calls. It will achieve this through
&lt;a href="https://www.ired.team/offensive-security/defense-evasion/windows-api-hashing-in-malware"target="_blank" rel="noopener"&gt;API hashing&lt;/a&gt;.
It will first get a module handle for &lt;code&gt;ntdll.dll&lt;/code&gt;. The string for the DLL is
decrypted using a rolling XOR cipher.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig8.png" title="Decoding of NTDLL string" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Decoding of NTDLL string&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Using the returned handle, the loader will start to read the PE header of
ntdll.dll and it will locate the export directory and start parsing out values
that it will need to dynamically resolve the functions by hash. The loader
builds up the following 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-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;_NtDllExportInfo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;AddressOfFunctions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;AddressOfNames&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;AddressOfNameOrdinals&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt; &lt;span class="n"&gt;NumberOfNames&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;HMODULE&lt;/span&gt; &lt;span class="n"&gt;NtdllModuleHandle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&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 parsed values can be seen easily from viewing the export directory in CFF
explorer.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig9.png" title="Parsed fields shown in CFF Explorer" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Parsed fields shown in CFF Explorer&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Once the struct has been built up, it can then proceed to iterate through the
export names, hashing the names to compare to hardcoded values in the binary.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig10.png" title="Resolution of functions by hash" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Resolution of functions by hash&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The following calls are resolved, getting pointers for imports. Whilst the
exports will remain the same for each build of the malware, the hashing will be
unique per each build.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hash&lt;/th&gt;
&lt;th&gt;Call&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1ABEC790&lt;/td&gt;
&lt;td&gt;NtCreateSection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;993C0058&lt;/td&gt;
&lt;td&gt;NtMapViewOfSection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;92263458&lt;/td&gt;
&lt;td&gt;NtUnmapViewOfSection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9DA1D253&lt;/td&gt;
&lt;td&gt;NtClose&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6AF3F390&lt;/td&gt;
&lt;td&gt;NTQuerySystemInformation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0A96AB0E4&lt;/td&gt;
&lt;td&gt;RtlAllocateHeap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8A21A480&lt;/td&gt;
&lt;td&gt;RtlFreeHeap&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Shellcode Loading and Payload Decryption&lt;span class="hx:absolute hx:-mt-20" id="shellcode-loading-and-payload-decryption"&gt;&lt;/span&gt;
&lt;a href="#shellcode-loading-and-payload-decryption" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Once the loader resolves pointers for the imports, it first calls
&lt;code&gt;NtCreateSection&lt;/code&gt;, followed by &lt;code&gt;NtMapViewOfSection&lt;/code&gt;. This approach allows the
malware to allocate and manage memory outside the standard process space. The
decryption process begins with the loader rearranging the randomly stored
encrypted chunks of the payload into their correct order within the mapped
memory, before proceeding to decrypt each block.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig11.png" title="Decryption stages" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Decryption stages&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Before calling the decrypted code, the loader will perform one of a number of
anti sandboxing checks.&lt;/p&gt;
&lt;h3&gt;AntiSandboxing/Analysis&lt;span class="hx:absolute hx:-mt-20" id="antisandboxinganalysis"&gt;&lt;/span&gt;
&lt;a href="#antisandboxinganalysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;DirectX DLL&lt;span class="hx:absolute hx:-mt-20" id="directx-dll"&gt;&lt;/span&gt;
&lt;a href="#directx-dll" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;One of the anti-sandboxing checks involves checking the installed graphics
adapters to see if it is running in a sandboxed environment or not. This is
achieved by importing the DLL &lt;code&gt;dxgi.dll&lt;/code&gt;. The DLL is the DirectX Graphics
Infrastructure library and is a core Windows DLL that provides functionality
for interfacing with graphics hardware.&lt;/p&gt;
&lt;p&gt;The exported function &lt;code&gt;CreateDXGIFactory&lt;/code&gt; is called giving the loader a
&lt;a href="https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nn-dxgi-idxgifactory"target="_blank" rel="noopener"&gt;IDXGIFactory&lt;/a&gt;
object. This allows the loader to enumerate information from the installed
graphics adapters by calling &lt;code&gt;EnumAdapters&lt;/code&gt;, followed by &lt;code&gt;GetDesc&lt;/code&gt; from the
&lt;code&gt;IDXGIAdapter&lt;/code&gt; object to give a &lt;code&gt;DXGI_ADAPTER_DESC&lt;/code&gt; 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-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;DXGI_ADAPTER_DESC&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;WCHAR&lt;/span&gt; &lt;span class="n"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt; &lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;UINT&lt;/span&gt; &lt;span class="n"&gt;VendorId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;UINT&lt;/span&gt; &lt;span class="n"&gt;DeviceId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;UINT&lt;/span&gt; &lt;span class="n"&gt;SubSysId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;UINT&lt;/span&gt; &lt;span class="n"&gt;Revision&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;SIZE_T&lt;/span&gt; &lt;span class="n"&gt;DedicatedVideoMemory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;SIZE_T&lt;/span&gt; &lt;span class="n"&gt;DedicatedSystemMemory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;SIZE_T&lt;/span&gt; &lt;span class="n"&gt;SharedSystemMemory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;LUID&lt;/span&gt; &lt;span class="n"&gt;AdapterLuid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;DXGI_ADAPTER_DESC&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;From these structs is parsed the &lt;code&gt;VendorId&lt;/code&gt;, and it is compared against three
values that form a vendor whitelist.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Vendor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;8086&lt;/td&gt;
&lt;td&gt;Intel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10DE&lt;/td&gt;
&lt;td&gt;Nvidia&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1002&lt;/td&gt;
&lt;td&gt;AMD&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This anti-sandboxing technique has been observed in previous malwares, namely
&lt;a href="https://www.sentinelone.com/blog/sfg-furtims-parent/"target="_blank" rel="noopener"&gt;Furtim in 2016&lt;/a&gt; and
&lt;a href="https://blog.morphisec.com/in2al5d-p3in4er"target="_blank" rel="noopener"&gt;Invalid Printer Loader in 2023&lt;/a&gt;.
BabbleLoader takes additional measures to hide the vendor ID numbers through
using a simple XOR key and a few assembly instructions. The instructions are
separated by a large amount of junk code so as to hide the values when
statically analyzing the sample in a disassembler.&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;mov [rsp&amp;#43;1FF48h&amp;#43;nvidiaId], 0E8185136h
...
//Junk
...
mmov eax, [rsp&amp;#43;1FF48h&amp;#43;nvidiaId]
xor eax, 0E81841E8h
mov [rsp&amp;#43;1FF48h&amp;#43;nvidiaId], eax
...
//Junk
...
mov eax, [rsp&amp;#43;1FF48h&amp;#43;nvidiaId]
cmp [rsp&amp;#43;1FF48h&amp;#43;vendorId], eax&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 decoded value (Nvidia Vendor ID) is shown below:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig12.png" title="XOR to derive VendorID" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;XOR to derive VendorID&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;VDLL Function&lt;span class="hx:absolute hx:-mt-20" id="vdll-function"&gt;&lt;/span&gt;
&lt;a href="#vdll-function" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Another form of anti-sandboxing comes in the form of a VDLL check to combat
Windows Defender’s Antivirus Emulator. To start this check, BabbleLoader, in a
similar manner to how it deobfuscates strings to dynamically resolve functions,
will decode two DLLs with exports.&lt;/p&gt;
&lt;p&gt;The first check is to get &lt;code&gt;kernel32.dll&lt;/code&gt; and look for the proc address for
&lt;code&gt;MpSwitchToNextThread_WithCheck&lt;/code&gt;. The second check is &lt;code&gt;ntdll.dll&lt;/code&gt; with the
export of &lt;code&gt;MpDispatchException&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig13.png" title="Call of emulated function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Call of emulated function&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;If any of the &lt;code&gt;GetProcAddress&lt;/code&gt; calls are successful, it will set a variable for
the loader to exit later. A successful import of any of these calls will
indicate that the loader is being emulated by Windows Defender. This is because
these exports only exist in VDLLs, which are modified Windows system DLLs
available only in the emulator for Defender. This technique has been used by
&lt;a href="https://web.archive.org/web/20240727145128/https://harfanglab.io/en/insidethelab/raspberry-robin-and-its-new-anti-emulation-trick/"target="_blank" rel="noopener"&gt;Raspberry Robin previously&lt;/a&gt;,
and suggests that the loader developer is able to incorporate new technical
research around antivirus and sandboxing internals.&lt;/p&gt;
&lt;h4&gt;Unique process count&lt;span class="hx:absolute hx:-mt-20" id="unique-process-count"&gt;&lt;/span&gt;
&lt;a href="#unique-process-count" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;When the shellcode payload that is stored in the mapped memory of the newly
created section is executed, it performs another anti sandboxing check, this
time based on the running processes in the machine.&lt;/p&gt;
&lt;p&gt;This is achieved first by calling &lt;code&gt;NtQuerySystemInformation&lt;/code&gt;, previously
dynamically resolved from &lt;code&gt;ntdll.dll&lt;/code&gt;. Getting the &lt;code&gt;SystemProcessInformation&lt;/code&gt;
class. This returns an array of &lt;code&gt;SYSTEM_PROCESS_INFORMATION&lt;/code&gt; structures, one
for each process running in the system.&lt;/p&gt;
&lt;p&gt;The process name for each process in the array is gathered and hashed as a
checksum, and compared with the hash of the name of the process next in the
array. A counter is incremented with each iteration, but if the checksums
match, the counter is reduced by one. Giving the number of processes with
unique names running.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig14.png" title="Checksum counter" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Checksum counter&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The counter is compared to check if there are at least 85 unique processes
running on the machine. With the assumption that a true infected computer would
have more running processes rather than a sandbox or emulator that is trying to
be as lightweight as possible to reduce noise and costs. This technique has
been employed by other malware also, such as
&lt;a href="https://blog.reveng.ai/latrodectus-distribution-via-brc4/"target="_blank" rel="noopener"&gt;Latrodectus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When the check has passed, the next stage of the payload will be decoded and
executed.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig15.png" title="Second stage of decryption" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Second stage of decryption&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Donut Loader and Payload&lt;span class="hx:absolute hx:-mt-20" id="donut-loader-and-payload"&gt;&lt;/span&gt;
&lt;a href="#donut-loader-and-payload" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The next stage in this chain is a
&lt;a href="https://github.com/TheWover/donut"target="_blank" rel="noopener"&gt;Donut loader&lt;/a&gt;. This is used to unpack and
execute the final payload in memory. Donut loaders have been used by many
different malware and threat groups in their operations. The payload in this
sample is a
&lt;a href="https://g0njxa.medium.com/approaching-stealers-devs-a-brief-interview-with-whitesnake-2acd8af9d61b"target="_blank" rel="noopener"&gt;WhiteSnake stealer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig16.png" title="WhiteSnake Payload" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;WhiteSnake Payload&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This payload has a very interesting method of communication with its Command
and Control (C2) server over TOR. The C2 communication is described in further
detail in a blog from
&lt;a href="https://jfrog.com/blog/new-malware-targets-python-developers-uses-tor-for-c2-communication/"target="_blank" rel="noopener"&gt;JFrog in 2023&lt;/a&gt;,
but instead of downloading from the official TOR Project website. The payload
is downloaded from &lt;a href="https://github.com/matinrco/tor"target="_blank" rel="noopener"&gt;this github repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/11/babble-babble-babble-babble-babble-babble-babbleloader/images/fig17.png" title="Open source project downloaded by WhiteSnake" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Open source project downloaded by WhiteSnake&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In other samples, Meduza stealer has also been observed. There may be other
stealer payloads delivered that have not been observed yet.&lt;/p&gt;
&lt;h2&gt;Considerations for Defense&lt;span class="hx:absolute hx:-mt-20" id="considerations-for-defense"&gt;&lt;/span&gt;
&lt;a href="#considerations-for-defense" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The use of loaders is a long-standing technique incorporated by threat actors.
In order for modern day threat actors to have any success against the many
layers of detection employed by security vendors, they too must incorporate
multiple layers of defense within their own builds. It is a never ending arms
race between attacker and defender. Each side imposing increasing costs on the
other in a frantic effort to come out on top, no matter how short that time
period may be.&lt;/p&gt;
&lt;p&gt;The better that the loaders can protect the ultimate payloads, the less
resources threat actors will need to expend in order to rotate burned
infrastructure. BabbleLoader takes measures to protect against as many forms of
detection that it can, in order to compete in a crowded loader/crypter market.
The types of protection utilized protect the loader against hash, rule,
genetic, static, dynamic, and AI forms of detection, imposing costs upon
security vendors in the hope that the cost of detection will be so high that it
will cause security vendors to overlook analyzing these files.&lt;/p&gt;
&lt;p&gt;The developer behind this loader demonstrates an active engagement with current
security research, rapidly integrating new techniques to enhance evasion
capabilities. For instance, recent anti-sandboxing features reflect insights
from research on Windows Defender presented by white-hat experts at Black Hat,
allowing the loader to better evade detection by Microsoft’s defenses. This
adaptability shows a strategic commitment to keeping the loader ahead of
evolving security tools by adopting the latest innovations in bypass
techniques, making it more resilient and harder to detect with each new build.&lt;/p&gt;
&lt;p&gt;Many security vendors will look at using AI to help in future cases with
combating these loaders. The loaders of the future are already well equipped in
this fight. The loader’s layered obfuscation tactics pose a formidable
challenge for AI-based defenses. These techniques flood the AI with irrelevant
tokens and misleading patterns, making it difficult to distinguish meaningful
actions from noise. Each layer of complexity forces the AI to process massive
amounts of data, drastically increasing computational and financial costs. By
weaponizing this volume and variability, the loader effectively undermines AI’s
pattern recognition and analysis capabilities, pushing the limits of automated
detection systems.&lt;/p&gt;
&lt;p&gt;There is no signs of slowing down in the pace in the thriving loader market.&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;BabbleLoader&lt;span class="hx:absolute hx:-mt-20" id="babbleloader"&gt;&lt;/span&gt;
&lt;a href="#babbleloader" 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;052c776fdc9700dfb37f964a73d461a57efad30a01bcf54505d7abcd601e6ff3
0ad8513b62a778d7e426627be3ed2dbaf00d99b9802a1f566dc9203e3d311fc3
0f6847d33cb38b0ed6dc1d8cfe3dc5d2e293d91c4880e3b4f5ddb77fd9d4cd1f
114b868f319162c5d6ff92796e41910f54de0e89f895a066fd4980c6dba2e323
1367fb270f35512b17fe5e73cc0233ace272daafe15cf94e45f696431f52332f
1537965c7722a9886d542688fcbafecd1248b2fbd56e9a90a803a50e880e1bb8
16200bbe4646fe8cefeee5be20ce55c50300485f3356ab181fb930bd02536709
1da4de2b4b87bff7f9f1a3208c5c663a06f7f9b67f918e5a5e8e860e759b7075
200289d5a408a2e49a894228edb3324548ca5c5c0283d09486aa287df41f15bc
217d7501287ae894f47bd04253bd184d1901dd131b0cd15bcbbeba5158049d5d
22866e6ded40916de8002606f82e44ee141f27c3340fa2c4d16514624ee05a72
237812322bbbcf47feeb79b8e91b97d00453ffd5deb52c819c183b45d18b0b5a
25923b822e9a1374817caf79375170b944f2762b1e3f2add921008ffec702740
2a8a340fc9c395fe23211ac95d124b64452d49c67b069f53aaf3dbe16e95791d
2b6bff7b8c23f1fa526e116c7577c32845d5b969c68a66850c305a351adc9726
2d6b50003436ed489d1b46566eb879e317e1b9a5b6edb12f3cbb4c8a8d932a08
2eab850166944175e5fac4c89706328a58dcef55dbc22ff20342d1d246ba76b9
2ee32c46207119f6851f2869203124c104c72cfdf9622416252ae3405f485cd2
328d92b71034d74c016b1f8e70217be3f432a2ade8fe44522f84980fd0dbb1f9
33e42e7828cda7987d17342e0eb8134f590cd3d291dbc75f13334259a4908ba1
3bf5f07059a24fb803c6fefb874f000e9c300372b1b870e48b4935bd0219fe2b
401209ec9dda222984fd5cb775a6b6c2e651d88c04a506c9058cb1decdce869d
451e1bec8476a89c7d2b526071fa2918187f2f5b3ba9362e6999114993a74da5
455cd0db2de92ee348295780f8fc7a32a5406a5986a4d162761680f11b6346b1
466a8af8d0b51ed82aec35b17b845e6baf77ada259aa2fd5591024a01d8e31b5
46b355d25b95d7f9d7029f1ee1a346028e3c5bdec9e6c9245c12d1607cb1c686
46f0e190cd346d1eb6d0c27386bb3aceebf4ad44b25d253cac4063e2ccde9028
478eb22a1f1be2ef6e70625cf42ca61c716389135acbb705c0e21f0cf330bf46
47a71eb078b14a92eb5fb990f606aa48e535860af90ebc5e075c8b2e4d829633
4b7fa864007357e3e799eeb4a9630425652178551a9c37181fc6ea86660af814
4ba95478ea0ac78e038d30693fabf95244bd70e40b36b2a928f3854551d6fa78
4bed4960a896ebeafa9a9421d7ecf389205a2f0216ad911bdcd80f28237159e6
4e40aaddf718b70f397d449f8ca9a577ef0106f281ccb50f0b5cde531b758881
5305556bee271232973a9e09c4776a3b386964112785db638b225b2cc61d9af7
53e451750c099f33f80a3652d9f2a804390de0f867af13ae22ad0fbf4b15f8c3
5493fa6f2ab69da66352532b2c13e7e461bcde6cc2810a6f6af88e139dde1ae7
5665c96975c959b5e8057b7aed46f7c203335aefa35f5e290c538e9300e3e293
5b9481d9022b0efcaed04513d338048de4aa3e1328bacc0966486ef322c0d086
5eb3bb67656d990ceec07f55c78dcd8032a7cf00ac919a399e3642b177f68381
60ecef2d0a966db913bff15872c072175b895e16271351c43e5a0cf9e4018f22
643dde3f461907a94f145b3cd8fe37dbad63aec85a4e5ed759fe843b9214a8d2
69ad389722dd8b49590b2aa014f703b39737894073c7339ea44c94d296e00273
78f6c822cee2b0587df145d67478cce5bbeb76147a7846d08b7b6fd09aa36ce2
796c245c5bb1e7c1dcd52c4e8f83e1c707e391f6409ee9b5e1dd18658ff0e05f
7df313618a02e8e9961ddb1c3289956eb18361f1ca9fb639d64a00fae7568a4b
7e5ba9e3ccc1cb52d24c21c6d378a32bb540a8519789d8cf796e5dd351fc6958
8907a8454ef56d64bf788b9c8c64bbaaf187be7a9666d8d8331fd187c49c6031
8a28e457b19060678d5d007b291722e1dea92f69249e1588ca5b97eb1fe10807
8cc2e1104480875ee237bf4ca9f3d83e46ca213f5c88df95be0d78e05c7c2d71
8cf8bea6842219e565720919372e4aa530942b28d533231043ee57e7bb424cbe
8d8c3b6be212ce645566311ce95ad9ad3aad37795042882adefda9716deb2eab
8e63b1f7f8e29b9a714f796e2e8ca0cd1094086e2d0a5de21601e23e1792a906
9125c13250a14905a4fd97978a3a6dbba80df01e73d98f8d4fa2d19b49d9fda0
9314ea889f93da5cd39129840a42bd5f228538686a2345f56e757e5a5d956dee
9bf7a01254fed809e0f564f28a3cf54156ea98f85d3b633ae3a213a87f9db143
9dfb8ed499b667d782ae3a4ce40472893a789ed973f48884b47358536b6a76e8
9fa7574f35fae3d309c8cefe0e8a43d07afb6cefaee0caa3b2538263bd4a7ec5
a01ac4244102e3958296c70d71e3d951f11abcc355458d1918d081587b151d90
a08db4c7b7bacc2bacd1e9a0ac7fbb91306bf83c279582f5ac3570a90e8b0f87
a29e108e912c77ed565873bd205da01ed0e6001d18b442139c06827428d2eba1
a3b45619606d4c3c487047786e3d51a98fdcc1fdc43dc7b6f6e80974fd0a9c97
a695cb493631962a4c2fd61a094cb0b952ce708a99af714772cddd4991f32df0
ae6ee6bf2f9890ed83922e5c80770dd88faa9b32b2211462ea2eed29bf1bf6c5
b14af38c4230de20c7c4fefc1e3c5fffb1562bacedfebc56a508f55182a6fe88
b1ebe1794e091fd82a34d6806f18f64ebadb5d3b2343a661c481fb7c54cb872f
b2a91277e5fb40a0a38215142f683554b4e7c03ccd439e0d056c56b031a5bec5
b72d9ae8484b91ec9c6167e6707617f495622f3b684f6b3e30b29106891c778b
bb4f812f8bb4e7b33d7b583407370a5351d079f63b26956adc7ab317b3d90601
bdd6bd29937059dd944fb09163a24e4482c5ce420d3de749e5e46c6c25b2ea86
c2a95f22cfee1f4df67a424e30425b59c23db265bff611f2ee653d71b30a70d8
ca67f61b5f8d20ec3f45dbbfc355045a8ceee15396f1cad032850a3ee23a42b3
cd3f064d088a3a6a6ad03da148701fb6b660866b8aac2a808359505620166641
d7967661947ca835deddec30ae6e62d580718cbdeafb42cd6d0f038a407edcf0
d9cea34db0d1dc016dd4007d8cd11416f095c41b0639f13af1eb6ad675651df2
db282cae419ed5af3338f65f170ecd7b312cac2500b5cb2c8824721ba981c361
db41e032193becc097d0da85cac74cf1f519b85cf731f783ccea11c1e20ad23f
e09c36993e1c29b6ef0f1c73e02aee54686c0df49b6d87b577e70f261313acaf
e13f20752f6298728ac0463a3f4b0657d5657ca7710e63a27ac1179078ac71f6
e1448680114cb3dd06aa81a3b1037f77e6d5b3f6dce213aa38cffdec72d59e74
f2f23a963952c1a822484382bf4c68cd8b7278400ad2d8bacf3235ba2fc42a89
fa292bfcf81223bab0f79d4ce08187e37d68960005629df0241ea22f0b95d7a8
fc589aa3529a057fee52a1c9bd9bb19fa42bbfd291b7dbb3791e77eced376640
ffcae0093d509563b47b1d0cef3aa455a4358de3a1d2c2b84c298a927aa238e8&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;WhiteSnake Stealer&lt;span class="hx:absolute hx:-mt-20" id="whitesnake-stealer"&gt;&lt;/span&gt;
&lt;a href="#whitesnake-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;6dce9024ec032390ca4294f62cb282a09291cf141cb003f7e0ef23bb7a34bfae&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>Dissecting SSLoad Malware: A Comprehensive Technical Analysis</title><link>https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/</link><pubDate>Mon, 10 Jun 2024 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/</guid><description>
&lt;p&gt;SSLoad is a stealthy malware that is used to infiltrate systems through
phishing emails, gather reconnaissance and transmit it back to its operators
while delivering various payloads. Recently, Unit42 highlighted an active
campaign leveraging SSLoad in their attack arsenal.
&lt;a href="https://twitter.com/Unit42_Intel/status/1781326222019932535"target="_blank" rel="noopener"&gt;One attack vector&lt;/a&gt;
involves a decoy Word document that delivers an SSLoad DLL, which eventually
executes Cobalt Strike.
&lt;a href="https://twitter.com/Unit42_Intel/status/1780021135813337366"target="_blank" rel="noopener"&gt;The other attack&lt;/a&gt;
utilizes a phishing email that leads to a fake Azure page, downloading a
JavaScript script that ultimately downloads an MSI installer, which loads the
SSLoad payload.&lt;/p&gt;
&lt;p&gt;SSLoad is a new malware that has been targeting victims since April 2024. A
recent
&lt;a href="https://www.securonix.com/blog/securonix-threat-research-security-advisory-frozenshadow-attack-campaign/"target="_blank" rel="noopener"&gt;report&lt;/a&gt;
by Secournix highlighted the latest SSLoad activity, and we are already seeing
additional delivery variants. The diverse delivery methods uncovered by our
technical analysis suggest its use in &lt;strong&gt;Malware-as-a-Service (MaaS)&lt;/strong&gt;
operations, highlighting its versatile nature.&lt;/p&gt;
&lt;p&gt;This blog presents a detailed technical analysis of the loaders and payloads
used in these campaigns. We examined the payloads, techniques, and
functionality at each stage of the malware execution chain. Our analysis also
includes conclusions drawn from additional IOCs identified through
threat-hunting and pivoting efforts. We aim to shed more light on the technical
functionality of this rapidly evolving malware.&lt;/p&gt;
&lt;h2&gt;MSI Installer&lt;span class="hx:absolute hx:-mt-20" id="msi-installer"&gt;&lt;/span&gt;
&lt;a href="#msi-installer" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We began our analysis by dissecting the MSI file identified in one of the
campaigns. This installer initiates a delivery chain comprising several
loaders, ultimately deploying the final payload.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;SHA256:
&lt;a href="https://analyze.intezer.com/files/90f1511223698f33a086337a6875db3b5d6fbcce06f3195cdd6a8efa90091750?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;90f1511223698f33a086337a6875db3b5d6fbcce06f3195cdd6a8efa90091750&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using &lt;a href="https://github.com/GNOME/msitools"target="_blank" rel="noopener"&gt;msitools&lt;/a&gt;, we can determine what
actions the installer will execute:&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;❯ msiinfo export 90f1511223698f33a086337a6875db3b5d6fbcce06f3195cdd6a8efa90091750.sample CustomAction
[...]
SET_APPDIR 307 APPDIR [AppDataFolder][Manufacturer][ProductName]
LaunchFile 1026 viewer.exe C:\Windows\System32\regsvr32.exe /S [LocalAppDataFolder]sharepointMenuEx.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;The Loader: PhantomLoader&lt;span class="hx:absolute hx:-mt-20" id="the-loader-phantomloader"&gt;&lt;/span&gt;
&lt;a href="#the-loader-phantomloader" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The initial loader is a 32-bit DLL written in C/C++, serving as the first-stage
loader. We named it &amp;ldquo;PhantomLoader&amp;rdquo; to emphasize its elusive and stealthy
behavior. The loader is added to a legitimate DLL, usually EDR or AV products,
by binary patching the file and employing self-modifying techniques to evade
detection. This loader has not been reported or documented previously.&lt;/p&gt;
&lt;p&gt;Analysis of its metadata reveals that the PhantomLoader attempts to disguise
itself as a legitimate DLL named &lt;code&gt;MenuEx.dll&lt;/code&gt;, associated with 360 Total
Security, a Chinese antivirus program. Additionally, we discovered a PDB path
in the metadata: &lt;code&gt;C:\vmagent_new\bin\joblist\500965\out\Release\MenuEx.pdb&lt;/code&gt;. The
loader also shares code with the antivirus software and retains remnants of a
digital signature, as shown by Intezer&amp;rsquo;s analysis.&lt;/p&gt;
&lt;p&gt;SHA256:
&lt;a href="https://analyze.intezer.com/files/09ffc4188bf11bf059b616491fcb8a09a474901581f46ec7f2c350fbda4e1e1c?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;09ffc4188bf11bf059b616491fcb8a09a474901581f46ec7f2c350fbda4e1e1c&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig2.png" title="String and Code reuse between the loader and 360 Total Security." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;String and Code reuse between the loader and 360 Total Security.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig3.png" title="File metadata." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;File metadata.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The payload is stored encrypted in the resource section, which exhibits a high
entropy level, as shown in the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig4.png" title="The sections of the PhantomLoader." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;The sections of the PhantomLoader.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Phantom Loader is a self-modifying loader. It first decrypts the stub function,
which then extracts the payload from the resource section. The screenshot above
shows that the &lt;code&gt;.text&lt;/code&gt; section has RWX permissions, which is uncommon. However,
since the loader is self-modifying, this explains the unusual permissions.&lt;/p&gt;
&lt;p&gt;The decoding logic employs an XOR decryption method. Each byte of the encrypted
code at a specified address is XORed with a corresponding byte from a
predefined encryption key. The key repeats cyclically if the code&amp;rsquo;s length
exceeds the key&amp;rsquo;s length.&lt;/p&gt;
&lt;p&gt;The XOR key is a stack string with the following value:&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;71 21 2a 43 74 52 4f 42 65 6a 6c 64 57 46 37 45 33 40 31 4c 69 79 55 53 00&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;Below is an IDA Python script that modifies the code based on the logic
described above:&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-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;ida_bytes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;ida_auto&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;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decode_code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_addr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key_hex&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="c1"&gt;# Convert the hex key string into a byte array&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;key_bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;bytearray&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fromhex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key_hex&lt;/span&gt;&lt;span class="p"&gt;)&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;    &lt;span class="c1"&gt;# Read the current encrypted data from the IDB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;encrypted_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ida_bytes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_addr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&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;    &lt;span class="c1"&gt;# Create a bytearray for the encrypted data to perform mutable operations&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;encrypted_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;bytearray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;encrypted_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;key_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key_bytes&lt;/span&gt;&lt;span class="p"&gt;)&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;    &lt;span class="c1"&gt;# Perform the XOR decryption&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;        &lt;span class="n"&gt;encrypted_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;^=&lt;/span&gt; &lt;span class="n"&gt;key_bytes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;key_length&lt;/span&gt;&lt;span class="p"&gt;]&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;    &lt;span class="c1"&gt;# Write the decrypted data back to the IDB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="c1"&gt;# Convert bytearray back to bytes since patch_bytes expects a &amp;#39;bytes&amp;#39; type&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;ida_bytes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;patch_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_addr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;encrypted_data&lt;/span&gt;&lt;span class="p"&gt;))&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;    &lt;span class="c1"&gt;# Optionally, inform IDA to reanalyze modified areas to reflect changes in disassembly&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;ida_auto&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auto_make_code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_addr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;    &lt;span class="n"&gt;ida_auto&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auto_wait&lt;/span&gt;&lt;span class="p"&gt;()&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;&lt;span class="c1"&gt;# Constants&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;encryption_key_hex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;71212a4374524f42656a6c64574637453340314c6979555300&amp;#34;&lt;/span&gt;  &lt;span class="c1"&gt;# The decryption key in hex&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;code_region_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mh"&gt;0x76C&lt;/span&gt;  &lt;span class="c1"&gt;# Length of the code region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;start_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mh"&gt;0x1000AF77&lt;/span&gt;  &lt;span class="c1"&gt;# Starting address of the encrypted code&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;&lt;span class="c1"&gt;# Decode the encrypted code region&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;decode_code&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code_region_length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encryption_key_hex&lt;/span&gt;&lt;span class="p"&gt;)&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;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Decryption complete. The code region has been updated.&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;p&gt;Once the code is decrypted, the instruction pointer (EIP) will point to the
first instruction. The stub then implements the same XOR decryption using the
same key to extract the encoded payload from the resource section. After
decoding the payload, the stub loads and executes it. This payload is another
loader.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig5.png" title="Encoded resource." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Encoded resource.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another version of the loader, observed in the attack that uses the decoy
document, follows the same logic but employs a different XOR key:&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;25 5e 47 51 4d 4a 42 44 77 42 64 58 4c 41 46 57 75 28 21 46 61 67 32 24 34 46 47 00&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;SHA256:
&lt;a href="https://analyze.intezer.com/files/73774861d946d62c2105fef4718683796cb77de7ed42edaec7affcee5eb0a0ee?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;73774861d946d62c2105fef4718683796cb77de7ed42edaec7affcee5eb0a0ee&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Second Stage of The Phantom Loader&lt;span class="hx:absolute hx:-mt-20" id="second-stage-of-the-phantom-loader"&gt;&lt;/span&gt;
&lt;a href="#second-stage-of-the-phantom-loader" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The second stage of the Phantom Loader is a small, simple 32-bit DLL written in
C/C++. It loads the payload and sets the entry point to the
&lt;code&gt;DllRegisterServer&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;SHA256:
&lt;a href="https://analyze.intezer.com/files/09ffc4188bf11bf059b616491fcb8a09a474901581f46ec7f2c350fbda4e1e1c/sub/3bb8aaec-62fa-46f2-a616-0235bb406ec2?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;6aa3daefee979a0efbd30de15a1fc7c0d05a6e8e3f439d5af3982878c3901a1c&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;SSLoad: The Downloader&lt;span class="hx:absolute hx:-mt-20" id="ssload-the-downloader"&gt;&lt;/span&gt;
&lt;a href="#ssload-the-downloader" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The payload is a 32-bit DLL written in Rust, identified as SSLoad. This stage
has not been documented in previous blogs, indicating it might be an additional
step in the delivery chain. Key strings, such as the user agent and domains,
are encrypted using a unique algorithm.&lt;/p&gt;
&lt;p&gt;SHA256:
&lt;a href="https://analyze.intezer.com/files/265514c8b91b96062fd2960d52ee09d67ea081c56ebadd7a8661f479124133e9?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;265514c8b91b96062fd2960d52ee09d67ea081c56ebadd7a8661f479124133e9&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This SSLoad variant begins by decrypting a URL and a user agent. The URL
directs to a Telegram channel named SSLoad, which serves as a dead-drop site,
as shown in the screenshot below. This channel contains another encrypted
string that indicates the Command-and-Control (C2) server responsible for
delivering the final payload.&lt;/p&gt;
&lt;p&gt;The variant we have analyzed uses the following address with the corresponding
user agent.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;https://t[.]me/+st2YadnCIU1iNmQy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig7.png" title="SSLoad Telegram channel." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;SSLoad Telegram channel.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The Telegram channel is used as a dead drop host.&lt;/p&gt;
&lt;p&gt;Once the C2 address is decrypted, the malware decrypts another user agent
string, &lt;code&gt;SSLoad/1.1&lt;/code&gt;, and the string &lt;code&gt;/api/g&lt;/code&gt;. This string is appended to the
C2 address, forming the URL &lt;code&gt;http://85[.]239.53.219/api/g&lt;/code&gt;. The malware then
sends an HTTP GET request to this URL to retrieve the next payload from the C2
server.&lt;/p&gt;
&lt;h3&gt;String Decoding&lt;span class="hx:absolute hx:-mt-20" id="string-decoding"&gt;&lt;/span&gt;
&lt;a href="#string-decoding" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;This SSLoad variant employs a custom and unique method to decrypt strings,
utilizing the standard RC4 algorithm. Notably, each string is encrypted with
its own distinct key, which is stored alongside the encrypted string.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll use the first string as an example to explain the decryption logic. The
blob below contains both the encrypted string and the RC4 key.&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;uTjvTPJayj/5Af1pr&amp;#43;qBtvkwh9KKDV2mKF0C&amp;#43;7lBoOJHnmLwZJzKE&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;Converted to hexadecimal:&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;75 54 6A 76 54 50 4A 61 79 6A 2F 35 41 66 31 70 72 2B 71 42 74 76 6B 77 68 39 4B 4B 44 56 32 6D 4B 46 30 43 2B 37 6C 42 6F 4F 4A 48 6E 6D 4C 77 5A 4A 7A 4B 45&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 decryption key for each string is composed of the first 6 bytes of the
encoded string concatenated with the last 7 bytes. For the given example, the
key is:&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;75 54 6A 76 54 50 4C 77 5A 4A 7A 4B 45&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 remaining part of the blob (from the 7th byte up to the length of the blob
minus 7 bytes) is processed by a custom function that calculates the length of
the encrypted string using the following logic:&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-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;scaled_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;scaled_length&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;scaled_length&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;3&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;Essentially, the encrypted string starts at the 7th byte of the blob, and the
value of &lt;code&gt;scaled_length&lt;/code&gt; determines its length.&lt;/p&gt;
&lt;p&gt;The malware uses Base64 encoding. In this example, the &lt;code&gt;scaled_length&lt;/code&gt; is
calculated to be 30 (&lt;code&gt;0x1E&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig8.png" title="Base64 decryption." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Base64 decryption.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The Base64-decoded payload is then decrypted using the RC4 algorithm with the
key derived earlier. This process decrypts the URL of the Telegram channel.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;SSLoad: The Payload&lt;span class="hx:absolute hx:-mt-20" id="ssload-the-payload"&gt;&lt;/span&gt;
&lt;a href="#ssload-the-payload" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The extracted payload from this file is:
&lt;a href="https://analyze.intezer.com/files/6329244cfb3480eae11070f1aa880bff2fd52b374e12ac37f1eacb6379c72b80?utm_campaign=research-blog&amp;amp;utm_content=ssload-technical-malware-analysis&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;&lt;code&gt;6329244cfb3480eae11070f1aa880bff2fd52b374e12ac37f1eacb6379c72b80&lt;/code&gt;&lt;/a&gt;
which is another Rust file.&lt;/p&gt;
&lt;p&gt;The payload will first create a mutex, using a hardcoded string. This is a
check if the machine is already infected. If the mutex exists, it will cease
execution.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;SSLoad will check the Process-Environment-Block (PEB) to see if the
&lt;code&gt;BeingDebugged&lt;/code&gt; flag is set, as an anti-debugging technique.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Next the library &lt;code&gt;Advapi32.dll&lt;/code&gt; will be dynamically located in memory&lt;/p&gt;
&lt;p&gt;The DLL uses multiple arithmetic operations to derive a rolling XOR key. This
key is used to decode strings dynamically. Every single string that is
decrypted in this format has a unique stub of arithmetic operations and inputs,
therefore every string has a unique XOR key. This is used in order to hamper
static configuration extraction and differs from the method used by the
downloader.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The library &lt;code&gt;Advapi32.dll&lt;/code&gt; is dynamically loaded in order to get the function
&lt;code&gt;RtlGenRandom&lt;/code&gt; (&lt;code&gt;SystemFunction036&lt;/code&gt;). This randomly generated number is used to
help generate a unique name for a working folder. Located under
&lt;code&gt;AppDataRoamingMicrosoft&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Some library calls are dynamically located using a common malware technique.
SSLoad does this by locating the PEB, and finding the
&lt;a href="https://learn.microsoft.com/en-us/windows/win32/api/winternl/ns-winternl-peb_ldr_data"target="_blank" rel="noopener"&gt;&lt;code&gt;PEB_LDR_DATA&lt;/code&gt; structure&lt;/a&gt;.
This structure contains information about the currently loaded modules for the
executed process. In this structure it will jump forward to the
&lt;code&gt;InMemoryOrderModuleList&lt;/code&gt;. This is a list of
&lt;a href="https://learn.microsoft.com/en-us/windows/win32/api/winternl/ns-winternl-peb_ldr_data#remarks"target="_blank" rel="noopener"&gt;&lt;code&gt;LDR_DATA_TABLE_ENTRY&lt;/code&gt;&lt;/a&gt;
structures. It will loop through the names of these modules and perform a
simple hash routine comparing it to a hardcoded hash. If the hash matches,
&lt;a href="https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandlea"target="_blank" rel="noopener"&gt;the handle&lt;/a&gt;
(&lt;code&gt;HMODULE&lt;/code&gt;) of the module will be returned.&lt;/p&gt;
&lt;p&gt;Similarly, the malware resolves functions by hash, looping through the
functions of the matching module to locate the corresponding function address
based on the hash. It stores these pointers as local variables to be called at
the appropriate time. This technique is most commonly used for the
&lt;code&gt;winhttp.dll&lt;/code&gt; module to evade static analysis that detects network
capabilities.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig14.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Next the DLL will start the fingerprinting process, in preparation for sending
a registration beacon to the C2. The fingerprint results are built into a JSON
object. Below are the following fields:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left"&gt;Field&lt;/th&gt;
&lt;th style="text-align: left"&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;version&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;The version of the loader. Hardcoded into the binary.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;ip&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;The public IP address, obtained using &lt;code&gt;api.ipify[.]org&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;domain&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;The Windows network domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;hostname&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Computer host name taken from environment variable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;arch&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Architecture of the infected machine, taken from environment variable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;os_version&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;The version of the Windows operating system. Retrieved using &lt;a href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version"target="_blank" rel="noopener"&gt;GetVersionExW&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;cur_user&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;String indicating whether the current user is an administrator or not&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;owner&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Appears to indicate campaign name&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2024/06/ssload-technical-malware-analysis/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This JSON fingerprint is sent to the C2 over plaintext via a HTTP POST request.
If the registration is successful, the C2 will respond with a JSON object
containing a key and an ID. The &lt;code&gt;key&lt;/code&gt; field is a Base64 string that is used as
an RC4 key in later communications. The ID is a unique identifier for the
infected host that is primarily used to identify itself to the C2 during
further HTTP requests. When the registration is complete, SSLoad will begin its
task beaconing loop. The malware will send a HTTP POST request to the C2, using
the unique identifier as a URL path. No data is sent from the client in this
POST request.&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;POST /api/[unique_identifier]/tasks&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 C2 has a task for the infected host, it will send over a JSON structure
containing a &lt;code&gt;job&lt;/code&gt; and another unique identifier for this job. The job is an
RC4 encrypted struct that is encoded in a Base64 string. The job structure has
two fields, a &lt;code&gt;command&lt;/code&gt;, and an array of arguments. We have only observed the
command &lt;code&gt;exe&lt;/code&gt; in communications, with an argument that is a URL pointing to a
server to download an additional payload. The way that the job struct is formed
means that the malware is designed to be easily expanded to support more
commands in the future.&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 comprehensive SSLoad analysis reveals this malware&amp;rsquo;s intricate nature.
SSLoad demonstrates its capability to gather reconnaissance, attempt to evade
detection and deploy further payloads through various delivery methods and
techniques. Its use of a Rust-based downloader, a never-seen-before loader,
implements dynamic string decryption, and anti-debugging measures emphasize its
complexity and adaptability.&lt;/p&gt;
&lt;p&gt;As SSLoad continues to evolve, it highlights the necessity for ongoing
monitoring and advanced threat detection methods to combat malware campaigns
effectively. This analysis deepens our understanding of SSLoad and emphasizes
the importance of adaptive cybersecurity measures in the face of ever-evolving
threats.&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;&lt;strong&gt;Files&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: left"&gt;SHA256&lt;/th&gt;
&lt;th style="text-align: left"&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;90f1511223698f33a086337a6875db3b5d6fbcce06f3195cdd6a8efa90091750&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;MSI Installer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;09ffc4188bf11bf059b616491fcb8a09a474901581f46ec7f2c350fbda4e1e1c&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;PhantomLoader&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;73774861d946d62c2105fef4718683796cb77de7ed42edaec7affcee5eb0a0ee&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;PhantomLoader&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;6aa3daefee979a0efbd30de15a1fc7c0d05a6e8e3f439d5af3982878c3901a1c&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;Second stage of the PhantomLoader&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;265514c8b91b96062fd2960d52ee09d67ea081c56ebadd7a8661f479124133e9&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;SSLoad Downaloder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: left"&gt;&lt;code&gt;6329244cfb3480eae11070f1aa880bff2fd52b374e12ac37f1eacb6379c72b80&lt;/code&gt;&lt;/td&gt;
&lt;td style="text-align: left"&gt;SSLoad Payload&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Network&lt;/strong&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;https://t[.]me/&amp;#43;st2YadnCIU1iNmQy
85.239.53[.]219&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>Wrapping Up a Year of Infamous Bazar Campaigns</title><link>https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/</link><pubDate>Thu, 27 May 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/</guid><description>
&lt;h2&gt;Bazar is the latest tool developed by the TrickBot gang&lt;span class="hx:absolute hx:-mt-20" id="bazar-is-the-latest-tool-developed-by-the-trickbot-gang"&gt;&lt;/span&gt;
&lt;a href="#bazar-is-the-latest-tool-developed-by-the-trickbot-gang" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Common malware used for cybercrime such as Agent Tesla, Dridex and Formbook
have been around for at least five years and are still distributed and active.
About one year ago, a new malware named Bazar breathed some fresh air into this
landscape. Since its
&lt;a href="https://www.bleepingcomputer.com/news/security/bazarbackdoor-trickbot-gang-s-new-stealthy-network-hacking-malware/"target="_blank" rel="noopener"&gt;first campaign&lt;/a&gt;,
Bazar has been extremely active and has taken part in large-scale breaches
including the
&lt;a href="https://www.bleepingcomputer.com/news/security/uhs-hospitals-hit-by-reported-country-wide-ryuk-ransomware-attack/"target="_blank" rel="noopener"&gt;nationwide Ryuk ransomware attack on UHS hospitals&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The name &amp;lsquo;Bazar&amp;rsquo; was given to the malware because of its use of
&lt;a href="https://emercoin.com/en/emerdns"target="_blank" rel="noopener"&gt;EmerDNS&lt;/a&gt; (.bazar) domains for
command-and-control networking. On top of serving as a backdoor, Bazar is
designed to gain a foothold on the victim&amp;rsquo;s machine to deliver an additional
payload as a next phase of the attack. The time between Bazar installation and
payload delivery can vary between a
&lt;a href="https://thedfirreport.com/2020/11/05/ryuk-speed-run-2-hours-to-ransom/"target="_blank" rel="noopener"&gt;few hours&lt;/a&gt;
to &lt;a href="https://www.hhs.gov/sites/default/files/bazarloader.pdf"target="_blank" rel="noopener"&gt;days&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post we will profile Bazar and highlight four prominent campaigns
delivering this year-old malware.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Key Profiling&lt;span class="hx:absolute hx:-mt-20" id="key-profiling"&gt;&lt;/span&gt;
&lt;a href="#key-profiling" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Attribution&lt;span class="hx:absolute hx:-mt-20" id="attribution"&gt;&lt;/span&gt;
&lt;a href="#attribution" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Based on code similarities, delivery, infrastructure and operation methods,
researchers believe that Bazar was developed by the TrickBot gang (aka Team9).&lt;/p&gt;
&lt;h3&gt;Targets&lt;span class="hx:absolute hx:-mt-20" id="targets"&gt;&lt;/span&gt;
&lt;a href="#targets" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The operators behind the malware are mainly financially motivated, meaning they
target organizations with high capital.&lt;/p&gt;
&lt;h3&gt;Delivery Method&lt;span class="hx:absolute hx:-mt-20" id="delivery-method"&gt;&lt;/span&gt;
&lt;a href="#delivery-method" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The malware delivery method is purely based on social engineering initiated
with a phishing email. The email will usually contain a link to a website,
hosting a malicious Microsoft Office document, delivering Bazar upon running
the document on a victim&amp;rsquo;s machine, or it will host the malware itself
masqueraded as a document.&lt;/p&gt;
&lt;h3&gt;Stealth&lt;span class="hx:absolute hx:-mt-20" id="stealth"&gt;&lt;/span&gt;
&lt;a href="#stealth" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Bazar implements the following evasion techniques to bypass detection:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://attack.mitre.org/techniques/T1553/002/"target="_blank" rel="noopener"&gt;Signing malware with certificates&lt;/a&gt;:
Antiviruses tend to rely on code signing certificates to increase the
credibility of a file. Therefore, signed files are less likely to be detected
as malicious by Antivirus vendors.&lt;/p&gt;
&lt;p&gt;Fileless payload: Bazar uses a lightweight loader to inject its fileless
payload into memory. Fileless malware challenges traditional Antivirus
solutions as it resides only in memory and leaves no footprint on disk. The
following is the genetic analysis of a Bazar sample
(&lt;code&gt;3578e96b72cba790179d546f11e045ca&lt;/code&gt;) injecting fileless code into memory.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig2.png" title="Bazar sample (3578e96b72cba790179d546f11e045ca) injects fileless code" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Bazar sample (3578e96b72cba790179d546f11e045ca) injects fileless code&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Use of decentralized C2C: For its C2C communication, Bazar uses
&lt;a href="https://emercoin.com/en/emerdns"target="_blank" rel="noopener"&gt;EmerDNS&lt;/a&gt; which is a decentralized domain name
system based on Emercoin blockchain technology. EmerDNS domains cannot be
altered, revoked, or suspended, which allows Bazar&amp;rsquo;s operations to be nearly
immune from a take down attempt by law enforcement.&lt;/p&gt;
&lt;h2&gt;Timeline and Milestone Campaigns&lt;span class="hx:absolute hx:-mt-20" id="timeline-and-milestone-campaigns"&gt;&lt;/span&gt;
&lt;a href="#timeline-and-milestone-campaigns" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As Bazar evolves and takes part in different phishing campaigns, we are
highlighting the top four milestones of this threat so far.&lt;/p&gt;
&lt;h3&gt;Apr 2020 – Bazar Exposed to the Masses&lt;span class="hx:absolute hx:-mt-20" id="apr-2020--bazar-exposed-to-the-masses"&gt;&lt;/span&gt;
&lt;a href="#apr-2020--bazar-exposed-to-the-masses" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;With the outburst of COVID-19, many threat actors leveraged the pandemic for
phishing campaigns. This theme was used as part of the
&lt;a href="https://www.bleepingcomputer.com/news/security/bazarbackdoor-trickbot-gang-s-new-stealthy-network-hacking-malware/"target="_blank" rel="noopener"&gt;first documented campaign&lt;/a&gt;
delivering Bazar.&lt;/p&gt;
&lt;p&gt;Similar to other campaigns using Bazar, this one began with a phishing email
containing a link to a page hosted on Google Docs. On this page, the victim was
lured to click on a link preview to a doc report. By clicking on the link, the
victim would download the Bazar malware executable masqueraded as a document.
Because
&lt;a href="https://www.bleepingcomputer.com/news/microsoft/hiding-windows-file-extensions-is-a-security-risk-enable-now/"target="_blank" rel="noopener"&gt;Windows does not present&lt;/a&gt;
a file&amp;rsquo;s extension by default, threat actors are able to trick victims by
masquerading a non-executable file type, so that the file has a word document
icon but it is in fact an executable.&lt;/p&gt;
&lt;p&gt;The next image shows a Google Docs page hosting the malware executable.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig3.png" title="COVID-19 themed phishing campaign (source: BleepingComputer)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;COVID-19 themed phishing campaign (source: BleepingComputer)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Interestingly, one of these phishing emails was sent to a BleepingComputer
domain.&lt;/p&gt;
&lt;h3&gt;Sep 2020 – Healthcare, Ransomware and Bazar in Between&lt;span class="hx:absolute hx:-mt-20" id="sep-2020--healthcare-ransomware-and-bazar-in-between"&gt;&lt;/span&gt;
&lt;a href="#sep-2020--healthcare-ransomware-and-bazar-in-between" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;a href="https://www.bleepingcomputer.com/news/security/uhs-hospitals-hit-by-reported-country-wide-ryuk-ransomware-attack/"target="_blank" rel="noopener"&gt;UHS hospitals&lt;/a&gt;
were hit by a Ryuk ransomware attack in September 2020. This attack was part of
a greater trend targeting hospitals and other healthcare-related organizations
in the United States.&lt;/p&gt;
&lt;p&gt;These ransomware attacks were initiated with phishing emails sent to employees
delivering Bazar but also BuerLoader or TrickBot. After an employee was lured
to install Bazar, a Cobalt Strike Beacon was delivered to the victim&amp;rsquo;s machine
for lateral movement and persistence. Together with Cobalt Strike, other
penetration testing tools were installed and ran on the victim&amp;rsquo;s machine for
reconnaissance and privilege escalation purposes. Ryuk ransomware was delivered
as the final step of the attack to run widely on the organization&amp;rsquo;s assets.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig4.png" title="CISA alert on the ransomware campaign" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;CISA alert on the ransomware campaign&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This attack chain not only targeted the healthcare sector but also went after
different organizations inside France after it became public that
&lt;a href="https://www.lemagit.fr/actualites/252491402/Cyberattaque-Ryuk-chez-Sopra-Steria-ce-que-nous-apprennent-les-echantillons"target="_blank" rel="noopener"&gt;Sopra Steria&lt;/a&gt;,
a French consulting organization, was hit by Ryuk.&lt;/p&gt;
&lt;h3&gt;Jan 2021 – Hello, Who is This?&lt;span class="hx:absolute hx:-mt-20" id="jan-2021--hello-who-is-this"&gt;&lt;/span&gt;
&lt;a href="#jan-2021--hello-who-is-this" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The BazarCall campaign may be the most interesting social engineering method
used for delivering Bazar thus far.&lt;/p&gt;
&lt;p&gt;As the first step, a personalized phishing email is sent claiming that a free
trial for a [fake] product is about to expire, and the addressee will be
charged via a &amp;ldquo;pre provided payment method.&amp;rdquo; The email also states that if the
addressee wishes to drop the subscription, they can make a call to the
&amp;ldquo;customer service center.&amp;rdquo; Once a victim calls the customer service center
number, the &amp;ldquo;service provider&amp;rdquo; lures the user to browse a phishing website,
insert a code, and click on &amp;ldquo;unsubscribe.&amp;rdquo; By clicking unsubscribe a malicious
Microsoft Office document is downloaded delivering Bazar.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig5.png" title="Example of a BazarCall phishing email (source: Sophos)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Example of a BazarCall phishing email (source: Sophos)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The email has no indication of maliciousness as it does not contain any links
or attachments but it is purely an attempt to exploit the innocence of the
victims who are lured to make the phone call.&lt;/p&gt;
&lt;p&gt;This &lt;a href="https://www.youtube.com/watch?v=uAkeXCYcl4Y"target="_blank" rel="noopener"&gt;YouTube video&lt;/a&gt; documents a
phone call between a researcher posing as a victim and the &amp;ldquo;service provider.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The campaign, which started by delivering BazarLoader, continues to deliver
other loaders such as IceID.&lt;/p&gt;
&lt;h3&gt;Feb 2021 – Nim What?&lt;span class="hx:absolute hx:-mt-20" id="feb-2021--nim-what"&gt;&lt;/span&gt;
&lt;a href="#feb-2021--nim-what" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In the beginning of February, a new and unusual
&lt;a href="https://www.bleepingcomputer.com/news/security/trickbots-bazarbackdoor-malware-is-now-coded-in-nim-to-evade-antivirus/"target="_blank" rel="noopener"&gt;version of Bazar&lt;/a&gt;
was detected—an implementation of the backdoor written in
&lt;a href="https://nim-lang.org/"target="_blank" rel="noopener"&gt;Nim&lt;/a&gt;, which is a statically-typed self-contained
programming language.&lt;/p&gt;
&lt;p&gt;Because Nim is not a common choice for malware development, it is believed that
the use of this programming language is an attempt to bypass detection. This
attempt can be considered successful as this version, also known as
&amp;lsquo;&lt;a href="https://twitter.com/GossiTheDog/status/1357396209372168199"target="_blank" rel="noopener"&gt;BazarNimrod&lt;/a&gt;&amp;rsquo; and
&amp;lsquo;&lt;a href="https://www.proofpoint.com/us/blog/threat-insight/nimzaloader-ta800s-new-initial-access-malware"target="_blank" rel="noopener"&gt;NimzaLoader&lt;/a&gt;,&amp;rsquo;
had low detection rates in VirusTotal.&lt;/p&gt;
&lt;p&gt;Bazar is not the first malware written in Nim. Sofacy (Russian APT) developed a
&lt;a href="https://www.welivesecurity.com/2019/09/24/no-summer-vacations-zebrocy/"target="_blank" rel="noopener"&gt;downloader in Nim&lt;/a&gt;
for their Zebrocy tool.&lt;/p&gt;
&lt;h2&gt;Final Words&lt;span class="hx:absolute hx:-mt-20" id="final-words"&gt;&lt;/span&gt;
&lt;a href="#final-words" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Threat actors are highly motivated and must keep reinventing themselves to stay
effective. They put in the time and money to bypass Antivirus detection on the
way to successful compromises. We assess that cybercriminals will continue to
step up their game with social engineering creativity and different malware
implementation.&lt;/p&gt;
&lt;h2&gt;How to Protect Your Organization&lt;span class="hx:absolute hx:-mt-20" id="how-to-protect-your-organization"&gt;&lt;/span&gt;
&lt;a href="#how-to-protect-your-organization" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Bazar and similar threats use social engineering as an entry point and keep a
low profile once inside. Keep in mind that it takes only one employee to take
down an entire organization.&lt;/p&gt;
&lt;p&gt;Take the following steps to keep your organization clean from these type of
attacks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enhance social engineering awareness inside your organization.&lt;/li&gt;
&lt;li&gt;Perform proactive hunting on all endpoints inside your organization to make
sure that no traces of malicious code or malware exist. Intezer&amp;rsquo;s live
Endpoint Scanner collects all binaries running in memory, including fileless,
and classifies them using genetic code analysis technology.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/05/wrapping-up-a-year-of-infamous-bazar-campaigns/images/fig6.png" title="Endpoint scan on an infected machine" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Endpoint scan on an infected machine&lt;/figcaption&gt;
&lt;/figure&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;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;3d483689f373a12f6f9607079b9cebb9 signed BazarBackdoor
bcda9eed7688400b654b88e4f0bdb3f0 signed BazarBackdoor
52a8527e0d7cd86b1d04ccc80eb6595e signed BazarBackdoor
06118d290e54e106d0571234946c2e0d signed BazarBackdoor
3578e96b72cba790179d546f11e045ca Bazar loader injecting a fileless payload
1d528a2e1d0a097421e57f86ba04e79f BazarLoader written in Nim&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;ds45x1[.]com
x57gc[.]com
x55gc[.]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;References&lt;span class="hx:absolute hx:-mt-20" id="references"&gt;&lt;/span&gt;
&lt;a href="#references" 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.bleepingcomputer.com/news/security/bazarbackdoor-trickbot-gang-s-new-stealthy-network-hacking-malware/"target="_blank" rel="noopener"&gt;https://www.bleepingcomputer.com/news/security/bazarbackdoor-trickbot-gang-s-new-stealthy-network-hacking-malware/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.bleepingcomputer.com/news/security/bazarcall-malware-uses-malicious-call-centers-to-infect-victims/"target="_blank" rel="noopener"&gt;https://www.bleepingcomputer.com/news/security/bazarcall-malware-uses-malicious-call-centers-to-infect-victims/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.advanced-intel.com/post/front-door-into-bazarbackdoor-stealthy-cybercrime-weapon"target="_blank" rel="noopener"&gt;https://www.advanced-intel.com/post/front-door-into-bazarbackdoor-stealthy-cybercrime-weapon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://threatpost.com/bazarloader-malware-slack-basecamp/165455/"target="_blank" rel="noopener"&gt;https://threatpost.com/bazarloader-malware-slack-basecamp/165455/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://news.sophos.com/en-us/2021/04/15/bazarloader/"target="_blank" rel="noopener"&gt;https://news.sophos.com/en-us/2021/04/15/bazarloader/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cybereason.com/blog/a-bazar-of-tricks-following-team9s-development-cycles#trickbot-connection"target="_blank" rel="noopener"&gt;https://www.cybereason.com/blog/a-bazar-of-tricks-following-team9s-development-cycles#trickbot-connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.advanced-intel.com/post/front-door-into-bazarbackdoor-stealthy-cybercrime-weapon"target="_blank" rel="noopener"&gt;https://www.advanced-intel.com/post/front-door-into-bazarbackdoor-stealthy-cybercrime-weapon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Prince of Persia: The Sands of Foudre</title><link>https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/</link><pubDate>Fri, 17 Aug 2018 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/</guid><description>
&lt;h2&gt;Introduction&lt;span class="hx:absolute hx:-mt-20" id="introduction"&gt;&lt;/span&gt;
&lt;a href="#introduction" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In the past couple years, Palo Alto Networks reported on the &amp;ldquo;Prince of Persia&amp;rdquo;
malware campaign which is believed to be of Iranian origin and ongoing for more
than 10 years. The original research, published in 2016, called the malware
&lt;a href="https://researchcenter.paloaltonetworks.com/2016/05/prince-of-persia-infy-malware-active-in-decade-of-targeted-attacks/"target="_blank" rel="noopener"&gt;Infy&lt;/a&gt;
and their second report, published in 2017, named the upgraded malware Foudre.
The name
&amp;ldquo;&lt;a href="https://researchcenter.paloaltonetworks.com/2017/08/unit42-prince-persia-ride-lightning-infy-returns-foudre/"target="_blank" rel="noopener"&gt;Foudre&lt;/a&gt;&amp;rdquo;
comes from a string in the binary used to check if the computer is already
infected. At the time of their blog post, Palo Alto Networks stated the version
of Foudre they observed were versions 1 and 2. We have found new evidence of
the Prince of Persia campaign active by finding a new version of the Foudre
malware, version 8.&lt;/p&gt;
&lt;p&gt;In this blog post, we are only going to focus on the new, unique, interesting
features of the new version of Foudre, and its related campaign&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig1.png" title="Internal version name of Foudre v8" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Internal version name of Foudre v8&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;No to The Forced Hijab&lt;span class="hx:absolute hx:-mt-20" id="no-to-the-forced-hijab"&gt;&lt;/span&gt;
&lt;a href="#no-to-the-forced-hijab" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Similarly to the samples noted in previous reports, this new malware also comes
packaged in a WinRAR SFX archive including multiple malicious binaries and a
media file. The media file in this case is a video in the MP4 format showing a
woman in Iran walking around and at the end pulling off her hijab. In the
video, there is text written in Farsi with a hashtag, بنه به حجاب اجباری#,
literally translating to &amp;ldquo;no to the forced hijab.&amp;rdquo; This hashtag is in reference
to protesters in Iran who are protesting the mandatory use of the hijab for
women and the video is meant to distract the victim while the Foudre malware
gets installed in the background.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig2.png" title="Screenshot from the video bundled in the malware" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Screenshot from the video bundled in the malware&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Foudre is a remote access tool and has the ability to remotely execute
commands, steal information about the infected target (such as keystrokes,
process information, etc), and auto-update itself. Most of the code and
functionality from the previous versions of Foudre and Infy was reused and can
be read about in the reports linked above, so we are only going to focus on the
new, unique, interesting features and the linkage of code reuse from previous
versions.&lt;/p&gt;
&lt;h2&gt;Code Reuse&lt;span class="hx:absolute hx:-mt-20" id="code-reuse"&gt;&lt;/span&gt;
&lt;a href="#code-reuse" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After uploading the WinRAR SFX to Intezer Analyze™, the files inside were
statically extracted which reveals 3 binaries, a lockbox3 signature, and the
video mentioned above.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Using our new Show Code feature, we can see code overlapping with Foudre and
Infy.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig4.png" title="Code overlap with Foudre" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Code overlap with Foudre&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig5.png" title="Code overlap with Infy" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Code overlap with Infy&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;New Features/Changes&lt;span class="hx:absolute hx:-mt-20" id="new-featureschanges"&gt;&lt;/span&gt;
&lt;a href="#new-featureschanges" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;First of all, the main binary of the upgraded Foudre malware is mostly
undetected on
&lt;a href="https://www.virustotal.com/#/file/c7279a32329ebb1ab5c1cdbfbddb5a167e1505340c3ca72e837a222ff92665a6/detection"target="_blank" rel="noopener"&gt;VirusTotal&lt;/a&gt;
with only 3/67 detections.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In the latest version of Foudre, there are 2 modules. One of the modules
(i7234.dll) has the export &amp;ldquo;D1&amp;rdquo; and the other module (d388) exports &amp;ldquo;D2&amp;rdquo; as a
function. We are going to refer to the different binaries based on their
exports, D1 and D2. The third binary never gets launched and is still under
investigation. We will release more details about it on a further date. The
WinRAR SFX and D1 module only get executed once. The following features/changes
are spread across the WinRAR SFX, D1, and D2:&lt;/p&gt;
&lt;p&gt;WinRAR SFX Dropper:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;WinRAR SFX has icon of girl with hijab from video&lt;/li&gt;
&lt;li&gt;Extracts files&lt;/li&gt;
&lt;li&gt;Launches D1 (&lt;code&gt;i7234.dll&lt;/code&gt;) with rundll32 and executes export D1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;D1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;D1 executes the mp4 file&lt;/li&gt;
&lt;li&gt;Checks if finds a window &amp;ldquo;TNRRDPKE2&amp;rdquo; means it’s already running&lt;/li&gt;
&lt;li&gt;Copies D2 and key to &lt;code&gt;%APPDATA%&lt;/code&gt; with filenames a.n and p.k and creates a
shortcut in the folder named &amp;ldquo;an.lnk&amp;rdquo;
&lt;code&gt;C:\WINDOWS\system32\rundll32.exe a.n D2 838238125&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Deletes these files from TEMP folder&lt;/li&gt;
&lt;li&gt;Stores name of D2 (a.n) in &lt;code&gt;HKEY_CURRENT_USER\Software\temp&lt;/code&gt; in key called
&amp;ldquo;ran2&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Checks &lt;code&gt;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run&lt;/code&gt; for
SnailDriver&lt;/li&gt;
&lt;li&gt;Creates autorun for an.lnk&lt;/li&gt;
&lt;li&gt;Checks for &lt;code&gt;%PROGRAMFILES%\Kaspersky Lab&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Launches D2 with rundll32 &lt;code&gt;C:\WINDOWS\system32\rundll32.exe a.n D2 838238125&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;D2 has mostly the same features as reported in the older versions of Foudre but
this table shows the main changes:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Foudre&lt;/th&gt;
&lt;th&gt;Version 2&lt;/th&gt;
&lt;th&gt;Version 8&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Browser Stealer Support&lt;/td&gt;
&lt;td&gt;Microsoft Edge, Internet Explorer, Mozilla Firefox and, Google Chrome&lt;/td&gt;
&lt;td&gt;Opera, Microsoft Edge, Internet Explorer, Mozilla Firefox and, Google Chrome&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Domain Generation Algorithm&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, different (see below)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VirusTotal Detections&lt;/td&gt;
&lt;td&gt;41/66&lt;/td&gt;
&lt;td&gt;3/67&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String Encryption&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Already Running Detection String&lt;/td&gt;
&lt;td&gt;TNRRDPKE&lt;/td&gt;
&lt;td&gt;TNRRDPKE2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Domain Generation Algorithm (DGA)&lt;span class="hx:absolute hx:-mt-20" id="domain-generation-algorithm-dga"&gt;&lt;/span&gt;
&lt;a href="#domain-generation-algorithm-dga" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The DGA used by version 8 of Foudre has only changed slightly from the previous
versions.&lt;/p&gt;
&lt;p&gt;In the previous versions, the DGA algorithm was calculated by the following
algorithm (credit to &lt;a href="https://twitter.com/xedi25"target="_blank" rel="noopener"&gt;Esmid Idrizovic&lt;/a&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;ToHex(CRC32(&amp;#34;NRV1&amp;#34; &amp;#43; year &amp;#43; month &amp;#43; week_number)) &amp;#43; (&amp;#34;.space&amp;#34;|&amp;#34;.net&amp;#34;|&amp;#34;.top&amp;#34;)&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;There are two minor differences now when calculating the C2. NRV1 was replaced
with NRTV1 and .dynu.net was added as suffix to the domain making the algorithm
now:&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;ToHex(CRC32(&amp;#34;NRTV1&amp;#34; &amp;#43; year &amp;#43; month &amp;#43; week_number)) &amp;#43; (&amp;#34;.space&amp;#34;|&amp;#34;.net&amp;#34;|&amp;#34;.top&amp;#34;|&amp;#34;.dynu.net&amp;#34;)&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;A few of the calculated domains were added to the bottom of the report in the
IoCs section. The domains up to week of September 9, 2018 (week 35) have been
registered in Panama and resolve to the same IP address &lt;code&gt;185[.]61[.]154[.]26&lt;/code&gt;.
The oldest domain using this algorithm we could find that was registered was
registered for the week of November 5, 2017.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/08/prince-of-persia-the-sands-of-foudre/images/fig7.png" alt="" loading="lazy" /&gt;&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;Due to the content of the video and the information from the reports on
previous versions of Foudre, we believe the targets are mostly Iranian
citizens. We have registered some of the future generated domains to prevent
the attack, and will update the post with information in regards to the
infected victims.&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;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;WinRAR SFX c38533b85e4750e6f649cc407a50031de0984a8f3d5b90600824915433a5e218
D1 DLL a02ce6768662ef250d248c158f26129dd4dfab30845d07962fbfe7aa19b16db9
D2 DLL c7279a32329ebb1ab5c1cdbfbddb5a167e1505340c3ca72e837a222ff92665a6
Unknown Binary cef161a220e019acc9ae79924a477c64aac2d6cc04126bb3f4a9f8452515f40f
MP4 dbed2ca2e9c53dd72c3ed3ce60e603c6c91c80152f924d97d8514781e6d9e26f
lockbox3 signature d2645d16e869addd099727c3c58438c2f6935d92c00f9e4b237ef498de1dad87&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;185[.]61[.]154.26
ns1[.]cf75d89b[.]space
ns2[.]cf75d89b[.]space
Week 32 (Aug 5) - fe19f97f[.]space
Week 33 (Aug 12) - 891ec9e9[.]space
Week 34 (Sept 2) - 177a5c4a[.]space
Week 35 (Sept 9) - 607d6cdc[.]space
Week 36 (Sept 16) - f8b65751[.]space
Week 37 (Sept 23) - 8fb167c7[.]space
Week 38 (Sept 30) - 1f0e7a56[.]space
Week 39 (Oct 7) - 68094ac0[.]space
Week 40 (Oct 14) - 1d8bfc20[.]space&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></channel></rss>