PowerShell Base64 Encoded IEX Cmdlet


Description

Detects usage of a base64 encoded "IEX" cmdlet in a process command line

Query · sigma

selection:
- CommandLine|base64offset|contains:
  - IEX ([
  - iex ([
  - iex (New
  - IEX (New
  - IEX([
  - iex([
  - iex(New
  - IEX(New
  - IEX(('
  - iex(('
- CommandLine|contains:
  - SQBFAFgAIAAoAFsA
  - kARQBYACAAKABbA
  - JAEUAWAAgACgAWw
  - aQBlAHgAIAAoAFsA
  - kAZQB4ACAAKABbA
  - pAGUAeAAgACgAWw
  - aQBlAHgAIAAoAE4AZQB3A
  - kAZQB4ACAAKABOAGUAdw
  - pAGUAeAAgACgATgBlAHcA
  - SQBFAFgAIAAoAE4AZQB3A
  - kARQBYACAAKABOAGUAdw
  - JAEUAWAAgACgATgBlAHcA
condition: selection

Known false positives

  • Unknown
Raw source PowerShell Base64 Encoded IEX Cmdlet · Sigma
Esc
Published by SigmaHQ/sigma ↗, licensed under Detection Rule License 1.1 ↗. Reproduced here unmodified.
title: PowerShell Base64 Encoded IEX Cmdlet
id: 88f680b8-070e-402c-ae11-d2914f2257f1
status: test
description: Detects usage of a base64 encoded "IEX" cmdlet in a process command line
references:
    - Internal Research
author: Florian Roth (Nextron Systems)
date: 2019-08-23
modified: 2023-04-06
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - CommandLine|base64offset|contains:
              - 'IEX (['
              - 'iex (['
              - 'iex (New'
              - 'IEX (New'
              - 'IEX(['
              - 'iex(['
              - 'iex(New'
              - 'IEX(New'
              - "IEX(('"
              - "iex(('"
        # UTF16 LE
        - CommandLine|contains:
              - 'SQBFAFgAIAAoAFsA'
              - 'kARQBYACAAKABbA'
              - 'JAEUAWAAgACgAWw'
              - 'aQBlAHgAIAAoAFsA'
              - 'kAZQB4ACAAKABbA'
              - 'pAGUAeAAgACgAWw'
              - 'aQBlAHgAIAAoAE4AZQB3A'
              - 'kAZQB4ACAAKABOAGUAdw'
              - 'pAGUAeAAgACgATgBlAHcA'
              - 'SQBFAFgAIAAoAE4AZQB3A'
              - 'kARQBYACAAKABOAGUAdw'
              - 'JAEUAWAAgACgATgBlAHcA'
    condition: selection
falsepositives:
    - Unknown
level: high

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.