Windows PowerShell Web Access Installation via PowerShell Script Block
Detects PowerShell Web Access installation and web authorization configuration from Windows PowerShell script blocks.
- Product
- windows
- Category
- ps_script
- Author
- Michael Haag (SigmaHQ), DRL 1.1
- Published
- 2024-09-03
- Updated
- 2026-07-31
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies PowerShell activity that installs PowerShell Web Access and configures a web application and authorization rules. An attacker could use this to establish remote web-based access paths that may support persistence or follow-on abuse. The detection relies on ScriptBlockText content from PowerShell script block logging, matching installation, application setup, and authorization rule commands.
Reporting behind it
- docs.microsoft.comhttps://docs.microsoft.com/en-us/powershell/module/powershellwebaccess/install-pswawebapplication
- cisa.govhttps://www.cisa.gov/news-events/cybersecurity-advisories/aa24-241a
- gist.github.comhttps://gist.github.com/MHaggis/7e67b659af9148fa593cf2402edebb41
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_powershell_web_access_installation.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows PowerShell Web Access Installation via PowerShell Script Block
id: ce0e85f5-dcd3-4158-ab75-039a44bf32ba
status: test
description: This rule identifies PowerShell activity that installs PowerShell Web Access and configures a web application and authorization rules. An attacker could use this to establish remote web-based access paths that may support persistence or follow-on abuse. The detection relies on ScriptBlockText content from PowerShell script block logging, matching installation, application setup, and authorization rule commands.
references:
- https://docs.microsoft.com/en-us/powershell/module/powershellwebaccess/install-pswawebapplication
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-241a
- https://gist.github.com/MHaggis/7e67b659af9148fa593cf2402edebb41
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_powershell_web_access_installation.yml
author: Michael Haag, Huntrule Team
date: 2024-09-03
tags:
- attack.persistence
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection_install:
ScriptBlockText|contains: Install-WindowsFeature WindowsPowerShellWebAccess
selection_config:
ScriptBlockText|contains: Install-PswaWebApplication
selection_auth:
ScriptBlockText|contains|all:
- Add-PswaAuthorizationRule
- -UserName *
- -ComputerName *
condition: 1 of selection_*
falsepositives:
- Legitimate PowerShell Web Access installations by administrators
level: high
license: DRL-1.1
related:
- id: 5f9c7f1a-7c21-4c39-b2f3-8d8006e0e51f
type: derived