Detectionhightest

PowerShell Web Access Installation - PsScript

Detects the installation and configuration of PowerShell Web Access, which could be used for remote access and potential abuse

Open in Detection LabConvert ruleBuild Package
Michael HaagCreated 2024-09-035f9c7f1a-7c21-4c39-b2f3-8d8006e0e51fwindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic3 selectors
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_*
False Positives

Legitimate PowerShell Web Access installations by administrators

Rule Metadata
Rule ID
5f9c7f1a-7c21-4c39-b2f3-8d8006e0e51f
Status
test
Level
high
Type
Detection
Created
2024-09-03
Path
rules/windows/powershell/powershell_script/posh_ps_powershell_web_access_installation.yml
Raw Tags
attack.persistenceattack.executionattack.t1059.001
View on GitHub