svchost.exe
Overview
SvcHost (Service Host) is a generic host process used by the Service Control Manager (services.exe) to load and run DLL-based services.
It should only run from:
- %SYSTEMROOT%\System32\svchost.exe
- %SYSTEMROOT%\SysWOW64\svchost.exe
Multiple instances of svchost.exe should be expected. Since Windows 10 version 1703, services are no longer grouped into shared host processes on systems with more than 3.5GB of memory. It is therefore normal to see significantly more svchost.exe instances on modern systems.
The -k flag specifies the service group and should always be present in the command line of a legitimate svchost.exe process.
The -s flag specifies a single service within the group.
The /P flag specifies service hardening policies and may indicate a legitimate service, although its presence should still be validated.
Expected Characteristics
Expected Location
- %SYSTEMROOT%\System32\svchost.exe
- %SYSTEMROOT%\SysWOW64\svchost.exe
Expected Parent
- services.exe
Typical Profile
- Multiple instances are normal
- Long-running
- Service-hosting process
- Frequently observed on all Windows systems
Why This Matters
svchost.exe is one of the most commonly abused Windows processes because it provides a trusted method for launching services with elevated privileges.
Common adversary techniques include:
- T1543.003 - Windows Service
- T1036 - Masquerading
- T1036.005 - Match Legitimate Name or Location
Investigation Objective
Determine whether svchost.exe is:
- Hosting a legitimate Windows service
- Hosting a legitimate third-party service
- Being abused for persistence
- Being abused for privilege escalation
- Being used to disguise malicious code execution
Particular attention should be paid to service creation, service modification, and process masquerading.
Normal Behaviour
Characteristics
Path
- %SYSTEMROOT%\System32\svchost.exe
- %SYSTEMROOT%\SysWOW64\svchost.exe
Digital Signature
- Microsoft Windows Publisher
Parent
- services.exe
Command Line
Typical format:
svchost.exe -k <service-group>
or
svchost.exe -k <service-group> -s <service>
or
svchost.exe -k <service-group> -s <service> /P
Children
- Often none
- Behaviour should align with the hosted service
Many svchost.exe instances are effectively childless.
Typical Activity
- Hosting Windows services
- Loading service DLLs
- Interacting with Service Control Manager
- Starting during system boot
- Running for extended periods
Expected Behavioural Characteristics
- Parent process should be services.exe
- Command line should contain the
-kflag - Service group should correspond to a legitimate registry configuration
- Process behaviour should match the hosted service
Abuse Patterns
Image Path Mismatch
Investigate immediately if svchost.exe is running from:
- User profile paths
- AppData
- Temp
- Downloads
- Arbitrary directories
Examples include:
C:\Users\<user>\svchost.exe
C:\Temp\svchost.exe
C:\Windows\System32\srv\svchost.exe
These are strong indicators of masquerading.
Parent Process Mismatch
Investigate svchost.exe launched by:
powershell.exe
cmd.exe
mshta.exe
wscript.exe
wmiprvse.exe
Anything other than services.exe requires investigation.
Missing -k Flag
A legitimate svchost.exe instance should specify a service group.
Example:
svchost.exe -k netsvcs
Investigate instances lacking a -k parameter.
In most environments, the absence of a valid service group is a strong masquerading indicator.
Unexpected Child Processes
Examples include:
rundll32.exe
powershell.exe
cmd.exe
wscript.exe
cscript.exe
mshta.exe
Although there are exceptions, these remain high-value indicators.
Potential explanations include:
- Service abuse
- Process injection
- Search-order hijacking
- Malicious helper binaries
Service Abuse Indicators
Investigate:
- Recently-created services
- Recently-modified services
- Services with unusual names
- Services pointing to user-writable locations
- Services executing non-Windows binaries
Particularly relevant to:
- T1543.003 - Windows Service
Detection Opportunities
Process Lineage Analytics
Investigate:
- svchost.exe without services.exe as parent
- Unusual parent-child relationships
- Rare process chains involving svchost.exe
Process lineage remains one of the highest-confidence indicators available.
Command-Line Analytics
Monitor for:
- Missing
-kparameters - Unusual service groups
- Rare service names
- Service groups not normally observed in the estate
Useful examples include:
svchost.exe
without any additional parameters.
Service Creation Monitoring
Review:
- Event ID 7045
- Service installation activity
- Service configuration changes
- Service startup type changes
A newly-created service is often more significant than the resulting svchost.exe process.
Child Process Monitoring
Investigate:
- PowerShell
- Command Prompt
- Scripting engines
- LOLBins
- Unknown binaries
originating from svchost.exe.
Registry Monitoring
Relevant locations include:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\SvcHost
and
HKLM\System\CurrentControlSet\Services
Unexpected changes may indicate service abuse or persistence activity.
Hunting Opportunities
Useful hunting pivots include:
- Rare svchost command lines
- Rare service groups
- Newly installed services
- svchost spawning child processes
- Services running from non-standard paths
- Service binaries in user-writable locations
Prioritise rarity and environmental context over static indicators.
False Positives
Missing Command Line Visibility
There are rare cases where svchost.exe runs with Protected Process Light (PPL).
In these situations:
- Command lines may appear hidden
- Paths may appear unavailable
- Monitoring tools may show incomplete information
The process may still be completely legitimate.
Parent Process Exceptions
services.exe should almost always be the parent process.
However:
- MsMpEng.exe may occasionally appear as the parent in legitimate Defender-related activity
This is uncommon but not inherently suspicious.
Legitimate Child Processes
Although unusual, some services may launch supporting binaries.
Examples include:
- Windows Update
- Service maintenance actions
- Approved enterprise software
Validation should focus on:
- Publisher
- Path
- Behaviour
- Service context
Validation Questions
Check:
- Is the binary Microsoft-signed?
- Is the service documented?
- Is the behaviour observed elsewhere?
- Does the service belong to a known application?
- Is the service group legitimate?
Compare with known-good systems whenever possible.
Hardening Recommendations
Service Governance
Maintain an inventory of:
- Approved services
- Third-party services
- Service owners
- Service dependencies
Unknown services should be investigated promptly.
Application Control
Implement:
- WDAC
- AppLocker
- Application allow-listing
Prevent unauthorised binaries from executing as services.
Service Installation Monitoring
Alert on:
- New service creation
- Service modifications
- Startup type changes
- Service binary path changes
These events are often higher-fidelity than process alerts.
Restrict Administrative Access
Limit the ability to:
- Create services
- Modify services
- Install software
- Register service binaries
Reducing service creation opportunities significantly limits abuse.
Service Binary Validation
Regularly review:
- Service executable paths
- Service DLL locations
- Digital signatures
- File ownership
Pay particular attention to services executing from user-writable locations.
Defensive Validation
Periodically test:
- Service creation detections
- Service modification alerts
- Event ID 7045 monitoring
- Application control policies
- Incident response procedures
Validate controls against realistic persistence scenarios rather than isolated proof-of-concept activity.
Triage Checklist
Identity and Integrity Checks
- Verify image path is System32 or SysWOW64
- Verify Microsoft Windows Publisher signature
- Review OriginalFileName metadata
- Investigate any executable path anomalies
Lineage and Behaviour Checks
- Verify parent is services.exe
- Review command line for valid
-kservice group - Investigate missing or invalid service groups
- Review child processes
Service Context Checks
Review:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\SvcHost
and
HKLM\System\CurrentControlSet\Services
Validate:
- Service group
- Service name
- Service DLL
- Service binary
Scope and Context
- Review Event ID 7045 activity
- Review recent service installations
- Capture hashes and modules
- Review network connections
- Correlate with PowerShell activity
- Correlate with WMI activity
ATT&CK References
- T1543.003 - Windows Service
- T1036 - Masquerading
- T1036.005 - Match Legitimate Name or Location
Related Topics
Windows Processes
- services.exe
- lsass.exe
- winlogon.exe
- rundll32.exe
- taskhost.exe
Windows Services
- Service Control Manager
- Service DLLs
- Service Groups
- Service Hardening
MITRE ATT&CK
- T1543.003 - Windows Service
- T1036 - Masquerading
- T1036.005 - Match Legitimate Name or Location