2020-10-12 00:00:17 +03:00
|
|
|
title: Encoded PowerShell Command Line
|
2020-10-11 21:14:45 +03:00
|
|
|
id: cdf05894-89e7-4ead-b2b0-0a5f97a90f2f
|
2020-10-12 00:23:27 +03:00
|
|
|
description: Detects specific combinations of encoding methods in the PowerShell command lines
|
2020-10-11 20:56:45 +03:00
|
|
|
status: experimental
|
|
|
|
|
references:
|
|
|
|
|
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=65
|
|
|
|
|
tags:
|
|
|
|
|
- attack.defense_evasion
|
|
|
|
|
- attack.t1027
|
|
|
|
|
- attack.execution
|
|
|
|
|
- attack.t1059.001
|
|
|
|
|
author: Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community
|
|
|
|
|
date: 2020/10/11
|
|
|
|
|
logsource:
|
|
|
|
|
category: process_creation
|
|
|
|
|
product: windows
|
|
|
|
|
detection:
|
2020-10-12 18:10:46 +03:00
|
|
|
selection1:
|
2020-10-12 14:11:10 +03:00
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-13 10:59:20 +03:00
|
|
|
CommandLine|contains|all:
|
|
|
|
|
- 'char'
|
|
|
|
|
- 'join'
|
2020-10-12 18:10:46 +03:00
|
|
|
selection2:
|
|
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-11 20:56:45 +03:00
|
|
|
CommandLine|contains:
|
|
|
|
|
- 'ToInt'
|
|
|
|
|
- 'ToDecimal'
|
|
|
|
|
- 'ToByte'
|
2020-10-13 10:59:20 +03:00
|
|
|
- 'ToUint'
|
2020-10-11 20:56:45 +03:00
|
|
|
- 'ToSingle'
|
|
|
|
|
- 'ToSByte'
|
2020-10-12 18:10:46 +03:00
|
|
|
selection3:
|
|
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-11 20:56:45 +03:00
|
|
|
CommandLine|contains:
|
|
|
|
|
- 'ToChar'
|
|
|
|
|
- 'ToString'
|
|
|
|
|
- 'String'
|
2020-10-12 18:10:46 +03:00
|
|
|
selection4:
|
|
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-13 10:59:20 +03:00
|
|
|
CommandLine|contains|all:
|
|
|
|
|
- 'split'
|
|
|
|
|
- 'join'
|
2020-10-12 18:10:46 +03:00
|
|
|
selection5:
|
|
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-13 10:59:20 +03:00
|
|
|
CommandLine|contains|all:
|
|
|
|
|
- 'ForEach'
|
|
|
|
|
- 'Xor'
|
2020-10-12 18:10:46 +03:00
|
|
|
selection6:
|
|
|
|
|
Image|endswith: '\powershell.exe'
|
2020-10-12 14:04:24 +03:00
|
|
|
CommandLine|contains:
|
|
|
|
|
- 'cOnvErTTO-SECUreStRIng'
|
2020-10-12 18:10:46 +03:00
|
|
|
condition: (selection2 and selection3) or selection1 or selection4 or selection5 or selection6
|
2020-10-11 20:56:45 +03:00
|
|
|
falsepositives:
|
|
|
|
|
- Unlikely
|
2021-04-03 00:00:43 +02:00
|
|
|
level: medium
|