Sigma rule: Use Of Remove-Item to Delete File - ScriptBlock
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-6585fece6d00, updated 2022-03-17T00:00:00.000Z.
Rule
- Title
- Use Of Remove-Item to Delete File - ScriptBlock
- Status
- test
- Level
- low
- Author
- frack113
- Date
- 2022-01-15
- Modified
- 2022-03-17
- File
- rules-threat-hunting/windows/powershell/powershell_script/posh_ps_remove_item_path.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
PowerShell Remove-Item with -Path to delete a file or a folder with "-Recurse"
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection:
ScriptBlockText|contains:
- 'Remove-Item -Path '
- 'del -Path '
- 'erase -Path '
- 'rd -Path '
- 'ri -Path '
- 'rm -Path '
- 'rmdir -Path '
condition: selectionFalse positives (as the rule lists them)
- Legitimate PowerShell scripts
Tags
- attack.stealth
- attack.t1070.004
- detection.threat-hunting
MITRE ATT&CK ids this rule names
References
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1070.004/T1070.004.md
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/Remove-Item?view=powershell-5.1&viewFallbackFrom=powershell-7
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/powershell/powershell_script/posh_ps_remove_item_path.yml
Sources and licences
SigmaHQ
"Use Of Remove-Item to Delete File - ScriptBlock" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/powershell/powershell_script/posh_ps_remove_item_path.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Use Of Remove-Item to Delete File - ScriptBlock",
entity page, dataset version ref-6585fece6d00, updated 2022-03-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/b8af5f36-1361-4ebe-9e76-e36128d947bf (accessed 2026-11-03).
Underlying source: SigmaHQ rule b8af5f36-1361-4ebe-9e76-e36128d947bf, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.