How to Detect and Remove Hidden Mining Malware from a Linux Server

This guide explains how to identify a compromised Linux server caused by hidden cryptocurrency mining malware, kill the malicious processes, clean infected files, and harden the system by reviewing scheduled tasks, startup scripts, user accounts, and SSH configurations.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
How to Detect and Remove Hidden Mining Malware from a Linux Server

Server became inaccessible and SSH extremely slow.

Using top revealed a high load average; the top process was an unknown "minerd". Research showed minerd is a cryptocurrency mining program, indicating a compromise.

Checked the process with ps -ef | grep minerd, found the executable in /tmp, killed it and removed the file. Load returned to normal.

Because the trojan can rename, copy, and auto‑run, continued monitoring. Later a new process "klll" appeared, which was also killed and its file deleted.

To close the breach, performed the following remediation steps:

Reviewed scheduled tasks and removed any unknown entries ( crontab -l, more /etc/crontab).

Checked startup scripts and disabled unnecessary services ( chkconfig --list | grep 3:on, examined /etc/rc.d/rc.local and /etc/rc.local).

Audited user accounts, disabled logins for non‑essential users and strengthened passwords.

Changed the SSH port and configured an IP whitelist for SSH access.

After rebooting and monitoring, the system remained stable. Further investigation of web applications is recommended.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

process managementLinuxmalwarecrontabServer SecuritySSH HardeningCryptocurrency Mining
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.