Detectionmediumtest

Potential Suspicious PowerShell Keywords

Detects potentially suspicious keywords that could indicate the use of a PowerShell exploitation framework

Open in Detection LabConvert ruleBuild Package
Florian Roth (Nextron Systems), Perez Diego, Tuan Le (NCSGroup)Created 2019-02-11Updated 2023-04-211f49f2ab-26bc-48b3-96cc-dcffbc93eadfwindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains:
            - 'System.Reflection.Assembly.Load($'
            - '[System.Reflection.Assembly]::Load($'
            - '[Reflection.Assembly]::Load($'
            - 'System.Reflection.AssemblyName'
            - 'Reflection.Emit.AssemblyBuilderAccess'
            - 'Reflection.Emit.CustomAttributeBuilder'
            - 'Runtime.InteropServices.UnmanagedType'
            - 'Runtime.InteropServices.DllImportAttribute'
            - 'SuspendThread'
            - 'rundll32'
            # - 'FromBase64'
            # - 'Invoke-WMIMethod' # Prone to FP
            # - 'http://127.0.0.1' # Prone to FP
    condition: selection
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

MITRE ATT&CK
Rule Metadata
Rule ID
1f49f2ab-26bc-48b3-96cc-dcffbc93eadf
Status
test
Level
medium
Type
Detection
Created
2019-02-11
Modified
2023-04-21
Path
rules/windows/powershell/powershell_script/posh_ps_susp_keywords.yml
Raw Tags
attack.executionattack.t1059.001
View on GitHub