T1124

System Time Discovery

Discovery Last updated:

Adversaries may gather the system time and/or time zone settings from a local or remote system. System time is commonly queried to support time-bomb payloads (activating only after a preset date), sandbox evasion (detecting analysis environments via uptime or timestamp checks), encryption key generation seeded with timestamps, and victim targeting based on locale inference from timezone. Common methods include net time, w32tm /tz, GetSystemTime(), GetTickCount(), timedatectl, systemsetup -gettimezone, and ESXi-specific commands like esxcli system clock get. Malware families including Shamoon, ShrinkLocker, EvilBunny, Zebrocy, and Taidoor have all used system time queries for these purposes.

What is T1124 System Time Discovery?

System Time Discovery (T1124) maps to the Discovery tactic — the adversary is trying to figure out your environment in MITRE ATT&CK.

This page provides production-ready detection logic for System Time Discovery, covering the data sources and telemetry it touches: Process: Process Creation, Command: Command Execution, Microsoft Defender for Endpoint. The queries below are rated low severity at low confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Discovery
Technique
T1124 System Time Discovery
Canonical reference
https://attack.mitre.org/techniques/T1124/
Microsoft Sentinel / Defender
kusto
let TimeDiscoveryCmds = dynamic([
  "net time", "w32tm", "GetTickCount", "GetSystemTime", "GetLocalTime",
  "NtQuerySystemTime", "timeIntervalSinceNow", "systemsetup -gettimezone",
  "systemsetup -getnetworktimeserver", "timedatectl", "show clock",
  "esxcli system clock", "clock detail"
]);
let TimeDiscoveryBinaries = dynamic([
  "net.exe", "net1.exe", "w32tm.exe", "systemsetup", "timedatectl"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
    (FileName in~ (TimeDiscoveryBinaries) and ProcessCommandLine has_any (TimeDiscoveryCmds))
    or (FileName =~ "net.exe" and ProcessCommandLine has "time")
    or (FileName =~ "net1.exe" and ProcessCommandLine has "time")
    or (FileName =~ "w32tm.exe")
    or (ProcessCommandLine has "w32tm" and ProcessCommandLine has_any ("/tz", "/query", "/stripchart"))
    or (ProcessCommandLine has "net" and ProcessCommandLine has "time" and ProcessCommandLine has "\\\\")  // remote time query
)
| extend IsRemoteTimeQuery = ProcessCommandLine has "\\\\"  // net time \\hostname pattern
| extend IsTimezoneQuery = ProcessCommandLine has_any ("/tz", "timezone", "gettimezone")
| extend IsUptimeQuery = ProcessCommandLine has_any ("GetTickCount", "uptime", "/stripchart")
| extend SuspiciousParent = InitiatingProcessFileName in~ (
    "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
    "mshta.exe", "cmd.exe", "regsvr32.exe", "rundll32.exe",
    "svchost.exe", "explorer.exe"
  )
| extend SuspicionScore = toint(IsRemoteTimeQuery) + toint(IsTimezoneQuery) + toint(IsUptimeQuery) + toint(SuspiciousParent)
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         IsRemoteTimeQuery, IsTimezoneQuery, IsUptimeQuery, SuspiciousParent, SuspicionScore
| sort by Timestamp desc

Detects system time and timezone discovery commands using Microsoft Defender for Endpoint DeviceProcessEvents. Covers net time (local and remote), w32tm queries, and timezone enumeration. Enriches each event with context flags for remote time queries (net time \\hostname), timezone queries, uptime checks, and suspicious parent processes. A suspicion score aggregates these indicators to help analysts prioritize — isolated time checks score low, but time discovery launched by scripting engines or LOLBins score higher.

low severity low confidence

Data Sources

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

Required Tables

DeviceProcessEvents

False Positives

  • NTP monitoring tools and network management platforms (SolarWinds, PRTG, Nagios) that routinely query system time for drift detection
  • IT automation scripts (Ansible, PowerShell DSC, SCCM) that check system time before applying scheduled changes or patches
  • Software installations and license managers that validate the system clock before activating features or checking certificate expiry
  • Backup and replication agents that synchronize timestamps across systems or verify time consistency before initiating jobs
  • Security tools and SIEMs that query w32tm for time-sync audit compliance checks

Sigma rule & cross-platform mapping

The detection logic for System Time Discovery (T1124) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


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 1Local System Time Query via net time

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\net.exe, CommandLine='net time'. Security Event ID 4688 (if command line auditing enabled). Parent process will be cmd.exe or the test runner.

  2. Test 2Timezone and Time Source Discovery via w32tm

    Expected signal: Sysmon Event ID 1: Two Process Create events — w32tm.exe with CommandLine 'w32tm /tz' and 'w32tm /query /status'. Security Event ID 4688 for each invocation if audit process creation is enabled.

  3. Test 3Remote System Time Discovery via net time with hostname

    Expected signal: Sysmon Event ID 1: Process Create with Image=net.exe, CommandLine containing 'net time \\<hostname>'. Sysmon Event ID 3: Network connection to the target host on port 445 (SMB). Security Event ID 4688 if audit policy is configured.

  4. Test 4System Time Discovery via PowerShell (Scripted Discovery Simulation)

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe and CommandLine containing '[DateTime]::UtcNow', '[Environment]::TickCount', and '[System.TimeZoneInfo]'. PowerShell ScriptBlock Logging Event ID 4104 captures the full script. Sysmon Event ID 11: File Create for df00tech-time.txt in %TEMP%.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections

Tactic Hub