
title: Malicious PowerShell Keywords
author: Sean Metcalf (source), Florian Roth (rule)
date: 2017/03/05
description: Detects keywords from well-known PowerShell exploitation frameworks
detection:
  SELECTION_1:
    ScriptBlockText:
    - '*AdjustTokenPrivileges*'
    - '*IMAGE_NT_OPTIONAL_HDR64_MAGIC*'
    - '*Microsoft.Win32.UnsafeNativeMethods*'
    - '*ReadProcessMemory.Invoke*'
    - '*SE_PRIVILEGE_ENABLED*'
    - '*LSA_UNICODE_STRING*'
    - '*MiniDumpWriteDump*'
    - '*PAGE_EXECUTE_READ*'
    - '*SECURITY_DELEGATION*'
    - '*TOKEN_ADJUST_PRIVILEGES*'
    - '*TOKEN_ALL_ACCESS*'
    - '*TOKEN_ASSIGN_PRIMARY*'
    - '*TOKEN_DUPLICATE*'
    - '*TOKEN_ELEVATION*'
    - '*TOKEN_IMPERSONATE*'
    - '*TOKEN_INFORMATION_CLASS*'
    - '*TOKEN_PRIVILEGES*'
    - '*TOKEN_QUERY*'
    - '*Metasploit*'
    - '*Mimikatz*'
  condition: SELECTION_1
falsepositives:
- Penetration tests
id: f62176f3-8128-4faa-bf6c-83261322e5eb
level: high
logsource:
  category: ps_script
  definition: It is recommended to use the new "Script Block Logging" of PowerShell
    v5 https://adsecurity.org/?p=2277
  product: windows
modified: 2021/10/16
references:
- https://adsecurity.org/?p=2921
status: experimental
tags:
- attack.execution
- attack.t1059.001
- attack.t1086
ruletype: SIGMA
