Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for T1021.002.

Upgrade to Pro
T1021.002 Splunk · SPL

Detect SMB/Windows Admin Shares in Splunk

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.

MITRE ATT&CK

Tactic
Lateral Movement
Technique
T1021 Remote Services
Sub-technique
T1021.002 SMB/Windows Admin Shares
Canonical reference
https://attack.mitre.org/techniques/T1021/002/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="WinEventLog:Security")
(
  (EventCode=5140 OR EventCode=5145)
| eval ShareName=coalesce('Share_Name', ObjectName)
| eval SourceIP=coalesce('Source_Address', IpAddress)
| eval AccessAccount=coalesce('Account_Name', SubjectAccountName)
| where ShareName IN ("\\\\*\\ADMIN$", "\\\\*\\C$", "\\\\*\\IPC$") OR match(ShareName, "\\\\\\\\.*\\\\(ADMIN|C|IPC)\\$")
| eval AlertType="AdminShareAccess"
| table _time, host, ShareName, SourceIP, AccessAccount, AlertType
)
OR
(
  sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\psexec.exe" OR Image="*\\psexec64.exe" OR Image="*\\paexec.exe" OR Image="*\\remcom.exe")
| eval AlertType="PsExecExecution"
| table _time, host, Image, CommandLine, User, AlertType
)
OR
(
  sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\net.exe" OR Image="*\\net1.exe")
  CommandLine="*use*"
  (CommandLine="*ADMIN$*" OR CommandLine="*C$*" OR CommandLine="*IPC$*")
| eval AlertType="NetUseAdminShare"
| table _time, host, Image, CommandLine, User, AlertType
)
| sort - _time
high severity high confidence

Detects SMB admin share lateral movement using three log sources: Security Event 5140/5145 (share access to ADMIN$, C$, IPC$), Sysmon Event 1 for PsExec/PaExec process creation, and Sysmon Event 1 for net use commands targeting admin shares. Combines Windows Security log share audit events with Sysmon process telemetry.

Data Sources

Network Traffic: Network Share AccessProcess: Process CreationWindows Security Event ID 5140 (Network Share Object Access)Windows Security Event ID 5145 (Network Share Object Detailed)Sysmon Event ID 1 (Process Create)

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:Security

False Positives & Tuning

  • SCCM/Intune agents distributing software packages via ADMIN$ shares
  • Backup agents accessing C$ for backup operations
  • IT administrators manually copying files to ADMIN$ for patching
  • Legitimate PsExec use by sysadmins for remote command execution
  • Windows file sharing between workstations

Other platforms for T1021.002


Testing Methodology

Validate this detection against 4 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 1Map Admin Share with Net Use

    Expected signal: Sysmon Event ID 1: net.exe with CommandLine containing 'use' and 'C$'. Sysmon Event ID 3: Network Connection to 127.0.0.1:445. Security Event ID 4624 (LogonType=3, NTLM or Kerberos) on the target. Security Event ID 5140 (share accessed: \\*\C$).

  2. Test 2Copy File to ADMIN$ Share

    Expected signal: Sysmon Event ID 3: Network Connection to 127.0.0.1:445 from cmd.exe. Security Event ID 5145: Detailed network share file access for \\*\ADMIN$\calc_test.exe. Sysmon Event ID 11: File created at C:\Windows\calc_test.exe on the target.

  3. Test 3PsExec Remote Command Execution via ADMIN$

    Expected signal: Sysmon Event ID 1: psexec.exe process creation. Sysmon Event ID 11: PSEXESVC.exe file created in C:\Windows\. Security Event ID 7045: New service 'PSEXESVC' installed. Security Event ID 4624 (LogonType=3) on the target. Security Event ID 5140 (\\*\ADMIN$ accessed).

  4. Test 4Enumerate Admin Shares with Net View

    Expected signal: Sysmon Event ID 1: net.exe with CommandLine 'view \\127.0.0.1 /all'. Sysmon Event ID 3: Network Connection to 127.0.0.1:445. Security Event ID 5140 (IPC$ share access for enumeration).

Unlock playbooks & atomic tests with Pro

Get the full detection package for T1021.002 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections

Detection Variants (1)

Different telemetry and tradecraft for the same technique — pick the one that matches the data you collect.