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.
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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
