Detect System Time Discovery in Sumo Logic CSE
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.
MITRE ATT&CK
- Tactic
- Discovery
- Technique
- T1124 System Time Discovery
- Canonical reference
- https://attack.mitre.org/techniques/T1124/
Sumo Detection Query
(_sourceCategory="os/windows/sysmon" OR _sourceCategory="os/windows/security")
| where EventID in ("1", "4688")
| parse field=CommandLine "*" as command_line nodrop
| parse field=Image "*" as image_path nodrop
| parse field=ParentImage "*" as parent_image nodrop
| where (
(matches(toLowerCase(image_path), ".*\\\\net\.exe") and matches(toLowerCase(command_line), ".*\btime\b.*"))
or (matches(toLowerCase(image_path), ".*\\\\net1\.exe") and matches(toLowerCase(command_line), ".*\btime\b.*"))
or matches(toLowerCase(image_path), ".*\\\\w32tm\.exe")
or (matches(toLowerCase(image_path), ".*\\\\timedatectl") and matches(toLowerCase(command_line), ".*(status|show|timesync-status).*"))
or (matches(toLowerCase(image_path), ".*\\\\systemsetup") and matches(toLowerCase(command_line), ".*(gettimezone|getnetworktimeserver).*"))
or matches(toLowerCase(command_line), ".*esxcli.*system.*clock.*")
)
| eval is_remote_time = if(matches(toLowerCase(command_line), ".*net1?\.exe.*\btime\b.*\\\\\\\\.+"), 1, 0)
| eval is_timezone_query = if(matches(toLowerCase(command_line), ".*(/tz|/query|timezone|gettimezone).*"), 1, 0)
| eval is_uptime_query = if(matches(toLowerCase(command_line), ".*(stripchart|gettickcount|uptime).*"), 1, 0)
| eval suspicious_parent = if(matches(toLowerCase(parent_image), ".*(powershell|pwsh|wscript|cscript|mshta|regsvr32|rundll32).*"), 1, 0)
| eval suspicion_score = is_remote_time + is_timezone_query + is_uptime_query + suspicious_parent
| where suspicion_score > 0
| fields _messageTime, Computer, User, image_path, command_line, parent_image, is_remote_time, is_timezone_query, is_uptime_query, suspicious_parent, suspicion_score
| sort by _messageTime desc Sumo Logic CQL query detecting T1124 System Time Discovery from Windows Sysmon and Security event logs. Parses process creation events to identify net time, w32tm, timedatectl, systemsetup, and ESXi clock commands, enriching with suspicion scoring for remote queries, timezone enumeration, and suspicious parent processes.
Data Sources
Required Tables
False Positives & Tuning
- IT helpdesk scripts that query net time against domain controllers to diagnose Kerberos authentication failures caused by clock skew exceeding the 5-minute tolerance
- Backup software agents that verify system time prior to initiating backup jobs to ensure accurate timestamp metadata on backup archives
- Security baseline scanning tools (CIS-CAT, SCAP scanners) that query timedatectl or w32tm as part of configuration compliance assessments
Other platforms for T1124
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.
- 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.
- 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.
- 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.
- 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%.
References (10)
- https://attack.mitre.org/techniques/T1124/
- https://technet.microsoft.com/windows-server-docs/identity/ad-ds/get-started/windows-time-service/windows-time-service-tools-and-settings
- https://msdn.microsoft.com/ms724961.aspx
- https://any.run/cybersecurity-blog/time-bombs-malware-with-delayed-execution/
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1124/T1124.md
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_net_time.yml
- https://www.picussecurity.com/resource/virtualization/sandbox-evasion-how-attackers-avoid-malware-analysis
- https://unit42.paloaltonetworks.com/shamoon-3-targets-oil-gas-organization/
- https://www.welivesecurity.com/2022/01/25/watering-hole-deploys-new-macos-malware-dazzlespy-asia/
Unlock Pro Content
Get the full detection package for T1124 including response playbook, investigation guide, and atomic red team tests.