T1070.005 Sumo Logic CSE · Sumo

Detect Network Share Connection Removal in Sumo Logic CSE

Adversaries remove Windows network share connections after use to clean up traces of lateral movement and data access. Network shares mapped via net use or UNC paths leave artifacts in the Windows registry (HKCU\Network), Windows event logs (Event ID 5140 — network share object accessed, Event ID 5142 — network share created), and in the MRU list. The primary utility for removal is net use \\target\share /delete or net use * /DELETE /Y to remove all mapped drives simultaneously. RobbinHood ransomware used net use * /DELETE /Y to disconnect all network shares before encryption, likely to ensure local encryption of any mapped network paths. Threat Group-3390 detached network shares after exfiltrating files. InvisiMole, DUSTTRAP (APT41), and various ransomware families routinely perform share cleanup as a post-exploitation step.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1070 Indicator Removal
Sub-technique
T1070.005 Network Share Connection Removal
Canonical reference
https://attack.mitre.org/techniques/T1070/005/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
_sourceCategory=WinEventLog/Sysmon OR _sourceCategory=WinEventLog/Security
| where EventID = "1" OR EventID = "5140" OR EventID = "5142"
| if (EventID = "1",
    (Image matches "*\\net.exe" OR Image matches "*\\net1.exe")
    AND CommandLine matches "*use*"
    AND (CommandLine matches "*/delete*" OR CommandLine matches "*/DELETE*" OR CommandLine matches "* /d *"),
    true
  )
| where EventID in ("5140", "5142") OR
  (
    EventID = "1"
    AND (
      CommandLine matches "*/delete*"
      OR CommandLine matches "*/DELETE*"
      OR CommandLine matches "* /d *"
    )
    AND CommandLine matches "*use*"
  )
| eval BulkDelete = if(
    CommandLine matches "* \\* *" AND CommandLine matches "*use*",
    "YES - All Shares Removed",
    "NO - Targeted Removal"
  )
| eval Severity = if(BulkDelete = "YES - All Shares Removed", "HIGH", "MEDIUM")
| eval EventType = if(EventID = "5140", "Share Access",
    if(EventID = "5142", "Share Created",
      if(EventID = "1", "Process Execution", "Unknown")))
| fields _messageTime, Computer, User, CommandLine, Image, ParentImage, ShareName, IpAddress, BulkDelete, Severity, EventType
| sort by _messageTime desc
high severity high confidence

Detects network share removal commands via Sysmon process events and Windows Security audit events in Sumo Logic. Classifies events by bulk vs targeted share deletion and correlates with share access audit events to identify post-exploitation cleanup behavior.

Data Sources

Sysmon Operational LogWindows Security Event Log

Required Tables

WinEventLog/SysmonWinEventLog/Security

False Positives & Tuning

  • Enterprise endpoint management platforms (e.g., SCCM, Intune) running cleanup scripts during device provisioning or software deployment
  • Users in development or QA environments frequently mounting and unmounting file shares as part of build or test pipelines
  • VPN or network access control solutions that programmatically disconnect mapped drives before forcing a re-authentication flow
Download portable Sigma rule (.yml)

Other platforms for T1070.005


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Remove Specific Network Share Connection with net use /delete

    Expected signal: Sysmon EventCode 1: net.exe process creation with 'use \\127.0.0.1\IPC$ /delete' command line. Windows Security Event ID 5140 (share accessed) and then no corresponding 5142 (share removed) since the share never fully established due to authentication. MDE DeviceProcessEvents captures both the mapping and deletion commands.

  2. Test 2Bulk Network Share Removal with net use * /DELETE

    Expected signal: Sysmon EventCode 1: net.exe with '* /DELETE /Y' in command line. Windows Security Event ID 5140 may fire for each share that was disconnected. The wildcard (*) in the command line is a high-fidelity indicator of bulk share removal. MDE DeviceProcessEvents captures the full command including the * wildcard.

  3. Test 3Delete Network Share Registry History (MountPoints2 Cleanup)

    Expected signal: reg.exe process creation with 'delete' and 'MountPoints2' in command line. Sysmon EventCode 12 (RegistryKeyDeleted) for HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2. Security Event ID 4657 if registry auditing is enabled for HKCU keys.

Unlock Pro Content

Get the full detection package for T1070.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections