<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Ransomware</title><link>https://research.intezer.com/tags/ransomware/</link><description>Recent content in Ransomware on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 02 Mar 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/ransomware/index.xml" rel="self" type="application/rss+xml"/><item><title>When Viruses Mutate: Did SunCrypt Ransomware Evolve from QNAPCrypt?</title><link>https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/</link><pubDate>Tue, 02 Mar 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/</guid><description>
&lt;p&gt;&lt;em&gt;Dov Lerner from Cybersixgill contributed to this report&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Intro&lt;span class="hx:absolute hx:-mt-20" id="intro"&gt;&lt;/span&gt;
&lt;a href="#intro" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Programmers frequently reuse code, as recycling something that is already
written and functional is much more efficient than writing from scratch.
Malware authors are no different; functions and modules from one malware can be
reused in the next. Because of this, code reuse analysis can connect different
malware to the same author.&lt;/p&gt;
&lt;p&gt;When performing code reuse analysis, it is important to ensure that the code is
unique to the specific developer and not common code that, for example, is part
of an open-source library since open-source code can be used by many and cannot
be tied to a specific author. If this is handled correctly, code reuse is a
very powerful method for attributing malware to a specific malware author.&lt;/p&gt;
&lt;p&gt;There is a constant churn of new actors and malware families. However,
sometimes a seemingly new threat actor is just a &amp;ldquo;rebranding&amp;rdquo; or a new group
formed by known actors. For example, in May 2019, the GandCrab group announced
that they were retiring from their ransomware activity. Not long after,
&lt;a href="https://www.secureworks.com/blog/revil-the-gandcrab-connection"target="_blank" rel="noopener"&gt;researchers&lt;/a&gt;
connected a new ransomware called
&lt;a href="https://analyze.intezer.com/families/098aa9b8-08e5-4b20-a83f-5e94e57f8fd7?utm_campaign=research-blog&amp;amp;utm_content=when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;REvil&lt;/a&gt;
(also known as Sodinokibi) to the then defunct GandCrab ransomware. REvil
shared unique code similarities with GandCrab. This suggested that when
GandCrab was closing down, the malware authors switched to develop a new
ransomware using some of the code from GandCrab in a new collaboration with
other threat actors.&lt;/p&gt;
&lt;p&gt;This report uses both dark web research and malware analysis to investigate the
connection between the affiliate ransomware service known as SunCrypt and the
&lt;a href="../../../2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers"&gt;QNAPCrypt&lt;/a&gt;
ransomware, the latter of which was used against QNAP and Synology devices back
in 2019. While the two ransomware are operated by distinct different threat
actors on the dark web, there are strong technical connections in code reuse
and techniques, linking the two ransomware to the same author. Just because a
malware is a derivative of another malware does not mean it will be deployed in
exactly the same way. A new operator may use different targets, tactics,
techniques and procedures (TTPs), which can include new evasion techniques.
Defenders must remain vigilant.&lt;/p&gt;
&lt;h2&gt;Technical Connection&lt;span class="hx:absolute hx:-mt-20" id="technical-connection"&gt;&lt;/span&gt;
&lt;a href="#technical-connection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;SunCrypt is a Ransomware as a Service (RaaS) that uses a closed affiliate
program on the dark web. The history of this RaaS can be traced back to circa
October 2019. In October 2019, a new ransomware was found in-the-wild
(&lt;a href="https://analyze.intezer.com/files/98b8924d3f49ed0279723d3311bbdafcc918f240390151ea65493e48d2803393?utm_campaign=research-blog&amp;amp;utm_content=when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;5657abdb9d99cd5aec433099f8d6f53d&lt;/a&gt;).
The new ransomware was written in Go and targeted Windows machines. This
version of SunCrypt was not reported in many attacks and it wasn&amp;rsquo;t until
&lt;a href="https://id-ransomware.blogspot.com/2020/08/suncrypt-ransomware.html"target="_blank" rel="noopener"&gt;mid-2020&lt;/a&gt;
when a new version of the ransomware written in C/C++ was discovered, that
attacks started to increase. It is an interesting shift of retooling from Go to
C/C++ when
&lt;a href="https://twitter.com/VK_Intel/status/1281677718376120328"target="_blank" rel="noopener"&gt;other groups&lt;/a&gt; are
instead retooling from C/C++ to Go.&lt;/p&gt;
&lt;p&gt;While the RaaS didn&amp;rsquo;t appear until October 2019, these ransomware share
connections with another ransomware, called
&lt;a href="../../../2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers"&gt;QNAPCrypt&lt;/a&gt;
(also known as
&lt;a href="https://www.anomali.com/blog/the-ech0raix-ransomware"target="_blank" rel="noopener"&gt;eCh0raix&lt;/a&gt;), that was
used to target Network Attached Storage (NAS) devices back in July 2019. Both
families share identical code logic for the file encryption, which we can
conclude with high certainty has been compiled from the same source code.&lt;/p&gt;
&lt;h3&gt;SunCrypt 2020 and SunCrypt 2019&lt;span class="hx:absolute hx:-mt-20" id="suncrypt-2020-and-suncrypt-2019"&gt;&lt;/span&gt;
&lt;a href="#suncrypt-2020-and-suncrypt-2019" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The SunCrypt variant that was released in 2020 is written in C. Due to this, it
does not have any shared code with the earlier version from 2019. The
functionality of SunCrypt has been
&lt;a href="https://sapphirex00.medium.com/diving-into-the-sun-suncrypt-a-new-neighbour-in-the-ransomware-mafia-d89010c9df83"target="_blank" rel="noopener"&gt;well-documented&lt;/a&gt;
and some of the behaviors are similar between the two variants. For example,
both variants are designed to encrypt and steal data. This, together with the
name, is not enough to link the two variants together. Instead, we have to look
at other data points.&lt;/p&gt;
&lt;p&gt;After the ransomware has stolen and encrypted the files on the infected
machine, the user is presented with a ransom note. The ransom note for the 2020
variant is shown in Figure 1 below. The note can be read in English, German,
French, Spanish or Japanese. It has an input box that when the user enters the
unique ID, sends the user to a chat interface.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig1.png" title="Figure 1: Ransom note pages for SunCrypt. Left is showing the original ransom note and right is showing the current ransom note used. Both share the same typos and structure. The current ransom note provides a link to the leak site while the original note does not." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: Ransom note pages for SunCrypt. Left is showing the original ransom note and right is showing the current ransom note used. Both share the same typos and structure. The current ransom note provides a link to the leak site while the original note does not.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The ransom note for the 2019 variant is very similar. It has essentially the
same text. The background color is different. The major difference is that the
2019 version does not include the text of leaking the stolen data if the ransom
is not paid, as can be seen in Figure 1.&lt;/p&gt;
&lt;h3&gt;Connection to QNAPCrypt&lt;span class="hx:absolute hx:-mt-20" id="connection-to-qnapcrypt"&gt;&lt;/span&gt;
&lt;a href="#connection-to-qnapcrypt" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The 2021 variant is potentially a beta release of the RaaS. The version
included in the PDB path is &amp;ldquo;0.1&amp;rdquo; as can be seen in Figure 2. The figure is
showing a partial output of &lt;a href="https://github.com/goretk/redress"target="_blank" rel="noopener"&gt;redress&lt;/a&gt;, a
tool used to analyze Go binaries. As part of the output, we can see a file
called &amp;ldquo;aes.go&amp;rdquo; with two functions. Note that one of the functions has a typo
in the name, &amp;ldquo;EncEAS&amp;rdquo; instead of &amp;ldquo;EncAES.&amp;rdquo; A similar file has been found being
part of another malware family, QNAPCrypt. This typo was included in two
samples of version 2 of QNAPCrypt
(&lt;a href="https://analyze.intezer.com/files/50470f94e7d65b50bf00d7416a9634d9e4141c5109a78f5769e4204906ab5f0b?utm_campaign=research-blog&amp;amp;utm_content=when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;8dd59345cc034317630b2ac2ee19b362&lt;/a&gt;
and
&lt;a href="https://analyze.intezer.com/files/9d4bc803c256bd340664ce08c2bf68249f33419d7decd866f3ade78626c95422?utm_campaign=research-blog&amp;amp;utm_content=when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;516291d10b370c7be3863335cf5d57eb&lt;/a&gt;).
An output generated by redress from one of the QNAPCrypt samples is shown in
Figure 3. After searching both our data set of malware and a retro hunt on
VirusTotal, only these three samples have the two function names. From this, we
can conclude that the typo is unique and potentially shared code between the
two ransomware families.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig2.png" title="Figure 2: Partial output of redress for SunCrypt 2019 variant. One of the functions has the typo EAS instead of AES." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: Partial output of redress for SunCrypt 2019 variant. One of the functions has the typo EAS instead of AES.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig3.png" title="Figure 3: Output from redress for a version of QNAPCrypt with the same typo." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 3: Output from redress for a version of QNAPCrypt with the same typo.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;A deeper analysis of the function confirms that they are derived from the same
source. A flow graph of &amp;ldquo;&lt;code&gt;EncFile&lt;/code&gt;&amp;rdquo; is shown in Figure 4 and a flow graph for
&amp;ldquo;&lt;code&gt;EncEAS&lt;/code&gt;&amp;rdquo; is shown in Figure 5.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig4.png" title="Figure 4: Flow graphs for EncFile function. The flow is identical." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 4: Flow graphs for EncFile function. The flow is identical.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The samples are compiled for different operating systems and architectures
using different versions of the Go compiler which results in a slight
difference in the generated assembly code. The function opens a file handler to
the file to be encrypted. It uses the &amp;ldquo;Stat&amp;rdquo; function provided by Go&amp;rsquo;s standard
library to determine the file size. Based on the size, the flow splits into two
different branches.&lt;/p&gt;
&lt;p&gt;For SunCrypt, if the file is larger than 100 MB it goes down one branch while
QNAPCrypt uses a cutoff of 10 MB. Files smaller than the cutoff size goes down
to the second branch. In the large file branch, the SunCrypt reads in the first
100 MB using the &amp;ldquo;ReadAtLeast&amp;rdquo; function that is part of the standard library
&amp;ldquo;io&amp;rdquo; package. QNAPCrypt does the same but in the first 10 MB instead.&lt;/p&gt;
&lt;p&gt;For the smaller files, both families use the &amp;ldquo;ReadFile&amp;rdquo; function from the &amp;ldquo;io&amp;rdquo;
package. The read-in data is passed to the &amp;ldquo;&lt;code&gt;EncEAS&lt;/code&gt;&amp;rdquo; function that encrypts
the data. The content is finally written to disk as a new file with an
extension appended while the original file is removed. Except for the size
cutoff, the function logic in the two families is identical.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;&lt;code&gt;EncEAS&lt;/code&gt;&amp;rdquo; function encrypts the data using AES in Cipher Feedback (CFB)
mode. A comparison between the flow graphs is shown in Figure 5 below. As with
the &amp;ldquo;EncFile&amp;rdquo; function, the &amp;ldquo;&lt;code&gt;EncEAS&lt;/code&gt;&amp;rdquo; function has an identical logic and it
can be confirmed that it was compiled from a very similar source code.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig5.png" title="Figure 5: Flow graph comparison between SunCrypt and QNAPCrypt&amp;#39;s EncEAS function." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 5: Flow graph comparison between SunCrypt and QNAPCrypt&amp;#39;s EncEAS function.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Other Similarities&lt;span class="hx:absolute hx:-mt-20" id="other-similarities"&gt;&lt;/span&gt;
&lt;a href="#other-similarities" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In addition to the shared code between the two malware families for the
functionality responsible for the file encryption, the two families also have
other similarities. The similarities on their own do not indicate a connection,
but the collection of all of them does. The presentation of them is to
strengthen the connection indicated by the shared code. Figure 6 is showing
functions in QNAPCrypt that share similarities with functions in SunCrypt.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig6.png" title="Figure 6: Functions with similarities between QNAPCrypt and SunCrypt. File encryption logic is identical while the key generation and the encryption of the key is very similar. Both malware use the locale of the machine and GeoIP to determine the location of the machine." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 6: Functions with similarities between QNAPCrypt and SunCrypt. File encryption logic is identical while the key generation and the encryption of the key is very similar. Both malware use the locale of the machine and GeoIP to determine the location of the machine.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Both ransomware are designed to not run on some of the Commonwealth of
Independent States (CIS). QNAPCrypt will not perform any encryption of files if
it believes it is running on a Belarusian, Russian or Ukrainian machine.
SunCrypt does the same, but also includes Kyrgyzstan and Syria in the list.&lt;/p&gt;
&lt;p&gt;The way the ransomware tries to determine this is very similar, both use two
sources for this information. One of the sources is the locale of the machine.
As QNAPCrypt is targeting Linux machines and SunCrypt targets Windows machines,
the way of obtaining this information is different. The second source is via
geolocation based on the external IP address of the machine. Both ransomware
reaches out to an external service to get this information, &amp;ldquo;&lt;code&gt;ip-api.com&lt;/code&gt;&amp;rdquo; for
SunCrypt and &amp;ldquo;&lt;code&gt;ipapi.co&lt;/code&gt;&amp;rdquo; for QNAPCrypt. While the families use different
services, they both use the locale on the machine and the geoip information to
determine if the machine is located in a disallowed country.&lt;/p&gt;
&lt;p&gt;As discussed in the section covering the file encryption code, the files are
encrypted with AES in CFB mode. Both ransomware generates a unique 32
characters &amp;ldquo;password.&amp;rdquo; The logic for generating this code is very similar. A
comparison of the logic is shown in Figure 7. The characters in the password
are randomly selected from a list of valid characters that includes all the
English upper and lower characters and the numbers 0 through 9. The list is
identical between the malware. The rand implementation provided the math
package in the standard library is used, which means the randomness is not
cryptographic. The randomness is seeded with the current time. The main
difference is that SunCrypt resets the seed every time the function responsible
for generating the &amp;ldquo;password&amp;rdquo; is called, while QNAPCrypt sets the seed during
the initialization. SunCrypt also uses the function to generate a victim
identifier.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig7.png" title="Figure 7: Generation of the encryption password. The function loops 32 times and uses rand.Intn to pick a random character from the list of valid characters. When the loop is done, the byte slice of characters is converted to a string." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 7: Generation of the encryption password. The function loops 32 times and uses rand.Intn to pick a random character from the list of valid characters. When the loop is done, the byte slice of characters is converted to a string.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The encryption password is encrypted with a public RSA key included in the
binary. The logic for this code is similar as can be seen in Figure 8. The code
uses the &lt;code&gt;EncryptPKCS1v15&lt;/code&gt; function that is part of the &lt;code&gt;crypto/rsa&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig8.png" title="Figure 8: Encrypting of the password using the included public key in the binary." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 8: Encrypting of the password using the included public key in the binary.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Both ransomware families have command and control (C2) infrastructure hosted as
Tor hidden services. The first version of QNAPCrypt reached out to the C2 to
fetch information for the ransom note, including the Bitcoin wallet used for
the campaign. SunCrypt sends campaign information and uploads stolen files to
the C2 server. To access the hidden service, both families use a public
available SocksV5 proxy. QNAPCrypt connects directly to an IP address
(&lt;code&gt;192.99.206[.]61&lt;/code&gt;) while the proxy used by SunCrypt is accessed via the domain
&lt;code&gt;vie8hoos[.]xyz&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The file types encrypted by the ransomware are also similar. Both families have
a list of file extensions that they use to determine if the file should be
encrypted. In total, SunCrypt has a list of 589 file extensions. If we compare
the SunCrypt list to the list used by the first version of QNAPCrypt we can see
that SunCrypt&amp;rsquo;s list has added four new entries and removed 19 entries. The
lists are not sorted in any way so the extract lists appear exactly in the same
order as they appeared in the malware. The code snippet below shows the &lt;code&gt;diff&lt;/code&gt;
between the two lists.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ diff suncrypt_ext.lst qnap_ext_20190705.lst
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;460d459
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .mp4
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;562, 564d560
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .java
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .swift
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .go
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;589a586, &lt;span class="m"&gt;604&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .gcode
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .ngc
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .sldprt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .sldasm
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .x_t
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .step
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .fits
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .cat
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .ctlg
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .fit
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .rsn
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .eml
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .vhdx
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .cfg
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .plist
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .bckup
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .far
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .tbz
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .abf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If we compare SunCrypt&amp;rsquo;s list to the list used by the second version of
QNAPCrypt from August the same year, the overlap is even bigger. The &amp;ldquo;diff&amp;rdquo;
output is shown in the snippet below. The difference is that SunCrypt has added
three entries and removed two. This results in a string similarity of 0.991
which is a strong similarity.&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ diff suncrypt-files.lst qnap_ext_20190801.lst
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;562, 564d561
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .java
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .swift
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt; .go
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;589a587, &lt;span class="m"&gt;588&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .gcode
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; .ngc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Dark Web Activity&lt;span class="hx:absolute hx:-mt-20" id="dark-web-activity"&gt;&lt;/span&gt;
&lt;a href="#dark-web-activity" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Not long after the public reports on QNAPCrypt/eCh0raix, a new forum user named
eCh0raix became active and started promoting the ransomware. Later, a SunCrypt
user account promoted a new ransomware affiliate service. While both actors
operated on the same popular Russian-language dark web forum, this is where the
similarities end.&lt;/p&gt;
&lt;h3&gt;eCh0raix&lt;span class="hx:absolute hx:-mt-20" id="ech0raix"&gt;&lt;/span&gt;
&lt;a href="#ech0raix" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The actor behind eCh0raix first posted on August 31, 2019, announcing an
affiliate program for a ransomware targeting Linux, Figure 9. This includes a
diagram showing how the program works.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig9.png" title="Figure 9: Announcement post made by the eCh0raix actor on the dark web." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 9: Announcement post made by the eCh0raix actor on the dark web.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In the post (Figure 10), eCh0raix cites research by threat researchers (from
Anomali and Trend Micro), a marketing technique often used by RaaS providers in
order to bolster credibility.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig10.png" title="Figure 10: The threat actor referring to public research on his ransomware." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 10: The threat actor referring to public research on his ransomware.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;From this initial post until June 20, 2020, the actor posted 27 new threads on
the forum and another 77 replies to existing threads. They were quite
gregarious, jumping into threads and sharing expertise and advice. While the
actor did not give any updates on eCh0raix ransomware, all of the posts
concluded with a signature that included the citation from the threat
researchers.&lt;/p&gt;
&lt;p&gt;The actor&amp;rsquo;s catalogue of posts dealt with a broad variety of topics. On
December 25, 2019, eCh0raix offered a second service called DirBuster (Figure
11), for scanning domains, subdomains, pages, and scripts, which appears to
have been rebranded as Masscan a few months later:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig11.png" title="Figure 11: Forum post by the threat actor announcing port scanning service called Masscan." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 11: Forum post by the threat actor announcing port scanning service called Masscan.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The actor was also interested in virtualization, network access, and databases.
They posted a lengthy account of hacking a Magento site, sold SSH root
access/web shell access to a Costa Rican ad network and to an American IT
company, and a database dump from a Canadian cannabis store.&lt;/p&gt;
&lt;p&gt;In his final post (Figure 12) on the forum, the actor was looking to purchase a
Shodan account from which to export IP addresses. Like every post before it,
this post concluded with the same announcement of eCh0raix ransomware that had
been used ten months prior.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig12.png" title="Figure 12: Final post by the threat actor." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 12: Final post by the threat actor.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Since this was posted on June 20, 2020, without any reason or indication the
account has been inactive.&lt;/p&gt;
&lt;h3&gt;SunCrypt&lt;span class="hx:absolute hx:-mt-20" id="suncrypt"&gt;&lt;/span&gt;
&lt;a href="#suncrypt" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;On August 12, 2020, the actor behind SunCrypt posted on the same forum for the
first time. In a post titled &lt;code&gt;[PARTNERSHIP PROGRAM] SunCrypt Ransomware&lt;/code&gt;
(Figure 13), the actor posted characteristics of the ransomware and issued a
call for five affiliates to spread the ransomware. The actor noted that once
the affiliate program was full, &amp;ldquo;we will go into private again.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig13.png" title="Figure 13: Forum post announcing the SunCrypt partnership program." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 13: Forum post announcing the SunCrypt partnership program.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The actor posted 11 more times, all on this single thread and having to do with
searching for affiliates or answering technical questions about the ransomware.
On August 29, the actor announced that the affiliate program was full. Then on
September 3, they announced that a position was vacated.&lt;/p&gt;
&lt;p&gt;On September 19, an actor posted on the thread (Figure 14), &amp;ldquo;Even hospitals are
scammed by these scum,&amp;rdquo; and cited a Bleeping Computer article about a SunCrypt
attack against University Hospital New Jersey (UHNJ).&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig14.png" title="Figure 14: Another threat actor posts in the SunCrypt thread about how the ransomware has been used in attacks against hospitals." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 14: Another threat actor posts in the SunCrypt thread about how the ransomware has been used in attacks against hospitals.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;SunCrypt wrote defensively (Figure 15), &amp;ldquo;how can I see you are the most honest
here…. Mother Teresa&amp;rdquo; a stretched take on &amp;ldquo;Let he who is without attacking a
hospital with ransomware cast the first stone.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The actor continued, blaming the hospital attack on a new affiliate, who was
reportedly punished, since &amp;ldquo;we don&amp;rsquo;t do hospitals, government agencies,
airports, and so on.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig15.png" title="Figure 15: The actor behind SunCrypt response to the hospital attack allegation." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 15: The actor behind SunCrypt response to the hospital attack allegation.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Later that day, another actor posted a lengthy technical analysis of the
ransomware. The SunCrypt actor angrily responded, &amp;ldquo;Tell me, why are you posting
this here?&amp;rdquo; and requested that the moderator erase the post (Figure 16).&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/03/when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt/images/fig16.png" title="Figure 16: The threat actor&amp;#39;s angry response to a technical analysis of the ransomware." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 16: The threat actor&amp;#39;s angry response to a technical analysis of the ransomware.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;As of the date of this publication, the actor has not posted again. It is
unclear why.&lt;/p&gt;
&lt;p&gt;SunCrypt&amp;rsquo;s dedicated leak site (DLS) soon wound down. Starting on August 1,
there were 15 posts of data from targeted organizations. After September 19,
there were only three more over the next 10 days. Even though
&lt;a href="https://analyze.intezer.com/files/95ca9e284a085ce93f68c3d12e6c5f557a5049539e3379284a65de784e1bdeff?utm_campaign=research-blog&amp;amp;utm_content=when-viruses-mutate-did-suncrypt-ransomware-evolve-from-qnapcrypt&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;new&lt;/a&gt;
samples of SunCrypt ransomware had surfaced in VirusTotal, it appears that
SunCrypt&amp;rsquo;s public campaign on dark web forums and management of a DLS went
dark.&lt;/p&gt;
&lt;p&gt;It is unclear why the forum thread went silent and why the DLS site suspended
operations, but the timing indicates that it was related to the hospital
attack. SunCrypt&amp;rsquo;s operators may have been afraid that unwanted notoriety would
attract law enforcement actions or security researchers, so they decided to
keep a lower profile until the attention subsided.&lt;/p&gt;
&lt;p&gt;Suddenly, on February 16, SunCrypt&amp;rsquo;s DLS listed a new victim: PRP Diagnostic
Imaging. It appears that SunCrypt has returned to the business of public
ransomware breaches.&lt;/p&gt;
&lt;p&gt;It is notable that PRP provides &amp;ldquo;an extensive range of diagnostic [medical]
imaging services,&amp;rdquo; such as MRIs, ultrasounds, and mammograms. Thus, while
attacking a hospital may have forced the actor to suspend operations for
several months, SunCrypt has returned and continues to target healthcare
providers. These, despite the actor&amp;rsquo;s protest that &amp;ldquo;we don&amp;rsquo;t do hospitals.&amp;rdquo;&lt;/p&gt;
&lt;h2&gt;Comparing the Actors&lt;span class="hx:absolute hx:-mt-20" id="comparing-the-actors"&gt;&lt;/span&gt;
&lt;a href="#comparing-the-actors" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Despite the code similarities between the two ransomwares, the actors behind
them exhibited very different behaviors. The eCh0raix actor mentioned his
ransomware in passing, but it was hardly their only focus. They launched other
initiatives, shared advice, and participated in unrelated conversations in the
forum.&lt;/p&gt;
&lt;p&gt;Meanwhile, the SunCrypt actor was solely focused on a single purpose:
advertising the ransomware in order to recruit affiliates. During his five
weeks of activity, they were active in one thread only. SunCrypt operated a DLS
site, indicating a more sophisticated operation, while eCh0raix did not.&lt;/p&gt;
&lt;p&gt;Considering these behavioral differences, it is our assessment that the
eCh0raix and SunCrypt accounts are operated by different individuals/groups.
Perhaps the eCh0raix actor, overwhelmed by their many initiatives, decided that
they did not have the resources to operate it and sold it to an affiliate.
Maybe they were approached by a stranger asking to procure the source code.
While we may never know the full story, it appears that the eCh0raix ransomware
was transferred to and upgraded by the SunCrypt operators.&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;With technical analysis, it is possible to link the currently active version of
SunCrypt back to QNAPCrypt, a ransomware that was used to target NAS devices
back in the Summer of 2019. While the technical based evidence strongly
provides a link between QNAPCrypt and the earlier version of SunCrypt, it is
clear that both ransomware are operated by different individuals. Based on the
available data, it is not possible to connect the activity between the two
actors on the forum. This suggests that when new malware services derived from
older services appear, they may not always be operated by the same people.&lt;/p&gt;
&lt;p&gt;With this in mind, security officials should note that just because one malware
family is an iteration of another, it does not mean that the new family will be
deployed in exactly the same way. If a malware is exchanged, whether to an
affiliate or over the dark web, then the new operators may choose different
procedures, attack vectors, and targets. They might invest considerably in the
new malware, adding features and evasion techniques. Defenders must remain
vigilant.&lt;/p&gt;</description></item><item><title>PureLocker: New Ransomware-as-a-Service Being Used in Targeted Attacks Against Servers</title><link>https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/</link><pubDate>Tue, 12 Nov 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/</guid><description>
&lt;p&gt;&lt;em&gt;Analysis by Intezer and IBM X-Force points its origins to a
Malware-as-a-Service (MaaS) provider utilized by the Cobalt Gang and FIN6
attack groups&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This is a mutual research between Intezer and IBM&amp;rsquo;s X-Force IRIS team&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We have found a new and undetected ransomware threat that is being used for
targeted attacks against production servers of enterprises. Using code reuse
analysis, we discovered this threat is closely related to the &amp;ldquo;more_eggs&amp;rdquo;
backdoor malware, which is sold on the dark web by a veteran
&lt;a href="https://medium.com/@quoscient/golden-chickens-uncovering-a-malware-as-a-service-maas-provider-and-two-new-threat-actors-using-61cf0cb87648"target="_blank" rel="noopener"&gt;MaaS provider&lt;/a&gt;
and has been used by the Cobalt Gang, FIN6, and other threat groups.&lt;/p&gt;
&lt;p&gt;While the samples we analyzed are for the Windows platform, we have noticed
that the group operating this ransomware is also employing a Linux variant in
order to attack the Linux infrastructure of its targets.&lt;/p&gt;
&lt;p&gt;We have named this ransomware PureLocker because it&amp;rsquo;s written in the PureBasic
programming language. As part of our analysis, we have identified the evasion
methods and design features that have allowed this ransomware to remain under
the radar for several months. Below we present our findings through a technical
analysis of the malware samples.&lt;/p&gt;
&lt;h2&gt;Initial Analysis&lt;span class="hx:absolute hx:-mt-20" id="initial-analysis"&gt;&lt;/span&gt;
&lt;a href="#initial-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The Windows sample we analyzed is a 32-bit DLL, masquerading as a C++
cryptography library called &lt;a href="https://www.cryptopp.com/"target="_blank" rel="noopener"&gt;Crypto++&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In viewing the exports section we quickly noticed that something was unusual,
as the library supposedly contains functions related to music playback.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When looking at anti-virus vendor scan results in VirusTotal, we observed that
the file has been essentially undetected for more than three weeks now, which
is quite rare for a malicious file:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Additionally, when we executed this file in several sandbox environments it
didn&amp;rsquo;t exhibit any malicious or suspicious behaviors.&lt;/p&gt;
&lt;p&gt;However, after genetically analyzing the file in Intezer Analyze we made three
key observations:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;There is no Crypto++ code connection here, meaning the sample is not a
Crypto++ library.&lt;/li&gt;
&lt;li&gt;The file contains reused code from several malware families, mainly from
Cobalt Gang binaries. This means the file is malicious and may have
relations to Cobalt Gang.&lt;/li&gt;
&lt;li&gt;The majority of the relevant code in this file is unique, indicating that
it&amp;rsquo;s likely a new or highly modified malware. A Closer Look&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A closer look reveals this file is a ransomware written in the
&lt;a href="https://www.purebasic.com/"target="_blank" rel="noopener"&gt;PureBasic programming language&lt;/a&gt;, a rather uncommon
programming language. This unusual choice poses advantages for the attacker. AV
vendors have trouble generating reliable detection signatures for PureBasic
binaries. In addition, PureBasic code is portable between Windows, Linux, and
OS-X, making targeting different platforms easier.&lt;/p&gt;
&lt;p&gt;The malware is designed to be executed as a COM server DLL by regsrv32.exe,
which will invoke the DllRegisterServer export, where the malware&amp;rsquo;s code
resides. All of the other, music related, exports have no functionality and are
included in the ransomware for deception only.&lt;/p&gt;
&lt;p&gt;The malware&amp;rsquo;s strings are encoded and stored as Unicode hex strings. Each
string is decoded on demand by calling a string decoding function.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware&amp;rsquo;s code begins by checking if it was executed as intended by the
attackers, and that it&amp;rsquo;s not being analyzed or debugged. If any of these checks
fail, the malware will exit immediately, without deleting itself, likely as an
anti-analysis method not to raise suspicion. The main function flow graph is
presented below:&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig6.png" title="Overview of main payload function" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Overview of main payload function&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In case the malware&amp;rsquo;s payload is executed, the malware will delete itself
immediately afterwards.&lt;/p&gt;
&lt;h2&gt;Part of a Targeted Attack Chain&lt;span class="hx:absolute hx:-mt-20" id="part-of-a-targeted-attack-chain"&gt;&lt;/span&gt;
&lt;a href="#part-of-a-targeted-attack-chain" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;There are several hints suggesting that this component is part of a targeted
and multi-stage attack. The malware begins by checking whether it was executed
with the &lt;code&gt;/s /i&lt;/code&gt; arguments, which instructs regsrv32.exe to install the DLL
component without raising any dialogues (silent):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Later on the malware verifies that it&amp;rsquo;s indeed executed by &lt;code&gt;regsrv32.exe&lt;/code&gt;, and
that its file extension is either &lt;code&gt;.dll&lt;/code&gt; or &lt;code&gt;.ocx&lt;/code&gt;. It also verifies that the
current year on the machine is 2019, and that it has administrator rights. As
mentioned, if any of these checks fail, the malware will exit without
performing any malicious activity, likely in an attempt to conceal its
functionality.&lt;/p&gt;
&lt;p&gt;This type of behavior is not common in ransomware, which typically prefer to
infect as many victims as possible in the hopes of gaining as much profit as
possible. Additionally, being a DLL file designed to be executed in a very
specific manner reveals this ransomware is a later-stage component of a
multi-stage attack.&lt;/p&gt;
&lt;h2&gt;Evasion and Anti-Analysis Techniques&lt;span class="hx:absolute hx:-mt-20" id="evasion-and-anti-analysis-techniques"&gt;&lt;/span&gt;
&lt;a href="#evasion-and-anti-analysis-techniques" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Uncharacteristically for a ransomware, the malware uses an anti-hooking
technique by manually loading another copy of &amp;ldquo;ntdll.dll&amp;rdquo; and resolving API
addresses manually from there. This is an attempt by the malware to evade
user-mode hooking of ntdll functions. While it&amp;rsquo;s a known trick, it&amp;rsquo;s rarely
used in ransomware.&lt;/p&gt;
&lt;p&gt;The imports themselves are stored as 32bit hash values, and the ransomware uses
the familiar resolve-by-hash method to obtain the function addresses.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also worth noting that the
&lt;a href="../../../2019/11/acbackdoor-analysis-of-a-new-multiplatform-backdoor/"&gt;malware uses low level Windows&lt;/a&gt;
API functions in ntdll.dll for most of its functionality—with some exceptions
from kernel32.dll and advapi32.dll—notably for file manipulation. The malware
also does not use the Windows Crypto API functions, instead relying on the
compiled-in purebasic crypto library for its encryption needs, with the
exception of utilizing
&lt;a href="https://docs.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom"target="_blank" rel="noopener"&gt;SystemFunction036 from advapi32.dll&lt;/a&gt;
(RtlGenRandom) for pseudo-random number generation.&lt;/p&gt;
&lt;h2&gt;Encryption and Ransom Note&lt;span class="hx:absolute hx:-mt-20" id="encryption-and-ransom-note"&gt;&lt;/span&gt;
&lt;a href="#encryption-and-ransom-note" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In the event that all anti-analysis and integrity tests performed by the
malware are satisfied, it proceeds to encrypt the files on the victim&amp;rsquo;s machine
with the standard AES+RSA combination, using a hard-coded RSA key. The
ransomware adds the &lt;code&gt;.CR1&lt;/code&gt; extension for each encrypted file. It encrypts
mostly data files, skipping encryption for executable files according to the
particular file&amp;rsquo;s extension. The ransomware then secure-deletes the original
files in order to prevent recovery. Once the malware has completed the
encryption it leaves a ransom note file on the user&amp;rsquo;s desktop named
&lt;code&gt;YOUR_FILES.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting that the ransom note does not ask for the payment type or for
the monetary amount inside of the note itself, instead instructing the victim
to contact the attacker via email. The attackers use the anonymous and
encrypted &lt;a href="https://protonmail.com/"target="_blank" rel="noopener"&gt;Proton email service&lt;/a&gt;. Each sample we
analyzed contained a different email address, which might be how the attackers
can link between different victims and their respective decryption keys (each
email corresponds to a specific RSA key pair). This is further evidence that
this threat is different from typical forms of ransomware.&lt;/p&gt;
&lt;p&gt;Another element to note is the &lt;code&gt;CR1&lt;/code&gt; string, which appears in the attacker
email addresses, the encrypted file extension, and ransom note. Since this is a
RaaS, we believe this string is most likely the identifier of the group that is
operating these specific samples.&lt;/p&gt;
&lt;h2&gt;Code Connections and Origin&lt;span class="hx:absolute hx:-mt-20" id="code-connections-and-origin"&gt;&lt;/span&gt;
&lt;a href="#code-connections-and-origin" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;A deeper examination of the genetic analysis results reveals that the code
reuse connections to Cobalt Gang are related to a specific component used by
the group in its attack chain,
&lt;a href="http://blog.morphisec.com/cobalt-gang-2.0"target="_blank" rel="noopener"&gt;described here by Morphisec&lt;/a&gt; as the
Stage 3 Dropper DLL. More specifically, this component is the loader part of
the &amp;ldquo;more_eggs&amp;rdquo; JScript backdoor, also known as &amp;ldquo;SpicyOmelette&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Last year,
&lt;a href="https://medium.com/@quoscient/golden-chickens-uncovering-a-malware-as-a-service-maas-provider-and-two-new-threat-actors-using-61cf0cb87648"target="_blank" rel="noopener"&gt;QuoScient uncovered&lt;/a&gt;
that Cobalt Gang had been buying its malware kits from a malware-as-a-service
(MaaS) provider on underground cybercrime forums. QuoScient also observed two
additional threat groups using the same MaaS kits in their operations,
including the &amp;ldquo;more_eggs&amp;rdquo; backdoor.&lt;/p&gt;
&lt;p&gt;Most recently, IBM X-Force has
&lt;a href="https://securityintelligence.com/posts/more_eggs-anyone-threat-actor-itg08-strikes-again/"target="_blank" rel="noopener"&gt;uncovered several campaigns by FIN6&lt;/a&gt;
(also known as ITG08) where they observed heavy usage of the &amp;ldquo;more_eggs&amp;rdquo;
malware kit.&lt;/p&gt;
&lt;p&gt;A comparison between the PureLocker ransomware samples and recent more_eggs
loader samples reveals it&amp;rsquo;s extremely likely that they were created by the same
author. The lines of similarity are evident:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;COM Server DLL components written in PureBasic&lt;/li&gt;
&lt;li&gt;Nearly identical pre-payload stage in both functionality and code, with
identical evasion and anti-analysis methods&lt;/li&gt;
&lt;li&gt;Identical string encoding and decoding methods&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/11/purelocker-ransomware-being-used-in-targeted-attacks-against-servers/images/fig10.png" title="COM Server DLL components written in PureBasic" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;COM Server DLL components written in PureBasic&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;These findings strongly suggest that the MaaS provider of &amp;ldquo;more_eggs&amp;rdquo; has added
a new malware kit to its offerings, by modifying the &amp;ldquo;more_eggs&amp;rdquo; loader&amp;rsquo;s
payload from a JScript backdoor to a ransomware.&lt;/p&gt;
&lt;p&gt;While we have a good sense regarding the malware&amp;rsquo;s origin, it&amp;rsquo;s unclear at this
time whether the &amp;ldquo;CR1&amp;rdquo; group that&amp;rsquo;s using this ransomware for targeted attacks
is a previous customer of the MaaS provider, such as Cobalt Gang and FIN6, or a
new one.&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;PureLocker is a rather unorthodox ransomware. Instead of trying to infect as
many victims as possible, it was designed to conceal its intentions and
functionalities unless executed in the intended manner. This approach has
worked well for the attackers who have managed to successfully use it for
targeted attacks, while remaining undetected for several months.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s interesting to note that the code of the evasion and anti-analysis
functionalities described in this blog is directly copied from the &amp;ldquo;more_eggs&amp;rdquo;
backdoor loader. Some of these duplicated features have allowed the ransomware
to stay undetected by evading automated analysis systems. This provides an
example of the importance of code reuse analysis for malware detection and
classification. It twists the usage of any previously used code, even code for
effective evasion and anti-analysis, into a reliable indicator for detection.&lt;/p&gt;
&lt;p&gt;The PureLocker ransomware is now indexed in Intezer&amp;rsquo;s code genome database and
the genetic analysis of its samples
&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=purelocker-ransomware-being-used-in-targeted-attacks-against-servers&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/files/c592c52381d43a6604b3fc657c5dc6bee61aa288bfa37e8fc54140841267338d"target="_blank" rel="noopener"&gt;can be viewed in Intezer Analyze&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Intezer would like to thank IBM&amp;rsquo;s X-Force IRIS team for its collaboration on
this mutual research. For more information, check out
&lt;a href="https://exchange.xforce.ibmcloud.com/collection/New-Ransomware-Available-for-Targeted-Attacks-99c7156cff70e1d8e1687ab7dadc8c0e"target="_blank" rel="noopener"&gt;IBM&amp;rsquo;s X-Force exchange collection related to this threat&lt;/a&gt;&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;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;1fd15c358e2df47f5dde9ca2102c30d5e26d202642169d3b2491b89c9acc0788
c592c52381d43a6604b3fc657c5dc6bee61aa288bfa37e8fc54140841267338d&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>How We Seized 15 Active Ransomware Campaigns Targeting Linux File Storage Servers</title><link>https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/</link><pubDate>Wed, 10 Jul 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/</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;It is rare to see ransomware being used to target the Linux operating system.
However, cyber criminals seem to adapt to this emerging environment and use a
variety of creative methods to gain profits from this landscape.&lt;/p&gt;
&lt;p&gt;We at Intezer have detected and temporarily DoS’d the operation of a ransomware
targeting Linux-based file storage systems (NAS servers).&lt;/p&gt;
&lt;p&gt;We have named the ransomware QNAPCrypt, as this is the name the authors have
appeared to label the malware. QNAP is a well-known vendor for selling NAS
servers, which the malware was intended to infect and encrypt the containing
files for ransom. NAS servers normally store large amounts of important data
and files, which make them a valuable target for attackers and especially a
viable target for ransomware campaigns.&lt;/p&gt;
&lt;p&gt;This malware currently has very low detection rates in all major security
solutions.&lt;/p&gt;
&lt;p&gt;The first two sections of this blog post will explain in brief how QNAPCrypt
operates and how we were able to take advantage of two design flaws in the
ransomware infrastructure in order to temporarily stop the campaign—preventing
the malware from infecting additional victims and forcing the authors behind
this malware to deploy new instances. Lastly, we will present a detailed
technical analysis of the malware and the investigation of the entire campaign.&lt;/p&gt;
&lt;p&gt;For reference, here is the genetic analysis of the QNAPCrypt malware:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/files/3d7ebe73319a3435293838296fbb86c2e920fd0ccc9169285cc2c4d7fa3f120d"target="_blank" rel="noopener"&gt;ARM variant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/files/076a6fa4e051c061e19b9e3e37da9c63a9bc7c1a99111ac13b32eb2f70b7fa5c"target="_blank" rel="noopener"&gt;x86 variant&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig1.png" title="QNAPCrypt malware" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;QNAPCrypt malware&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;How the Ransomware Works&lt;span class="hx:absolute hx:-mt-20" id="how-the-ransomware-works"&gt;&lt;/span&gt;
&lt;a href="#how-the-ransomware-works" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The QNAPCrypt ransomware works similarly to other ransomware, including
encrypting all files and delivering a ransom note. However, there are several
important differences:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The ransom note was included solely as a text file, without any message on
the screen—naturally, because it is a server and not an endpoint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every victim is provided with a different, unique Bitcoin wallet—this could
help the attackers avoid being traced.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once a victim is compromised, the malware requests a wallet address and a
public RSA key from the command and control server (C&amp;amp;C) before file
encryption.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;How We Seized the Campaign&lt;span class="hx:absolute hx:-mt-20" id="how-we-seized-the-campaign"&gt;&lt;/span&gt;
&lt;a href="#how-we-seized-the-campaign" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig2.jpg" title="QNAPCrypt ransomware" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;QNAPCrypt ransomware&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;In order to further research the malware and its operation, we wrote a script
to simulate infections on a wide scale to see how the wallet generation
mechanism worked in the attackers’ back end.&lt;/p&gt;
&lt;p&gt;After simulating the infections of hundreds of virtual “victims”, we discovered
two major design flaws in the ransomware infrastructure which led us to seize
the operation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The list of bitcoin wallets was created in advance and it was static.
Therefore, it does not create a new wallet for each new victim in real time,
but rather it pulls a wallet address from a fixed, predetermined list.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once all of the wallets are allocated (or sent), the ransomware would not be
able to continue its malicious operation in the victim’s machine.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After simulating the infection of more than 1,091 victims from 15 different
campaigns, we encountered that the attackers ran out of unique Bitcoin wallets
to supply to their victims. As a result, any future infection will be
unsuccessful and the authors behind this malware were forced to update their
implants in order to circumvent this design flaw in their infrastructure to
continue with their malicious operations.&lt;/p&gt;
&lt;p&gt;After several days of continuously DoS&amp;rsquo;ing their infrastructure, we have
observed a newer variant in the wild that
&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/files/076a6fa4e051c061e19b9e3e37da9c63a9bc7c1a99111ac13b32eb2f70b7fa5c"target="_blank" rel="noopener"&gt;shares a significant amount of code&lt;/a&gt;
with previous QNAPCrypt instances and Linux.Rex. This time, the newer variant
uses an embedded static wallet and RSA public key in contrast to previous
instances.&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 initial implant we found came in the form of a statically linked Golang
binary built with the Go linker for ARM architecture. Throughout our research,
we were able to confirm that other variants exist for additional architectures
such as x86 / x64.&lt;/p&gt;
&lt;p&gt;Go binaries may seem difficult to analyze when they come stripped, since trying
to make sense of stripped statically linked binaries is usually a more
difficult task than analyzing stripped dynamically linked binaries.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can observe that this binary is indeed a Go executable by looking at the
section names in its section header table.&lt;/p&gt;
&lt;p&gt;If we know the location of these sections, in particular the .gopclntab
section, we will be able to reconstruct symbol names and offsets. This
methodology is illustrated in the following diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;For further insights into populating function names in Go binaries we highly
recommend to view Tim Strazzere’s presentation and &lt;a href="https://github.com/strazzere/golang_loader_assist"target="_blank" rel="noopener"&gt;scripts in GitHub&lt;/a&gt; which
document this technique.&lt;/p&gt;
&lt;p&gt;After retrieving Go function names, analyzing the binary becomes much less
complex since we can highlight the relevant functions of the application. Let’s
not forget that the binary is 4MB in size.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After several cryptography algorithm initializations and parsing of arguments
for directory whitelisting and alike functionalities, the malware will send a
GET request to the CNC as a means to communicate that a new victim has been
compromised and that system locking is taking place:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After sending this GET request, the malware will attempt to retrieve victim
keys configuration using a client for the SOCKS proxy protocol version 5.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig7.png" title="SOCKS proxy protocol version 5" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;SOCKS proxy protocol version 5&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This proxy will request to connect to an onion domain name. The following
represents the relevant packets for this connection:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After successful connection through the proxy to the onion domain, an
additional GET request to the ransomware REST API is completed in order to
retrieve the RSA public key that will be used to encrypt the file system—a
unique Bitcoin wallet and the ransom note specific to the victim. All of these
artifacts seem to be retrieved based on a specific campaign ID.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The response from the server is the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After victim configuration has been retrieved, the malware will proceed to
remove itself and then it will parse the retrieved RSA public key.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig11.png" title="RSA public key" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;RSA public key&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This RSA public key will be used to encrypt a random sequence of bytes that
would be used to encrypt the file system later on. This encrypted key will be
base64 encoded and it will be written at the end of the ransom note file called
README_FOR_DECRYPT.txt. We also noted that the ransomware distributes a
different Bitcoin wallet per each compromised system:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After this file is created, the malware will proceed to execute the locking
mechanism by walking the file system encrypting files using AES CFB with the
derived encrypted key, avoiding to encrypt the ransom note just created:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware will target files with the following extensions:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig14.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After encryption, the malware will rename the affected files so that they will
be prefixed with &lt;code&gt;.encrypt&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig15.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In order for system decryption to take place the base64 encoded random sequence
encrypted with the RSA public key will be needed to be sent to the ransomware
operator via the onion domain site after paying the demanded ransom:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig16.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After system locking has taken place, the ransomware will communicate that it
has finished with the victim once again to the CNC:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig17.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Looking Outside of the Binary&lt;span class="hx:absolute hx:-mt-20" id="looking-outside-of-the-binary"&gt;&lt;/span&gt;
&lt;a href="#looking-outside-of-the-binary" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;One of our intended goals that we wanted to achieve when analyzing QNAPCrypt
was to assess the scale of victims the ransomware was dealing with.&lt;/p&gt;
&lt;p&gt;We were able to find a
&lt;a href="https://www.reddit.com/r/linux/comments/bucepu/linux_ransomware/"target="_blank" rel="noopener"&gt;Reddit thread&lt;/a&gt;
in which we contacted some of the affected victims:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig18.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;While talking to some of the victims related to the various campaigns of this
malware, we were able to identify the initial attack vector as SSH brute force
attacks and that they were targeting mainly NAS server providers, which
corresponds to how the attacker has chosen to label this malware:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig19.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After making these findings we studied their infrastructure to determine if
there was anything we could do to interact with this threat actor’s operations.&lt;/p&gt;
&lt;p&gt;While researching the ARM instance of the malware, we observed that there was a
request through their REST API in order to retrieve new victim configuration
keys as previously discussed. The following diagram is a high level overview of
the ransomware operation:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig20.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The connection to the SOCKS5 proxy is completed without any authentication
enforced, and anyone would have the capability to connect to it.&lt;/p&gt;
&lt;p&gt;Therefore, we decided to interact with the ransomware infrastructure in order
to retrieve configuration keys and potentially temporarily shut down the
operation of the ransomware to prevent infection of future victims that were
compromised by instances of the ransomware that followed the previous design
architecture:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig21.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This idea simply abuses the fact that no authentication is enforced to connect
to the SOCKS5 proxy as previously mentioned. Since the authors behind this
ransomware were delivering one Bitcoin wallet per victim from a static pool of
already generated wallets, we could replicate the infection packets to retrieve
all of the wallets until they had no further wallets under their control.
Therefore, when a genuine infection would occur, the ransom client would not be
able to retrieve configuration artifacts.&lt;/p&gt;
&lt;p&gt;We wrote the following script in order to implement the methodology described
above:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;socket&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;hexdump&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;192.99.206.61&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;65000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;BTC_WALLETS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AF_INET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SOCK_STREAM&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;x05x01x00&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;x05x01x00x03x16&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;sg3dwqfpnr4sl5hh.onionx00&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;x50&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;GET /api/GetAvailKeysByCampId/&lt;/span&gt;&lt;span class="si"&gt;%.2d&lt;/span&gt;&lt;span class="s1"&gt; HTTP/1.1x0dx0a&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Host: sg3dwqfpnr4sl5hh.onionx0dx0a&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;User-Agent: http/2x0dx0a&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Accept-Encoding: gzipx0ax0dx0a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;[+] Campaign id &lt;/span&gt;&lt;span class="si"&gt;%.2d&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexdump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;{&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;):])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;BtcPublicKey&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;BtcPublicKey&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;BTC_WALLETS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;BTC_WALLETS&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;BtcPublicKey&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="ne"&gt;ValueError&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;[+] CAMPAIN HAS NO WALLETS LEFT&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;wallets_&lt;/span&gt;&lt;span class="si"&gt;%0d&lt;/span&gt;&lt;span class="s2"&gt;.txt&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;w+&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;fd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;wallet&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;BTC_WALLETS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;fd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;wallet&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;n&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We were able to collect a total of 1,091 unique wallets meant to be delivered
to new victims distributed among 15 different campaigns.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig22.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, by depleting the attacker’s stored Bitcoin wallets we were able to
stop this malware from infecting new victims temporarily, since if there is a
failure to parse the RSA public key the client will just exit:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig23.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The following screenshot shows the packets that the onion domain will retrieve
after the entire static Bitcoin wallet pool was depleted:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig24.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The HTTP request returns a 200 but with a content length of 0, therefore
failing to retrieve configuration, and thus the ransomware client stops
execution. This implies that we were able to identify an easy method to prevent
further infections of this ransomware by constantly depleting its static
bitcoin wallet pool.&lt;/p&gt;
&lt;h2&gt;Attribution and Attackers Reaction&lt;span class="hx:absolute hx:-mt-20" id="attribution-and-attackers-reaction"&gt;&lt;/span&gt;
&lt;a href="#attribution-and-attackers-reaction" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After several days of continuously DoS&amp;rsquo;ing QNAPCrypt clients, we encountered
another QNAPCrypt sample—but this time targeting x86 systems.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig25.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Based on Genetic Malware Analysis, we observed that this specific implant
reused a large portion of code with old instances of x86 Linux.Rex builds.
Linux.Rex is known for deploying
&lt;a href="http://news.softpedia.com/news/crooks-used-sql-injections-to-hack-drupal-sites-and-install-web-ransomware-504300.shtml"target="_blank" rel="noopener"&gt;exploits&lt;/a&gt;
against Drupal servers in 2016, in order to conduct ransomware and DDoS
operations.&lt;/p&gt;
&lt;p&gt;The following represents some of the code similarities between Linux.Rex and
newer QNAPCrypt variants:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig26.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Although both implants implement different functionality, it is noticeable that
both were written in a similar manner.&lt;/p&gt;
&lt;p&gt;Furthermore, we can observe similarities with the ARM instance of QNAPCrypt but
with a major difference—the RSA public key, Bitcoin wallet and ransom note are
hardcoded in the binary:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig27.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We can also see that the hardcoded onion domain is exactly the same as in the
ARM variant, and the site design to pay the ransom is also the same, although
the demanded ransom in Bitcoin seems to be lower than in previous variants:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig28.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;We interpret the discovery of these newer instances with hardcoded
configuration to be a response from the threat actors behind this campaign to
attempt to circumvent the DoS that their non connectionless instances were
suffering. This implied that they were forced to change their implants and to
centralize their bitcoin wallets, making the tracking of their income via their
ransomware campaigns more convenient.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;span class="hx:absolute hx:-mt-20" id="conclusion"&gt;&lt;/span&gt;
&lt;a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We have covered the operation of the QNAPCrypt ransomware, and how we were able
to find design flaws to prevent the malware from running in newer victims’
machines and forcing the attackers behind the malware to update their implants
in order to circumvent these flaws.&lt;/p&gt;
&lt;p&gt;Additionally, Golang malware seems to be on the rise, since it appears to be a
very convenient language to create cross-platform malware.&lt;/p&gt;
&lt;p&gt;Furthermore, we have discussed how Linux ransomware has slightly different
targets than Windows ransomware, in this case targeting NAS servers rather than
Linux endpoints.&lt;/p&gt;
&lt;p&gt;Unfortunately detection rates of QNAPCrypt are low, and the ransomware could
create significant monetary losses and economic damage in comparison to other
types of Linux threats.&lt;/p&gt;
&lt;p&gt;We have created a custom
&lt;a href="https://github.com/intezer/yara-rules/blob/master/QNAPCrypt.yar"target="_blank" rel="noopener"&gt;YARA signature&lt;/a&gt;
for detecting future variants of QNAPCrypt.&lt;/p&gt;
&lt;h2&gt;Genetic Analysis&lt;span class="hx:absolute hx:-mt-20" id="genetic-analysis"&gt;&lt;/span&gt;
&lt;a href="#genetic-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The QNAPCrypt malware variants are now indexed in Intezer&amp;rsquo;s genetic database.
If you have a suspicious file that you suspect to be QNAPCrypt or other malware
from the Rex group, you can upload it to Intezer Analyze to detect code reuse
to this threat family and many others.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2019/07/seizing-15-active-ransomware-campaigns-targeting-linux-file-storage-servers/images/fig29.png" title="Genetic Analysis of the QNAPCrypt ARM variant" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Genetic Analysis of the QNAPCrypt ARM variant&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;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;sg3dwqfpnr4sl5hh[.]onion
192.99.206[.]61
3d7ebe73319a3435293838296fbb86c2e920fd0ccc9169285cc2c4d7fa3f120d
076a6fa4e051c061e19b9e3e37da9c63a9bc7c1a99111ac13b32eb2f70b7fa5c&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>Yet Another Distraction? A New Version of North Korean Ransomware Hermes Has Emerged</title><link>https://research.intezer.com/blog/2018/02/another-distraction-new-version-north-korean-ransomware-hermes/</link><pubDate>Thu, 08 Feb 2018 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2018/02/another-distraction-new-version-north-korean-ransomware-hermes/</guid><description>
&lt;h2&gt;Detecting Reused Ransomware&lt;span class="hx:absolute hx:-mt-20" id="detecting-reused-ransomware"&gt;&lt;/span&gt;
&lt;a href="#detecting-reused-ransomware" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Whether we’re dealing with a criminal threat actor looking to steal money from
their victims using ransomware or malware sponsored by a nation state, we can
consistently see the reuse of code. In this specific case, we have observed a
variant of a well-known ransomware, via a new version of Hermes from what may
have originated from a nation state threat actor.&lt;/p&gt;
&lt;p&gt;According to reports by researchers at
&lt;a href="https://securingtomorrow.mcafee.com/mcafee-labs/taiwan-bank-heist-role-pseudo-ransomware/"target="_blank" rel="noopener"&gt;McAfee&lt;/a&gt;
and
&lt;a href="http://baesystemsai.blogspot.com/2017/10/taiwan-heist-lazarus-tools.html"target="_blank" rel="noopener"&gt;BAE Systems&lt;/a&gt;,
a ransomware named Hermes was used as a diversion in an attack involving a bank
heist in Taiwan. The ransomware is thought to have originated from the Lazarus
group, a threat actor known to be affiliated with North Korea.
(&lt;a href="../../../2017/12/blockbusted-lazarus-blockbuster-north-korea/"&gt;You can be read about them in this blog post about the Blockbuster campaign.&lt;/a&gt;).
Security researcher
&lt;a href="https://twitter.com/demonslay335/status/960590594707017729"target="_blank" rel="noopener"&gt;@demonslay335&lt;/a&gt;
tweeted about the existence of a new sample Hermes 2.1, so our team decided to
take a deeper look.&lt;/p&gt;
&lt;h2&gt;Code Reuse Analysis of Hermes 2.1&lt;span class="hx:absolute hx:-mt-20" id="code-reuse-analysis-of-hermes-21"&gt;&lt;/span&gt;
&lt;a href="#code-reuse-analysis-of-hermes-21" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When examining new binaries, the first step we take in our research is to take
the binary and upload it to our Intezer Analyze™ system in order to identify
code reuse.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2018/02/another-distraction-new-version-north-korean-ransomware-hermes/images/fig1.jpg" title="Code Reuse Analysis of Hermes" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Code Reuse Analysis of Hermes&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Here we can see some code reuse between the Hermes samples that were originally
discovered as well as the latest sample. Since the sample came out mostly
unique — indicating that much of the binary has changed — we were still able to
catch some key parts that clearly reuse code.&lt;/p&gt;
&lt;p&gt;Intezer Analyze™ caught these fragments, and with a deeper look into IDA Pro,
we find an exact function-for-function match:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2018/02/another-distraction-new-version-north-korean-ransomware-hermes/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In other places, although the code is not exactly the same, we can see very
similar code to the original Hermes and techniques known to be used by Lazarus.&lt;/p&gt;
&lt;h2&gt;An Evolving Threat&lt;span class="hx:absolute hx:-mt-20" id="an-evolving-threat"&gt;&lt;/span&gt;
&lt;a href="#an-evolving-threat" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The last time this ransomware appeared there was a bank heist affiliated with
it, and now it is possible that this new sample was used in an attack where the
infected target was unaware of the intended result. It may have been used to
cover up intellectual property theft, bank fraud, or something even more
nefarious. At this moment in time, there is not enough information to make
definitive conclusions about the specific intent of the Lazarus group; however,
with the reappearance of Hermes, we can be confident that this likely won’t be
the last time this code will be used in an attack.&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;bcb96251c3e747c0deabadfecc4e0ca4f56ca30f8985cae807ca2ff29099d818 New Sample
851032eb03bc8ee05c381f7614a0cbf13b9a13293dfe5e4d4b7cd230970105e3 Related Sample&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>NotPetya Returns as Bad Rabbit</title><link>https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/</link><pubDate>Wed, 25 Oct 2017 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/</guid><description>
&lt;p&gt;Large scale cyber attacks seem to be happening once a month these days.
Originally discovered by
&lt;a href="https://www.welivesecurity.com/2017/10/24/kiev-metro-hit-new-variant-infamous-diskcoder-ransomware/"target="_blank" rel="noopener"&gt;ESET&lt;/a&gt;,
Ukrainian and Russian organizations have been hit with the latest ransomware
attack named Bad Rabbit. At the time of writing this post, the ransomware has
believed to have originated from compromised webpages with a fake popup for
updating Adobe Flash Player. It has been reported that much of the behavior of
Bad Rabbit has been similar to a previous ransomware known as NotPetya.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig1.png" title="Screenshot from ESET report, after ransomware has infected a computer" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Screenshot from ESET report, after ransomware has infected a computer&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Using Intezer Analyze™, we have found code reuse from NotPetya throughout
different binaries of Bad Rabbit.&lt;/p&gt;
&lt;p&gt;The Bad Rabbit loader, with the original name (install_flash_player.exe) and
metadata (Adobe Systems Incorporated as the company and Adobe Flash Player
Installer/Uninstaller), was made to look like the Adobe Flash Player installer.
You can see in the screenshot below that according to our analysis, the binary
did not contain any code from any Adobe product but does contain code from
NotPetya. In fact, we find that 27% of the code in the loader has been seen in
only NotPetya samples. Find the public report
&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=notpetya-returns-bad-rabbit&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/analyses/6ba279af-8ce2-46c6-8b86-5fa65a5ed42a"target="_blank" rel="noopener"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Below is a direct comparison of function (&lt;code&gt;0x1000C244&lt;/code&gt;) of NotPetya
(&lt;code&gt;027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745&lt;/code&gt;) and
function (&lt;code&gt;0x4033B4&lt;/code&gt;) of the Bad Rabbit loader
(&lt;code&gt;630325cac09ac3fab908f903e3b00d0dadd5fdaa0875ed8496fcbb97a558d0da&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Another example of code reuse in the loader from a function that seems to
initialize some type of struct.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#BadRabbit (#NotPetya v2) unpacked DLL: infpub.dat : &lt;a href="https://t.co/Ey5Yffsn74"target="_blank" rel="noopener"&gt;https://t.co/Ey5Yffsn74&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;— hasherezade (@hasherezade)
&lt;a href="https://x.com/hasherezade/status/922867095997681664?ref_src=twsrc%5Etfw"target="_blank" rel="noopener"&gt;October 24, 2017&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The final module that gets loaded and is responsible for encrypting the files
on disk (&lt;code&gt;579fd8a0385482fb4c789561a30b09f25671e86422f40ef5cca2036b28f99648&lt;/code&gt;)
also has a code connection with NotPetya samples. According to our technology,
we can see that 13% of the code has been reused. You can find the public report
&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=notpetya-returns-bad-rabbit&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com#/analyses/d41e8a98-a106-4b4f-9b7c-fd9e2c80ca7d"target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#badrabbit found to have 13% code reuse of #notpetya #petya here&amp;rsquo;s a public
report with the unpacked sample: &lt;a href="https://t.co/NOIul4yLVT"target="_blank" rel="noopener"&gt;https://t.co/NOIul4yLVT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;— Jay Rosenberg (@jaytezer)
&lt;a href="https://x.com/jaytezer/status/922875751174758400?ref_src=twsrc%5Etfw"target="_blank" rel="noopener"&gt;October 24, 2017&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Below is a screenshot comparing a function (&lt;code&gt;0x1000777B&lt;/code&gt;) of NotPetya (&lt;code&gt;027cc450ef5f8c5f653329641ec1fed91f694e0d229928963b30f6b0d7d3a745&lt;/code&gt;) and a function (&lt;code&gt;0x1000733&lt;/code&gt;C) of the encryptor module of Bad Rabbit (&lt;code&gt;579fd8a0385482fb4c789561a30b09f25671e86422f40ef5cca2036b28f99648&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The next screenshot is of another matching function between the two samples.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2017/10/notpetya-returns-bad-rabbit/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see in this attack, and in many other cases, malware authors constantly reuse their code. By recognizing code reuse, you force malware authors to rewrite code and come up with new techniques to avoid detection. This changes the playing field and makes it far less cost effective for malware authors and cyber crime organizations.&lt;/p&gt;
&lt;p&gt;IOCs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;630325cac09ac3fab908f903e3b00d0dadd5fdaa0875ed8496fcbb97a558d0da&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;8ebc97e05c8e1073bda2efb6f4d00ad7e789260afa2c276f0c72740b838a0a93&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;579fd8a0385482fb4c789561a30b09f25671e86422f40ef5cca2036b28f99648&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>