Which types of malware are there?
| Type | What defines it | Server relevance |
|---|---|---|
| Virus | Attaches to other files and spreads when they run | Rare on modern Linux servers |
| Worm | Spreads on its own across networks by exploiting services | High; exposed databases and SSH are common targets |
| Trojan | Poses as useful software to get installed | Pirated plugins, fake tools, poisoned packages |
| Ransomware | Encrypts data and demands payment | High for file servers and databases with weak backups |
| Cryptominer | Uses CPU or GPU to mine coins for the attacker | Very common on hijacked servers |
| Backdoor and web shell | Hidden remote access | Very common after a web app compromise |
| Spyware and infostealer | Collects credentials, keys and data | Targets config files, SSH keys and browser data |
| Rootkit | Hides other malware and the intruder | See Rootkit |
| Bot | Joins a remotely controlled network | See Botnet |
How does malware reach a Linux server?
- Weak or reused credentials: SSH, database and panel logins guessed or taken from leaks.
- Unpatched software: web apps, CMS plugins, mail servers and file sharing tools with known holes.
- Exposed services: Redis, Docker's remote API, Jupyter notebooks or admin dashboards reachable without a login.
- Supply chain: a malicious package in npm, PyPI or a container image, or a compromised update.
- Uploads: a file upload form that lets a visitor store and execute a script, the classic web shell route.
Most server infections are opportunistic. Automated scanners do not care who you are; they test every address for the same handful of weaknesses.
Which signs point to an infection?
- CPU or outgoing traffic far above normal without matching load from users.
- Unknown files in web roots, especially PHP files with obfuscated content such as long base64 strings passed to
eval. - Processes running from
/tmp,/var/tmpor/dev/shm. - New users, SSH keys, cron jobs or systemd services.
- Files suddenly renamed with a new extension and a ransom note in each folder.
find /var/www -name '*.php' -newer /var/www/html/index.php -mtime -7 -print | head -30 grep -rlE 'eval\s*\(\s*(base64_decode|gzinflate|str_rot13)' /var/www --include='*.php' | head find /tmp /var/tmp /dev/shm -type f -perm -u+x -ls 2>/dev/null freshclam && clamscan -ri --max-filesize=50M /var/www /home
ClamAV catches many known web shells and miners. A clean scan is reassuring but not proof, because new samples may not have signatures yet.
How do I respond to malware on my machine?
For anything beyond a single quarantined upload, assume the attacker had shell access. Preserve logs for later review, find the entry point, then reinstall from the panel and restore data from a backup taken before the infection. Rotate every secret that lived on the machine: database passwords, API keys, SSH keys and application salts. Recovery is fastest when configuration is kept in version control and backups are tested; Backup server covers keeping copies off the machine, which is the main defense against ransomware.
Which defenses matter most on a server?
- Patching: unattended security updates, plus a schedule for application and plugin updates.
- Key-only SSH: no password logins, limited source addresses where practical.
- Minimal exposure: internal services bound to 127.0.0.1, a default-deny host firewall.
- Least privilege: each app under its own user, web roots not writable by the web server except upload folders that cannot execute scripts.
- Offsite, versioned backups: copies an attacker on the server cannot delete.
- Monitoring: alerts on CPU, outbound traffic and new listening ports.
For uploads in nginx, a block such as location ^~ /uploads/ { location ~ \.php$ { return 403; } } stops stored scripts from running even if one slips through.
How do package supply chain attacks work?
Attackers publish packages with names close to popular ones, take over abandoned projects, or slip code into a dependency several levels deep. When a build runs npm install or pip install, an install script can run with the privileges of the build user. Pin versions in lock files, review new dependencies before adding them, and run builds under an unprivileged account rather than root. For system software, stick to signed distribution repositories, which verify every package against keys the distribution controls.
Is Linux immune to malware?
No. Linux desktops see less consumer malware, but Linux servers are prime targets because they run most of the internet's services and sit on fast connections. Miners, botnets and ransomware all have Linux versions. Good habits matter more than the operating system.
Why does single tenancy help?
On a bare metal machine nobody else shares your kernel, so the hardening you apply is the whole story. Even an entry box like the E1 at $30.52 a month can be locked down to the same standard as a large one, and models with two drives such as the S3 let you keep local snapshots on a separate disk alongside offsite copies.
Machines Where You Control Every Layer
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| E1 | Intel Xeon E3-1240 v3 | 4 / 8 | 16 GB DDR3 | 2x 240 GB SSD | 2x 1 Gbps | $30.52 | $91.56 (3 months) |
| S1 | Intel Xeon E-2276G | 6 / 12 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $53.32 | $53.32 (1 month) |
| S3 | Intel Xeon E-2356G | 6 / 12 | 64 GB DDR4 | 2x 1 TB NVMe | 2x 10 Gbps | $80.38 | $80.38 (1 month) |
Keep Reading
Rootkit
Malware that hides an intruder with full control of a system, the main kinds, warning signs and why a reinstall is the safe fix.
OpenBotnet
Networks of hijacked devices run by one controller, what they are used for, how servers get recruited and how to keep yours out.
OpenMalware Analysis
How analysts take apart a malicious file to learn what it does, static and dynamic methods, safe lab setups and the tools on Linux.
OpenBackup server
A machine whose job is to receive, keep and restore copies of other systems, and how to size one on budget bare metal.
OpenFAQ
Quick Answers
Any software written to harm systems, steal data, spy on users or take control of computers without permission.
Cryptominers, botnet agents and web shells, usually installed through weak passwords, exposed services or unpatched web apps.
Scanners like ClamAV help find known web shells and miners, but patching, key-only SSH and minimal exposure matter far more.
Keep versioned backups off the server where an intruder cannot delete them, and test restoring them regularly.
Reinstall for anything beyond a single quarantined file. Restore data from a clean backup and rotate all secrets.