<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Threat_actor</title><link>https://research.intezer.com/tags/threat_actor/</link><description>Recent content in Threat_actor on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 27 May 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/threat_actor/index.xml" rel="self" type="application/rss+xml"/><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>Stantinko's Proxy After Your Apache Server</title><link>https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/</link><pubDate>Tue, 24 Nov 2020 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/</guid><description>
&lt;h2&gt;Intro&lt;span class="hx:absolute hx:-mt-20" id="intro"&gt;&lt;/span&gt;
&lt;a href="#intro" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;It is common for threat actors to evolve their Linux malware. BlackTech with
their new &lt;a href="https://blogs.jpcert.or.jp/en/2020/11/elf-plead.html"target="_blank" rel="noopener"&gt;ELF_PLEAD&lt;/a&gt;
malware and Winnti&amp;rsquo;s
&lt;a href="https://twitter.com/IntezerLabs/status/1308740144120213506"target="_blank" rel="noopener"&gt;PWNLNX&lt;/a&gt; tool are
recent examples. On par with this trend, we have discovered a new version of a
Linux proxy trojan related to Stantinko group. The malware has just one
detection in VirusTotal at the time of this publication.&lt;/p&gt;
&lt;p&gt;Stantinko group is known for targeting Windows operating systems with ongoing
campaigns dating back to 2012. The group&amp;rsquo;s malware mainly consists of
coin-miners and adware botnets.&lt;/p&gt;
&lt;p&gt;In a 2017
&lt;a href="https://www.welivesecurity.com/wp-content/uploads/2017/07/eset_stantinko_whitepaper_final.pdf"target="_blank" rel="noopener"&gt;white paper&lt;/a&gt;
summarizing Stantinko&amp;rsquo;s operations, researchers at ESET analyzed a Linux trojan
proxy. Up until now, this was the only known Linux malware belonging to
Stantinko.&lt;/p&gt;
&lt;p&gt;We have identified a new version of this Linux trojan masqueraded as &lt;code&gt;httpd&lt;/code&gt;.
httpd is Apache Hypertext Transfer Protocol Server, a commonly used program on
Linux servers. The sample&amp;rsquo;s version is 2.17, and the older version is 1.2*.&lt;/p&gt;
&lt;p&gt;We believe this malware is part of a broader campaign that takes advantage of
compromised Linux servers. Below we provide a technical analysis of the malware
and compare it to its previous version.&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 new proxy version file name is &lt;code&gt;httpd&lt;/code&gt; and it has only one detection in
VirusTotal at the time of this writing. Figure 1 below depicts the result from
VirusTotal. The sample was uploaded on November 7, 2020 from Russia, one of
Stantinko&amp;rsquo;s main target countries. The sample is an unstripped 64-bit ELF
binary.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig1.png" title="Figure 1: The sample&amp;#39;s detection report in VirusTotal (7d2a840048f32e487f8a61d7fc1a0c39)." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: The sample&amp;#39;s detection report in VirusTotal (7d2a840048f32e487f8a61d7fc1a0c39).&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Malware Flow&lt;span class="hx:absolute hx:-mt-20" id="malware-flow"&gt;&lt;/span&gt;
&lt;a href="#malware-flow" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Upon execution, the malware will validate a configuration file which is
delivered together with the malware on the infected machine. The malware
expects the configuration file to be located at &lt;code&gt;/etc/pd.d/proxy.conf&lt;/code&gt;. If the
configuration file does not exist, or if it lacks the required structure, the
malware exits without conducting any additional malicious activity. Figure 2
below is a snippet from the configuration parsing logic. The configurations are
stored as key/value pairs.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig2.png" title="Figure 2: ParseConfigElement function is used to parse the configuration file." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: ParseConfigElement function is used to parse the configuration file.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The configuration file is expected to have the following keys: &lt;code&gt;proxy_ip&lt;/code&gt;,
&lt;code&gt;port&lt;/code&gt;, &lt;code&gt;redirect_url&lt;/code&gt;, &lt;code&gt;localhost&lt;/code&gt;, &lt;code&gt;ip_header&lt;/code&gt; and
&lt;code&gt;request_header_log_files&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After validating and parsing the configuration file structure, the
&lt;code&gt;start_demon&lt;/code&gt; function is called and the proxy daemonizes itself. Then, it
creates a socket and a listener to accept connections from a client. We believe
the clients who interact with this Trojan are other infected machines that are
part of the campaign. Figure 3 is a snippet taken from the main function,
showing the general code flow described above.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig3.png" title="Figure 3: Main function flow snippet" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 3: Main function flow snippet&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Once a client connects to the listener, the program calls the
&lt;code&gt;on_client_connect&lt;/code&gt; function. First, it checks if the request method is &lt;code&gt;GET&lt;/code&gt;,
&lt;code&gt;POST&lt;/code&gt; or &lt;code&gt;NOTIFY&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the request method is GET, the program will reply with a 301 redirect HTTP
response containing the &lt;code&gt;redirect_url&lt;/code&gt; parameter from the configuration file.
This means that if the C&amp;amp;C IP is simply searched, using a browser for instance,
the response could be misleading by redirecting to a benign website, leaving no
trace of an extra payload that is used in the attack. If the request method is
POST or NOTIFY, the malware will build a POST request to send to the C&amp;amp;C server
based on the client&amp;rsquo;s HTTP request headers and content, using the
&lt;code&gt;create_post_data&lt;/code&gt; function. The program will then call the
&lt;code&gt;mysql_server_do_request&lt;/code&gt; function which is in charge of sending the POST
request to the C&amp;amp;C. Figure 4 shows a snippet from the &lt;code&gt;on_client_connect&lt;/code&gt;
function.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig4.png" title="Figure 4: Snippet from on_client_connect function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 4: Snippet from on_client_connect function&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The POST request is sent to one of the following paths on the C&amp;amp;C server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/kbdmai/index.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/kbdmai/dht/index.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/kbdmai/DRTIPROV/index.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/kbdmai/winsvc/index.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/kbdmai/anti_rstrui/index.php&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The path is selected in the detect_proxy_script function based on the data sent
from the client. We believe that each path delivers a different payload as part
of the campaign&amp;rsquo;s attack chain. The C&amp;amp;C IP address is stored as the proxy_ip
parameter in the config file. Finally, the proxy forwards the C&amp;amp;C response back
to the client. Figure 5 emphasizes the attack flow at a high level.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig5.png" title="Figure 5: Attack Flow" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 5: Attack Flow&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An infected client sends a POST or NOTIFY HTTP request to the proxy&lt;/li&gt;
&lt;li&gt;The proxy parses the request and passes on a POST request to the attacker&amp;rsquo;s
server&lt;/li&gt;
&lt;li&gt;The attacker&amp;rsquo;s server replies to the proxy and the proxy passes on the
response to the client&lt;/li&gt;
&lt;li&gt;A non-infected machine sends a GET request to the proxy&lt;/li&gt;
&lt;li&gt;The proxy replies with a 301 Redirect to a preconfigured URL&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Versions Comparison&lt;span class="hx:absolute hx:-mt-20" id="versions-comparison"&gt;&lt;/span&gt;
&lt;a href="#versions-comparison" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;With a nearly three year difference between the two versions, the trojan
proxies have similar purpose but they are not identical. In this section we
will compare version 1.2* and 2.17 based on three criteria: Parameters,
functionality, and ELF structure.&lt;/p&gt;
&lt;h3&gt;Parameters&lt;span class="hx:absolute hx:-mt-20" id="parameters"&gt;&lt;/span&gt;
&lt;a href="#parameters" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The new version (2.17) uses a configuration file that is dropped on the
victim&amp;rsquo;s machine together with the malware. The configuration file contains the
C&amp;amp;C IP address together with other parameters. In the old version (1.2*) the
C&amp;amp;C is hardcoded in the binary, making it easier to block the campaign&amp;rsquo;s
traffic once the binary is detected.&lt;/p&gt;
&lt;h3&gt;Functionality&lt;span class="hx:absolute hx:-mt-20" id="functionality"&gt;&lt;/span&gt;
&lt;a href="#functionality" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In addition to the proxy functionality, the old version receives files and self
update commands from the C&amp;amp;C. The new version is more simple in that it only
functions as a proxy.&lt;/p&gt;
&lt;h3&gt;ELF Structure&lt;span class="hx:absolute hx:-mt-20" id="elf-structure"&gt;&lt;/span&gt;
&lt;a href="#elf-structure" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both versions 1.2* and 2.17 are unstripped and include debug symbols. The old
version is statically linked, whereas the new version is dynamically linked.&lt;/p&gt;
&lt;h2&gt;The Stantinko Connection&lt;span class="hx:absolute hx:-mt-20" id="the-stantinko-connection"&gt;&lt;/span&gt;
&lt;a href="#the-stantinko-connection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After uploading the file to Intezer Analyze we noticed that the new variant
shares several function names with the old one. These functions, such as
&lt;code&gt;get_binary_full_path&lt;/code&gt; and &lt;code&gt;read_variable_string&lt;/code&gt;, are not called statically in
the new version. We are almost certain these functions are leftover from the
previous variant.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig6.png" title="Figure 6: String reuse between the Linux versions" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 6: String reuse between the Linux versions&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Interestingly, the C&amp;amp;C paths hint at some of Stantinko&amp;rsquo;s earlier campaigns
based on
&lt;a href="https://www.welivesecurity.com/wp-content/uploads/2017/07/eset_stantinko_whitepaper_final.pdf"target="_blank" rel="noopener"&gt;ESET&amp;rsquo;s research&lt;/a&gt;.
An example of the hard coded paths is shown in Figure 7. The root directory
name is kbdmai. &lt;code&gt;KDBMAI.dll&lt;/code&gt; is a malware filename used by Stantinko in 2012.
Also, the malware&amp;rsquo;s C&amp;amp;C was hosted on &lt;code&gt;kdbmai[.]net&lt;/code&gt;. Another interesting
directory is DRTIPROV. DRTIPROV is part of a Program Database (pdb) path from
one of the group&amp;rsquo;s Windows malware.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig7.png" title="Figure 7: Path hard coded in the detect_proxy_script function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 7: Path hard coded in the detect_proxy_script function&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Wrap-Up&lt;span class="hx:absolute hx:-mt-20" id="wrap-up"&gt;&lt;/span&gt;
&lt;a href="#wrap-up" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stantinko is the latest malware targeting Linux servers to fly under the radar,
joining threats such as
&lt;a href="../../../2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud"&gt;Doki&lt;/a&gt;,
&lt;a href="../../../2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware"&gt;IPStorm&lt;/a&gt;
and
&lt;a href="https://securelist.com/ransomexx-trojan-attacks-linux-systems/99279/"target="_blank" rel="noopener"&gt;RansomEXX&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The code from the new Stantinko sample is now indexed in Intezer&amp;rsquo;s Genome
Database.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/11/stantinkos-proxy-after-your-apache-server/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I want to thank Nicole Fishbein and Joakim Kennedy for their contributions to
this analysis&lt;/em&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;p&gt;New version: 2.17&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;1de81bf6ee490b6bebe9f27d5386a48700e8431f902f4f17d64ddc5d8509ca7a&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;Old version: 1.2*&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;889aa5a740a3c7441cdf7759d4b1c41c98fd048f4cf7e18fcdda49ea3911d5e5
968b41b6ca0e12ea86e51e0d9414860d13599cd127ad860e1c52c2678f4f2cb9
43a6894d5953b37f92940d5c783c9977690f358b5e25bba8c096fa54657bb2e5
a305d488733d50ea92a2794cb6e0aa9d1d176e2c8906305ea48ff503fc2eb276&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>ChinaZ Updates Toolkit by Introducing New, Undetected Malware</title><link>https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/</link><pubDate>Fri, 13 Dec 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/</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;ChinaZ is a Chinese cybercrime group and the author of several
&lt;a href="https://www.botconf.eu/wp-content/uploads/2014/12/2014-2.10-Chinese-Chicken-Multiplatform-DDoS-Botnets.pdf"target="_blank" rel="noopener"&gt;DDoS malware&lt;/a&gt;.
We have profiled this group in a
&lt;a href="../../../2019/01/chinaz-relations"&gt;previous article&lt;/a&gt; discussing connections
between ChinaZ and other Chinese threat actors.&lt;/p&gt;
&lt;p&gt;Recently, we have discovered new tools being utilized by ChinaZ which have low
detection rates in comparison to the group’s other, more common malware.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig1.jpeg" title="VirusTotal detection rate of one of the discovered samples" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;VirusTotal detection rate of one of the discovered samples&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Some of the components reported in this article have been present in the wild
for at least one year, which implies the active state of this group. We have
based this conclusion upon seeing that the first submission was made to
VirusTotal one year ago:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig2.jpeg" title="VirusTotal analysis of an older, related sample" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;VirusTotal analysis of an older, related sample&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We believe this may be an attempt by ChinaZ to retool its current toolset,
using new malware with low detection rates to accomplish its operations, since
the group has received more attention from the infosec community in recent
years.&lt;/p&gt;
&lt;p&gt;The new malware samples seem to implement a combination of backdoor and DDoS
bot capabilities to mainly target Linux servers. However, we do not discount
the possibility that Windows variants may exist, since this is a recurrent
pattern we have observed from ChinaZ malware in the past.&lt;/p&gt;
&lt;p&gt;In addition, we were able to retrieve a CNC binary from one of the samples,
which has enabled us to learn more about the network protocol along with some
of the malware’s capabilities.&lt;/p&gt;
&lt;p&gt;In this post, we will present the technical findings of those tools, including
a technical analysis of the files and network protocols.&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;We’ve received several hits of suspicious files from VirusTotal Intelligence
that communicated with given subdomains under the domain l11l1.com. All of the
identified subdomains were hosting several HttpFileServer panels, web servers
specifically designed for publishing and sharing files. ChinaZ is known to have
used these types of panels in the past.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig3.jpeg" title="HttpFileServer panel of one of the identified servers" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;HttpFileServer panel of one of the identified servers&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Based on VirusTotal passive DNS records, it appears that some Windows malware
samples were also hosted on some of these subdomains:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig4.jpeg" title="VirusTotal Intelligence graph from one of the discovered samples" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;VirusTotal Intelligence graph from one of the discovered samples&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;After analyzing some of the Windows binaries we observed that based on code
reuse analysis, the majority of these files seem to be variants of Gh0st or
ServStart, modified Chinese RATs with DDoS capabilities known to be leveraged
by ChinaZ in the past.&lt;/p&gt;
&lt;p&gt;These
&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=chinaz-updates-toolkit-by-introducing-new-undetected-malware&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/files/167c1036befcbd69c83666fd8125209aed5dd89be1068d0bb2ed1974fa6faf27"target="_blank" rel="noopener"&gt;samples&lt;/a&gt;
are also infected by common PE file infectors such as Sality, Parite, and
Virut. ChinaZ has a reputation for deploying infected malware compromised with
these aforementioned file infectors:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig5.jpeg" title="Sality genes from one of the hosted Windows malware samples" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Sality genes from one of the hosted Windows malware samples&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;As seen in the screenshot above, a Gh0st RAT instance deployed by ChinaZ
contains code from Sality. This implies that the subject Gh0st RAT is infected
with Sality. We documented this same pattern in our
&lt;a href="../../../2019/01/chinaz-relations"&gt;previous article&lt;/a&gt; on the subject matter.
This finding may imply that these new malware samples may be operating from the
same servers as other malware under the ChinaZ umbrella.&lt;/p&gt;
&lt;p&gt;Furthermore, when we analyze the newly discovered samples using Genetic Malware
Analysis, we observed that they all share the same ratio of genes across
several malware families related to ChinaZ threat actors.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig6.jpeg" title="Malware Analysis across samples under the ChinaZ umbrella" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Malware Analysis across samples under the ChinaZ umbrella&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;After analyzing these connections we observed that they all have been
statically compiled with specific versions of some C++ libraries.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig7.jpeg" title="C&amp;#43;&amp;#43; function similarities between one of the identified samples and a XorDDoS instance" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;C&amp;#43;&amp;#43; function similarities between one of the identified samples and a XorDDoS instance&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;These code similarities are from C++ statically linked library code, which at
first glance are often considered non-attributive. However, based on the high
number of code connections between hundreds of other malware samples related to
ChinaZ, we can interpret them as if the authors of these newly discovered
samples will be using the same compiler version or toolchain to generate their
implants as the one used by a large number of ChinaZ threat actors.&lt;/p&gt;
&lt;p&gt;Among the different identified samples we were able to classify three variants
with different functionalities. Each of these variants were found hosted
together and often sharing the same CNC server. The following section includes
an analysis of each of the new implants we discovered.&lt;/p&gt;
&lt;h3&gt;NewManager&lt;span class="hx:absolute hx:-mt-20" id="newmanager"&gt;&lt;/span&gt;
&lt;a href="#newmanager" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;NewManager is a minimalistic backdoor with arbitrary command execution and file
upload capabilities. The functionality of the backdoor is fairly simple in
logic. NewManager is intended to be executed as root, therefore we can assume
the backdoor is used as a stager when a given target is compromised.&lt;/p&gt;
&lt;p&gt;The backdoor will daemonize itself and set persistence mechanisms. These
persistence mechanisms are primarily based on setting symbolic links to
specific directories in which the presence of those symbolic links implies file
execution on boot time. These mechanisms are predominant among all discovered
samples.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig8.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We have observed that across the discovered implants the name of the persistent
binary will be set differently. The name used to label NewManager was &amp;rsquo;new
manager&amp;rsquo;, therefore its name:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig9.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware will then execute a series of functions that will initialize the
communication with the CNC to start receiving commands.&lt;/p&gt;
&lt;p&gt;The client will collect interface information from &lt;code&gt;/proc/net/dev&lt;/code&gt; and cpu
information from &lt;code&gt;/proc/stat&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig10.jpeg" title="Functions executed prior to CNC command handling" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Functions executed prior to CNC command handling&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This collected information serves to inform the operator of the network
interface and cpu performance of the compromised machine.&lt;/p&gt;
&lt;p&gt;After this information is collected, the client will craft the beaconing packet
that will be sent periodically to send interface and cpu statistics to the CNC.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig11.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After analyzing the network protocol we observed that packets are crafted in a
similar manner, although they will differ depending on the payload based on the
command type sent. In order to show the packet&amp;rsquo;s structure, the following
diagram shows the beaconing packet:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig12.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After this specific information is configured to be sent in intervals to the
CNC, the backdoor will send its own handshake packet.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig13.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This packet transfers the kernel version to the backdoor operator. Once this
command is sent, the operator will be able to see the compromised machine on
its panel:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig14.jpeg" title="NewManager CNC panel" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;NewManager CNC panel&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;NewManager supports three commands. They are the following:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Specification&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Execute command&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0x11000011&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Executes an arbitrary bash command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0x11000002&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Creates a file on an arbitrary path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0x11000003&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reads a file on an arbitrary path&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The command ID after packet parsing is fairly straightforward on the backdoor’s
side.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig15.jpeg" title="Command selection implementation in NewManager" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Command selection implementation in NewManager&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;AmpManager&lt;span class="hx:absolute hx:-mt-20" id="ampmanager"&gt;&lt;/span&gt;
&lt;a href="#ampmanager" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The second piece of malware we were able to analyze is AmpManager.&lt;/p&gt;
&lt;p&gt;The reason we named this malware AmpManager is due to its resemblance to
NewManager, however, it appears that the spectrum of supported commands is
wider, implementing more functionalities along with a range of DDoS attack
methodologies.&lt;/p&gt;
&lt;p&gt;Although AmpManager and NewManager share most of their code base and CNC
communication protocol, there are more commands implemented in AmpManager and
some command IDs do not match with the command IDs implemented by NewManager.&lt;/p&gt;
&lt;p&gt;For that reason—although we see a high volume of code reuse—we consider
AmpManager to be a different malware, although it’s clear that NewManager is
AmpManager’s predecessor.&lt;/p&gt;
&lt;p&gt;The name AmpManager chooses to persist in a given system is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig16.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following is an overview of the command implementation code:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig17.jpeg" title="Command selection implementation in AmpManager" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Command selection implementation in AmpManager&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;As we can see, the command implementation code is broader than the one
NewManager implements. One of the main differences between AmpManager and
NewManager is AmpManager introduces DDoS attacks among other features.&lt;/p&gt;
&lt;p&gt;There are three different DDoS attack methodologies implemented: SSDP, DNS, and
NTP amplifications.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig18.jpeg" title="SSDP flood UDP header" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;SSDP flood UDP header&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;These floods have some configurations set under the &lt;code&gt;/etc/&lt;/code&gt; directory that will
impact the number of iterations that each flood will run for.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig19.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following table shows the supported commands implemented in AmpManager:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Specification&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;NTP amplification&lt;/td&gt;
&lt;td&gt;0x11000002&lt;/td&gt;
&lt;td&gt;Executes a NTP amplification flood against a target IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Send flood configurations&lt;/td&gt;
&lt;td&gt;0x11000003&lt;/td&gt;
&lt;td&gt;Send the established configurations for each flood to the CNC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSDP amplification&lt;/td&gt;
&lt;td&gt;0x11000006&lt;/td&gt;
&lt;td&gt;Executes a SSDP amplification flood against a target IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All amplifications&lt;/td&gt;
&lt;td&gt;0x11000007&lt;/td&gt;
&lt;td&gt;Executes all implemented amplification floods against a target IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS amplification&lt;/td&gt;
&lt;td&gt;0x11000008&lt;/td&gt;
&lt;td&gt;Executes a DNS amplification flood against a target IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Download HTTP&lt;/td&gt;
&lt;td&gt;0x11000009&lt;/td&gt;
&lt;td&gt;Downloads a given file to a target path via HTTP GET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execute command&lt;/td&gt;
&lt;td&gt;0x11000011&lt;/td&gt;
&lt;td&gt;Executes a target bash command in the target machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Update current time&lt;/td&gt;
&lt;td&gt;0x11000012&lt;/td&gt;
&lt;td&gt;Saves the time via gettimeofday&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Apply flood configurations&lt;/td&gt;
&lt;td&gt;0x11000023&lt;/td&gt;
&lt;td&gt;Applies flood configurations for each respective DDoS methodology&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;DDoSManager&lt;span class="hx:absolute hx:-mt-20" id="ddosmanager"&gt;&lt;/span&gt;
&lt;a href="#ddosmanager" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In contrast to the two previously reported malware samples, DDoSManager seems
to be based on a completely different code base and network protocol.&lt;/p&gt;
&lt;p&gt;Although its overall functionality is similar to AmpManager due to the fact
that it’s also a DDoS bot, uses the same persistence mechanisms and overall
preliminary functionality before CNC communication, it’s important to highlight
that DDoSManager uses different DDoS attack methodologies than AmpManager.&lt;/p&gt;
&lt;p&gt;In addition, we noticed that this sample contains known Elknot/BillGates
artifacts, which are some of the most popular malware families leveraged by
ChinaZ.&lt;/p&gt;
&lt;p&gt;The following is a small write up from a
&lt;a href="https://www.novetta.com/wp-content/uploads/2015/06/NTRG_ElasticBotnetReport_06102015.pdf"target="_blank" rel="noopener"&gt;report by Novetta&lt;/a&gt;
covering in detail the internals of BillGates malware.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig20.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;If we take a closer look, we can see that these two C++ classes are also used
in DDoSManager:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig21.jpeg" alt="" loading="lazy" /&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig22.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This reinforces the connection between these malware samples and the developers
of Elknot/BillGates, and with respect to the ChinaZ umbrella, in addition to
the connections explained previously.&lt;/p&gt;
&lt;p&gt;As is the case with the previous samples, DDoSManager commences by setting
persistence mechanisms. The techniques applied are the same ones covered in
NewManager and AmpManager as previously mentioned. DDoSManager will use the
name SingTool to masquerade itself:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig23.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Interface and performance information will be collected as with the previous
samples. However, an additional thread will be launched.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig24.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This thread is in charge of listening for packets to then decode and parse them
for CNC communication.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig25.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When we intercepted the network traffic we noticed that the traffic was
encoded:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig26.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After analysis we observed that packets were encoded and decoded with a simple
sub/xor algorithm. This algorithm is the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig27.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After applying this algorithm to each given packet, we can retrieve their plain
text version. The following is the structure of each packet after decoding:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig28.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, the command ID will be extracted from each packet in order to
execute the desired task.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig29.jpeg" title="Command selection implementation in DDoSManager" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Command selection implementation in DDoSManager&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;DDoSManager supports a total of seven commands. These are the following:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Specification&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Read configuration&lt;/td&gt;
&lt;td&gt;0x64&lt;/td&gt;
&lt;td&gt;Configuration is retrieved to the&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CNC Write configuration entry&lt;/td&gt;
&lt;td&gt;0x65&lt;/td&gt;
&lt;td&gt;Entry is added to the configuration file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HeartBeat&lt;/td&gt;
&lt;td&gt;0x66&lt;/td&gt;
&lt;td&gt;Beaconing command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not implemented&lt;/td&gt;
&lt;td&gt;0x67&lt;/td&gt;
&lt;td&gt;Not implemented&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execute Manager Function&lt;/td&gt;
&lt;td&gt;0x68&lt;/td&gt;
&lt;td&gt;Invoke internal manager function&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stop command&lt;/td&gt;
&lt;td&gt;0x69&lt;/td&gt;
&lt;td&gt;Stop an ongoing command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execute DDoS attack&lt;/td&gt;
&lt;td&gt;0x6a, 0x6b, 0x6c&lt;/td&gt;
&lt;td&gt;Execute a DDoS flood on a target IP address&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The malware sets a configuration file for the targets it will attempt to DDoS.
This configuration file is located at /tmp/Cfg.9:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig30.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When a DDoS command is executed, a series of fields will be provided from the
CNC packet in order to execute the command. These fields are clearly shown on a
debug message in the binary:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig31.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;There are three different DDoS amplification algorithms supported. These are
SYN, UDP, and DNS amplifications. Interestingly, in the analyzed samples of
DDoSManager we found that the DNS amplification algorithm was not implemented.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/12/chinaz-updates-toolkit-by-introducing-new-undetected-malware/images/fig32.jpeg" 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;We have analyzed three new malware variants in which we have named NewManager,
AmpManager, and DDoSManager.&lt;/p&gt;
&lt;p&gt;These three variants were found to be hosted together, sharing the same CNC
address, and are nearly identical in terms of overall preliminary
functionality.&lt;/p&gt;
&lt;p&gt;Some of the servers where the malware is hosted are also serving Windows DDoS
bots based on modified versions of Chinese RATs such as Gh0st and ServStart. It
is well-known that ChinaZ has utilized these malware families in previous
campaigns.&lt;/p&gt;
&lt;p&gt;In addition, we presented evidence that the Windows implants were infected with
common PE file infectors, also resembling a known pattern of ChinaZ Windows
malware samples seen in the past.&lt;/p&gt;
&lt;p&gt;Furthermore, we highlighted the use of a common compiler/toolchain used to
generate the discovered binaries which seems to be shared across a high number
of samples belonging to the ChinaZ umbrella. We also found artifact
similarities between the BillGates malware and DDoSManager, specifically the
name of two core C++ classes used by the malware.&lt;/p&gt;
&lt;p&gt;A technical analysis of the overall functionality and network protocol for each
of the discovered samples was provided explaining their main features and
capabilities.&lt;/p&gt;
&lt;p&gt;We believe these findings indicate the need by some ChinaZ threat actors to
update their malware toolsets, since they have not conducted a major retooling
process in years, and the majority of the older malware utilized by this group
is largely detected by Anti-Virus engines.&lt;/p&gt;
&lt;p&gt;The code from these samples are now indexed in Intezer Analyze so users can
detect and classify NewManager, AmpManager, DDoSManager, and other threats that
share code with these malware. We have also generated a
&lt;a href="https://github.com/intezer/yara-rules/blob/master/ChinaZ_Managers.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
which can be used by organizations to hunt for additional samples of these
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;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;syn.l11l1[.]com
ccyk.l11l1[.]com
yk.l11l1[.]com
fd.l11l1[.]com
1bfa8af4b51d9fc54d4baa49df27116f44ce269da9123625c1f2ba17289ea2cd
625c57c7090e63472f2bd4d12bf5c821ac821327ee4274a728846fa0bb967b00
F0a2b4c223d6c0c537d9e75b38a2d9b4031485bcfc0c03da96a2b49d7f91591e
B79af4e394cbc8c19fc9b5410fa69b10325fd23f58bec330954caae135239a1f
Dda419d145d4ec7f0eec74ee6cf14ab0b35f22a1af7f39ffbe914c66c445bdf5
3be01b2b27a2cb7b7a852c6305f7a26f35d60fa80ab0050643d97486feaf09dd
33d44642d47488ca0e9fba1935944433e618ec212c5a24969aed406e7b50c611
E3e979d00006fb102279f1033d02bfb8d2ceb6b92c1377195ccb8daa36093c8b
4f5cfb805feb7576e594f1bb3b773ba0ca80e09e49bfb7e3507f815f774ac62d
8ad95b128ab477cc80cba9e4ddccc9d74d423415c17d2837d537c406e6ac81cd&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>Mapping the Connections Inside Russia’s APT Ecosystem</title><link>https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/</link><pubDate>Tue, 24 Sep 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/</guid><description>
&lt;p&gt;&lt;em&gt;This research is a joint effort conducted by Omri Ben-Bassat from Intezer and
Itay Cohen from Check Point Research.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Prologue пролог&lt;span class="hx:absolute hx:-mt-20" id="prologue-пролог"&gt;&lt;/span&gt;
&lt;a href="#prologue-%d0%bf%d1%80%d0%be%d0%bb%d0%be%d0%b3" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;If the names Turla, Sofacy, and APT29 strike fear into your heart, you are not
alone. These are known to be some of the most advanced, sophisticated and
notorious APT groups out there, and not in vain. These Russian-attributed
actors are part of a larger picture in which Russia is one of the strongest
powers in cyber warfare today. Their advanced tools, unique approaches, and
solid infrastructures suggest enormous and complicated operations that involve
different military and government entities inside Russia.&lt;/p&gt;
&lt;p&gt;Russia is known to conduct a wide range of cyber espionage and sabotage
operations for the last three decades. Beginning with the first publicly known
attacks by
&lt;a href="https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07180251/Penquins_Moonlit_Maze_PDF_eng.pdf"target="_blank" rel="noopener"&gt;Moonlight Maze&lt;/a&gt;,
in 1996, the
&lt;a href="https://web.archive.org/web/20090221124901/http://articles.latimes.com/2008/nov/28/nation/na-cyberattack28"target="_blank" rel="noopener"&gt;Pentagon breach&lt;/a&gt;
in 2008,
&lt;a href="https://www.wired.com/story/crash-override-malware/"target="_blank" rel="noopener"&gt;Blacking out Kyiv&lt;/a&gt; in
2016, hacking the
&lt;a href="https://www.dhs.gov/news/2016/10/07/joint-statement-department-homeland-security-and-office-director-national"target="_blank" rel="noopener"&gt;United States elections&lt;/a&gt;
in 2016, and including some of the largest, most infamous cyberattacks in
history,
&lt;a href="https://www.washingtonpost.com/world/national-security/russian-military-was-behind-notpetya-cyberattack-in-ukraine-cia-concludes/2018/01/12/048d8506-f7ca-11e7-b34a-b85626af34ef_story.html?"target="_blank" rel="noopener"&gt;targeting an entire&lt;/a&gt;
nation with NotPetya ransomware.&lt;/p&gt;
&lt;p&gt;Indeed, numerous Russian operations and malware families were publicly exposed
by different security vendors and intelligence organizations such as the
&lt;a href="https://www.us-cert.gov/sites/default/files/publications/JAR_16-20296A_GRIZZLY%20STEPPE-2016-1229.pdf"target="_blank" rel="noopener"&gt;FBI&lt;/a&gt;
and the
&lt;a href="https://www.valisluureamet.ee/pdf/raport-2018-ENG-web.pdf"target="_blank" rel="noopener"&gt;Estonian Foreign Intelligence Services&lt;/a&gt;.
While these discoveries shed light into specific Russian actors or operations,
the larger picture remains hazy.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig1.png" title="Figure 1: An infographic that was published in a report by the Estonian Foreign Intelligence Service" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: An infographic that was published in a report by the Estonian Foreign Intelligence Service&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The fog behind these complicated operations made us realize that while we know
a lot about single actors, we are short of seeing an entire ecosystem with
actor interaction (or lack thereof) and particular TTPs that can be viewed on a
larger scope. We decided to know more and to adopt a broader perspective. This
led us to gather, classify, and analyze thousands of Russian APT malware
samples in order to find connections not only between samples, but also between
different families and actors.&lt;/p&gt;
&lt;p&gt;During this research, we analyzed approximately 2,000 samples that were
attributed to Russia and found 22,000 connections between the samples, in
addition to 3.85 million non-unique pieces of code that were shared. We
classified these samples into 60 families and 200 different modules.&lt;/p&gt;
&lt;h2&gt;Key Findings ключевые результаты&lt;span class="hx:absolute hx:-mt-20" id="key-findings-ключевые-результаты"&gt;&lt;/span&gt;
&lt;a href="#key-findings-%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%b2%d1%8b%d0%b5-%d1%80%d0%b5%d0%b7%d1%83%d0%bb%d1%8c%d1%82%d0%b0%d1%82%d1%8b" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;This research is the first and the most comprehensive of its kind. For the
first time, thousands of samples were gathered, classified, and analyzed in
order to map connections between different cyber espionage organizations of a
superpower country.&lt;/li&gt;
&lt;li&gt;In most cases, the Russian actors do not share code with one another. While
each actor does reuse its code in different operations and between different
malware families, there is no single tool, library or framework that is
shared between different actors.&lt;/li&gt;
&lt;li&gt;Every actor or organization under the Russain APT umbrella has its own
dedicated malware development teams, working for years in parallel on similar
malware toolkits and frameworks. Knowing that a lot of these toolkits serve
the same purpose, it is possible to spot redundancy in this parallel
activity.&lt;/li&gt;
&lt;li&gt;These findings may suggest that Russia is investing a lot of effort into its
operational security. By avoiding different organizations re-using the same
tools on a wide range of targets, they overcome the risk that one compromised
operation will expose other active operations.&lt;/li&gt;
&lt;li&gt;We were able to verify previously reported connections between different
families, supporting these connections with code similarity analysis as
evidence.&lt;/li&gt;
&lt;li&gt;We are releasing several tools to be used by the research community. An
interactive map of connections between dozens of Russian APT families and
their components. A signature-based tool to scan a host or a file against the
most commonly re-used pieces of code leveraged by the Russian APTs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the complete list of findings and their meaning, please refer to the
extended results section.&lt;/p&gt;
&lt;h2&gt;Getting Started ачинаем&lt;span class="hx:absolute hx:-mt-20" id="getting-started-ачинаем"&gt;&lt;/span&gt;
&lt;a href="#getting-started-%d0%b0%d1%87%d0%b8%d0%bd%d0%b0%d0%b5%d0%bc" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Our journey into this complex ecosystem began, as any thorough research, with
one question. To be honest, it wasn’t a single question, but several of them:&lt;/p&gt;
&lt;p&gt;What information is already publicly available? What, if any, previous research
of this type been conducted before? Who are the actors in the Russian APT
ecosystem? What are the malware families used by these actors? Who are the
targeted victims? What connections were already found between different actors,
families, and samples? And more…&lt;/p&gt;
&lt;p&gt;This led us to a deep background reading of public information that was shared
by other researchers, vendors, and governments. Without the previous research
conducted by these individuals, and without this information we would’ve been
lost, so this is the time to say thank you.&lt;/p&gt;
&lt;p&gt;After days of reading background materials and publications, it became more
clear to us on how we should proceed. To put it simply, we split the research
into four steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Gathering samples&lt;/li&gt;
&lt;li&gt;Classifying the samples&lt;/li&gt;
&lt;li&gt;Find code similarities between the samples&lt;/li&gt;
&lt;li&gt;Analyze the identified connections&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the chapters below, we will try to explain each of these steps. We will
describe what we have done, how we did it, and what challenges we encountered.&lt;/p&gt;
&lt;h2&gt;Gathering Samples сбор образцов&lt;span class="hx:absolute hx:-mt-20" id="gathering-samples-сбор-образцов"&gt;&lt;/span&gt;
&lt;a href="#gathering-samples-%d1%81%d0%b1%d0%be%d1%80-%d0%be%d0%b1%d1%80%d0%b0%d0%b7%d1%86%d0%be%d0%b2" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The first step was to gather samples that we know were attributed to malware
families that are associated with official Russian actors. We began by listing
the names of the actors and families we read about previously. We searched for
technical reports that were published about these names and extracted
potentially valuable Indication of Compromise from them. IOCs are usually
posted at the bottom of technical analysis reports and used by researchers as a
way to share hashes of the discussed malware samples. This information can
later be used by other researchers, vendors, and SOC teams.&lt;/p&gt;
&lt;p&gt;We then downloaded these samples from VirusTotal and from our internal
databases, and gathered them all together. Overall, we began with approximately
2,500 unique samples.&lt;/p&gt;
&lt;h2&gt;Classifying классификация&lt;span class="hx:absolute hx:-mt-20" id="classifying-классификация"&gt;&lt;/span&gt;
&lt;a href="#classifying-%d0%ba%d0%bb%d0%b0%d1%81%d1%81%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%86%d0%b8%d1%8f" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When we find code similarities between two or more samples, we basically know
that a sample file A shares a mutual code with another sample file B. This
alone is not enough information for us, because we need to know what are A and
B—are they variants or modules of the same family, do they belong to the same
actor, or most importantly, are these samples a part of different families,
written by different actors. In order to do this, we needed to have a clear
understanding of the ascription of each sample. When taking this into practice,
we tried to determine the following information about each and every sample we
gathered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Actor—which Russian APT actor is known or probable to have written this
malware (Turla, Sofacy, GreyEnergy, …)?&lt;/li&gt;
&lt;li&gt;Family—what is the common family name that is associated with this malware?&lt;/li&gt;
&lt;li&gt;Module—many malware families are built in a modular way in which a certain
malware can load different payloads embedded within it or downloaded from a
Command and Control server. When possible, we wanted to know whether the
sample we have is a Keylogger module, a communication module, an injection
module, or anything else.&lt;/li&gt;
&lt;li&gt;Version—some malware have a clear version stamp embedded in them. We wanted
to be able to differentiate between earlier and recent versions, as well as
versions that were written to different architectures and bits.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Although on the surface it looks easy, classifying turned out to be one of the
most complicated parts of this research.&lt;/p&gt;
&lt;p&gt;Starting with this frustrating fact–there is no naming standardization for
malware and threat actors in the infosec industry. Every Russian APT actor and
every malware family have more than a few names given to them by different
vendors, researchers, and intelligence institutions. Some names will be used by
different vendors to describe different families. Some malware families are
described with different names by the same vendor. Other malware families
simply do not have a clear name. These issues and more, made us face one of the
most painful drawbacks of classification and required us to be very careful
when we classify a specific piece of malware to a family and an actor.&lt;/p&gt;
&lt;h2&gt;Code Similarities сходство кода&lt;span class="hx:absolute hx:-mt-20" id="code-similarities-сходство-кода"&gt;&lt;/span&gt;
&lt;a href="#code-similarities-%d1%81%d1%85%d0%be%d0%b4%d1%81%d1%82%d0%b2%d0%be-%d0%ba%d0%be%d0%b4%d0%b0" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once we finished collecting and classifying all of the Russian APT samples, we
began to cluster them based on the shared unique and malicious code between the
different samples. Using Intezer’s Malware Analysis technology, we
automatically disassembled and dissected each binary file into thousands of
small pieces of assembly code, also referred to as “genes”. Then, for each and
every gene, we checked in which software/malware it was seen previously, by
referencing Intezer’s code genome database. This code genome database contains
binary genes from both previously seen malicious and legitimate software, which
helps us to focus on only the unique and malicious genes per file (without
wasting time on shared library code, for example).&lt;/p&gt;
&lt;p&gt;Intezer’s technology also helped us to automatically unpack samples which were
packed (statically or dynamically), and to ignore the irrelevant binary parts,
such as library code. Since the genome database contains all of the genes from
the files that we have collected, the output of this process was an
automatically generated connections graph, based on the unique Russian code,
for further investigation of the results as described in the following
sections.&lt;/p&gt;
&lt;h2&gt;Visualizing the Connections визуализация связей&lt;span class="hx:absolute hx:-mt-20" id="visualizing-the-connections-визуализация-связей"&gt;&lt;/span&gt;
&lt;a href="#visualizing-the-connections-%d0%b2%d0%b8%d0%b7%d1%83%d0%b0%d0%bb%d0%b8%d0%b7%d0%b0%d1%86%d0%b8%d1%8f-%d1%81%d0%b2%d1%8f%d0%b7%d0%b5%d0%b9" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Now that we have analyzed thousands of samples for code similarities, it is
time to gather and visualize all of the identified connections in one place.
Our current situation is that we essentially have two lists:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A list of all the samples • Sha256, Label, Actor&lt;/li&gt;
&lt;li&gt;A list of found connections • sha256_sampleA, sha256_sampleB, # of shared
genes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is all we need in order to create an initial graph of the connections, in
which every sample is a node (vertex), and a connection between two samples is
an edge. We created the initial graph using the
&lt;a href="https://networkx.github.io/"target="_blank" rel="noopener"&gt;networkx&lt;/a&gt; library for Python and produced a .gexf
file that later can be used in our favorite graph visualizer tool, Gephi. Gephi
is an open-source interactive visualization and exploration platform for all
kinds of networks and complex systems, dynamic and hierarchical graphs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;GEXF (Graph Exchange XML Format) is a language for describing complex
networks structures, their associated data and dynamics.&lt;/p&gt;
&lt;p&gt;Source: Gephi website&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By loading the produced file to Gephi, we begin with a complex and crowded web
of connections. In order to make it look clearer, we would need to apply some
layout algorithms to it.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig2.png" title="Figure 2: The initial graph as created by Gephi" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: The initial graph as created by Gephi&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Without getting too deep into Graph Theory and Graph Drawing, layout algorithms
are responsible for the way that vertices and edges are arranged in the graph.
This has a direct effect on the aesthetics, understandability, and usability of
the graph. For our graph, we chose a
&lt;a href="https://en.wikipedia.org/wiki/Force-directed_graph_drawing"target="_blank" rel="noopener"&gt;Force-Directed layout algorithm&lt;/a&gt;,
or more specifically–
&lt;a href="https://github.com/gephi/gephi/wiki/Fruchterman-Reingold"target="_blank" rel="noopener"&gt;Fruchterman-Reingold algorithm&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig3.gif" title="Figure 3: The graph of connections after applying layout algorithms" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 3: The graph of connections after applying layout algorithms&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Now we can notice some big clusters that are created and bridges between two or
more clusters like this. Circular and complete-linkage clusters are most likely
to be collections of samples of the same family. Two clusters that are joined
together are most likely to belong to the same family (different variants) or
to the same ancestry. There are many clusters, big ones, and smaller ones. The
different sizes indicate the number of nodes in the cluster. This is something
that can be either relevant or irrelevant depending on the situation. We need
to remember, after all, a graph will present the data it was given with. Thus,
the size of the cluster is directly affected by the number of samples of the
same family that were in our dataset. The family may indeed be a big one, but
it is possible that the samples of this family were simply more accessible for
us.&lt;/p&gt;
&lt;p&gt;Now that we have the shape of the graph, let’s add another layer—text, and
colors. In our research, we want to show connections between families and
actors. Thus, for each node on the graph, we will add a label with its name and
a unique color per attributed actor.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig4.png" title="Figure 4: Colors applied to the graph in order to make it more readable" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 4: Colors applied to the graph in order to make it more readable&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Analyzing the Connections анализ связей&lt;span class="hx:absolute hx:-mt-20" id="analyzing-the-connections-анализ-связей"&gt;&lt;/span&gt;
&lt;a href="#analyzing-the-connections-%d0%b0%d0%bd%d0%b0%d0%bb%d0%b8%d0%b7-%d1%81%d0%b2%d1%8f%d0%b7%d0%b5%d0%b9" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Now that Gephi did its magic and we have a nice, yet busy, visual graph, it is
time to inspect the thousands of connections, starting from the most
interesting ones, cross-actor edges.&lt;/p&gt;
&lt;p&gt;A cross-actor edge is a line connecting two nodes that are attributed to
different actors. Such a connection, when verified, can indicate that two or
more actors share code.&lt;/p&gt;
&lt;p&gt;While there are thousands of inter-family connections on the graph (a code is
shared between samples of the same family) and cross-family connections (a code
is shared between samples of different families attributed to the same actor),
it is uncommon to see cross-actor connections.&lt;/p&gt;
&lt;p&gt;In order to analyze the graph and its connections, we used Gephi’s Python API
module. We wrote several clean-up scripts to remove and reduce false-positives
and false attributions. Then, we extracted a list of connections between
samples belonging to different actors.&lt;/p&gt;
&lt;p&gt;We then moved to our favorite part, reverse-engineering the shared genes in
order to verify the unique mutuality or to flag the connection as a
false-positive.&lt;/p&gt;
&lt;p&gt;A false-positive connection, in our terminology, would be a connection which is
indeed true (the samples do share code), but not uniquely true. Mutually shared
genes that we flagged as false-positive most-likely belong to some version of
an open-source library, such as PolarSSL, B-Zip or a fork of any other
open-source library.&lt;/p&gt;
&lt;p&gt;This part required us to analyze the mutual pieces of code that were shared by
two or more samples in order to understand the nature of the connection. By
looking at the shared code, we could understand the goal of this code, how it
is being used and in what context it was written.&lt;/p&gt;
&lt;p&gt;In this part, we also verified that our research was able to spot and detect
previously reported connections between samples and actors, be it a TTP
connection or a code-connection. In some cases, we are the first to provide
code-based evidence for the connections.&lt;/p&gt;
&lt;h2&gt;Interesting Connections интересные связи&lt;span class="hx:absolute hx:-mt-20" id="interesting-connections-интересные-связи"&gt;&lt;/span&gt;
&lt;a href="#interesting-connections-%d0%b8%d0%bd%d1%82%d0%b5%d1%80%d0%b5%d1%81%d0%bd%d1%8b%d0%b5-%d1%81%d0%b2%d1%8f%d0%b7%d0%b8" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Now, with the code connections graph in place, we were able to examine the
interesting connections between the different Russian APTs. We have observed
many connections between different tools used from the same actors, which
ranged between a specific function to a whole module. Code similarities between
samples of different actors were rare to find and those that we did find are
not unique or large enough to indicate that code or modules were actively
shared. Here are the highlights of these connections.&lt;/p&gt;
&lt;h3&gt;BlackEnergy Password Stealer &amp;lt;—&amp;gt; PinchDuke&lt;span class="hx:absolute hx:-mt-20" id="blackenergy-password-stealer--pinchduke"&gt;&lt;/span&gt;
&lt;a href="#blackenergy-password-stealer--pinchduke" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both share credential dumping implementation for Outlook and “The Bat!”—which
is a Moldovan email client. We know that
&lt;a href="https://www.f-secure.com/documents/996508/1030745/dukes_whitepaper.pdf"target="_blank" rel="noopener"&gt;PinchDuke&lt;/a&gt;
is based on an old credential stealer called Pinch (LdPinch) that was
distributed in Russian speaking underground forums about a decade ago, and we
believe that this shared piece of code between BlackEnergy and PinchDuke has
originated from the Pinch source code. Not only that several functions are
mutual, but there are also mutual strings—as can be seen in the screenshots
below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig5.png" title="Figure 5: Pinch Duke 0ce3bfa972ced61884ae7c1d77c7d4c45e17c7d767e669610cf2ef72b636b464" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 5: Pinch Duke 0ce3bfa972ced61884ae7c1d77c7d4c45e17c7d767e669610cf2ef72b636b464&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig6.png" title="Figure 6: Black Energy 3cf46c68dccb989fbda3f853cc19025d39d38d9ea5786f4ae6a926677d6c5f62" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 6: Black Energy 3cf46c68dccb989fbda3f853cc19025d39d38d9ea5786f4ae6a926677d6c5f62&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;BlackEnergy &amp;lt;—&amp;gt; Energetic Bear&lt;span class="hx:absolute hx:-mt-20" id="blackenergy--energetic-bear"&gt;&lt;/span&gt;
&lt;a href="#blackenergy--energetic-bear" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;As
&lt;a href="https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/operation-dragonfly-analysis-suggests-links-to-earlier-attacks/"target="_blank" rel="noopener"&gt;published by McAfee&lt;/a&gt;,
we also observed identical self-delete functions between BlackEnergy sample
from 2015 and the newer Energetic Bear (Dragonfly) sample from 2017. Despite
the fact that self-delete functions are pretty common in malware, it is rare to
see an exact 1:1 match in the binary level, which matches only for these two
malware families out of all the malware families indexed in Intezer’s Genome
Database. We believe that this function was not actively shared between these
actors, but instead, was taken from a
&lt;a href="https://www.c-plusplus.net/forum/topic/157481/selbstl%C3%B6schende-dll-m%C3%B6glich"target="_blank" rel="noopener"&gt;public source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig7.png" title="Figure 7: Black Energy 11b7b8a7965b52ebb213b023b6772dd2c76c66893fc96a18a9a33c8cf125af80" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 7: Black Energy 11b7b8a7965b52ebb213b023b6772dd2c76c66893fc96a18a9a33c8cf125af80&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig8.png" title="Figure 8: Energetic Bear fc54d8afd2ce5cb6cc53c46783bf91d0dd19de604308d536827320826bc36ed9" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 8: Energetic Bear fc54d8afd2ce5cb6cc53c46783bf91d0dd19de604308d536827320826bc36ed9&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Potao Main Module &amp;lt;—&amp;gt; X-Agent&lt;span class="hx:absolute hx:-mt-20" id="potao-main-module--x-agent"&gt;&lt;/span&gt;
&lt;a href="#potao-main-module--x-agent" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both Potao’s main module sample from
&lt;a href="https://www.welivesecurity.com/wp-content/uploads/2015/07/Operation-Potao-Express_final_v2.pdf"target="_blank" rel="noopener"&gt;ESET&amp;rsquo;s publication&lt;/a&gt;
and X-Agent sample which was uncovered by
&lt;a href="https://twitter.com/CNMF_VirusAlert"target="_blank" rel="noopener"&gt;USCYBERCOM&lt;/a&gt; share slightly similar PE
Loader implementation. Due to the low percentage of shared code, we cannot call
if it was originated from a shared codebase or simply a generic implementation
of a PE loader function.&lt;/p&gt;
&lt;h3&gt;Industroyer &amp;lt;—&amp;gt; Exaramel&lt;span class="hx:absolute hx:-mt-20" id="industroyer--exaramel"&gt;&lt;/span&gt;
&lt;a href="#industroyer--exaramel" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;As
&lt;a href="https://www.welivesecurity.com/2018/10/11/new-telebots-backdoor-linking-industroyer-notpetya/"target="_blank" rel="noopener"&gt;published by ESET&lt;/a&gt;
we also observed similar code connecting Exaramel backdoor used by TeleBots
group to Industroyer’s main backdoor component, which suggests Exaramel is a
newer version of this backdoor.&lt;/p&gt;
&lt;h2&gt;Tools тулзы&lt;span class="hx:absolute hx:-mt-20" id="tools-тулзы"&gt;&lt;/span&gt;
&lt;a href="#tools-%d1%82%d1%83%d0%bb%d0%b7%d1%8b" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We are happy to conclude the results of our research into two open-source
accessible tools. These tools can be an asset for any researcher and security
teams that will investigate or research Russian-related attacks.&lt;/p&gt;
&lt;h3&gt;Russian APT Map&lt;span class="hx:absolute hx:-mt-20" id="russian-apt-map"&gt;&lt;/span&gt;
&lt;a href="#russian-apt-map" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The Russian APT map is a web-based, interactive map that shows the different
families and actors that are part of the Russian APT ecosystem, as well as the
connections between them. The map is basically a one-stop-shop for anyone who
is interested to learn and understand the connections and attributions of the
samples, modules, families, and actors that together comprise this ecosystem.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig9.png" title="Figure 9: The map we created to show the connections inside the ecosystem" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 9: The map we created to show the connections inside the ecosystem&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The map is intuitive and rich with information. The user can get a full
overview of the ecosystem or drill down into specific connections. By clicking
on nodes in the graph, a side panel will reveal, containing information about
the malware family the node belongs to, as well as links to analysis reports on
Intezer’s platform and external links to related articles and publications.
Basically, this side-panel is a short identity-card of the entities on the map.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/09/russian-apt-ecosystem/images/fig10.png" title="Figure 10: A side panel with additional information about the nodes" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 10: A side panel with additional information about the nodes&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The map and its data are available open-sourced in our repository and we are
inviting you all to add more information and improve it.&lt;/p&gt;
&lt;p&gt;Click here to open: &lt;a href="https://apt-ecosystem.com/russia/map/"target="_blank" rel="noopener"&gt;Russian APT Map&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;APT Scanning Tool&lt;span class="hx:absolute hx:-mt-20" id="apt-scanning-tool"&gt;&lt;/span&gt;
&lt;a href="#apt-scanning-tool" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Having access to more than 3.5 million pieces of code that were shared between
the Russian APT samples we gathered, allowed us to understand which unique
genes are popular and more likely to be shared between samples, families, and
actors. We used this knowledge to write a tool that can be used by
organizations, CERT teams, researchers, and individuals to scan a specific
file, a folder, or a whole file system, and search for infections by Russian
APTs.&lt;/p&gt;
&lt;p&gt;The tool, which we named Russian APT Detector, is a set of YARA rules produced
by Intezer’s platform. The rules contain byte-sequences of popular mutual code
between one or more samples. We then wrapped it up in a binary to ease the use
of the tool. The full ruleset can be found in
&lt;a href="https://github.com/ITAYC0HEN/APT-Ecosystem/tree/master/russia/detector"target="_blank" rel="noopener"&gt;our repository&lt;/a&gt;,
and can be used
freely using your favorite YARA scanner. Don’t hesitate to integrate this
ruleset into your platform and toolset.&lt;/p&gt;
&lt;p&gt;Click here to get:
&lt;a href="https://github.com/ITAYC0HEN/APT-Ecosystem/releases/download/0.1/RussianAPTDetector.7z"target="_blank" rel="noopener"&gt;Russian APT Detector&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Results pезультаты&lt;span class="hx:absolute hx:-mt-20" id="results-pезультаты"&gt;&lt;/span&gt;
&lt;a href="#results-p%d0%b5%d0%b7%d1%83%d0%bb%d1%8c%d1%82%d0%b0%d1%82%d1%8b" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As far as we know, this was the first time that research of this kind, size,
and comprehension was done. Using publicly known information we were able to
gather, classify, and analyze thousands of samples attributed to one of the
most active and advanced cyber-espionage ecosystems, Russia. Throughout this
research, we analyzed and investigated dozens of potential pieces of code-based
evidence that may indicate that code was shared between different Russian
military, government, and intelligence entities.&lt;/p&gt;
&lt;p&gt;The connections we analyzed clearly showed that pieces of code such as
functions, whole or partial module and, encryption schemes were shared between
different teams and projects of the same actor. That means that different
malware families of the same organization are sharing such code. This
information may suggest that different teams, belonging to the same
organization, are aware of each other’s work and operations. By sharing code
with each other, the teams can save hundreds of man-hours and a lot of money.
Instead of re-implementing capabilities that already exist, the teams can focus
on other things and re-use the code. Another benefit of using an existing code
is that most likely, the code was tested in real-life cyber operations and the
team that developed it had an experience of using and improving it. On the
other hand, the price of sharing and re-using code is that when it gets caught
by a security vendor or researchers, the shared pieces of code can be used to
find new samples and families that are using the code. Thus, one detected
family can make more operations fall apart.&lt;/p&gt;
&lt;p&gt;Interestingly, our analysis and observations demonstrate that when it comes to
cross-actor connections, in the vast majority of times, different actors do not
share code. None of the connections we analyzed indicated that some pieces of
code are shared between two or more organizations. We find it very interesting
and unexpected. While we cannot know for sure what brought the organizations in
the Russian APT ecosystem to not share code with one another, we can make some
hypotheses.&lt;/p&gt;
&lt;p&gt;A reasonable option can be that Russia, having one of the most advanced and
strong cyber-espionage capabilities, is aware of the disadvantages of
code-sharing that we listed above. By avoiding different organizations re-using
the same tools on a wide range of targets, they overcome the risk that one
compromised operation will expose other active operations, preventing a
sensitive house of cards from collapsing. According to this assumption, Russia
is willing to invest an enormous amount of money and man-power to write similar
code again and again, instead of sharing tools, libraries or frameworks,
causing redundancy in this parallel activity. If this is true, this can
indicate that operational security has a priceless meaning for the Russian
actors.&lt;/p&gt;
&lt;p&gt;Another hypothesis is that the different organizations do not share code due to
internal politics. Since we are not familiar enough with the politics and the
relationships between Russia’s intelligence organizations, this hypothesis
should be taken with caution. After the dissolution of the Soviet Union, KGB’s
SIGINT unit was succeeded by other special service organizations such as FSB
and SVR. In addition to the successors of KGB’s signal intelligence functions,
there is another organization, The Main Directorate of the General Staff of the
Armed Forces of the Russian Federation, or in short—GRU. Out of these special
services, the GRU likely possesses the finest technological and operational
capabilities. Sharing the responsibility for cyber-espionage operations between
several groups (which is not rare) might cause problems such as
miscommunication, redundant work, duplicate targets, and ego.&lt;/p&gt;
&lt;p&gt;As briefly mentioned earlier, our research confirmed connections that were
previously found by other security vendors. Some of these connections were
proved before and others were only suspected. We are now able to back these
claims with code-based evidence, such as Industroyer – TeleBots code
connections discussed previously.&lt;/p&gt;
&lt;p&gt;Finally, we concluded our research into two tools that we are publicly sharing
with the research community. The Russian APT Map and the Russian APT Detector
are thoroughly described in previous chapters in this article.&lt;/p&gt;
&lt;h2&gt;Acknowledgments благодарности&lt;span class="hx:absolute hx:-mt-20" id="acknowledgments-благодарности"&gt;&lt;/span&gt;
&lt;a href="#acknowledgments-%d0%b1%d0%bb%d0%b0%d0%b3%d0%be%d0%b4%d0%b0%d1%80%d0%bd%d0%be%d1%81%d1%82%d0%b8" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We want to thank our team leaders, Mark Lechtik and Ari Eitan, for accompanying
us in this research, for helping us a lot and for always giving interesting and
important insights. We would also like to thank our colleagues from
&lt;a href="https://www.welivesecurity.com/"target="_blank" rel="noopener"&gt;ESET&lt;/a&gt; for providing some of the samples. And
last but not least is our colleague Paul Litvak, who helped us with completing
the APT Detector tool.&lt;/p&gt;</description></item><item><title>Technical Analysis: Pacha Group Competing against Rocke Group for Cryptocurrency Mining Foothold on the Cloud</title><link>https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/</link><pubDate>Thu, 09 May 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/</guid><description>
&lt;p&gt;Pacha Group is a crypto-mining threat actor we at Intezer discovered and
profiled in a &lt;a href="../../../2019/02/technical-analysis-pacha-group"&gt;blog post&lt;/a&gt;
published on February 28, 2019. This threat actor targeted Linux servers dating
back to September 2018 and implemented advanced evasion and persistence
techniques.&lt;/p&gt;
&lt;p&gt;We have continued to monitor this threat actor and new findings show that Pacha
Group is also targeting cloud-based environments and conducting great efforts
to disrupt other crypto-mining groups, namely
&lt;a href="https://unit42.paloaltonetworks.com/malware-used-by-rocke-group-evolves-to-evade-detection-by-cloud-security-products/"target="_blank" rel="noopener"&gt;Rocke Group&lt;/a&gt;
who is also known to target cloud environments.&lt;/p&gt;
&lt;p&gt;We believe that these findings are relevant within the context of bringing
awareness about cloud-native threats and our research may imply that cloud
environments are increasingly becoming a common target for adversaries.&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;In monitoring Pacha Group we have identified new, undetected Linux.GreedyAntd
variants that share code with previous variants.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Despite sharing nearly 30% of code with previous variants, detection rates of
the new Pacha Group variants are low:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The main malware infrastructure appears to be identical to previous Pacha Group
campaigns, although there is a distinguishable effort to detect and mitigate
Rocke Group’s implants. Rocke Group was first reported by
&lt;a href="https://blog.talosintelligence.com/2018/08/rocke-champion-of-monero-miners.html"target="_blank" rel="noopener"&gt;Cisco Talos&lt;/a&gt;
researchers and has deployed sophisticated crypto-mining campaigns in Linux
servers and cloud-based environments as reported by
&lt;a href="https://unit42.paloaltonetworks.com/malware-used-by-rocke-group-evolves-to-evade-detection-by-cloud-security-products/"target="_blank" rel="noopener"&gt;Palo Alto Unit 42&lt;/a&gt;.
The following image is a blacklist of miners in which Linux.GreedyAntd searches
to eradicate. We have recognized several file names in this blacklist known to
be used for Rocke Group’s implants:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, there are other strings within this file path blacklist which are
used to search for and disable cloud protection solutions, such as Alibaba
Server Guard Agent. Strings of malware
&lt;a href="https://www.reddit.com/r/linuxquestions/comments/bknurg/is_is_exploit_or_what/"target="_blank" rel="noopener"&gt;implants&lt;/a&gt;
known to have abused the
&lt;a href="https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html?_ga=2.116436864.700072651.1557244235-1322709726.1557244235"target="_blank" rel="noopener"&gt;Atlassian vulnerability&lt;/a&gt;
were also found. Rocke Group is known to hunt for similar security products and
to have
&lt;a href="https://community.atlassian.com/t5/Confluence-questions/How-come-my-confluence-installation-was-hacked-by-Kerberods/qaq-p/1054605#M141274"target="_blank" rel="noopener"&gt;abused&lt;/a&gt;
the same vulnerability.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Another interesting update in Pacha Group’s infrastructure in comparison to
previous campaigns is that further implants would only be able to be downloaded
from Pacha Group’s servers if the HTTP GET request was completed with a
specific User-Agent. In the following screenshot we can see how files can not
be downloaded unless the correct User-Agent is used:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In addition, Pacha Group’s component update seems to include a lightweight
user-mode rootkit known as Libprocesshider, which is an open source project
hosted on &lt;a href="https://github.com/gianlucaborello/libprocesshider"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt; and has
also been used by Rocke Group.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware updates &lt;code&gt;/etc/ld.preload&lt;/code&gt; to include the path of the dropped
library masquerading libconv.so, a unicode conversion library.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This shared object will export customized versions of readdir and readdir64
functions that will attempt to hide a process name from /proc filesystem of one
of the main components of the malware’s infrastructure, in charge to download
further implants in intervals along with enforcing process, file path and IP
blacklisting:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Along with process and file path blacklisting measures seen in previous
variants, we also observed that newer variants implement IP blacklisting using
an interesting technique.&lt;/p&gt;
&lt;p&gt;Right after process and file path black listing has been accomplished, we find
the following code:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Each of the IPs in the blacklist IP table is decoded and then added to the
system routing table with host scope via ioctl.&lt;/p&gt;
&lt;p&gt;This is more conveniently shown by observing the following system call trace:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When we check the routing table of a compromised system we see the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Each of the decoded IPs have been added to the routing table with host scope.
This implies that when any of these IPs will be requested, each request will be
routed back to the host to be resolved instead of redirecting them to the
gateway, causing a failure in the routing process.&lt;/p&gt;
&lt;p&gt;In the following screenshot we can see the effect of this methodology by using
the ping utility:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After analyzing the IP blacklist we discovered that some of these IPs, even
though they may not necessarily be malicious, are known to have been used by
Rocke Group in the past. As an example, systemten.org is in this blacklist and
it is known that Rocke Group has &lt;a href="https://imgur.com/a/H7YuWuj"target="_blank" rel="noopener"&gt;used this&lt;/a&gt;
domain for their crypto-mining operations. The following are some domains that
correspond to their hardcoded IPs in Linux.GreedyAntd’s blacklist that have
Rocke Group correlations:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig13.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;We have presented evidence that Pacha Group is targeting cloud-based
environments and being especially aggressive towards Rocke Group. We have based
this conclusion on the process blacklist used by Pacha Group and the newly
added IP blacklist which contains Rocke Group correlated artifacts.&lt;/p&gt;
&lt;p&gt;We have also provided a
&lt;a href="https://github.com/intezer/yara-rules/blob/master/GreedyAntd.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
in order to detect Pacha Group’s Linux.GreedyAntd implants based on reused code
among the implants.&lt;/p&gt;
&lt;p&gt;Cloud infrastructure is quickly becoming a common target for threat actors,
particularly on vulnerable Linux servers. Unfortunately the detection rates of
Linux-based malware remain low and the security community needs more awareness
in order to more effectively mitigate these 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;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;195.154.187[.]169
165.227.140[.]184
f46a9d2c3c9bfcc409534e0856f4614d6b42e792134dcf0f40df7295a777c879
d2e373c1341a28e18158272208a15decfa397640b6092b56158e0f52e4ff73a4
c098d5aeef316c3564b0b40a8a102147dae9c606fa92a2e2f0ad5c94cfe30222
42612f41befc57619646da5e91e7758dcc83cbaafbe5fdfa19d9f43a71f2504f
ce10e7a0fb517309b1e1141b44d3f9f7759e0f8889c0392774a5869f41006a3f
d94a6537adcea2f8ef3ed5ed41a548bc2b26b3acdeca9aaf6da4c933e7f47174
f83d75ab09634a7b818ef87c6509cca2c6f26f5f65b8d3448ebc86b52be62253
e5f6fbeb3981c9dfa126dc0a71a0aa41b56a09a89228659a7ea5f32aff4b2058&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;GreedyAntd Embedded IP Blacklist The following are IPs that the Pacha Group
attempts to block to prevent operation of other crypto-mining implants (notice
not to block these IPs. See the IPs to block in the above IOCs section):&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;139.99.120[.]73
47.95.85[.]22
62.210.75[.]99
113.55.8[.]24
62.210.75[.]99
42.56.76[.]104
198.204.231[.]250
47.90.213[.]21
116.62.232[.]226
134.209.104[.]20
198.12.156[.]218
207.148.76[.]229
188.165.254[.]85
58.56.187[.]66
89.35.39[.]78
37.139.22[.]136
37.44.212[.]223
54.36.137[.]146
139.99.120[.]50
37.120.131[.]220
104.20.209[.]21
198.12.156[.]218
34.196.173[.]143
34.193.88[.]221
35.168.52[.]211
104.248.4[.]162
130.61.54[.]136
139.99.120[.]50
198.12.156[.]218
166.62.38[.]167
185.193.125[.]146
132.148.148[.]79
188.165.254[.]85
104.20.208[.]21
37.187.95[.]110
158.69.25[.]62
104.31.93[.]26
104.25.140[.]10
60.191.25[.]101
104.248.53[.]213
60.191.13[.]119
104.130.210[.]206
193.56.28[.]207
37.187.95[.]110
89.35.39[.]78
81.4.122[.]134
37.44.212[.]223
148.251.133[.]246
52.41.214[.]241
52.25.124[.]181
54.68.226[.]153
136.243.89[.]164
104.20.209[.]21
176.9.2[.]144
37.59.43[.]136
78.46.89[.]102
37.59.45[.]174
91.121.2[.]76
176.9.53[.]68
37.59.55[.]60
178.63.48[.]196
37.187.154[.]79
37.59.44[.]93
78.46.91[.]134
37.59.54[.]205
23.175.0[.]142
104.140.244[.]186
136.243.102[.]157
5.254.96[.]150
51.15.56[.]161&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>