Sigma rule: PowerShell Deleted Mounted Share

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-f7c3262f8d3d, updated 2025-10-07T00:00:00.000Z.

Rule

Title
PowerShell Deleted Mounted Share
Status
test
Level
medium
Author
oscd.community, @redcanary, Zach Stanford @svch0st
Date
2020-10-08
Modified
2025-10-07
File
rules/windows/powershell/powershell_script/posh_ps_susp_mounted_share_deletion.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects when when a mounted share is removed. Adversaries may remove share connections that are no longer useful in order to clean up traces of their operation

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    ScriptBlockText|contains:
        - 'Remove-SmbShare'
        - 'Remove-FileShare'
filter_main_module_load:
    ScriptBlockText|contains|all:
        - 'FileShare.cdxml'
        - 'Microsoft.PowerShell.Core\Export-ModuleMember'
        - 'ROOT/Microsoft/Windows/Storage/MSFT_FileShare'
        - 'ObjectModelWrapper'
        - 'Cmdletization.MethodParameter'
condition: selection and not 1 of filter_main_*

False positives (as the rule lists them)

  • Administrators or Power users may remove their shares via cmd line

Tags

  • attack.stealth
  • attack.t1070.005

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_mounted_share_deletion.yml

Sources and licences

  • SigmaHQ

    "PowerShell Deleted Mounted Share" by oscd.community, @redcanary, Zach Stanford @svch0st (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_mounted_share_deletion.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: PowerShell Deleted Mounted Share",
entity page, dataset version ref-f7c3262f8d3d, updated 2025-10-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/66a4d409-451b-4151-94f4-a55d559c49b0 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 66a4d409-451b-4151-94f4-a55d559c49b0, 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.