VeriKQL by Kaushik Saha

T1135 Network Share Discovery

Discoveryon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0182 Behavior-chain detection for T1135 Network Share Discovery across Windows, Linux, and macOS

AN0513 Windows

Process or script enumerates network shares via CLI (net view/net share, PowerShell Get-SmbShare/WMI) or OS APIs (NetShareEnum/ srvsvc.NetShareEnumAll RPC) → bursts of outbound SMB/RPC connections (445/139, \\host\IPC$ / srvsvc) to many hosts inside a short window → optional follow-on file listing or copy operations.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SecurityEventCode=4688
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4688)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SysmonEventCode=3, 22
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SysmonEventCode=17
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (17)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (17)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:PowerShellEventCode=4103, 4104, 4105, 4106
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where EventLog in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel in ("Microsoft-Windows-PowerShell/Operational", "Windows PowerShell") | where EventID in (4103, 4104, 4105, 4106)
etw:Microsoft-Windows-RPCrpc_call: srvsvc.NetShareEnum / NetShareEnumAll from non-admin or unusual processesNot mapped to Sentinel yet.

AN0514 Linux

CLI tools (smbclient -L, smbmap, rpcclient, nmblookup) or custom scripts enumerate SMB shares on many internal hosts → corresponding SMB connections (445/139) captured by Zeek/Netflow within a short window.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve of smbclient, smbmap, rpcclient, nmblookup, crackmapexec smbNot mapped to Sentinel yet.
NSM:Flowconnection: TCP connections to ports 139/445 to multiple hostsNot mapped to Sentinel yet.
NSM:Flowsmb_command: TreeConnectAndX to \\*\IPC$ / srvsvc or Trans2/NT_CREATE for listing sharesNot mapped to Sentinel yet.

AN0515 macOS

Use of native/mac tools (sharing -l, smbutil view, mount_smbfs) or scripts to enumerate SMB shares across many hosts, followed by outbound SMB connections observed in PF/Zeek logs.

MITRE log sourceIn Microsoft Sentinel
macos:endpointsecurityES_EVENT_TYPE_NOTIFY_EXEC: Process execution of "sharing -l", "smbutil view", "mount_smbfs"Not mapped to Sentinel yet.
macos:unifiedlogCommand line contains smbutil view //, mount_smbfs //Not mapped to Sentinel yet.
NSM:FirewallOutbound connections to 139/445 to multiple destinationsNot mapped to Sentinel yet.
NSM:Flowconnection: SMB connections to multiple internal hostsNot mapped to Sentinel yet.

Content Hub rules tagged with it (5)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1135 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

7 SigmaHQ community rules name it or one of its sub-techniques in their tags.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.