Suspicious autostart entries
CriticalW08Windows PCs and serversLook for programs that start automatically from temp or AppData folders, or…
What is the risk
Malware adds itself to Run registry keys, the Startup folder and scheduled tasks so it comes back after a reboot.
Executables in %TEMP% or AppData and powershell -enc (hidden commands) are common signs. Some normal apps also install to AppData, so check the name and publisher.
How to check
Windows PowerShell (admin)
Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location, User
Get-ScheduledTask | Where-Object { (($_.Actions.Execute -join ' ') + ' ' + ($_.Actions.Arguments -join ' ')) -match 'AppData|Temp|-enc' } | Select-Object TaskPath, TaskNameMicrosoft Autoruns shows even more places.
How to fix
Windows PowerShell (admin)
Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'suspect'
Unregister-ScheduledTask -TaskName 'suspect' -Confirm:$false
Start-MpScan -ScanType FullScan
Start-MpWDOScanWrite down the name, command and file path or copy the file before removing (replace suspect with what you found). The HKLM Run key works the same way. The last line reboots into an offline scan outside Windows.
A suspicious entry means someone already got in. Change passwords from a clean computer, and if in doubt reinstall Windows.
How to prevent it
- Do daily work with a non-admin account.
- Turn on PowerShell logging so you can see what happened later (W09).
- Keep Defender real-time protection and Tamper Protection on (W02).
Check again after fixing
Windows PowerShell (admin)
Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, LocationRun the downloaded check again and make sure this item passes.