![]() |
|
[MRT-X Academy] Malware Removal Guide for Linux - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Whitehat β’ Blue Team β’ Defensive Security (https://hackforums.net/forumdisplay.php?fid=448) +---- Forum: Malware, Rat, and Virus Removal (https://hackforums.net/forumdisplay.php?fid=110) +---- Thread: [MRT-X Academy] Malware Removal Guide for Linux (/showthread.php?tid=6294765) |
[MRT-X Academy] Malware Removal Guide for Linux - Tha Sneak - Mar 20, 2025 ![]() π§ Malware Removal Guide for Linux π§ ![]() β οΈ Can Linux Get Malware? While Linux is more secure by design than other operating systems, it is not immune to malware. Threats include: β Rootkits β Trojans disguised as .sh scripts or packages β Crypto miners β Malicious repositories β Backdoored software π‘ Tip: Malware on Linux often targets servers, misconfigured systems, or users running as root unnecessarily. ![]() πΉ Step 1: Check for Suspicious Processes Use terminal commands to view running processes: Code ps aux --sort=-%cpuβ Look for unknown processes using excessive CPU, memory, or network. π‘ Tip: Install htop using your package manager for an interactive view: Code sudo apt install htop![]() πΉ Step 2: Scan with ClamAV or RKhunter Install and run open-source antivirus tools: β ClamAV β Virus scanner Code sudo apt updateβ RKhunter β Rootkit scanner Code sudo apt install rkhunterπ‘ Tip: For CentOS/RHEL/Fedora, use yum or dnf instead of apt. ![]() πΉ Step 3: Check Cron Jobs & Startup Scripts Check for suspicious scheduled tasks or auto-starting malware: Code crontab -lβ Delete unknown entries carefully. π‘ Tip: Malicious cron jobs may download payloads or run miners silently. ![]() πΉ Step 4: Review Installed Packages Check for unfamiliar or malicious packages: Code dpkg -l # For Debian/Ubuntuβ Remove suspicious packages: Code sudo apt remove [package]π‘ Tip: Always install software from trusted repositories. Avoid unknown PPAs or external .deb/.rpm files. ![]() πΉ Step 5: Monitor Network Activity Use tools to spot suspicious network connections: Code netstat -tulnpβ Look for unfamiliar IPs or services bound to unusual ports. π‘ Tip: Install nethogs or iftop to monitor per-process bandwidth usage. ![]() πΉ Step 6: Analyze Bash History & Aliases Check for malware launched through terminal: Code cat ~/.bash_historyβ Look for: - Scripts you didnβt run - Hidden curl/wget commands - Aliases masking common commands (e.g., ls, cd, sudo) π‘ Tip: Some malware modifies .bashrc or .profile β inspect them if unsure. ![]() πΉ Step 7: Scan for Malicious Files Run a full disk scan with ClamAV: Code sudo clamscan -r --bell -i /This command will: - Scan recursively (-r) - Ring the bell on detection (--bell) - Show infected files only (-i) π‘ Tip: You can scan just your home folder for faster results: Code clamscan -r ~/![]() πΉ Step 8: Clean or Reinstall Affected Systems If your system is heavily infected: β Backup important files. β Wipe and reinstall a clean Linux distro. β Avoid restoring binaries or config files unless verified safe. π‘ Tip: Use checksum tools (sha256sum) to verify ISO integrity before reinstalling. ![]() β Tips to Stay Protected on Linux β Avoid logging in as root for regular tasks. β Use a firewall (e.g., ufw) to block unnecessary ports. β Keep your system updated: Code sudo apt update && sudo apt upgradeβ Donβt install software from untrusted sources. β Monitor system logs with journalctl or /var/log/syslog. π Linux is secure, but only if you practice good hygiene! π
RE: [MRT-X Academy] Malware Removal Guide for Linux - Bastille - Mar 21, 2025 Nice check list, thanks for the thread +1 for Linux hardening, I think we can rely on CIS check lists https://www.cisecurity.org/benchmark RE: [MRT-X Academy] Malware Removal Guide for Linux - Pr0m3th3us - Mar 21, 2025 Great thread as usual, it seems you know how to remove malware from anything. |