<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Botnet</title><link>https://research.intezer.com/tags/botnet/</link><description>Recent content in Botnet on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 24 Nov 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/botnet/index.xml" rel="self" type="application/rss+xml"/><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>A Storm is Brewing: IPStorm Now Has Linux Malware</title><link>https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/</link><pubDate>Thu, 01 Oct 2020 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/</guid><description>
&lt;h2&gt;UPDATE NOVEMBER 2023: IPStorm Infrastructure Dismantled by FBI&lt;span class="hx:absolute hx:-mt-20" id="update-november-2023-ipstorm-infrastructure-dismantled-by-fbi"&gt;&lt;/span&gt;
&lt;a href="#update-november-2023-ipstorm-infrastructure-dismantled-by-fbi" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The FBI today revealed US law enforcement&amp;rsquo;s dismantlement of a botnet proxy
network, along with a &lt;a href="https://www.justice.gov/usao-pr/pr/russian-and-moldovan-national-pleads-guilty-operating-illegal-botnet-proxy-service"target="_blank" rel="noopener"&gt;guilty plea&lt;/a&gt;
for the individual responsible for the botnet
infrastructure which was associated with the IPStorm malware. This achievement
is a significant milestone in ongoing efforts to combat cyber threats. The
research team at Intezer assisted in the FBI&amp;rsquo;s case, sharing our findings and
analysis about the new IPStorm malware variants and capabilities as it expanded
to infect Linux, Mac, and Android devices around the world.&lt;/p&gt;
&lt;h2&gt;A Storm is Brewing&lt;span class="hx:absolute hx:-mt-20" id="a-storm-is-brewing"&gt;&lt;/span&gt;
&lt;a href="#a-storm-is-brewing" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The development of cross-platform malware is not new, however, we continue to
observe a number of malware that were previously documented only targeting
Windows now
&lt;a href="https://intezer.com/blog/looking-back-on-the-last-decade-of-linux-apt-attacks/?utm_campaign=research-blog&amp;amp;utm_content=a-storm-is-brewing-ipstorm-now-has-linux-malware&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;targeting the Linux platform&lt;/a&gt;.
One of these threats is IPStorm.&lt;/p&gt;
&lt;p&gt;In May 2019, researchers from
&lt;a href="https://www.anomali.com/blog/the-interplanetary-storm-new-malware-in-wild-using-interplanetary-file-systems-ipfs-p2p-network"target="_blank" rel="noopener"&gt;Anomali&lt;/a&gt;
discovered a new Golang malware targeting Windows, which they dubbed
&lt;strong&gt;IPStorm&lt;/strong&gt; (InterPlanetary Storm). IPStorm is a botnet that abuses a
legitimate Peer-to-peer (p2p) network called InterPlanetary File System (IPFS)
as a means to obscure malicious traffic. It was found the malware eventually
allowed attackers to execute arbitrary PowerShell commands on the victim&amp;rsquo;s
Windows machine.&lt;/p&gt;
&lt;p&gt;Our research team recently identified new Linux variants of IPStorm targeting
various Linux architectures (ARM, AMD64, Intel 80386) and platforms (servers,
Android, IoT). We have also detected a macOS variant. The macOS variant and
most of the Linux samples are fully undetected in VirusTotal at the time of
this publication. IPStorm is written in Golang, which enabled Intezer to detect
cross-platform code connections between the Linux samples and the Windows
malware first reported by Anomali.&lt;/p&gt;
&lt;p&gt;The Linux variant has additional features over the documented Windows version,
such as using &lt;strong&gt;SSH brute-force&lt;/strong&gt; as a means to spread to additional victims
and &lt;strong&gt;fraudulent network activity&lt;/strong&gt; abusing
&lt;a href="https://store.steampowered.com/"target="_blank" rel="noopener"&gt;Steam&lt;/a&gt; gaming and advertising platforms. The
Linux variant has adjusted some features in order to account for the
fundamental differences that exist between this operating system and Windows.&lt;/p&gt;
&lt;p&gt;In this post, we will present a code relations graph between the IPStorm
Windows and Linux samples, analyze one of the Linux variant&amp;rsquo;s behavior, and
compare its features and capabilities to the old Windows samples to track its
evolution. Following we will take a deeper dive into some notable features and
explain how to respond to this threat.&lt;/p&gt;
&lt;h2&gt;Technical Analysis of IPStorm&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis-of-ipstorm"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis-of-ipstorm" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Most of the IPStorm Linux samples were fully undetected before we submitted
them for genetic analysis in Intezer.&lt;/p&gt;
&lt;p&gt;In this post, we will focus on the
&lt;code&gt;658638c6bef52e03e6aea4b6c1b2b3b8d81ad40144b56b2122d96e6957c33117&lt;/code&gt; Linux
sample.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig1.png" title="658638c6bef52e03e6aea4b6c1b2b3b8d81ad40144b56b2122d96e6957c33117 sample undetected in VirusTotal." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;658638c6bef52e03e6aea4b6c1b2b3b8d81ad40144b56b2122d96e6957c33117 sample undetected in VirusTotal.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Because IPStorm is written in Golang, not only can we observe strong code
connections between the different Linux variants, we can also identify
connections to IPStorm&amp;rsquo;s Windows samples uploaded to Intezer in 2019.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig2.png" title="Samples analyzed and classified by Intezer in the IPStorm malware family." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Samples analyzed and classified by Intezer in the IPStorm malware family.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The following map emphasizes code similarities between the different versions
and operating systems. The nodes represent the individual samples and the lines
are the code relations between them. All samples are linked to each other in
some way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IPStorm PE files from 2019&lt;/li&gt;
&lt;li&gt;IPStorm ELF files from 2020&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig3.png" title="Map showing IPStorm code similarities between different samples analyzed. Nodes represent the individual samples and the lines show code relations between them." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Map showing IPStorm code similarities between different samples analyzed. Nodes represent the individual samples and the lines show code relations between them.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The graph depicts three main clusters, with each cluster containing samples
that have strong code connections between them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PE, intel 80386 architecture&lt;/li&gt;
&lt;li&gt;ELF, intel 80386 architecture&lt;/li&gt;
&lt;li&gt;ELF, amd x86-64 architecture&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You will also notice shared code exists between the ELF clusters and the ELF
and PE intel 80386 architecture clusters.&lt;/p&gt;
&lt;p&gt;You can use the &lt;code&gt;cluster_directory.py&lt;/code&gt; API script in this GitHub
&lt;a href="https://github.com/intezer/analyze-scripts"target="_blank" rel="noopener"&gt;repository&lt;/a&gt; to create a cluster
graph of your own. IPStorm Linux Variant Behavior Flow&lt;/p&gt;
&lt;p&gt;The Linux variant symbols are stripped. Using the plugin
&lt;a href="https://github.com/sibears/IDAGolangHelper"target="_blank" rel="noopener"&gt;IDAGolangHelper&lt;/a&gt; we retrieved the
file&amp;rsquo;s symbols and saw exactly which packages the malware contains. A package
in Go is a bundle of Go source files which make up a specific functionality.
Every Go source file belongs to a package.&lt;/p&gt;
&lt;p&gt;The Linux malware&amp;rsquo;s main logic is implemented in a package called
&lt;code&gt;storm_starter&lt;/code&gt;, a new package that was not in the Windows version. All logic
was implemented via the main function in the Windows version.&lt;/p&gt;
&lt;p&gt;Both versions have similarities in the way the main flow is implemented,
however, the Linux instances have additional features and adjusted some logic
due to the differences that exist between the two operating systems.&lt;/p&gt;
&lt;p&gt;The Linux iteration starts by disabling the out-of-memory (OOM) killer in order
to prevent it from terminating the malware. It then proceeds to check for any
processes related to antiviruses or other security tools that may prevent
further execution of the malware. Next the malware generates and saves pubkeys
in a file called &lt;code&gt;strom.key&lt;/code&gt;. The location of where this key is saved is based
on privileges that the malware was executed with. If the malware was executed
with root privileges, the key will be stored at &lt;code&gt;/etc/storm.key&lt;/code&gt;. Otherwise, it
will be saved at &lt;code&gt;/tmp/storm.key&lt;/code&gt;. The malware then tries to establish
connections with other nodes in the peer to peer network.&lt;/p&gt;
&lt;p&gt;The malware sends HTTP requests to different services such as
&lt;code&gt;diagnostic[.]opendns[.]com/myip&lt;/code&gt;, &lt;code&gt;ifconfig[.]io/ip&lt;/code&gt;, and
&lt;code&gt;myip[.]dnsomatic[.]com&lt;/code&gt; to receive the external IP address of the victim
server. If the malware is running as root, it will create a service under
systemd to achieve persistence and copy itself to /usr/bin/storm. Otherwise, it
will be copied to /tmp/storm. The malware will then relaunch itself from the
new installation path.&lt;/p&gt;
&lt;p&gt;This new process is responsible for executing the main features of the IPStorm
malware, including reverse shell, which was previously seen in the Windows
variant—maintaining connection with other peers in the P2P network and a new
feature for spreading the malware to other victims.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig4.png" title="IPStorm Linux output non-privileged user." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;IPStorm Linux output non-privileged user.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Linux vs. Windows Comparison&lt;span class="hx:absolute hx:-mt-20" id="linux-vs-windows-comparison"&gt;&lt;/span&gt;
&lt;a href="#linux-vs-windows-comparison" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Comparing IPStorm Linux version &lt;code&gt;0.2.05a&lt;/code&gt; to Windows version &lt;code&gt;0.0.2m&lt;/code&gt;, it
became clear the developer added features and altered existing ones to attack
Linux platforms.&lt;/p&gt;
&lt;h3&gt;Packages Comparison&lt;span class="hx:absolute hx:-mt-20" id="packages-comparison"&gt;&lt;/span&gt;
&lt;a href="#packages-comparison" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The malware is composed of different Golang packages with each package
providing a different feature. The following table categorizes package
comparisons between the two versions:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Golang Package&lt;/th&gt;
&lt;th&gt;Functionality&lt;/th&gt;
&lt;th&gt;Linux Version Version 0.2.05a (2020)&lt;/th&gt;
&lt;th&gt;Windows Version Version 0.0.2m (2019)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;scan_tools&lt;/td&gt;
&lt;td&gt;Scans for potential victims&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;web_api_client&lt;/td&gt;
&lt;td&gt;Handles HTTP requests and responses&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;p2p (part of the web API)&lt;/td&gt;
&lt;td&gt;HTTP over P2P&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;reque_client&lt;/td&gt;
&lt;td&gt;Handles the communication of peers in the network&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;commander&lt;/td&gt;
&lt;td&gt;Handles HTTP requests&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;starter&lt;/td&gt;
&lt;td&gt;Implements the main logic of the malware (basically the &amp;ldquo;main function&amp;rdquo;)&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;malware-guard&lt;/td&gt;
&lt;td&gt;Antivirus evasion&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;avbypass&lt;/td&gt;
&lt;td&gt;Antivirus evasion&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;backshell&lt;/td&gt;
&lt;td&gt;In charge of the reverse shell&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ddb&lt;/td&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;filetransfer&lt;/td&gt;
&lt;td&gt;Persistence and managing file transfering to other peers&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;logging&lt;/td&gt;
&lt;td&gt;Output log&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;node&lt;/td&gt;
&lt;td&gt;Responsible for advertising the node, getting the external IP, and maintaining connection with other nodes.&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;powershell&lt;/td&gt;
&lt;td&gt;In Windows, in charge of the powershell artifact in the backdoor. In the Linux variant, the package has only one function copied from the Windows version and is used for achieving reverse shell. + util Utility functions&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ddbinterface&lt;/td&gt;
&lt;td&gt;DB functions&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;proxy&lt;/td&gt;
&lt;td&gt;Implements Socks5 Proxy&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: We compared Linux version 0.2.05a to Windows version 0.0.2m which was
analyzed in Anomali&amp;rsquo;s report. However, the malware is frequently being
updated and we have observed multiple different versions since, so
functionalities may differ between them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Features Comparison Scanning tools&lt;span class="hx:absolute hx:-mt-20" id="features-comparison-scanning-tools"&gt;&lt;/span&gt;
&lt;a href="#features-comparison-scanning-tools" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Android and SSH brute-force&lt;span class="hx:absolute hx:-mt-20" id="android-and-ssh-brute-force"&gt;&lt;/span&gt;
&lt;a href="#android-and-ssh-brute-force" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The Linux variant attempts to spread and infect other victims on the internet
by using SSH brute-force. Once a connection is established, the malware will
check if the victim server is a honeypot by comparing the hostname of the
attacked server to the string &amp;ldquo;svr04&amp;rdquo;, which is the default hostname of Cowrie
SSH honeypot. If the malware identifies a honeypot it will close the
connection, otherwise it will proceed to download the payload and infect the
server.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig5.png" title="Validation of whether the server is a honeypot or not." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Validation of whether the server is a honeypot or not.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another spreading method that is unique to the Linux version is searching for
potential Android victims. The malware checks for devices connected with ADB
(Android Debug Bridge) to the victim node. Once identified, it will upload an
Android version of IPStorm to the device, which was previously downloaded from
the P2P network.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig6.png" title="Screen capture from the log of the storm service showing the downloaded file." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Screen capture from the log of the storm service showing the downloaded file.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Antivirus Evasion&lt;span class="hx:absolute hx:-mt-20" id="antivirus-evasion"&gt;&lt;/span&gt;
&lt;a href="#antivirus-evasion" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both IPStorm Windows and Linux versions implement features related to detection
evasion and each variant uses a different technique. In the Linux version, the
package in charge of this logic is called &lt;code&gt;storm_malware_guard&lt;/code&gt;. The file
iterates through all current running processes in order to find and terminate
ones that might detect the malware&amp;rsquo;s activity.&lt;/p&gt;
&lt;p&gt;The function under the &lt;code&gt;storm_malware_guard&lt;/code&gt; package that implements this
technique is called &lt;code&gt;KillSuspiciousProcesses&lt;/code&gt;. Other functions in this package
are responsible for obtaining information about the CPU and memory usage,
number of I/O ports, and functions that return information about processes and
threads.&lt;/p&gt;
&lt;p&gt;In the Windows version, the AV evasion logic is implemented in a package called
&lt;code&gt;avbypass&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This technique is based on random sleep times and multiple function calls. The
purpose of this method is to make tracing the original process harder for
Antivirus solutions.&lt;/p&gt;
&lt;p&gt;It appears that due to the different operating systems, each IPStorm version
has its own way to evade detection.&lt;/p&gt;
&lt;h3&gt;Reverse Shell&lt;span class="hx:absolute hx:-mt-20" id="reverse-shell"&gt;&lt;/span&gt;
&lt;a href="#reverse-shell" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both IPStorm versions use the name backshell to refer to the feature of reverse
shell.&lt;/p&gt;
&lt;p&gt;The backshell functions of the Linux variant are identical to those of the
Windows variant.&lt;/p&gt;
&lt;p&gt;The Windows variant has a package called &lt;code&gt;powershell&lt;/code&gt; which contains functions
for achieving reverse shell. The same package is present in the Linux variant
but it contains only one function:
&lt;code&gt;storm_powershell__ptr_Backend_StartProcess&lt;/code&gt;. The function is used to get a
reverse shell on the infected system.&lt;/p&gt;
&lt;p&gt;The implementation of the reverse shell is a clear example of the code reuse
connections between the two IPStorm variants. The screengrabs below demonstrate
changes in the file names and the identical function names found in the two
versions:&lt;/p&gt;
&lt;h4&gt;Linux&lt;span class="hx:absolute hx:-mt-20" id="linux"&gt;&lt;/span&gt;
&lt;a href="#linux" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig7.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h4&gt;Windows&lt;span class="hx:absolute hx:-mt-20" id="windows"&gt;&lt;/span&gt;
&lt;a href="#windows" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig9.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;Persistence&lt;span class="hx:absolute hx:-mt-20" id="persistence"&gt;&lt;/span&gt;
&lt;a href="#persistence" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The Linux version will attempt to gain persistence only if it was executed with
root privileges. The Windows version, on the other hand, will always look to
gain persistence. It is evident that each variant of the malware, Linux and
Windows, uses a different technique to gain persistence since the operating
systems they target are fundamentally different.&lt;/p&gt;
&lt;p&gt;The Windows variant achieves persistence by copying itself to a random location
and adding the program to the:
&lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Run&lt;/code&gt; registry key.&lt;/p&gt;
&lt;p&gt;The Linux version achieves persistence by creating a &lt;code&gt;systemd&lt;/code&gt; service under
&lt;code&gt;/etc/systemd/system/storm.service&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig11.png" title="/etc/systemd/system/storm.service" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;/etc/systemd/system/storm.service&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig12.png" title="The function that archives persistence in the Linux variant." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;The function that archives persistence in the Linux variant.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another difference is the location to which the file is copied. The Windows
variant uses random file paths while the Linux version uses fixed paths.&lt;/p&gt;
&lt;h3&gt;Network Traffic&lt;span class="hx:absolute hx:-mt-20" id="network-traffic"&gt;&lt;/span&gt;
&lt;a href="#network-traffic" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;On top of creating a reverse shell, we have detected that IPStorm&amp;rsquo;s Linux
variant takes advantage of its being widespread to perform different fraudulent
activity in the background, abusing gaming and ads monetization. Because it&amp;rsquo;s a
botnet, the malware utilizes the large amount of requests from different
trusted sources, thus not being blocked nor traceable. This activity was not
observed in the Windows variant.&lt;/p&gt;
&lt;h4&gt;Steam Gaming Fraud&lt;span class="hx:absolute hx:-mt-20" id="steam-gaming-fraud"&gt;&lt;/span&gt;
&lt;a href="#steam-gaming-fraud" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Steam is a popular gaming service from Valve Corporation and is used by
hundreds of millions users worldwide. It also provides an API for developers
who want to use Steam data on their own websites.&lt;/p&gt;
&lt;p&gt;As part of the monetization process for game developers, Steam users can buy
and sell different items such as equipment, skins, and other in-game elements.
This platform is so popular that it has become a hot target for cybercriminals.
A known method used by attackers is creating phishing websites to lure users to
submit their Steam login credentials. With access to a user&amp;rsquo;s credentials the
attacker has full access to the the account, API key included.&lt;/p&gt;
&lt;p&gt;We noticed IPStorm generates a large amount of traffic to Steam&amp;rsquo;s API, querying
data pertaining to various Steam users and using multiple valid API keys.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We suspect these are stolen accounts that are being monitored as part of a fake
trade scam.
&lt;a href="https://www.skinwallet.com/csgo/how-to-avoid-steam-api-key-scam/"target="_blank" rel="noopener"&gt;Browse here&lt;/a&gt;
for more information about this scam.&lt;/p&gt;
&lt;h4&gt;Ad Fraud&lt;span class="hx:absolute hx:-mt-20" id="ad-fraud"&gt;&lt;/span&gt;
&lt;a href="#ad-fraud" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The malware generates requests which imitate fake advertisements clicks. All
the ads we have traced are related to pornographic websites. The malware crawls
through different predefined sites, searches for advertisement iframes, and
imitates a user &amp;ldquo;click&amp;rdquo; by browsing through the iframes.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig14.png" title="Example of a request the malware generates to an ad platform." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Example of a request the malware generates to an ad platform.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig15.png" title="Websites the malware crawls through." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Websites the malware crawls through.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;IPStorm Detection and Response&lt;span class="hx:absolute hx:-mt-20" id="ipstorm-detection-and-response"&gt;&lt;/span&gt;
&lt;a href="#ipstorm-detection-and-response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Compromised System Detection&lt;span class="hx:absolute hx:-mt-20" id="compromised-system-detection"&gt;&lt;/span&gt;
&lt;a href="#compromised-system-detection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;You can take the following steps to check if your system has been attacked by
the IPStorm malware.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check if the process of IPStorm is running on your system.
&lt;ul&gt;
&lt;li&gt;Run: &lt;code&gt;pstree | grep storm&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;IPStorm will usually run with multiple threads. &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig16.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check the services that run on your system, since if the malware was executed
with root privileges it would create a service for persistence.
&lt;ul&gt;
&lt;li&gt;Run: &lt;code&gt;sudo systemctl status strom.service&lt;/code&gt; &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig17.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check if IPStorm&amp;rsquo;s files exist in your system.
&lt;ul&gt;
&lt;li&gt;Run: &lt;code&gt;sudo find / -name &amp;quot;storm*&amp;quot; -type f&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;In case of a non-root execution the output will look similar to the
screen capture below &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;li&gt;If the malware was executed with root privileges, the output will look
similar to the screen capture below: &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Check the open ports on your system and the processes that are associated
with them.
&lt;ul&gt;
&lt;li&gt;Run: &lt;code&gt;sudo ss -tulpn&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;In the screen capture below a number of processes that belong to the
IPStorm malware listen on specific ports. &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Use freely the Intezer Protect community beta to identify which process is
running on your system. The screen capture below is taken from the alert of
IPStorm executed on a server. The info provided by the system includes the
malware family name, full path of the executable, the process ID, execution
time, and a link to Intezer where you can observe code reuse prevalent in
this malware. &lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig21.png" alt="" loading="lazy" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;How to Terminate IPStorm on a Compromised System&lt;span class="hx:absolute hx:-mt-20" id="how-to-terminate-ipstorm-on-a-compromised-system"&gt;&lt;/span&gt;
&lt;a href="#how-to-terminate-ipstorm-on-a-compromised-system" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;If the malware runs as a service you should stop the service by executing the
command: &lt;code&gt;sudo systemctl stop storm.service&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Delete all the files that are related to the IPStorm malware. The file paths
are mentioned in the previous section.&lt;/li&gt;
&lt;li&gt;Kill the process by running: &lt;code&gt;sudo pkill -9 storm&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Response&lt;span class="hx:absolute hx:-mt-20" id="response"&gt;&lt;/span&gt;
&lt;a href="#response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;We are providing a
&lt;a href="https://github.com/intezer/yara-rules/blob/master/IPStorm.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
intended to be run against in-memory artifacts in order to be able to detect
these implants.&lt;/p&gt;
&lt;h4&gt;System Security Hardening&lt;span class="hx:absolute hx:-mt-20" id="system-security-hardening"&gt;&lt;/span&gt;
&lt;a href="#system-security-hardening" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Make sure your SSH connection is secured. Use a key instead of a password or
use multi-factor authentication.
&lt;a href="https://www.techrepublic.com/article/5-quick-ssh-hardening-tips/"target="_blank" rel="noopener"&gt;Browse here&lt;/a&gt;
for more tips about SSH hardening.&lt;/li&gt;
&lt;li&gt;Make sure your system is updated to the latest software and aligned with most
recent security best practices.&lt;/li&gt;
&lt;li&gt;Use a runtime cloud workload protection solution. Protect provides full
runtime visibility over the code in your system and alerts on any suspicious
or unauthorized code that deviates from the secure baseline.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Summary&lt;span class="hx:absolute hx:-mt-20" id="summary"&gt;&lt;/span&gt;
&lt;a href="#summary" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;IPStorm now with Linux malware is the latest example of a cross-platform
malware developed in Golang. Platforms that are compromised by IPStorm are not
only exposed to a backdoor to their services but are also added to the IPStorm
Botnet which attempts to spread to other victims. The attackers behind IPStorm
are very active evidenced by the frequent release of updated versions with new
features and improvements, as well as the expansion to several different
platforms and architectures.&lt;/p&gt;
&lt;p&gt;IPStorm is part of a growing list of Golang ELF malware that have been spotted
attacking live servers in the past six months alone, together with
&lt;a href="../../../2020/05/kaiji-new-chinese-linux-malware-turning-to-golang"&gt;Kaiji&lt;/a&gt;,
&lt;a href="https://blog.aquasec.com/threat-alert-kinsing-malware-container-vulnerability"target="_blank" rel="noopener"&gt;Kinsing&lt;/a&gt;,
and
&lt;a href="https://www.guardicore.com/2020/08/fritzfrog-p2p-botnet-infects-ssh-servers/"target="_blank" rel="noopener"&gt;FritzFrog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We want to give a special thanks to Paul Litvak and Michael Kajiloti for their
help contributing to this analysis.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Both IPStorm Linux and Windows samples are indexed in Intezer and you can
detect this and other cross-platform malware with the code reuse feature for
Golang, just by uploading a file or hash to the system. Below is the analysis
of one of the Linux samples.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/10/a-storm-is-brewing-ipstorm-now-has-linux-malware/images/fig22.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Linux&lt;span class="hx:absolute hx:-mt-20" id="linux-1"&gt;&lt;/span&gt;
&lt;a href="#linux-1" 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;3aff4695c73709e2e0e55665c4850aa45064723a2c83e75325b27e77ec5f6d97
b80346c4d31d77fba9427024d34af2f43e64a5272b5bbef28c6bf045a06143ff
d233c37f2d49badbf53d054bce7fb8e787c9973067e8dcd79835d7816aacfa43
658638c6bef52e03e6aea4b6c1b2b3b8d81ad40144b56b2122d96e6957c33117
bfb69eadee1918a9402478c76dd15696bbac3e3e3e57c9a94c7d51e594b8c657
64abc2cf5866e932b0731a6deb487aa3d9756724250de26bac2fb930cd478dc0
52f215521ba59cb6a51314bd1527f1c540ffc04df924ad971ca2160405879778
aa7639b11f7c852005110e5ac34c9a2c94c562bcc95dbf6f60a1a7192cf8ea77
cae8a782765dd0f97e7a812a245cc5b94b3179ced9c8181d0fda13978c9f17be
5103133574615fb49f6a94607540644689be017740d17005bc08b26be9485aa7
08bf31862577567a56bf3be6425f1ddf4ac90914efd883a75a5a53dbcabd28a2
984c5e980fb8a5b7bbc673f923f22ddf06c5dd89fcd0acf774d79d4d193b44c8
591770835066958e912ceb445bd865e961ac946e8cf70ced9f0bd75c851d9478
69ea7bcf3da16d968e6104745c1f015f6371c093188f1061a311a6385985b45b
fbd5e48ee691df949e0dd3687755c80cc5b9d1a1a89e7dc486694370697de893
c247b3c07b4bf13da67c51d5834193d128c45c7e41214096090b5d2610313783
f4f1fb65df80666fe67b22b84d9d8f967449d1249c33ad97f4305784fa41e747
ef226de8cc53e59c9431838085f3bbd1b8a32f7cc135682033a3fdba19a0ee97
dfeecdd23f28f80e42e58c87c9a4858648964b3100dfb899c61b54aed7856cf7
db9c95bdc4247ff6cdaf8a8e47b4add21a730461d8f6e2693136aecd346b3fb5
b4c75e1d94bc4c8affd6d9f433585ace2738772e6a04403ab67cce3df9574068
b07c2dfb4c57175446b6188bb4b1722272f63a301f18c5f46ee6401347894fea
a5468b6130d90bc74cf8e458297f6d4c7fc42b87184623aefd535bca658542ed
7c41de95313dc98a3fc4f6fe3910759c3561743dacc629dab11e754290f8c7aa
7b044b8eddd20d8e1c7d499a6c34b1bc373f5fe9d59bab7b4e3a341a5f4ce0b5
79ec318a968679f94d2ab0ba15daaeeb71406d2f744eb0cd1b314c4bb403114d
52b081dbaafbbae8ad812f9c50a1a5f7d8b0850b3c6dc69eccb3322f34286c2e
50406ec7fa22c78e9b14da4ccc127a899db21f7a23b1916ba432900716e0db3d
1d0e003ee653d1a7b80ff5e69c33689af04e45fc836a29e0853219dd100fd534
16bcb323bfb464f7b1fcfb7530ecb06948305d8de658868d9c3c3c31f63146d4&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;macOS&lt;span class="hx:absolute hx:-mt-20" id="macos"&gt;&lt;/span&gt;
&lt;a href="#macos" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/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;522a5015d4d11833ead6d88d4405c0f4119ff29b1f64b226c464e958f03e1434&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>Kaiji: New Chinese Linux malware turning to Golang</title><link>https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/</link><pubDate>Mon, 04 May 2020 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/</guid><description>
&lt;p&gt;It is not often that you see a botnet&amp;rsquo;s tooling written from scratch. The
Internet of things (IoT) botnet ecosystem is relatively well-documented by
security specialists. New threat actors are generally discovered quickly due to
the inherent noise caused by DDoS operations, both in terms of infecting new
machines and conducting operations. Simply, it is difficult to hide such overt
activities. Most DDoS actors do not invest resources in creating custom
tooling, unless they require specific capabilities, and resort to using
well-known botnet implants (e.g. Mirai, BillGates).&lt;/p&gt;
&lt;p&gt;In late April we identified a new botnet campaign with definitive Chinese
origins, targeting servers and IoT devices via SSH brute forcing. While most
attackers derive their implants from popular and well-tested sources such as
open source (e.g., Mirai) or blackmarket toolsets (e.g., BillGates), this
botnet utilizes its own custom implant, which
&lt;a href="https://twitter.com/malwaremustd1e/status/1256977666084761602"target="_blank" rel="noopener"&gt;MalwareMustDie&lt;/a&gt;
named Kaiji based on one of the function names. The botnet was built from
scratch using the Golang programming language, which is rare in the IoT botnet
landscape.&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;Kaiji spreads exclusively via SSH brute forcing by targeting the root user
only. Accessing root is important to its operation since some DDoS attacks are
only available via crafting custom network packets. In Linux, custom network
packets are only given to a privileged user such as root.&lt;/p&gt;
&lt;p&gt;Once a SSH connection is established, a bash script is executed which sets up
the environment for the malware:&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;/usr/bin/lib&lt;/code&gt; directory is created and then Kaiji is installed under the
filename &amp;rsquo;netstat&amp;rsquo;, &amp;lsquo;ps&amp;rsquo;, &amp;rsquo;ls&amp;rsquo;, or some other system tool name.&lt;/p&gt;
&lt;p&gt;Kaiji has simple features. It consists of an arsenal of multiple DDoS attacks
such as ipspoof and synack attacks, an ssh bruteforcer module to continue the
spread, and another ssh spreader which relies on hijacking local SSH keys to
infect known hosts which the server has connected to in the past.&lt;/p&gt;
&lt;p&gt;Despite the Kaiji file being stripped, we were able to restore function names
using &lt;a href="https://github.com/sibears/IDAGolangHelper"target="_blank" rel="noopener"&gt;IDAGolangHelper&lt;/a&gt;. This
technique works by retrieving function definitions embedded within the Golang
binary which are not removed by the strip command.&lt;/p&gt;
&lt;p&gt;Once the malware is executed, it copies itself to &lt;code&gt;/tmp/seeintlog&lt;/code&gt; and
launches a second instance which commences its malicious operations. Each
operation is implemented within its own goroutine:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;There exist 13 central goroutines which are important for the implant&amp;rsquo;s
operation. Many of these functions are named in an English representation of
Chinese words. We have highlighted the most interesting functions and added a
translation from Chinese to relevant functions:&lt;/p&gt;
&lt;h3&gt;doLink routine&lt;span class="hx:absolute hx:-mt-20" id="dolink-routine"&gt;&lt;/span&gt;
&lt;a href="#dolink-routine" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Decrypt C2 addresses, register the newly infected server to one of the command
servers and launch the doTask and RotKit goroutines.&lt;/p&gt;
&lt;p&gt;Incidentally, some of the C2 addresses are decrypted through a chain of three
encryption schemes, while another C2 address is simply encoded in base64:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig2.png" title="C2 base64 decoding" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;C2 base64 decoding&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig3.png" title="C2 decryption" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;C2 decryption&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The binary contained four command server hostnames, two of which were resolved
to localhost since they were registered. The only hostname which worked was
operational for two weeks before failing to respond.&lt;/p&gt;
&lt;h3&gt;main_doTask&lt;span class="hx:absolute hx:-mt-20" id="main_dotask"&gt;&lt;/span&gt;
&lt;a href="#main_dotask" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Fetches commands from the C2. These include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DDoS instructions&lt;/li&gt;
&lt;li&gt;SSH bruteforce instructions, including host range and a password to attempt
login&lt;/li&gt;
&lt;li&gt;Run shell command&lt;/li&gt;
&lt;li&gt;Replace C2 servers&lt;/li&gt;
&lt;li&gt;Delete itself and remove all persistence&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For DDoS operations, a target and an attack technique are retrieved.&lt;/p&gt;
&lt;p&gt;Attacks include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two TCPFlood implementations (one with raw sockets)&lt;/li&gt;
&lt;li&gt;Two UDPFlood implementations (one with raw sockets)&lt;/li&gt;
&lt;li&gt;IPSpoof attack&lt;/li&gt;
&lt;li&gt;SYNACK attack&lt;/li&gt;
&lt;li&gt;SYN attack&lt;/li&gt;
&lt;li&gt;ACK attack&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;ddos_Rotkit&lt;span class="hx:absolute hx:-mt-20" id="ddos_rotkit"&gt;&lt;/span&gt;
&lt;a href="#ddos_rotkit" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Tries to connect to known hosts through existing SSH RSA keys or IPs found in
bash history:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;main_runkshell&lt;span class="hx:absolute hx:-mt-20" id="main_runkshell"&gt;&lt;/span&gt;
&lt;a href="#main_runkshell" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Install persistence through rc.d and Systemd services:&lt;/p&gt;
&lt;p&gt;Systemd (&lt;code&gt;/etc/systemd/system/linux.service&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;rc.d (&lt;code&gt;/etc/rc.d/init.d/linux_kill&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig6.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;main_runghost&lt;span class="hx:absolute hx:-mt-20" id="main_runghost"&gt;&lt;/span&gt;
&lt;a href="#main_runghost" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Install persistence through &lt;code&gt;/etc/profile.d&lt;/code&gt; (/etc/profile.d/linux.sh)&lt;/p&gt;
&lt;h3&gt;main_rundingshi (漢字: run timing)&lt;span class="hx:absolute hx:-mt-20" id="main_rundingshi-漢字-run-timing"&gt;&lt;/span&gt;
&lt;a href="#main_rundingshi-%e6%bc%a2%e5%ad%97-run-timing" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Install persistence through crontab&lt;/p&gt;
&lt;h3&gt;main_runganran (漢字: run infection)&lt;span class="hx:absolute hx:-mt-20" id="main_runganran-漢字-run-infection"&gt;&lt;/span&gt;
&lt;a href="#main_runganran-%e6%bc%a2%e5%ad%97-run-infection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Another persistence technique, backdoor the SSH init script &lt;code&gt;/etc/init.d/ssh&lt;/code&gt;
to call the rootkit on startup.&lt;/p&gt;
&lt;h3&gt;main_runshouhu (漢字: run surgery)&lt;span class="hx:absolute hx:-mt-20" id="main_runshouhu-漢字-run-surgery"&gt;&lt;/span&gt;
&lt;a href="#main_runshouhu-%e6%bc%a2%e5%ad%97-run-surgery" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Copy the rootkit to &lt;code&gt;/etc/32679&lt;/code&gt; and run it every 30 seconds&lt;/p&gt;
&lt;h3&gt;main_runkaiji (漢字: run boot)&lt;span class="hx:absolute hx:-mt-20" id="main_runkaiji-漢字-run-boot"&gt;&lt;/span&gt;
&lt;a href="#main_runkaiji-%e6%bc%a2%e5%ad%97-run-boot" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Install more persistence init.d files, e.g.: &lt;code&gt;/etc/init.d/boot.local&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;ddos_rdemokill&lt;span class="hx:absolute hx:-mt-20" id="ddos_rdemokill"&gt;&lt;/span&gt;
&lt;a href="#ddos_rdemokill" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Check the CPU usage machine periodically and kill if CPU usage exceeds 85%.
This can inadvertently kill unrelated processes. Interestingly, this function
refers to the rootkit as a demo&lt;/p&gt;
&lt;h3&gt;Dynamic Analysis&lt;span class="hx:absolute hx:-mt-20" id="dynamic-analysis"&gt;&lt;/span&gt;
&lt;a href="#dynamic-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In our own sandbox we observed that the rootkit tends to invoke itself too many
times, leaving the machine gasping for memory:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This, together with the fact that the C2 was operational only temporarily, and
the presence of a &amp;lsquo;demo&amp;rsquo; string, led us to believe that this is an early
version still in testing.&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;It is rare to see a botnet written from scratch, considering the tools readily
available to attackers in blackmarket forums and open source projects. In this
post we have uncovered a new DDoS operation in its early stages that was
written from scratch. This is another confirmation of an interesting trajectory
noted by vendors
&lt;a href="https://unit42.paloaltonetworks.com/the-gopher-in-the-room-analysis-of-golang-malware-in-the-wild/"target="_blank" rel="noopener"&gt;such as Palo Alto&lt;/a&gt;
that malware developers are turning to modern languages such as Golang for
their operations.&lt;/p&gt;
&lt;p&gt;The Kaiji samples are now
&lt;a href="https://analyze.intezer.com/files/9f090a241eec74a69e06a5ffed876c7a37a2ff31e171924673b6bb5f1552814c?utm_campaign=research-blog&amp;amp;utm_content=kaiji-new-chinese-linux-malware-turning-to-golang&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;indexed in Intezer Analyze&lt;/a&gt;.
Powered by our new Golang cross platform code connections, users will be able
to easily spot if this threat actor switches to Windows.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/05/kaiji-new-chinese-linux-malware-turning-to-golang/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;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;4e8d4338cd3b20cb027a8daf108c654c10843e549c3f3da6646ac2bb8ffbe24d
9198853b8713560503a4b76d9b854722183a94f6e9b2a46c06cd2865ced329f7
98aee62701d3a8a75aa19028437bc2d1156eb9bfc08661c25db5c2e26e364dca
0ed0a9b9ce741934f8c7368cdf3499b2b60d866f7cc7669f65d0783f3d7e98f7
f4a64ab3ffc0b4a94fd07a55565f24915b7a1aaec58454df5e47d8f8a2eec22a
9f090a241eec74a69e06a5ffed876c7a37a2ff31e171924673b6bb5f1552814c
370efd28a8c7ca50275957b47774d753aabb6d7c504f0b81a90c7f96c591ae97
357acbacdb9069b8484f4fdead1aa946e2eb4a505583058f91f40903569fe3f3
cu.versiondat[.]xyz
1.versionday[.]xyz
www.aresboot[.]xyz
www.6x66[.]com
www.2s11[.]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;</description></item><item><title>HiddenWasp Malware Stings Targeted Linux Systems</title><link>https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/</link><pubDate>Wed, 29 May 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/</guid><description>
&lt;h2&gt;Overview&lt;span class="hx:absolute hx:-mt-20" id="overview"&gt;&lt;/span&gt;
&lt;a href="#overview" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Intezer has discovered a new, sophisticated malware that we have named
&amp;ldquo;HiddenWasp&amp;rdquo;, targeting Linux systems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The malware is still active and has a zero-detection rate in all major
anti-virus systems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unlike common Linux malware, HiddenWasp is not focused on crypto-mining or
DDoS activity. It is a trojan purely used for targeted remote control.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Evidence shows in high probability that the malware is used in targeted
attacks for victims who are already under the attacker’s control, or have
gone through a heavy reconnaissance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;HiddenWasp authors have adopted a large amount of code from various publicly
available open-source malware, such as Mirai and the Azazel rootkit. In
addition, there are some similarities between this malware and other Chinese
malware families, however the attribution is made with low confidence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We have detailed our recommendations for preventing and responding to this
threat.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&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;Although the Linux threat ecosystem is crowded with IoT DDoS botnets and
crypto-mining malware, it is not very common to spot trojans or backdoors in
the wild.&lt;/p&gt;
&lt;p&gt;Unlike Windows malware, Linux malware authors do not seem to invest too much
effort writing their implants. In an open-source ecosystem there is a high
ratio of publicly available code that can be copied and adapted by attackers.&lt;/p&gt;
&lt;p&gt;In addition, Anti-Virus solutions for Linux tend to not be as resilient as in
other platforms. Therefore, threat actors targeting Linux systems are less
concerned about implementing excessive evasion techniques since even when
reusing extensive amounts of code, threats can relatively manage to stay under
the radar.&lt;/p&gt;
&lt;p&gt;Nevertheless, malware with strong evasion techniques do exist for the Linux
platform. There is also a high ratio of publicly available open-source malware
that utilize strong evasion techniques and can be easily adapted by attackers.&lt;/p&gt;
&lt;p&gt;We believe this fact is alarming for the security community since many implants
today have very low detection rates, making these threats difficult to detect
and respond to.&lt;/p&gt;
&lt;p&gt;We have discovered further undetected Linux malware that appear to be enforcing
advanced evasion techniques with the use of rootkits to leverage trojan-based
implants.&lt;/p&gt;
&lt;p&gt;In this blog we will present a technical analysis of each of the different
components that this new malware, HiddenWasp, is composed of. We will also
highlight interesting code-reuse connections that we have observed to several
open-source malware.&lt;/p&gt;
&lt;p&gt;The following images are screenshots from VirusTotal of the newer undetected
malware samples discovered:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Technical Analysis&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When we came across these samples we noticed that the majority of their code
was unique:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig2.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Similar to the recent Winnti Linux variants reported by
&lt;a href="https://medium.com/chronicle-blog/winnti-more-than-just-windows-and-gates-e4f03436031a"target="_blank" rel="noopener"&gt;Chronicle&lt;/a&gt;,
the infrastructure of this malware is composed of a user-mode rootkit, a trojan
and an initial deployment script. We will cover each of the three components in
this post, analyzing them and their interactions with one another.&lt;/p&gt;
&lt;h3&gt;Initial Deployment Script:&lt;span class="hx:absolute hx:-mt-20" id="initial-deployment-script"&gt;&lt;/span&gt;
&lt;a href="#initial-deployment-script" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When we spotted these undetected files in VirusTotal it seemed that among the
uploaded artifacts there was a bash script along with a trojan implant binary.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig4.png" title="Initial Deployment Script" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Initial Deployment Script&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We observed that these files were uploaded to VirusTotal using a path
containing the name of a Chinese-based forensics company known as
&lt;a href="http://www.china-forensic.com/ccfc/en/"target="_blank" rel="noopener"&gt;Shen Zhou Wang Yun Information Technology Co., Ltd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Furthermore, the malware implants seem to be hosted in servers from a physical
server hosting company known as ThinkDream located in Hong Kong.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Among the uploaded files, we observed that one of the files was a bash script
meant to deploy the malware itself into a given compromised system, although it
appears to be for testing purposes:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks to this file we were able to download further artifacts not present in
VirusTotal related to this campaign. This script will start by defining a set
of variables that would be used throughout the script.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Among these variables we can spot the credentials of a user named &amp;lsquo;sftp&amp;rsquo;,
including its hardcoded password. This user seems to be created as a means to
provide initial persistence to the compromised system:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, after the system’s user account has been created, the script
proceeds to clean the system as a means to update older variants if the system
was already compromised:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig9.png" alt="" loading="lazy" /&gt; The script will then proceed to download a tar compressed
archive from a download server according to the architecture of the compromised
system. This tarball will contain all of the components from the malware,
containing the rootkit, the trojan and an initial deployment script:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig10.png" alt="" loading="lazy" /&gt; After malware components have been installed, the script
will then proceed to execute the trojan:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can see that the main trojan binary is executed, the rootkit is added to
LD_PRELOAD path and another series of environment variables are set such as the
&amp;lsquo;I_AM_HIDDEN&amp;rsquo;. We will cover throughout this post what the role of this
environment variable is. To finalize, the script attempts to install reboot
persistence for the trojan binary by adding it to /etc/rc.local.&lt;/p&gt;
&lt;p&gt;Within this script we were able to observe that the main implants were
downloaded in the form of tarballs. As previously mentioned, each tarball
contains the main trojan, the rootkit and a deployment script for x86 and
x86_64 builds accordingly.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The deployment script has interesting insights of further features that the
malware implements, such as the introduction of a new environment variable
&amp;lsquo;HIDE_THIS_SHELL&amp;rsquo;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We found some of the environment variables used in a open-source rootkit known
as
&lt;a href="https://github.com/chokepoint/azazel/search?q=HIDE_THIS_SHELL&amp;amp;unscoped_q=HIDE_THIS_SHELL"target="_blank" rel="noopener"&gt;Azazel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig14.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It seems that this actor changed the default environment variable from Azazel,
that one being HIDE_THIS_SHELL for I_AM_HIDDEN. We have based this conclusion
on the fact that the environment variable HIDE_THIS_SHELL was not used
throughout the rest of the components of the malware and it seems to be
residual remains from Azazel original code.&lt;/p&gt;
&lt;p&gt;The majority of the code from the rootkit implants involved in this malware
infrastructure are noticeably different from the original Azazel project.
Winnti Linux variants are also known to have reused code from this open-source
project.&lt;/p&gt;
&lt;h3&gt;The Rootkit&lt;span class="hx:absolute hx:-mt-20" id="the-rootkit"&gt;&lt;/span&gt;
&lt;a href="#the-rootkit" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The rootkit is a user-space based rootkit enforced via LD_PRELOAD linux
mechanism.&lt;/p&gt;
&lt;p&gt;It is delivered in the form of an ET_DYN stripped ELF binary.&lt;/p&gt;
&lt;p&gt;This shared object has an DT_INIT dynamic entry. The value held by this entry
is an address that will be executed once the shared object gets loaded by a
given process:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Within this function we can see that eventually control flow falls into a
function in charge to resolve a set of dynamic imports, which are the functions
it will later hook, alongside with decoding a series of strings needed for the
rootkit operations.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig16.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can see that for each string it allocates a new dynamic buffer, it copies
the string to it to then decode it.&lt;/p&gt;
&lt;p&gt;It seems that the implementation for dynamic import resolution slightly varies
in comparison to the one used in
&lt;a href="https://github.com/chokepoint/azazel/blob/master/config.py"target="_blank" rel="noopener"&gt;Azazel&lt;/a&gt; rootkit.&lt;/p&gt;
&lt;p&gt;When we wrote the script to simulate the cipher that implements the string
decoding function we observed the following algorithm:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig17.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We recognized that a similar algorithm to the one above was used in the past by
&lt;a href="https://github.com/jgamblin/Mirai-Source-Code/blob/master/mirai/bot/scanner.c#L963"target="_blank" rel="noopener"&gt;Mirai&lt;/a&gt;,
implying that authors behind this rootkit may have ported and modified some
code from Mirai.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After the rootkit main object has been loaded into the address space of a given
process and has decrypted its strings, it will export the functions that are
intended to be hooked. We can see these exports to be the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;For every given export, the rootkit will hook and implement a specific
operation accordingly, although they all have a similar layout. Before the
original hooked function is called, it is checked whether the environment
variable &amp;lsquo;I_AM_HIDDEN&amp;rsquo; is set:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can see an example of how the rootkit hooks the function fopen in the
following screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig21.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We have observed that after checking whether the &amp;lsquo;I_AM_HIDDEN&amp;rsquo; environment
variable is set, it then runs a function to hide all the rootkits’ and trojans&amp;rsquo;
artifacts. In addition, specifically to the fopen function it will also check
whether the file to open is &amp;lsquo;/proc/net/tcp&amp;rsquo; and if it is it will attempt to
hide the malware’s connection to the cnc by scanning every entry for the
destination or source ports used to communicate with the cnc, in this case
61061. This is also the default port in
&lt;a href="https://github.com/chokepoint/azazel/blob/master/config.py"target="_blank" rel="noopener"&gt;Azazel&lt;/a&gt; rootkit.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig22.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The rootkit primarily implements artifact hiding mechanisms as well as tcp
connection hiding as previously mentioned. Overall functionality of the rootkit
can be illustrated in the following diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig23.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;The Trojan&lt;span class="hx:absolute hx:-mt-20" id="the-trojan"&gt;&lt;/span&gt;
&lt;a href="#the-trojan" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The trojan comes in the form of a statically linked ELF binary linked with
stdlibc++. We noticed that the trojan has code connections with
&lt;a href="../../../2019/01/chinaz-relations"&gt;ChinaZ&amp;rsquo;s&lt;/a&gt; Elknot implant in regards to some
common MD5 implementation in one of the statically linked libraries it was
linked with:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig24.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In addition, we also see a high rate of shared strings with other known ChinaZ
malware, reinforcing the possibility that actors behind HiddenWasp may have
integrated and modified some MD5 implementation from Elknot that could have
been shared in Chinese hacking forums:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig25.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When we analyze the main we noticed that the first action the trojan takes is
to retrieve its configuration:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig26.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware configuration is appended at the end of the file and has the
following structure:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig27.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware will try to load itself from the disk and parse this blob to then
retrieve the static encrypted configuration.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig28.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once encryption configuration has been successfully retrieved the configuration
will be decoded and then parsed as json.&lt;/p&gt;
&lt;p&gt;The cipher used to encode and decode the configuration is the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig29.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This cipher seems to be an RC4 alike algorithm with an already computed PRGA
generated key-stream. It is important to note that this same cipher is used
later on in the network communication protocol between trojan clients and their
CNCs.&lt;/p&gt;
&lt;p&gt;After the configuration is decoded the following json will be retrieved:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig30.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Moreover, if the file is running as root, the malware will attempt to change
the default location of the dynamic linker’s LD_PRELOAD path. This location is
usually at /etc/ld.so.preload, however there is always a possibility to patch
the dynamic linker binary to change this path:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig31.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Patch_ld function will scan for any existent /lib paths. The scanned paths are
the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig32.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware will attempt to find the dynamic linker binary within these paths.
The dynamic linker filename is usually prefixed with ld-&lt;version number&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig33.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once the dynamic linker is located, the malware will find the offset where the
/etc/ld.so.preload string is located within the binary and will overwrite it
with the path of the new target preload path, that one being /sbin/.ifup-local.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig34.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;To achieve this patching it will execute the following formatted string by
using the xxd hex editor utility by previously having encoded the path of the
rootkit in hex:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig35.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once it has changed the default LD_PRELOAD path from the dynamic linker it will
deploy a thread to enforce that the rootkit is successfully installed using the
new LD_PRELOAD path. In addition, the trojan will communicate with the rootkit
via the environment variable ‘I_AM_HIDDEN’ to serialize the trojan’s session
for the rootkit to apply evasion mechanisms on any other sessions.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig36.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After seeing the rootkit’s functionality, we can understand that the rootkit
and trojan work together in order to help each other to remain persistent in
the system, having the rootkit attempting to hide the trojan and the trojan
enforcing the rootkit to remain operational. The following diagram illustrates
this relationship:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig37.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Continuing with the execution flow of the trojan, a series of functions are
executed to enforce evasion of some artifacts:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig38.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;These artifacts are the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig39.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;By performing some OSINT regarding these artifact names, we found that they
belong to a Chinese open-source rootkit for Linux known as
&lt;a href="https://github.com/yaoyumeng/adore-ng"target="_blank" rel="noopener"&gt;Adore-ng&lt;/a&gt; hosted in GitHub:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig40.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The fact that these artifacts are being searched for suggests that potentially
targeted Linux systems by these implants may have already been compromised with
some variant of this open-source rootkit as an additional artifact in this
malware’s infrastructure. Although those paths are being searched for in order
to hide their presence in the system, it is important to note that none of the
analyzed artifacts related to this malware are installed in such paths.&lt;/p&gt;
&lt;p&gt;This finding may imply that the target systems this malware is aiming to
intrude may be already known compromised targets by the same group or a third
party that may be collaborating with the same end goal of this particular
campaign.&lt;/p&gt;
&lt;p&gt;Moreover, the trojan communicated with a simple network protocol over TCP. We
can see that when connection is established to the Master or Stand-By servers
there is a handshake mechanism involved in order to identify the client.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig41.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;With the help of this function we where able to understand the structure of the
communication protocol employed. We can illustrate the structure of this
communication protocol by looking at a pcap of the initial handshake between
the server and client:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig42.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We noticed while analyzing this protocol that the Reserved and Method fields
are always constant, those being 0 and 1 accordingly. The cipher table offset
represents the offset in the hardcoded key-stream that the encrypted payload
was encoded with. The following is the fixed keystream this field makes
reference to:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig43.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After decrypting the traffic and analyzing some of the network related
functions of the trojan, we noticed that the communication protocol is also
implemented in json format. To show this, the following image is the decrypted
handshake packets between the CNC and the trojan:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig44.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After the handshake is completed, the trojan will proceed to handle CNC
requests:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig45.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Depending on the given requests the malware will perform different operations
accordingly. An overview of the trojan’s functionalities performed by request
handling are shown below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/hiddenwasp-malware-targeting-linux-systems/images/fig46.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Prevention and Response&lt;span class="hx:absolute hx:-mt-20" id="prevention-and-response"&gt;&lt;/span&gt;
&lt;a href="#prevention-and-response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Prevention: Block Command-and-Control IP addresses detailed in the IOCs
section.&lt;/p&gt;
&lt;p&gt;Response: We have provided a
&lt;a href="https://github.com/intezer/yara-rules/blob/master/HiddenWasp.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
intended to be run against in-memory artifacts in order to be able to detect
these implants.&lt;/p&gt;
&lt;p&gt;In addition, in order to check if your system is infected, you can search for
“ld.so” files — if any of the files do not contain the string
‘/etc/ld.so.preload’, your system may be compromised. This is because the
trojan implant will attempt to patch instances of ld.so in order to enforce the
LD_PRELOAD mechanism from arbitrary locations.&lt;/p&gt;
&lt;h2&gt;Summary&lt;span class="hx:absolute hx:-mt-20" id="summary"&gt;&lt;/span&gt;
&lt;a href="#summary" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We analyzed every component of HiddenWasp explaining how the rootkit and trojan
implants work in parallel with each other in order to enforce persistence in
the system.&lt;/p&gt;
&lt;p&gt;We have also covered how the different components of HiddenWasp have adapted
pieces of code from various open-source projects. Nevertheless, these implants
managed to remain undetected.&lt;/p&gt;
&lt;p&gt;Linux malware may introduce new challenges for the security community that we
have not yet seen in other platforms. The fact that this malware manages to
stay under the radar should be a wake up call for the security industry to
allocate greater efforts or resources to detect these threats.&lt;/p&gt;
&lt;p&gt;Linux malware will continue to become more complex over time and currently even
common threats do not have high detection rates, while more sophisticated
threats have even lower visibility.&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;103.206.123[.]13
103.206.122[.]245
http://103.206.123[.]13:8080/system.tar.gz
http://103.206.123[.]13:8080/configUpdate.tar.gz
http://103.206.123[.]13:8080/configUpdate-32.tar.gz
e9e2e84ed423bfc8e82eb434cede5c9568ab44e7af410a85e5d5eb24b1e622e3
f321685342fa373c33eb9479176a086a1c56c90a1826a0aef3450809ffc01e5d
d66bbbccd19587e67632585d0ac944e34e4d5fa2b9f3bb3f900f517c7bbf518b
0fe1248ecab199bee383cef69f2de77d33b269ad1664127b366a4e745b1199c8
2ea291aeb0905c31716fe5e39ff111724a3c461e3029830d2bfa77c1b3656fc0
d596acc70426a16760a2b2cc78ca2cc65c5a23bb79316627c0b2e16489bf86c0
609bbf4ccc2cb0fcbe0d5891eea7d97a05a0b29431c468bf3badd83fc4414578
8e3b92e49447a67ed32b3afadbc24c51975ff22acbd0cf8090b078c0a4a7b53d
f38ab11c28e944536e00ca14954df5f4d08c1222811fef49baded5009bbbc9a2
8914fd1cfade5059e626be90f18972ec963bbed75101c7fbf4a88a6da2bc671b&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>Technical Analysis: Pacha Group Deploying Undetected Cryptojacking Campaigns on Linux Servers</title><link>https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/</link><pubDate>Thu, 28 Feb 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/</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;Cryptomining malware, also known as cryptojacking or cryptocurrency mining
malware, refers to software developed to take over a computer&amp;rsquo;s resources and
use them for
&lt;a href="https://www.webopedia.com/TERM/C/cryptocurrency-mining.html"target="_blank" rel="noopener"&gt;cryptocurrency mining&lt;/a&gt;
without a user&amp;rsquo;s explicit permission.&lt;/p&gt;
&lt;p&gt;There are several
&lt;a href="https://www.symantec.com/blogs/threat-intelligence/cryptojacking-modern-cash-cow"target="_blank" rel="noopener"&gt;reports&lt;/a&gt;
documenting this newer malware breed and how it has become more popular in the
last few years.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://translate.google.com/translate?hl=en&amp;amp;sl=auto&amp;amp;tl=en&amp;amp;u=https%3A%2F%2Fwww.acey.me%2Fantd-miner%2F"target="_blank" rel="noopener"&gt;Antd&lt;/a&gt;
is a miner found in the wild on September 18, 2018. Recently we discovered that
the authors from Antd are actively delivering newer campaigns deploying a broad
number of components, most of them completely undetected and operating within
compromised third party Linux servers. Furthermore, we have observed that some
of the techniques implemented by this group are unconventional, and there is an
element of sophistication to them. We believe the authors behind this malware
are from Chinese origin. We have labeled the undetected Linux.Antd variants,
Linux.GreedyAntd and classified the threat actor as &lt;strong&gt;Pacha Group&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig1.png" title="String Reuse from Antd and GreedyAntd" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;String Reuse from Antd and GreedyAntd&lt;/figcaption&gt;
&lt;/figure&gt;&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;h3&gt;Infrastructure Overview&lt;span class="hx:absolute hx:-mt-20" id="infrastructure-overview"&gt;&lt;/span&gt;
&lt;a href="#infrastructure-overview" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Based on our findings Linux.GreedyAntd’s operations closely resemble previous
&lt;a href="https://intezer.com/blog/cloud-security/competition-for-cryptocurrency-mining-foothold-on-the-cloud/?utm_campaign=research-blog&amp;amp;utm_content=technical-analysis-pacha-group&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;cryptojacking campaigns&lt;/a&gt;
deployed by Pacha Group in the past. A resumed overview of the current
infrastructure is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The attack chain commences by intruding into a given vulnerable server. Based
on the services the compromised servers were publicly exposing, we can assume
the attackers opted to launch a brute-force attack against services like
WordPress or PhpMyAdmin, or used a known exploit for an outdated version of
alike services. The following is an overview of the open services and known
vulnerabilities found in one of the compromised systems:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once the attackers are able to break into a given compromised server, they will
run a series of stages in their attack chain.&lt;/p&gt;
&lt;h3&gt;Main Dropper&lt;span class="hx:absolute hx:-mt-20" id="main-dropper"&gt;&lt;/span&gt;
&lt;a href="#main-dropper" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Once a system is compromised the first implant that will be executed is a UPX
packed statically linked stripped ELF. &lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This ELF binary is the main component in the intrusion stage and it is worth
dedicating a separate section to. We will refer to this binary as the ‘first
stage’ or ‘main dropper’ throughout the blog.&lt;/p&gt;
&lt;p&gt;This binary is responsible for various tasks. One of the first actions it will
take is to assure that the current compromised server is not infected by other
cryptominers by using a technique similar to that of a ‘bot kill’ approach (as
known in the DDoS scene) killing any other cryptominer that is currently
running in the system. The following list contains the file names belonging to
known foreign cryptominers: &lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We recognized that one of the file names in this list is the Korkerds miner
reported by
&lt;a href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/cryptocurrency-mining-malware-targets-linux-systems-uses-rootkit-for-stealth"target="_blank" rel="noopener"&gt;TrendMicro&lt;/a&gt;
as well as other known miners such as
&lt;a href="https://www.bleepingcomputer.com/news/security/mining-botnet-targeting-redis-and-orientdb-servers-made-almost-1-million/"target="_blank" rel="noopener"&gt;DDG&lt;/a&gt;
or &lt;a href="https://github.com/xmrig/xmrig"target="_blank" rel="noopener"&gt;XMRig&lt;/a&gt;. This reinforces the assumption that
the list is indeed a blacklist of file names of known miners operating in the
wild.&lt;/p&gt;
&lt;p&gt;Processes with a filepath residing in &lt;code&gt;/tmp/&lt;/code&gt;, &lt;code&gt;/usr/tmp&lt;/code&gt; or &lt;code&gt;/dev/shm&lt;/code&gt; will be
killed. We concluded that the purpose of this aggressive behavior is intended
to discover further miner processes or malware that were not covered in the
initial miner process blacklist.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We have also noticed that some implants were checking for potential JBOSS
compromised servers by attempting to access specific paths in order to detect
and restrict potential operational webshells or dropped binaries by removing
all available file permissions to them. There is a github project called
&lt;a href="https://github.com/joaomatosf/jexboss"target="_blank" rel="noopener"&gt;JexBoss&lt;/a&gt; regarding JBOSS serialization
vulnerabilities that uses these same paths, suggesting that authors behind
other cryptomining campaigns could be using it to spread their infrastructures,
answering why these paths are being searched for:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;As previously mentioned, evaluation of the current system in order to know if
it is already compromised has been accomplished. Furthermore, there may be a
chance that the current system is already compromised by the same group. In
order to figure out whether this is the case all process names are checked
again with the end goal of recognizing any familiar process names used by the
same group and if found, the process will terminate. This could potentially
work as a possible vaccine to be used by some miner-protection solutions
against this specific miner:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After the first stage has completed an initial reconnaissance for the running
processes, it proceeds to create a random string to rename itself. It also
overwrites some known memory locations where the original process name resides
and overwrites them with a fake process name (in this case &lt;code&gt;[kworker/1:7]&lt;/code&gt;). An
example of such memory locations is &lt;code&gt;argv[0]&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore it will fork itself and detach from its parent to become an
independent process running on a different session as a means to create a fresh
new process:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Lastly, the current session username is checked and the control flow will
diverge accordingly:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;As demonstrated in the previous screenshot, the main difference is that if the
file was executed as root, persistence mechanisms would be enforced.&lt;/p&gt;
&lt;h3&gt;Persistence Mechanisms&lt;span class="hx:absolute hx:-mt-20" id="persistence-mechanisms"&gt;&lt;/span&gt;
&lt;a href="#persistence-mechanisms" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The applied persistence mechanisms consist mainly of a given dropped implant
saved as ‘mand’ followed by installing a Systemd service which will grant its
persistence in the system. In addition, the timestamp of the dropped implants
will be replaced as for the one of &lt;code&gt;/usr/bin/find&lt;/code&gt; as a means to make the
dropped file unnoticed in the filesystem.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;A Systemd unit file will be decoded and dropped as ‘systemd-mandb.service’
masquerading the genuine mandb service. The following is the decoded Systemd
unit file:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It is important to highlight that this persistence measure will make the
intrusion harder to spot for the untrained eye since it is not the average
cron-job that most Linux malware tend to use. Furthermore we spotted other
components of this campaign dropping and installing initrd scripts as well as
the following one:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig14.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After persistence measures have been enforced, several components will be
downloaded to the current compromised system to remain with the attack chain:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;Multi-Stage Architecture&lt;span class="hx:absolute hx:-mt-20" id="multi-stage-architecture"&gt;&lt;/span&gt;
&lt;a href="#multi-stage-architecture" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The following diagram is a simplified version of the various components that
make up the malware’s main infrastructure: &lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig16.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can assume that the main reason for having such a broad infrastructure
involving a large number of components is to make it more resilient to server
shutdowns as well as to provide a factor of modularity. Furthermore, having
this amount of components interconnected with each other also implies to invest
a much greater effort in order to clean a given compromised system.&lt;/p&gt;
&lt;p&gt;These components will run according to a small protocol involving the main
dropper and all remaining components executed via a shared named pipe. This
execution protocol is the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig17.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The majority of the secondary stagers create (or just open if it already
exists) a named pipe on execution with write permissions in which they write
their pid to:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;On the other hand, the main dropper serializes each stager by reading and
logging the contents of the named pipe therefore retrieving each stager’s pid.
This way the main dropper acts as a manager for each active stager in the
system:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The first stage’s main threat will continue execution attempting to update the
available stagers by downloading them in intervals on an infinite loop:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In addition, a timed routine will be executed by triggering a &lt;code&gt;SIGALRM&lt;/code&gt; signal
also in intervals, handling this signal via sigaction sycall, and therefore
pivoting control of execution to its correspondent signal handler
intermittently. This same technique has been spotted in various components of
this malware’s infrastructure:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig21.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This installed signal handler is mainly used to drop further artifacts using
embedded one-liner python scripts such as the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig22.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This script will drop further stages as well as further scripts. The following
is an example of such scripts:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig23.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h3&gt;GreedyAntD Miner Client&lt;span class="hx:absolute hx:-mt-20" id="greedyantd-miner-client"&gt;&lt;/span&gt;
&lt;a href="#greedyantd-miner-client" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The deployed miner instance is a XMRig variant. We can confirm this via code
reuse:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig24.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can also confirm the miner shares code with other components from the same
infrastructure, also based on code reuse:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig25.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It uses the &lt;a href="https://en.bitcoin.it/wiki/Stratum_mining_protocol"target="_blank" rel="noopener"&gt;Stratum&lt;/a&gt;
mining protocol and connects to a XMRig proxy in order to conduct the mining
operation. We assume the reason to use this specific protocol is to prevent to
deploy its clients with encoded configurations containing the target wallet
address they will be mining to, instead they connect to already configured
proxies:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig26.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following are the Proxies that interacts with:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig27.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, we can also confirm it is using Stratum by sniffing the Miner’s
stream to these proxies:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig28.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We notice that the client and server are exchanging information encoded as
json-rpc strings, which is commonly used in stratum mining protocol.&lt;/p&gt;
&lt;p&gt;Highlighted are the different cryptocurrency mining algorithms that the client
supports. These names can be seen in the main XMRig-proxy GitHub repository:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig29.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following screenshot is a process list view on htop of a compromised
system. Highlighted are some of the malicious processes related to the
campaign:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig30.png" title="htop of a compromised system" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;htop of a compromised system&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Connections with Linux.HelloBot&lt;span class="hx:absolute hx:-mt-20" id="connections-with-linuxhellobot"&gt;&lt;/span&gt;
&lt;a href="#connections-with-linuxhellobot" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Among the artifacts hosted in GreedyAntd’s servers, we managed to find a single
component not related to the same cryptojacking operation just previously
discussed and leveraged by Pacha Group. This file was hosted on a compromised
third party server and its main purpose was to drop a xmr-stak json
configuration. This json file was the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig31.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When we analyzed this binary for code reuse connections we found it shared a
significant amount of code with Linux.HelloBot, a Chinese bot discovered by
Intezer along with MalwareMustDie in January 2019:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig32.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After analyzing the code connections we came to the realization that both
samples were sharing the same instance of some static libc implementation:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig33.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Library similarities tend to not be as relevant in some specific scenarios in
regards to finding connections between threat actors. However, in this case
these library similarities seem to be relevant enough to consider a potential
link between these two threat actors. Especially since from viewing all
different x86 libc versions in our database, it only matched with
Linux.HelloBot’s statically linked libc. In addition, this libc instance has
identical code in both samples which implies it was compiled with the same
compilation flags. This reinforces that the particular libc instance may be a
potential link to connect these binaries with a single author, also taking into
account that both of them have indicators that suggest they have Chinese
origin.&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;This
&lt;a href="../../../2021/01/a-rare-look-inside-a-cryptojacking-campaign-and-its-profit/"&gt;cryptominer use&lt;/a&gt;
case is another example of an undetected Linux malware operating in the wild.
After conducting more research we concluded that the approach of
interconnecting all second-stagers to a manager (this being the main dropper)
via IPCs is successful for anti-dynamic analysis. In order for any of the
secondary-stages to run successfully they will need to be present with the main
dropper in a given system. This implies that behavior and dynamic analysis will
fail if any of the second-stager components are analyzed independently without
tampering the original sample. This may explain why the majority of the
components in this malware’s infrastructure remain practically undetected:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/02/technical-analysis-pacha-group/images/fig34.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;185.165.169.6
185.10.68.100
4d1a6151166048ea066c6b5918fbb02a43ed357e3e7eb75bc73970a97008337e
chn
206287e22445431ccab0a574f3002e28d1aaffa5153ba66f2a754d1f92b90a78
chn.unpacked
9119d47ee2b6e7bf94245699fec1432042e30255d9f64289f8e0aca56570eab3
ofd
096f8f387200fa70dddb2bfe5a77a50c88acb155d4f296f1fa6cb09109053246
ofd.unpacked
ee0ab03909ca433deb9161e831512c5bd6c64ffbc9332c3eea14b85b996ba882
rlr
1161fbe0a9ae1c5e0792d23682b602990af31c6847865220cf4f2f91981d426c
rlr.unpacked
3c3379284417070983da222f8ea347a4166c28a2ba3445e19f92b10b9b539573
_j.jpg
9ff1bf60e35912141c74728738c3af105d06ea8fa9c0cbd7a4b196ec1cdc9e22
j.jpg
dafac060867643d27a81e99e3753d155658e5f4a7f359317e0e8609fc7d14373
jm
069a87fbd966df854f55d82fc98f89ef394cee59b352fba5fb402887892a4161
jm.unpacked
84165c21fc144894c5fe674cfd06edafd4b95d52abf86afef4d61db91099bf8a
jpp
544e71e3a7ff1f1f0e902cef00156aa157790f7c3450870ca9272936443e05af
jpp.unpacked
a9656439d1ac3881c1ba9e0f2fd462b8a4469bf79035233517eae65ed6afafd0
jrd
e43d381c43749d7d267d207273ef3b634bfaeb0ff76f8e2cd6e0b27c6e3b07c8
jrd.unpacked
3c3379284417070983da222f8ea347a4166c28a2ba3445e19f92b10b9b539573
_j.sh
b6455e0335ad99028656b5b847fd5d530bc079b2524b2ecbf4f06d5e69473e7d
lmmml
39904faf4a620aa3a9e9ece3022f0bced20ef7684e0f352f99267e7c462d227c
lmmml.unpck
910fea37c73fc328522e04c77d1ad555c990f0376960770698bd3590c5b1b485
nvn
81b8860ecf21a73de8663188962fb1dae5a5c17e7b6f4ac41e0198d12497838f
nvn.unpacked
371f52a238d4be6eb8d7fd0130684f4286681f09adb61fbca3bdfacef8c747f7
sds
b72074b6c75b4fe5ea74e2db716f488a356d9d879c6d3aa5e9ed4bb786993761
sds.unpacked
42a423b6107f2186964ac9a1e7882a50f6b5cb9f96926dd2a69b1fc5eaba81d6
lmmml.1
e9a06f7183f7e06d8e414e16caae769a3859fcca20acae735f6744712f84b3e5
sss
4f9e77b4e0d80ea74ba861ab54b7360df7b823f24fd9cedb1fd44a29da70b11f
sss.unpacked
0940472a185099df2f814bcedbc1c913a7075168ab90d63249c6301849c1d93f
dld
6ff5e36d2999f8593cc4daa5e7c633abe0f28b0cba9da0339fc8d3cb7f6090a3
dld.unpacked
c70423e5d44cc31df70a69d65e56be1621956bccec2a3a68a69195ecccd4e881
_jj.jpg
452ed9cf53aed0afdc7900ca855f652a7c1585c2b03b27e6f3224fb6204da25a
_jj.sh
6f3add7ec36a710973d09b814082e105b848cd78f2769ba6bbc946f59f463457
ldl
045d7afaf53692607e7433a4fe8f19b2e3790414c649c8630086039d88935a02
ldl.unpacked
0940472a185099df2f814bcedbc1c913a7075168ab90d63249c6301849c1d93f
olo
6ff5e36d2999f8593cc4daa5e7c633abe0f28b0cba9da0339fc8d3cb7f6090a3
olo.unpacked
7ae8c6c65955fb9340b07afd380bbf3383b5030a92ba204cd61ca21c13a955e8
_z.jpg
9e049a51741f22403a9c08d3d7625ad4761cbfda5a8a051f6e8195e0f6a8e9cd
z.jpg
7ae8c6c65955fb9340b07afd380bbf3383b5030a92ba204cd61ca21c13a955e8
_z.sh
9e049a51741f22403a9c08d3d7625ad4761cbfda5a8a051f6e8195e0f6a8e9cd
z.sh
Cceddd7e9a7ddb4991776239cb0b941d061ac21db00b1021a8c45660f52e56b7
E2e07782dbfddeb95661c7360db5113c9b035cfb8e43e038106bd0f537553b36
40d8d89aa19ca4121ab583758692752964402923917da766f39a32cbc8bdd6dd&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 Revelations: Revealing ChinaZ Relationships with other Chinese Threat Actor Groups</title><link>https://research.intezer.com/blog/2019/01/chinaz-relations/</link><pubDate>Mon, 07 Jan 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/01/chinaz-relations/</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;Distributed denial-of-service (DDoS) attacks were on the rise in 2018, ranging
from a high volume of
&lt;a href="https://www.corero.com/resources/ddos-attack-types/mirai-botnet-ddos-attack.html"target="_blank" rel="noopener"&gt;Mirai&lt;/a&gt;
attacks to more sophisticated botnets targeting enterprises. An example of
these attacks is the one targeting
&lt;a href="https://techcrunch.com/2018/03/02/the-worlds-largest-ddos-attack-took-github-offline-for-less-than-tens-minutes/"target="_blank" rel="noopener"&gt;GitHub in February 2018&lt;/a&gt;,
forcing the website to go offline for approximately 10 minutes.&lt;/p&gt;
&lt;p&gt;In researching the current DDoS ecosystem we find threat actors from different
regions displaying different motivations. Chinese threat actors in particular
have predominantly deployed DDoS attacks in their cyber campaigns, and China
has emerged as having one of the highest rates of
&lt;a href="https://securelist.com/ddos-report-in-q3-2018/88617/"target="_blank" rel="noopener"&gt;DDoS attacks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this blog we will discuss the current state of a well-known Chinese threat
actor group known as ChinaZ, notorious for targeting Windows and Linux systems
with DDoS botnets since
&lt;a href="http://blog.malwaremustdie.org/2015/01/mmd-0030-2015-new-elf-malware-on.html"target="_blank" rel="noopener"&gt;November 2014&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We will explain how we first came across
&lt;a href="http://blog.malwaremustdie.org/2015/08/mmd-0039-2015-chinaz-made-new-malware.html"target="_blank" rel="noopener"&gt;ChinaZ&lt;/a&gt;,
along with the various methods employed to discover more of the group’s
servers. Additionally, we will analyze the types of files hosted on the servers
and conclude with a technical analysis highlighting potential connections that
could relate various Chinese actors in the current DDoS landscape such as
&lt;a href="https://www.netskope.com/blog/nitol-botnet-makes-resurgence-evasive-sandbox-analysis-technique"target="_blank" rel="noopener"&gt;Nitol&lt;/a&gt;,
&lt;a href="https://www.digitaltrends.com/computing/mrblack-malware-botnet/"target="_blank" rel="noopener"&gt;MrBlack&lt;/a&gt; and
some minor relations to
&lt;a href="https://securitybrief.asia/story/new-malware-spotted-asia-reminiscent-iron-tiger-apt"target="_blank" rel="noopener"&gt;Iron Tiger APT&lt;/a&gt;.
These relationships will be discussed in the technical analysis section.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Initial ChinaZ Discovery via Honeypot Hit&lt;span class="hx:absolute hx:-mt-20" id="initial-chinaz-discovery-via-honeypot-hit"&gt;&lt;/span&gt;
&lt;a href="#initial-chinaz-discovery-via-honeypot-hit" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In the last few months we have observed a higher volume of attacks from
Billgates, a DDoS botnet attributed to ChinaZ, a well-known Chinese threat
actor notorious for deploying a series of botnets primarily targeting Linux
systems.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/ulexec/status/1065743509376954368"target="_blank" rel="noopener"&gt;https://twitter.com/ulexec/status/1065743509376954368&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ChinaZ was fairly active in 2018 based on previous hits that were encountered
in our honeypots. An example of an attack vector via SSH/Telnet bruteforce
employed by ChinaZ can be seen in the following session log from one of our
honeypots:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The downloader bash script seems to be fairly simple in logic by changing
directories from /root to /tmp once it detected that the dropped implant could
not be executed after several attempts changing its file permissions.&lt;/p&gt;
&lt;p&gt;Once we accessed where the script was trying to download its corresponding
files we found that there were files being hosted in a Chinese Http File Server
(HFS) panel. The following is a screenshot of this panel:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We discovered the server was online for less than 24 hours, and that all of the
files were uploaded on that same day. We decided to observe this and other
servers and conduct a tracking investigation with the intention to collect all
of the information we could about the botnet infrastructure.&lt;/p&gt;
&lt;h2&gt;Observing ChinaZ&lt;span class="hx:absolute hx:-mt-20" id="observing-chinaz"&gt;&lt;/span&gt;
&lt;a href="#observing-chinaz" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ChinaZ is known to use Chinese Http File Server (HFS) instances, and unlike
other major DDoS botnets such as Mirai, ChinaZ operates mostly on Windows
Servers. In this particular HFS server we see various hosted files. The two
Linux prefixed files are both regular Billgates builds. We can confirm this
based on code reused from other samples:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig4.webp" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Since BillGates is a well-known botnet and there are plenty of well-written
technical analysis articles about the botnet and its relations to ChinaZ, we
have decided to not cover its technical analysis for the sake of simplicity.
These builds are default BillGates instances. Both of these instances share the
same CNC domain which is the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Among the hosted files in the HFS server we can also find a PE executable
labeled as BX.exe, which is a Gh0st RAT variant.&lt;/p&gt;
&lt;p&gt;Furthermore, this Gh0st RAT instance decodes the same CNC address:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Since both BillGates and the Gh0st RAT instances found in the initially
discovered HFS panel shared the same CNC, we can associate both implants to be
components of a single botnet targeting both Linux and Windows systems. This
same scenario was presented by Avast researchers as the
&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;Chinese Chicken&lt;/a&gt;
DDoS botnets by exposing a series of multi-platform Chinese DDoS tools.&lt;/p&gt;
&lt;p&gt;After one day threat actors behind this botnet updated the HFS panel by
uploading two ChinaZ.DDoSClient samples compiled for x86 and x86_64 systems
accordingly.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following is a code reuse analysis of these new samples:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;DDoSClient malware is a DDoS client known to be leveraged by ChinaZ. As an
interesting fact about the progression of this threat actor group, at some
point in time the source code of this client was hosted in GitHub, although
DDosClient was originally code of ChinaZ.
&lt;a href="http://blog.malwaremustdie.org/2015/06/the-elf-chinaz-reloaded.html"target="_blank" rel="noopener"&gt;MalwareMustDie&lt;/a&gt;
exposed this source
code and the actor’s identity. The actor behind this client was a student hired
by ChinaZ.&lt;/p&gt;
&lt;p&gt;Furthermore, we can find a compressed archive labeled as &amp;lsquo;Black Wolf Linux
Blasting V4.0&amp;rsquo; in Chinese among the different binaries hosted in the HFS
server. Inside this RAR file we encounter the following files:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Most interestingly, the contents of this compressed file appear to be a Chinese
DDoS tool:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The tool enables users to edit which files will be used on deployment, and
other related configurations such as the time out. We observed this specific
DDoS tool advertised in a range of Chinese forums:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;If we analyze one of the scripts inside the zip file and compare it with our
initial honeypot hit log, we can assume that the attack was deployed using this
tool:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We are not sure whether this Chinese DDoS tool was distributed by ChinaZ, or if
the group purchased this tool in order to use it in its campaigns.&lt;/p&gt;
&lt;p&gt;The server was online for one more day before it went offline. This behavior
suggests that actors behind this botnet may have migrated to a different CNC
server, they were performing some internal management, or that it was merely
part of the way they operate since we have seen this same behavior tracking
their other servers.&lt;/p&gt;
&lt;h2&gt;Hunting for Additional ChinaZ Servers&lt;span class="hx:absolute hx:-mt-20" id="hunting-for-additional-chinaz-servers"&gt;&lt;/span&gt;
&lt;a href="#hunting-for-additional-chinaz-servers" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We decided to look up the specific CNC domain name seen in the BillGates and
Gh0st RAT instances found in the initial HFS server, to see if this domain had
multiple resolutions in order to find more potential servers linked to this
botnet. When we searched the domain on RiskIQ we found the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig14.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;All of the shown IPs in the previous screenshot denote a server that would
resolve to &amp;ldquo;ak-74.top&amp;rdquo;, the CNC address seen in the first HFS server. Based on
these resolutions we were able to find other panels like the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We instantly recognize the same pattern in terms of the naming convention as
well as the types of files that were hosted in this HFS server. In contrast
with the previous HFS server, this server is only hosting Windows binaries and
a zip file.&lt;/p&gt;
&lt;p&gt;The 7z compressed file contained the following files:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig16.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;These files appear to be composing a Port Scanner tool written in python that
could also be used to deploy DDoS attacks.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig17.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In the screenshot above we can observe an executable responsible for the main
TCP/SYN flood, and the script used to deploy DDoS attacks.&lt;/p&gt;
&lt;p&gt;We also used Shodan to hunt for more operative ChinaZ HFS servers. We did this
by filtering Shodan’s query for the appropriate service and country.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Leveraging Shodan we were able to find many other ChinaZ linked servers, in
which we collected additional relevant samples. After we discovered several
ChinaZ servers and we collected their correspondent hosted files, we found
interesting correlations and relationships which we will discuss in the next
section.&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;Throughout the investigation we found several interesting facts among the
artifacts we collected and analyzed. The following is a brief summary of our
findings.&lt;/p&gt;
&lt;h3&gt;Gh0st RAT Clients&lt;span class="hx:absolute hx:-mt-20" id="gh0st-rat-clients"&gt;&lt;/span&gt;
&lt;a href="#gh0st-rat-clients" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The Gh0st RAT clients we discovered among several HFS servers all appear to be
modified instances of Gh0st RAT that share notable characteristics. These Gh0st
RAT variants are found hosted in different HFS servers with the names BX.exe or
shadow.exe.&lt;/p&gt;
&lt;p&gt;We can observe similarities in different functions from the open-source version
hosted in &lt;a href="https://github.com/sincoder/gh0st"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt;. The following is a brief
comparison of both files&amp;rsquo; WinMain function:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Regarding this Gh0st RAT variant, if we take a closer look we observe that it
has similarities with the Gh0st RAT instance deployed on Operation
&lt;a href="https://download.bitdefender.com/resources/files/News/CaseStudies/study/185/Bitdefender-Business-2017-WhitePaper-PZCHAO-crea2452-en-EN-GenericUse.pdf"target="_blank" rel="noopener"&gt;PZCHAO&lt;/a&gt;
by Iron Tiger APT, an APT group with also alleged Chinese origin. The RC4 key
used to decrypt the CNC is the same as the one used in the PZCHAO campaign,
&amp;ldquo;Mother360&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Based on a Bitdefender blog post about operation PZCHAO, this same
cryptographic key was not only used to decode the malware&amp;rsquo;s CNC addresses but
also was the key used to decrypt traffic between the client and the CNC.&lt;/p&gt;
&lt;p&gt;We also see code similarities from both Gh0st RAT variants apart from the used
RC4 function. The following code similarity comparisons are portions of the
main function:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig21.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Although these two Gh0st RATs may share common code, it is important to
understand how to interpret these similarities. ChinaZ has been known to employ
DDoS botnets in its campaigns as previously mentioned. Usually APT groups do
not rely on DDoS attacks. These similarities may not necessarily correlate
ChinaZ and Iron Tiger APT, but instead it may be evidence of the existence of a
common Gh0st RAT variant shared within the Chinese community, by having the
possibility to have ‘Mother360’ as one of the default hard-coded keys. The
reason for this interpretation is based on the fact that APT groups are rarely
involved with DDoS operations since the mere thought of correlating these two
models does not seem practical and the probability unlikely.&lt;/p&gt;
&lt;h3&gt;Infected Compressed Files with Nitol Artifacts&lt;span class="hx:absolute hx:-mt-20" id="infected-compressed-files-with-nitol-artifacts"&gt;&lt;/span&gt;
&lt;a href="#infected-compressed-files-with-nitol-artifacts" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Among some of the HFS panels found, we observed that some of the panels were
hosting DDoS tools.&lt;/p&gt;
&lt;p&gt;Inside these compressed files we can see that they contain varying components.
However, among all of the files found in these compressed files, the most
notable file was a DLL labelled as lpk.dll that appeared in every hosted
compressed archive that we found. This DLL has been known to be hijacked in the
past by &lt;a href="http://www.edison-newworld.com/2017/07/analysis-of-nitol.html"target="_blank" rel="noopener"&gt;Nitol&lt;/a&gt;,
a Chinese DDoS botnet targeting Windows systems that propagated infected
trusted software by exploiting the Windows Module Loading process. This was
achieved by placing a malicious lpk.dll within the file system meant to take
precedence against the genuine lpk.dll on load-time since this DLL is known to
be loaded in every process by being a component of Microsoft Language Pack.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig22.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can confirm this lpk.dll instance is the Nitol DLL from code reuse:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig23.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This finding may lead to different interpretations. One may directly link Nitol
to ChinaZ and argue that they are hosting infected compressed archives as a way
to spread and compromise systems. However, it is known that the Nitol botnet
was seized
&lt;a href="https://www.theregister.co.uk/2012/09/13/botnet_takedown/"target="_blank" rel="noopener"&gt;by Microsoft&lt;/a&gt; in
2012, although there are reports that document
&lt;a href="https://www.netskope.com/blog/nitol-botnet-makes-resurgence-evasive-sandbox-analysis-technique"target="_blank" rel="noopener"&gt;Nitol activity&lt;/a&gt;
from 2016 onwards.&lt;/p&gt;
&lt;p&gt;Therefore, we can interpret this finding from a different standpoint, and raise
the possibility that actors behind this botnet are operating on infected
physical Windows systems, and consequently deploying malware infected with
previous malware belonging to older campaigns, therefore indirectly linking
Nitol and ChinaZ.&lt;/p&gt;
&lt;p&gt;In addition, as a fact supporting this theory was that after analysis, this
specific DLL failed to connect to its correspondent CNC, but at some point in
the infection chain a parite file infector was also dropped from both, the
Nitol DLL implants as well as from the hosted windows Gh0st RATs.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig24.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It is known that in 2010 there was a strong infection wave of Chinese servers
that are still operative deploying infected malware. This may be why we can
find parite drops from files hosted in these servers:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/benkow_/status/961713159630393346"target="_blank" rel="noopener"&gt;https://twitter.com/benkow_/status/961713159630393346&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It should be noted how minimal effort is shown from the actors to maintain a
clean development environment for their newer malware campaigns, if the theory
explained above is indeed true.&lt;/p&gt;
&lt;h3&gt;Further Connections between ChinaZ and Nitol&lt;span class="hx:absolute hx:-mt-20" id="further-connections-between-chinaz-and-nitol"&gt;&lt;/span&gt;
&lt;a href="#further-connections-between-chinaz-and-nitol" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;a href="https://www.incapsula.com/blog/ddos-botnet-soho-router.html"target="_blank" rel="noopener"&gt;MrBlack&lt;/a&gt; is an
IoT botnet also known to have Windows
&lt;a href="http://blog.malwaremustdie.org/2016/01/mmd-0048-2016-ddostf-new-elf-windows.html"target="_blank" rel="noopener"&gt;variants&lt;/a&gt;.
As documented by MalwareMustDie, MrBlack is the simplified version of
&lt;a href="http://blog.malwaremustdie.org/2014/09/reversing-arm-architecture-elf-elknot.html"target="_blank" rel="noopener"&gt;AES.DDoS&lt;/a&gt;,
an ELF DDoS tool with Chinese origin that was on circulation before ChinaZ was
ever established. Therefore, there are not direct correlations between MrBlack
and ChinaZ.&lt;/p&gt;
&lt;p&gt;However, we spotted MrBlack samples being hosted along with known ChinaZ
malware. In addition, if we analyze the results on string reuse of MrBlack
samples, often we can see a high volume of strings reused from ChinaZ malware.&lt;/p&gt;
&lt;p&gt;Below is a code reuse analysis of the different files found in the following
HFS server:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig25.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following is the code reuse analysis of one of the hosted linux files, both
of them being ChinaZ.DdosClient:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig26.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following is a code reuse analysis of the hosted windows binary
demonstrating that the file is a Win32/MrBlack instance:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig27.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can see that this instance of MrBlack shares 10 genes with ServStart, a
trojan associated with the Nitol family. After analysis of these 10 genes we
observed that this instance of MrBlack shares the exact SYN flood function as
in the ServStart instance.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig28.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can observe that there are slight variations present throughout the code.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig29.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Most of the function is identical, specifically the main flood loop:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig30.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;To reinforce this connection between MrBlack and ServStart, we discovered the
following panel:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig31.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In this panel we found two instances of Linux/MrBlack along with seven
instances of a variant of ServStart. We have identified the MrBlack instances
based on code reuse:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig32.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig33.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Regarding the ServStart variants, we can see that they share a substantial
amount of code with respect to previous ServStart variants:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig34.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It is important to note that these newer ServStart variants have a recent
compilation time stamp, and it was only submitted to VirusTotal one week ago
from today:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig35.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We found several nearly identical functions reused from previous variants of
ServStart. The following is an example of one of these common functions.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig36.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Within the common code we found exact code fragments like the one below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig37.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;On the other hand, we found common code, although there are noticeable
differences between the new and old ServStart versions. An example of this is
shown in the screenshot below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig38.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The relationships described above validate the previous linkage between Nitol
and ChinaZ, which could insinuate that these two threat actor groups may be
related or may have collaborated together. So far we have gathered the
following links between them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;These two groups share the same goals in their campaigns with an emphasis on
the deployment of DDoS botnets.&lt;/li&gt;
&lt;li&gt;Both groups have alleged Chinese origins.&lt;/li&gt;
&lt;li&gt;A range of ChinaZ’s Windows clients have been infected by old Nitol
artifacts.&lt;/li&gt;
&lt;li&gt;These two families share relevant code with one another such as DDoS flood
implementations.&lt;/li&gt;
&lt;li&gt;New ServStart variants have been spotted being hosted alongside with MrBlack
Linux instances.&lt;/li&gt;
&lt;/ul&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 covered how we have tracked ChinaZ and collected some up to date
information about this threat actor group. We have found potential connections
that could relate various Chinese actors in the current DDoS landscape.&lt;/p&gt;
&lt;p&gt;ChinaZ is hosting instances of Linux and Windows builds of MrBlack, and Windows
versions have shown code reuse connections with old ServStart variants.
Furthermore, we have spotted newer versions of ServStart being hosted along
with MrBlack Linux instances. Therefore there may be a relationship between
MrBlack and ServStart actors, indicating a potential relationship between
ChinaZ and Nitol families.&lt;/p&gt;
&lt;p&gt;In addition, ChinaZ Windows components have been seen infected with Nitol
components, suggesting that these actors may have been operating in servers
already infected with Nitol. This enforces the hypothesis that there may be
deeper relationships between these two threat groups. ChinaZ has always been a
relatively active threat actor group that is slowly evolving in sophistication
even though it is not making many changes to its overall infrastructure from
early stages. To reflect the most relevant relationships discussed in this blog
we have decided to present them with the following diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/01/chinaz-relations/images/fig39.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ChinaZ Gh0st RAT variant with ‘Mother360’ key:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;a9c54bdba780bcdc34f15b62f0ac1da8bcf4d65b4587d0d95bd2a9b5be5dfee6
908d817f81f9276f5afad1a33a7e2de7566fd5c967ad95782a4d904ca0e5efdd
9e24ba7304ae7c4f153fa8e97d2e6779d0e4377cee270b83d20d91afef7fe6f4&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;Iron Tiger APT gh0st RAT:&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;d4262bbfe779d18b83b950bb993d3d46154bf1da5a4868ff6fa3e54c167eed71&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;BillGates:&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;92c191c41bcc701de5d633a0edb8cab6085ea13ede079651a2cc4a4ae54b29bb
6fd7aab3faabd5f071d1bc9bb039146c01acf67d941c24e99813b1375114e908&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;Infected ChinaZ DDoS tools with Nitol:&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;b883b32264bcafd0c5ede5ff7399388feb51dbdf183f7ad52024c08cd221d574
23c69edc4695f6c2184484682757f024f0e20573dba599030fde1cdaeae9915c&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;ChinaZ.DDoSClient:&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;80952e211eb98773909f0f3e7ce783ce2f410327058a4760efad2ff0dbebcb88
d97ffba4169df8b206f6fc588ba594e84539b321fae9247723d6b42940116fa5
a8d0928098cc43e7b9e8ba3b03507d342489dea832816dfc083c356b346f8a3d
7495be154047e2c3c3b9735d61c6f1256eea776eb536e42f2ea76d5c11fc7f84&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;Win32/MrBlack:&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;d793e629df1b73b054f763106fcfedaaafadd8a0919192fc7d1925752a1d64fe&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;Linux/MrBlack:&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;f025b6d531e7dcba68a309636f622fbe8ee212d457c9cc00e7bf339dca65fec2
fb69075f4383f3537af46d2098b3bcdcb7c1bdd6896c580cd9ead6f56fb5219c&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;ServStart:&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;4f4f24f0333ed6e8883971129f216fab608b6e4d0c97c58a2b3b6a1106c77bf7
7db53e95a1339d4d023d61087907a5b07bf6720a2dd88b12882a2c5c201a92ea
7e6a2448e06a1d97ff317a5dc4ed969cef077a3568fd214cbe61854b7ff1a6d1&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;New ServStart:&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;774af1499fa1558d0b31272b84b4fbbfcc6fea578898325610524aa3853b669d
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
d104daec5e990de0233efdde8747a1d829c90b7b9a2169a7bcf5744fa1d95e6e&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>Muhstik Botnet Reloaded: New Variants Targeting phpMyAdmin Servers</title><link>https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/</link><pubDate>Mon, 12 Nov 2018 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/</guid><description>
&lt;p&gt;&lt;em&gt;The Muhstik botnet was first exposed by
&lt;a href="https://blog.netlab.360.com/gpon-exploit-in-the-wild-i-muhstik-botnet-among-others-en/"target="_blank" rel="noopener"&gt;Netlab360&lt;/a&gt;
researchers in May 2018. This botnet targeted mainly GPON routers. At Intezer
we found that Muhstik is extending its spectrum of compromised devices by
targeting web servers hosting phpMyAdmin.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.phpmyadmin.net/"target="_blank" rel="noopener"&gt;PhpMyAdmin&lt;/a&gt; is a well known open-source tool
written in PHP, intended to handle the administration of MySQL over the web.
This tool is fairly popular among web developers due to the convenience of
operating a database via a web browser. On the other hand, the use of these
type of tools leads the front-end of a server to be publicly exposed, and in
particular to phpMyAdmin, with a lack of protection against brute-forcing
attempts.&lt;/p&gt;
&lt;p&gt;This blog will cover how the Muhstik malware has been using phpMyAdmin scanners
in its newer variants in order to extend the spectrum of its vulnerable devices
discovery and acquisition.&lt;/p&gt;
&lt;p&gt;Another recent IoT malware campaign that targeted phpMyAdmin servers was
&lt;a href="https://www.guardicore.com/2018/06/operation-prowli-traffic-manipulation-cryptocurrency-mining/"target="_blank" rel="noopener"&gt;Operation Prowli&lt;/a&gt;,
however, it is not very common to see these type of botnets targeting web
servers.&lt;/p&gt;
&lt;p&gt;We will also disclose the relationship between Muhstik’s phpMyAdmin Scanner and
an open-source TCP port scanner tool called Pnscan, since we believe that the
threat actors behind Muhstik borrowed and modified code from this project.&lt;/p&gt;
&lt;h2&gt;Hunting New Mushtik Variants&lt;span class="hx:absolute hx:-mt-20" id="hunting-new-mushtik-variants"&gt;&lt;/span&gt;
&lt;a href="#hunting-new-mushtik-variants" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After the analysis of various known &lt;em&gt;Muhstik&lt;/em&gt; samples, we observed that some
lower detected samples exposed what seem to be new features added to the
botnet. One of these examples is the following MIPS sample:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;d0d8f3c3e530a75768784c44772b2a71c5b3462d68a3217fee1f6767686cea4e&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The following is the known Muhstik’s implant download method from Netlab360
report:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig1.png" title="Muhstik GPON exploit deployment" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstik GPON exploit deployment&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;When analyzing the strings we notice that there are some uncommon &lt;em&gt;Muhstik&lt;/em&gt;
strings along with the known Muhstik payloads.&lt;/p&gt;
&lt;p&gt;Known and unknown strings from the known &lt;em&gt;Muhstik&lt;/em&gt; variant:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig2.png" title="String reuse from Intezer Analyze™" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;String reuse from Intezer Analyze™&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;After analyzing the code, we concluded that the new functionality was a
phpMyAdmin scanner module. Furthermore, these new findings motivated us to
index some lower detected variants in our database in order to evaluate if the
discovery of further lower detected variants was possible.&lt;/p&gt;
&lt;p&gt;Since we support ELF files in Intezer Analyze™ but do not currently support
MIPS binaries, we decided to rely on our &amp;lsquo;String Reuse&amp;rsquo; feature in order to
find lower detected variants that shared large pieces of the phpMyAdmin Scanner
code base based on string reuse.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Muhstik.PMA.Scan Variant Analysis&lt;span class="hx:absolute hx:-mt-20" id="muhstikpmascan-variant-analysis"&gt;&lt;/span&gt;
&lt;a href="#muhstikpmascan-variant-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This variant shares the same infrastructure as earlier Mushstik variants,
possessing scan, report, download, and control stages.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig4.png" title="Muhstick’s phpMyAdmin Scanner Infrastructure" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstick’s phpMyAdmin Scanner Infrastructure&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Scanner Stage&lt;span class="hx:absolute hx:-mt-20" id="scanner-stage"&gt;&lt;/span&gt;
&lt;a href="#scanner-stage" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Sample: &lt;code&gt;d0d8f3c3e530a75768784c44772b2a71c5b3462d68a3217fee1f6767686cea4e&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The scanner is a command line tool utility in which a file containing a list of
&lt;em&gt;CIDRs&lt;/em&gt; to bruteforce is expected as the first argument.&lt;/p&gt;
&lt;p&gt;In every analyzed sample we noticed a recurrent pattern of hardcoding the
report and download servers in the main function:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig5.png" title="Hardcoded servers in phpMyAdmin Scanner" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Hardcoded servers in phpMyAdmin Scanner&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The scanner then attempts to obtain the CIDR list it requires to commence the
scan. For this specific sample it obtains such lists from the download server,
but we are aware of samples that contain the hardcoded IP blocks in the binary
itself:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig6.png" title="Retrieving CIDRs from download server" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Retrieving CIDRs from download server&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The download server (&lt;code&gt;217.13.228.176&lt;/code&gt;) hosts implants to be downloaded by the
compromised server and CIDRs to be used by the phpMyAdmin Scanner. In this
sample, the download server host these files at &lt;code&gt;/rescueshop_dev/x/&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig7.png" title="Download Server Open Directory" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Download Server Open Directory&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We observe the names of the CIDRs correlate with the names that Muhstik’s
aioscan implant used based on a Netlab360 report.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig8.png" title="Older variants of Muhstik using CIDRs" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Older variants of Muhstik using CIDRs&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The download server also contains a series of files which are instances of
&lt;em&gt;Muhstik&lt;/em&gt; &lt;em&gt;phpmyAdmin&lt;/em&gt; Scanner. These files were hosted in the root directory
of the download server under the name &lt;code&gt;pma&amp;lt;number&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In addition, once the scanner obtains the IP block to target, it will begin
brute forcing credentials in order to find vulnerable servers. The following
image demonstrates one of the several ways that the scanner crafts http
requests when attempting to brute force login credentials of a discovered
&lt;em&gt;phpMyAdmin&lt;/em&gt; login page:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig9.png" title="Muhstick’s phpMyAdmin HTTP headers" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstick’s phpMyAdmin HTTP headers&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Once the scanner has found a vulnerable server, it will then disclose it to the
report server.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig10.png" title="Vulnerable phpMyAdmin URL crafting for report" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Vulnerable phpMyAdmin URL crafting for report&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig11.png" title="Function in charge to report Vulnerable phpMyAdmin URL" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Function in charge to report Vulnerable phpMyAdmin URL&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Report and Download Stages&lt;span class="hx:absolute hx:-mt-20" id="report-and-download-stages"&gt;&lt;/span&gt;
&lt;a href="#report-and-download-stages" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;After the scanner has found a vulnerable &lt;em&gt;phpMyAdmin&lt;/em&gt; server, it will send the
full vulnerable url to the report server (&lt;code&gt;128.199.251.119&lt;/code&gt;) in the following
format:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http:://&amp;lt;reportserver&amp;gt;/pma.php?ip=&amp;lt;vulnerable url&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The report server IP can also be seen in the Netlab360 report used to deploy
Muhstik’s GPON exploit:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig12.png" title="Muhstik’s GPON exploit deployment" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstik’s GPON exploit deployment&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Throughout the investigation we were unable to find the exact operations of
pma.php hosted in the report server, although we assess with high confidence
that it was used to deploy a phpMyAdmin exploit since it shares the same
convention as previously observed Muhstik exploit deployments.&lt;/p&gt;
&lt;p&gt;Furthermore, we were able to find a core dump in
&lt;a href="https://www.virustotal.com/#/file/1dd04d7a09b0ae49cfd552fd7ae93c3f16ae78e629b7610d8dec96ec8325af48"target="_blank" rel="noopener"&gt;VirusTotal&lt;/a&gt;
of this same variant that exposed some of pma.php’s behavior.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig13.png" title="Muhstik’s phpMyAdmin Scanner Core-dump VirusTotal Analysis" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstik’s phpMyAdmin Scanner Core-dump VirusTotal Analysis&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;When analyzing the stack segment in the core file we found the following:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig14.png" title="Core-Dump Stack Overview" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Core-Dump Stack Overview&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We observed that paths of the downloaded implant and &lt;em&gt;Muhstik phpMyAdmin&lt;/em&gt;
Scanner instance were saved in suspicious environment variables. We also notice
based on the &lt;code&gt;$PWD&lt;/code&gt; environment variable that this core file proceeded from a
&lt;code&gt;WordPress&lt;/code&gt; server.&lt;/p&gt;
&lt;p&gt;The binary was executed from &lt;code&gt;/tmp/&lt;/code&gt; directory and its name was pma6, which
follows the same naming convention from the Muhstik phpMyAdmin Scanner
instances hosted in its download server.&lt;/p&gt;
&lt;p&gt;Additionally, the environment variable &lt;code&gt;$SHLVL&lt;/code&gt; has a value of 3. The value of
this environment variable increases by one each time a shell has started. In
other words, for the time that the core dump was generated, the binary was
running on 3 nested shells. These are solid indicators that this core file was
generated in a compromised system.&lt;/p&gt;
&lt;p&gt;Summarizing, this core dump leaves hints on how the attack chain was deployed.
It seems that the implants may have been downloaded by an additional agent in
the exploitation stage, and that the scanner was one piece of a broader
post-exploitation tool set.&lt;/p&gt;
&lt;h3&gt;Control Stage&lt;span class="hx:absolute hx:-mt-20" id="control-stage"&gt;&lt;/span&gt;
&lt;a href="#control-stage" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;If we submit the implants to Intezer Analyze™ we observe that they are packed
with a specific UPX variant.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig15.png" title="Packed Muhstik sample" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Packed Muhstik sample&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In the related samples section we observe that the same UPX variant has been
seen in previous Kaiten variants reported by MalwareMustDie.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig16.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig17.png" alt="" loading="lazy" /&gt; &lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After unpacking the sample we see that the unpacked &lt;em&gt;Muhstik&lt;/em&gt; implant shares
genes with Tsunami based on code reuse. Tsunami and STDBot are known to be
derived from an IRC bot malware family called Kaiten. Therefore, this
connection shows that &lt;em&gt;Muhstik&lt;/em&gt; implants are also based on Kaiten.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This implant operates with different &lt;em&gt;IRC&lt;/em&gt; servers, implementing &lt;em&gt;SSH&lt;/em&gt;, &lt;em&gt;HTTP&lt;/em&gt;
scanning functionalities, and multiple &lt;em&gt;DDoS&lt;/em&gt; features which extends the usual
functionalities of regular Kaiten variants.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Based on Netlab360’s report we can assume that this botnet has been active
since May 2018. However, when we analyze the username the botnet uses at some
point in one of its IRC channels, we notice the date as a suffix. We believe
this naming convention is used to track new variants among the botnet’s IRC
channels. This sample’s fixed IRC username suggests the build was released one
day after Netlab360 published its blog about &lt;em&gt;Muhstik&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig21.png" title="Origins of Muhstik phpMyAdmin Scanner" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Origins of Muhstik phpMyAdmin Scanner&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Origins of Muhstik phpMyAdmin Scanner&lt;span class="hx:absolute hx:-mt-20" id="origins-of-muhstik-phpmyadmin-scanner"&gt;&lt;/span&gt;
&lt;a href="#origins-of-muhstik-phpmyadmin-scanner" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After researching this newer Muhstik variant, we noticed several other pieces
of malware not related to Muhstik, but using a similar scanner.&lt;/p&gt;
&lt;p&gt;Based on code similarities, we found that the original scanner in which Muhstik
borrows code from is an open-source project called Pnscan. Pnscan was written
by Peter Eriksson, a computer systems manager from Linköping University,
Sweden.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig22.png" title="Pnscan’s Github Repository" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Pnscan’s Github Repository&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;It is important to understand that this Pnscan tool is not directly related to
the Linux.Pnscan.2 worm reported by
&lt;a href="https://news.drweb.com/show/?i=9548&amp;amp;lng=en&amp;amp;c=5"target="_blank" rel="noopener"&gt;DrWeb&lt;/a&gt; in August, 2015. Pnscan
is an open-source TCP port scanner tool which received its name as an
abbreviation of Parallel Network Scanner.&lt;/p&gt;
&lt;p&gt;When we compare some of the functions found in the un-stripped Muhstik
phpMyAdmin Scanner against Pnscan, we observe undeniable evidence that they
share a common code base. We can see this based on function, string, and symbol
naming similarities.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig23.png" title="Portion of Pnscan’s Main Function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Portion of Pnscan’s Main Function&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig24.png" title="Portion of Muhstick’s phpMyAdmin Main’s Function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Portion of Muhstick’s phpMyAdmin Main’s Function&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig25.png" title="Pnscan’s get_ip_range" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Pnscan’s get_ip_range&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig26.png" title="Muhstick’s phpMyAdmin Scanner get_ip_range Function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstick’s phpMyAdmin Scanner get_ip_range Function&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig27.png" title="Pnscan’s get_port_range Function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Pnscan’s get_port_range Function&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/11/muhstik-botnet-reloaded-new-variants-targeting-phpmyadmin-servers/images/fig28.png" title="Muhstick’s phpMyAdmin get_port_range" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Muhstick’s phpMyAdmin get_port_range&lt;/figcaption&gt;
&lt;/figure&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;PhpMyAdmin scanners seem to be an increased resource leveraged by threat actors
to compromise systems in recent years. In particular, the Muhstik botnet has
adopted new techniques to compromise a broader spectrum of systems.&lt;/p&gt;
&lt;p&gt;The phpMyAdmin scanner variant appears to have fallen under the radar in
comparison with previous variants targeting GPON routers and has not been seen
or reported to date.&lt;/p&gt;
&lt;p&gt;In order to mitigate these types of attacks against phpMyAdmin, stronger
password conventions should be implemented, or some form of anti brute-forcing
schemes such as
&lt;a href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-policy"target="_blank" rel="noopener"&gt;account lockout policy&lt;/a&gt;,
or Google’s &lt;a href="https://www.google.com/recaptcha/intro/v3.html"target="_blank" rel="noopener"&gt;reCaptcha&lt;/a&gt;, should
be applied.&lt;/p&gt;
&lt;p&gt;Furthermore, we have observed in the past the repercussions of publishing
open-source projects that can be used for malicious purposes. This is another
example demonstrating how threat actors borrow and modify publicly released
code in order to conduct their campaigns.&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;Muhstik phpMyAdmin Scanner:&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;c356bf0fd5140f428c2f7c39b96095584c4b99fa6f077f0c1cf9d1ecd9d26e88
7109ba2b506fbcc2a99dfdee14bc1dbb0a8b5dbe14f530b12ffcfc3fa04f90b7
e6ee7da0d9e5d38b44be7f2c2c038708acc12819cb5d6635b8e31715de6026b7
61af6bb7be25465e7d469953763be5671f33c197d4b005e4a78227da11ae91e9
d0d8f3c3e530a75768784c44772b2a71c5b3462d68a3217fee1f6767686cea4e
e0da49d8def275d7e35b2ad4559330301debc9f10cc9bdde953748c18075994e
68002efcc5e13bf6a8c6738cdb324eb7d92bcc54080e3fa6beff2612e4f7252f
679fd3ff024750ef4753f6f52bc99c3d7bb9793e5d32742751099edbed558623&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;Muhstik WordPress Scanner&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;fbfc7b127ab9a03bb6b3550e6678e8224ab3d18d1e96ea473ec50eb271fcf05b&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;Muhstik Implants:&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;7296f5b14f5c55e1f359bb752e18323ba2819f4a43066d50cf4e0294c9d33766
9ae309db0fe53092e67bea17d37a6137bcca70e9c4c31491f15e493ebca3d1c7
fc367a6247e8dca792b54e49dc997e3bc48d28161d7d987043c12c9408933c61
094cd380b411951a2fe00c2d38208838463b83160199f4495062391ced106946
6d0a52bc9b3c6cdef438cbf22c9968e3c06eff6037ffc5ddc645f0f158513ef2
9519e0cd8ec702af86367c1245afea85fd98cc1160cf46e2874a60dfd0952ed8
82bf0be6debed7eb94d4d64e806e0c9f2458d58936443b12c8bd6ae805106e68
3756a7a180b4573efcb88bcba663c66d9474f19e7f646840469f2f60cad236d4
8426f4623aab0af7aaab2d5919dc86ffd9f167f2e423ca3838d7fe24591458f1
96867f503d65c564b146e8961dffae1f90962ba171dd0a5f856ed3f648cb7f4c
767cc42e1b6cc082bd41eecdb2743173d69ac5e8e02f5b63fa104e3c19d90345&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;Mushtik implant unpacked&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;b56f666944b3f6bc459546d34002e607c0dc51b1b8bc14999ff4a1e6665a1c9a&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;Mushtik GPON phpMyAdmin MIPS hybrid&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;Dd6c74d2942fe9e1cee82e39e7de6986589ae923530864d61b58e21318bf4f7b&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;Pnscan source code: &lt;a href="https://github.com/ptrrkssn/pnscan"target="_blank" rel="noopener"&gt;https://github.com/ptrrkssn/pnscan&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>