Suspicious PowerShell Deleted Mounted Share (via ps_script)

This rule detects when when a mounted share is removed. Threat actors may remove share connections that are no longer useful to clean up traces of their operation

SigmamediumWindowsv1
sigma
title: Suspicious PowerShell Deleted Mounted Share (via ps_script)
id: 8c6c4d9b-7abd-5061-8776-4af92092c6f5
status: stable
description: This rule detects when when a mounted share is removed. Threat actors may remove share connections that are no longer useful to clean up traces of their operation
references:
    - https://attack.mitre.org/techniques/T1070/005/
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1070.005/T1070.005.md
author: 'Huntrule Team'
date: 2026-01-05
tags:
    - attack.stealth
    - attack.t1070.005
logsource:
    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_*
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.