T1021.002

SMB/Windows Admin Shares

Adversaries may use Valid Accounts to interact with a remote network share using Server Message Block (SMB). Windows systems have hidden administrative shares (C$, ADMIN$, IPC$) accessible only to administrators. Adversaries abuse these shares to copy tools, execute payloads, and move laterally throughout a network. Major ransomware families (Conti, Ryuk, NotPetya, Emotet, Royal, RansomHub) and APT groups (APT41, Sandworm, Wizard Spider, Chimera) have all leveraged SMB admin shares for lateral movement. Common execution methods paired with SMB include PsExec, scheduled tasks, service creation, and WMI.

Microsoft Sentinel / Defender
kusto
// Detect suspicious SMB admin share access and lateral tool transfer
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemotePort == 445
| where ActionType in ("ConnectionSuccess", "ConnectionFound")
// Exclude known legitimate management traffic
| where not (InitiatingProcessFileName in~ ("svchost.exe", "System") and RemotePort == 445)
| extend IsAdminShare = InitiatingProcessCommandLine has_any ("ADMIN$", "C$", "IPC$", "\\\\")
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine,
         RemoteIP, RemotePort, RemoteUrl, ActionType
| union (
    // Detect PsExec-style service creation over SMB
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName in~ ("psexec.exe", "psexec64.exe", "paexec.exe", "remcom.exe")
    | extend Source = "PsExec"
    | project Timestamp, DeviceName, InitiatingProcessFileName, ProcessCommandLine,
             AccountName, Source
)
| union (
    // Detect net use commands establishing share connections
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName =~ "net.exe" or FileName =~ "net1.exe"
    | where ProcessCommandLine has "use" and ProcessCommandLine has_any ("ADMIN$", "C$", "IPC$", "\\\\")
    | project Timestamp, DeviceName, InitiatingProcessFileName, ProcessCommandLine, AccountName
)
| sort by Timestamp desc
high severity high confidence

Data Sources

Network Traffic: Network Connection Creation Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents DeviceProcessEvents

False Positives

  • SCCM/Intune agents distributing software packages via ADMIN$ shares to managed endpoints
  • Backup agents (Veeam, NetBackup, Commvault) accessing C$ for backup operations
  • IT administrators manually copying files to ADMIN$ for troubleshooting or patching
  • Legitimate PsExec use by sysadmins for remote command execution on managed hosts
  • Windows file sharing between workstations in peer-to-peer environments or home networks

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections