To check whether a Windows server has been hacked, inspect user accounts, running processes, network connections, login logs, scheduled tasks, and antivirus alerts. Unusual administrator accounts, unknown processes, unexpected remote connections, and disabled security tools may indicate compromise. For businesses using Windows VPS, dedicated server hosting, or a USA hosting provider, detecting these signs early can help protect data and minimize downtime.
1. Check for Unknown User Accounts
Attackers may create unauthorized accounts to maintain access to a compromised server.
Open Computer Management > Local Users and Groups > Users and review the account list.
Check the Administrators group for unfamiliar members.
You can also run these PowerShell commands:
Get-LocalUser
Get-LocalGroupMember -Group "Administrators"Investigate unfamiliar accounts, unexpected administrative privileges, and unexplained account changes. A username ending in $ is not automatically malicious because Windows and Active Directory use this naming convention for legitimate accounts.
2. Inspect Running Processes
Unknown processes consuming excessive CPU, memory, or network resources may indicate malware, unauthorized software, or cryptocurrency mining.
Open Task Manager with Ctrl + Shift + Esc and sort processes by resource usage.
Use PowerShell to inspect running processes:
Get-CimInstance Win32_Process |
Select-Object ProcessId, ParentProcessId, Name, ExecutablePath, CommandLineCheck suspicious processes' executable paths, digital signatures, command lines, and associated user accounts. High resource usage alone does not prove a server has been hacked; legitimate applications can produce similar behavior.
3. Check Network Connections and Open Ports
Unexpected connections may reveal unauthorized remote access or suspicious communication with external systems.
Run Command Prompt as an administrator:
netstat -anoThis displays local and remote addresses, connection states, and process IDs (PIDs).
Identify the process associated with a PID:
tasklist /FI "PID eq 1234"Replace 1234 with the actual PID. Investigate unfamiliar listening ports, unexplained outbound connections, and services that are not required by your applications.
Restrict unnecessary access through Windows Firewall or your hosting provider's network controls. For RDP security, see How to Change the RDP Port for a Windows Server. Changing the port alone does not prevent attacks.
4. Review Windows Security Logs
Windows Event Viewer can help identify suspicious login attempts and unauthorized account changes.
Press Win + R, enter eventvwr.msc, and navigate to Windows Logs > Security.
Check these event IDs:
| Event ID | Description |
|---|---|
| 4624 | Successful logon |
| 4625 | Failed logon |
| 4648 | Logon using explicit credentials |
| 4672 | Special privileges assigned |
| 4720 | User account created |
| 4728 | Member added to a global security group |
| 4732 | Member added to a local security group |
Investigate unusual login times, unfamiliar source addresses, unexpected administrator activity, and repeated failed logons. Event availability depends on the Windows version and audit configuration.
For Remote Desktop activity, also review the Terminal Services logs under Applications and Services Logs > Microsoft > Windows.
5. Check Services and Scheduled Tasks
Malware may use Windows services or scheduled tasks to restart automatically.
Open services.msc and review unfamiliar services, unexpected executable paths, and recently added entries.
List services and their executable paths with PowerShell:
Get-CimInstance Win32_Service |
Select-Object Name, State, StartMode, StartName, PathNameNext, open Task Scheduler by running taskschd.msc. Check for unfamiliar tasks, unexpected scripts, and commands running from temporary or user-writable directories.
Do not disable services or delete tasks solely because their names are unfamiliar. Verify their purpose before making changes.
6. Scan for Malware and Review File Changes
Check Microsoft Defender Antivirus or your installed endpoint-security software. If Defender is available and supported, run these commands in an elevated PowerShell session:
Update-MpSignature
Start-MpScan -ScanType FullScanReview scan results and security alerts. A clean scan does not guarantee that a server is uncompromised.
You should also investigate recently modified files, newly installed applications, and unexpected configuration changes. The following command lists files modified within the past seven days in a specified directory:
Get-ChildItem "C:\Path\To\Directory" -File -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) } |
Select-Object FullName, LastWriteTimeReplace the example directory with the path you want to inspect. File timestamps are clues, not definitive proof of malicious activity.
7. What to Do If Your Server Has Been Hacked
If you confirm or strongly suspect a compromise, take these steps:
- Contain the incident. Restrict network access or isolate the server if malicious activity is ongoing.
- Preserve evidence. Save relevant event logs, process details, network connections, and security alerts before removing suspicious files.
- Secure credentials. From a trusted device, reset affected passwords and rotate exposed API keys, database credentials, and other secrets.
- Remove unauthorized access. Investigate suspicious accounts, services, scheduled tasks, and remote-access configurations.
- Restore the server. If system integrity cannot be trusted, rebuild from a clean installation or verified image and restore trusted backups.
- Monitor recovery. Review login activity, network traffic, and security alerts after the server returns to service.
Avoid immediately deleting suspicious files, as doing so may destroy evidence. If the server contains sensitive data or supports critical applications, involve your security team or hosting provider.
For additional guidance, see How to Secure a Windows Server and How to Restrict the Scope of RDP Access.
8. Prevent Future Windows Server Attacks
Whether you manage a VPS, dedicated server, or USA hosting infrastructure, follow these essential security practices:
- Install security updates: Keep Windows Server and installed applications patched.
- Secure RDP: Restrict access through a VPN, firewall rules, or trusted IP addresses. Use strong passwords and multifactor authentication where available.
- Apply least privilege: Limit administrator access and remove unused accounts.
- Enable security monitoring: Review login events, account changes, and suspicious network activity.
- Maintain protected backups: Store backups separately from the production server and test restoration regularly.
- Reduce attack surface: Disable unnecessary services and close unused ports.
- Protect credentials: Avoid storing passwords and API keys in plaintext scripts or accessible configuration files.
A reliable hosting provider can help with infrastructure-level security and incident coordination, but server security also depends on correct configuration, access control, patching, and monitoring.
Conclusion
To determine whether a Windows server has been hacked, examine user accounts, processes, network connections, security logs, scheduled tasks, and malware alerts. No single indicator proves an intrusion, so correlate multiple findings before reaching a conclusion.
If compromise is confirmed, contain the incident, preserve evidence, secure credentials, and restore the server from a trusted source when necessary. Regular patching, restricted RDP access, protected backups, and continuous monitoring help keep your Windows server hosting environment secure.