Sigma rule: Potential Remote PowerShell Session Initiated
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-803cffbd7943, updated 2024-02-02T00:00:00.000Z.
Rule
- Title
- Potential Remote PowerShell Session Initiated
- Status
- test
- Level
- high
- Author
- Roberto Rodriguez @Cyb3rWard0g
- Date
- 2019-09-12
- Modified
- 2024-02-02
- File
- rules/windows/network_connection/net_connection_win_susp_remote_powershell_session.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects a process that initiated a network connection over ports 5985 or 5986 from a non-network service account.
This could potentially indicates a remote PowerShell connection.
Log source
- product
- windows
- category
- network_connection
Detection
selection:
DestinationPort:
- 5985
- 5986
Initiated: 'true' # only matches of the initiating system can be evaluated
SourceIsIpv6: 'false'
filter_main_service_users:
- User|contains: # covers many language settings for Network Service. Please expand
- 'NETWORK SERVICE'
- 'NETZWERKDIENST'
- 'SERVICIO DE RED'
- 'SERVIZIO DI RETE'
- User|contains|all:
- 'SERVICE R'
- 'SEAU'
filter_main_localhost:
SourceIp:
- '::1'
- '127.0.0.1'
DestinationIp:
- '::1'
- '127.0.0.1'
filter_optional_avast:
Image:
- 'C:\Program Files\Avast Software\Avast\AvastSvc.exe'
- 'C:\Program Files (x86)\Avast Software\Avast\AvastSvc.exe'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*False positives (as the rule lists them)
- Legitimate usage of remote PowerShell, e.g. remote administration and monitoring.
- Network Service user name of a not-covered localization
Tags
- attack.execution
- attack.t1059.001
- attack.lateral-movement
- attack.t1021.006
MITRE ATT&CK ids this rule names
References
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/network_connection/net_connection_win_susp_remote_powershell_session.yml
Sources and licences
SigmaHQ
"Potential Remote PowerShell Session Initiated" by Roberto Rodriguez @Cyb3rWard0g (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/network_connection/net_connection_win_susp_remote_powershell_session.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Potential Remote PowerShell Session Initiated",
entity page, dataset version ref-803cffbd7943, updated 2024-02-02T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/c539afac-c12a-46ed-b1bd-5a5567c9f045 (accessed 2026-11-03).
Underlying source: SigmaHQ rule c539afac-c12a-46ed-b1bd-5a5567c9f045, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.