A slow server or a strange log line does not prove a break-in, and a clean-looking server does not rule one out. Check calmly, record what you find, and avoid destroying the evidence.
Failed login attempts alone are normal on a public server. A success that follows many failures is much more important. Compare what you see with what you expect: ask others who administer the machine whether they made the change, and check your own deployment notes before drawing conclusions.
Before typing anything, note the time and what you noticed. If the provider offers a snapshot, consider taking one to preserve the disk. It may contain the attacker's files and your secrets, so restrict it and do not treat it as a clean backup. A snapshot also does not usually keep the contents of memory.
These commands look without changing configuration. Some need sudo, and log names vary by distribution.
who
last -a | head -30
sudo journalctl -u ssh -u sshd --since "7 days ago" | grep Accepted
ps auxf
sudo ss -tunap
getent passwd
systemctl list-units --type=service --state=running
systemctl list-timers --all
sudo crontab -l
ls -la /etc/cron.d /etc/systemd/systemCheck ~/.ssh/authorized_keys for every user, including root, and run crontab -l -u USERNAME for other accounts. Look for programs running from temporary folders such as /tmp or /dev/shm.
To compare installed files with package records, use sudo debsums -c on Debian or Ubuntu (it may need installing) or sudo rpm -Va on RPM-based systems. Changed configuration files are often legitimate. The debsums manual itself says it is of limited use as a security tool.
An attacker with root can alter commands and logs. A clean result is not proof.
Run PowerShell as administrator:
query user
Get-LocalUser
Get-LocalGroupMember -Group "Administrators"
Get-NetTCPConnection -State Established,Listen
Get-ScheduledTask | Where-Object State -ne "Disabled"
Get-Service | Where-Object Status -eq "Running"
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4625,4720,4732,1102} -MaxEvents 200| Event ID | Meaning |
|---|---|
| 4624 / 4625 | Successful / failed logon |
| 4720 | User account created |
| 4732 | Member added to a local security group |
| 1102 | Security audit log cleared |
| 7045 (System log) | New service installed |
Group names are translated on some language editions. In 4624 events, logon type 10 indicates a remote interactive session such as Remote Desktop. Microsoft's Sysinternals Autoruns tool shows many places where programs start automatically. Run a full antivirus scan too, knowing that it can miss things and may quarantine files you wanted to examine.
Use a different, trusted computer to change passwords. The stolen credential may have come from your own laptop.
If you confirm that someone had root or administrator access, deleting the one suspicious file is not enough. Install a fresh system and move only what you need.
Test restores in advance; see backups with restic. Keep at least one copy that the server itself cannot delete.
Use SSH keys, a firewall, automatic security updates and restricted Remote Desktop access. Keep a list of expected users, ports and services, so that a new one stands out. Send logs and alerts somewhere off the server.
If your server is with PhantomVPS and you suspect a compromise, contact support and review the AUP. The status page helps rule out a wider service issue.
Is high CPU use proof of a hack?
No. Updates, backups, traffic spikes and bugs can cause it. Identify the process, who owns it, where its file is and what it connects to.
Can antivirus or a rootkit scanner confirm the server is clean?
No. A detection is useful, but no finding does not prove safety, especially if the attacker had full control.
Should I shut the server down immediately?
If it is causing serious harm, isolate or stop it. Otherwise restrict the network and collect evidence first, because a shutdown loses information held in memory.
Can I restore the latest backup?
Only if you are confident it predates the break-in. The compromise may be older than the first sign you noticed.