T1021.002 Elastic Security · Elastic

Detect SMB/Windows Admin Shares in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
  (
    event.category == "network" and
    event.type == "connection" and
    destination.port == 445 and
    process.name != null and
    process.name not in~ ("svchost.exe", "System") and
    process.command_line like~ ("*ADMIN$*", "*IPC$*", "*C$*")
  ) or
  (
    event.category == "process" and
    event.type == "start" and
    process.name in~ ("psexec.exe", "psexec64.exe", "paexec.exe", "remcom.exe")
  ) or
  (
    event.category == "process" and
    event.type == "start" and
    process.name in~ ("net.exe", "net1.exe") and
    process.command_line like~ "*use*" and
    process.command_line like~ ("*ADMIN$*", "*C$*", "*IPC$*")
  )
high severity high confidence

Detects suspicious SMB admin share activity via three complementary angles using Elastic EQL: (1) outbound network connections to port 445 from non-system processes with admin share references in the command line, (2) execution of PsExec/PaExec/remcom lateral movement tools, and (3) net use commands explicitly mapping to ADMIN$, C$, or IPC$ shares. Uses ECS fields from Elastic Endpoint Security and Windows integrations.

Data Sources

Elastic Endpoint Security (elastic-agent)Winlogbeat with Windows moduleFilebeat with Windows Event Log inputElastic Agent with Windows integration

Required Tables

logs-endpoint.events.network-*logs-endpoint.events.process-*logs-windows.*.ds-logs-system.security-*

False Positives & Tuning

  • SCCM/ConfigMgr, PDQ Deploy, Ansible WinRM, and similar endpoint management platforms routinely connect to port 445 and reference admin shares for software deployment; baseline expected management hosts and service accounts
  • Enterprise backup solutions (Veeam, Acronis, Backup Exec, Windows Server Backup) mount remote C$ or ADMIN$ for agent-less file-level backups; exclude known backup server source IPs and service accounts
  • Domain controllers performing SYSVOL and NETLOGON share replication, and IT administrators manually mapping administrative shares for remote troubleshooting, generate process.command_line values that match admin share patterns
Download portable Sigma rule (.yml)

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 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