Files
blue-team-tools/rules/windows/powershell/powershell_script/posh_ps_tamper_defender.yml
T

65 lines
2.6 KiB
YAML
Raw Normal View History

2022-08-05 17:10:41 +01:00
title: Tamper Windows Defender - ScriptBlockLogging
2022-01-16 14:47:56 +01:00
id: 14c71865-6cd3-44ae-adaa-1db923fae5f2
related:
- id: ec19ebab-72dc-40e1-9728-4c0b805d722c
type: derived
status: experimental
2022-08-05 17:10:41 +01:00
description: Detects powershell scripts attempting to disable scheduled scanning and other parts of windows defender atp or set default actions to allow.
2022-01-16 14:47:56 +01:00
references:
2022-07-11 14:11:53 +01:00
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md
2022-01-16 14:47:56 +01:00
- https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2022-ps
- https://bidouillesecurity.com/disable-windows-defender-in-powershell/
author: frack113, elhoim, Tim Shelton (fps, alias support)
2022-01-16 14:47:56 +01:00
date: 2022/01/16
2023-01-17 01:00:44 +01:00
modified: 2023/01/12
2022-10-26 09:43:39 +02:00
tags:
- attack.defense_evasion
- attack.t1562.001
2022-01-16 14:47:56 +01:00
logsource:
product: windows
category: ps_script
2023-01-04 17:49:32 +01:00
definition: 'Requirements: Script Block Logging must be enabled'
2022-01-16 14:47:56 +01:00
detection:
2022-05-18 17:29:38 +02:00
selection_options_disabling_preference:
ScriptBlockText|contains: 'Set-MpPreference'
selection_options_disabling_function:
2022-01-16 14:47:56 +01:00
ScriptBlockText|contains:
2022-05-18 17:29:38 +02:00
- 'DisableRealtimeMonitoring 1'
- 'DisableBehaviorMonitoring 1'
- 'DisableScriptScanning 1'
- 'DisableArchiveScanning 1'
- 'DisableBlockAtFirstSeen 1'
- 'DisableIOAVProtection 1'
- 'DisableIntrusionPreventionSystem 1'
- 'DisableRemovableDriveScanning 1'
- 'DisableScanningMappedNetworkDrivesForFullScan 1'
- 'DisableScanningNetworkFiles 1'
- 'DisableRealtimeMonitoring $true'
- 'DisableBehaviorMonitoring $true'
- 'DisableScriptScanning $true'
- 'DisableArchiveScanning $true'
- 'DisableBlockAtFirstSeen $true'
- 'DisableIOAVProtection $true'
- 'DisableIntrusionPreventionSystem $true'
- 'DisableRemovableDriveScanning $true'
- 'DisableScanningMappedNetworkDrivesForFullScan $true'
- 'DisableScanningNetworkFiles $true'
2023-01-17 01:00:44 +01:00
selection_other_default_actions_allow:
ScriptBlockText|contains|all:
- 'Set-MpPreference'
- Allow
ScriptBlockText|contains:
- LowThreatDefaultAction
- ModerateThreatDefaultAction
- HighThreatDefaultAction
2023-01-17 01:00:44 +01:00
selection_other_use_of_alias:
ScriptBlockText|contains:
- 'ltdefac '
- 'mtdefac '
- 'htdefac '
- 'stdefac '
2023-01-17 01:00:44 +01:00
condition: all of selection_options_disabling* or 1 of selection_other_*
2022-01-16 14:47:56 +01:00
falsepositives:
- Legitimate PowerShell scripts
2022-03-03 13:53:06 +01:00
level: high