T1135

Network Share Discovery

Adversaries may look for folders and drives shared on remote systems as a means of identifying sources of information to gather as a precursor for Collection and to identify potential systems of interest for Lateral Movement. Networks often contain shared network drives and folders that enable users to access file directories on various systems across a network. File sharing over a Windows network occurs over the SMB protocol. Net can be used to query a remote system for available shared drives using the net view \\remotesystem command. It can also be used to query shared drives on the local system using net share. For macOS, the sharing -l command lists all shared points used for SMB services. Adversaries including Conti, BlackByte, Medusa, Latrodectus, QakBot, and Cuba have all leveraged network share discovery as a precursor to lateral movement, ransomware staging, and data collection operations, frequently calling NetShareEnum() directly or through net.exe wrappers.

Microsoft Sentinel / Defender
kusto
// T1135 - Network Share Discovery
// Detects network share enumeration via built-in tools, PowerShell, WMI, and offensive tooling
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
    // net.exe / net1.exe - most common method used by Latrodectus, Kwampirs, QakBot
    (FileName in~ ("net.exe", "net1.exe") and
     ProcessCommandLine has_any (" view", " share"))
    // PowerShell share enumeration via SMB cmdlets or WMI Win32_Share
    or (FileName in~ ("powershell.exe", "pwsh.exe") and
        ProcessCommandLine has_any ("Get-SmbShare", "Win32_Share", "NetShareEnum", "net share", "net view"))
    // WMI via wmic.exe querying share class
    or (FileName =~ "wmic.exe" and
        ProcessCommandLine has_any ("share", "Win32_Share"))
    // NBTscan - network recon tool used by Tonto Team
    or FileName =~ "nbtscan.exe"
    // CrackMapExec with SMB/shares flags - used by APT39
    or (ProcessCommandLine has_any ("crackmapexec", "cme ") and
        ProcessCommandLine has_any ("smb", "--shares"))
)
| extend IsRemoteView = (
    FileName in~ ("net.exe", "net1.exe") and
    ProcessCommandLine has " view" and
    (ProcessCommandLine contains @"\\" or ProcessCommandLine has "/all")
)
| extend IsLocalShare = (
    FileName in~ ("net.exe", "net1.exe") and
    ProcessCommandLine has " share" and
    not ProcessCommandLine has_any ("add", "delete", "/delete")
)
| extend IsNetAllDomain = (
    FileName in~ ("net.exe", "net1.exe") and
    ProcessCommandLine has " view" and
    ProcessCommandLine has "/all"
)
| extend IsPowerShellWmi = (
    FileName in~ ("powershell.exe", "pwsh.exe") and
    ProcessCommandLine has_any ("Get-SmbShare", "Win32_Share", "NetShareEnum")
)
| extend IsSuspiciousTool = (
    FileName =~ "nbtscan.exe" or
    (ProcessCommandLine has_any ("crackmapexec", "cme ") and
     ProcessCommandLine has_any ("smb", "--shares"))
)
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         IsRemoteView, IsLocalShare, IsNetAllDomain, IsPowerShellWmi, IsSuspiciousTool
| sort by Timestamp desc
medium severity high confidence

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • IT administrators running net view or net share during legitimate network inventory, troubleshooting, or helpdesk work
  • Backup agents and monitoring tools querying local or remote shares on a scheduled basis (e.g., Veeam, Backup Exec, SolarWinds Network Performance Monitor)
  • Vulnerability scanners and asset management platforms (Nessus, Qualys, Lansweeper) performing scheduled share enumeration as part of network discovery scans
  • SCCM distribution point or DFS replication health checks that enumerate available shares on managed servers
  • Developers or DevOps engineers using PowerShell Get-SmbShare or WMI to configure, validate, or document share permissions

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections