T1497.003 Elastic Security · Elastic

Detect Time Based Checks in Elastic Security

Adversaries may employ various time-based methods to detect virtualization and analysis environments, particularly those that attempt to manipulate time mechanisms to simulate longer elapses of time. This includes using GetTickCount and GetSystemTimeAsFileTime to detect time acceleration in sandboxes, implementing long sleep delays (minutes to hours) to outlast sandbox analysis timeouts, checking system uptime to verify the machine has been running for a reasonable period, computing execution timing differences before and after sleep to detect sandbox time manipulation, and using API hammering (excessive printf or I/O calls) to delay execution. Notable examples include SUNBURST (2-week dormancy), Ursnif (30-minute delay), Bumblebee (hardcoded and randomized sleep intervals), and TrickBot (printf-based API hammering).

MITRE ATT&CK

Tactic
Defense Evasion Discovery
Technique
T1497 Virtualization/Sandbox Evasion
Sub-technique
T1497.003 Time Based Checks
Canonical reference
https://attack.mitre.org/techniques/T1497/003/

Elastic Detection Query

Elastic Security (Elastic)
eql
process where event.type == "start" and
(
  process.command_line : ("*GetTickCount*", "*GetSystemTimeAsFileTime*", "*QueryPerformanceCounter*", "*NtQuerySystemTime*", "*timeGetTime*", "*GetSystemTime*") or
  (
    process.name : "timeout.exe" and
    process.command_line regex~ "timeout\\s+/t\\s+[0-9]{3,}"
  ) or
  (
    process.name : "ping.exe" and
    process.command_line regex~ "-n\\s+[0-9]{3,}\\s+127\\.0\\.0\\.1"
  ) or
  (
    process.command_line : ("*Start-Sleep*", "*WScript.Sleep*", "*Thread.Sleep*") and
    not process.parent.name : ("svchost.exe", "explorer.exe", "taskhostw.exe")
  ) or
  process.command_line : ("*lastbootuptime*", "*Boot Time*", "*net statistics*")
)
medium severity medium confidence

Detects time-based sandbox evasion techniques (T1497.003) via Elastic ECS process events. Matches timing API references in command lines, long sleep delays using timeout.exe or ping.exe, scripting sleep functions, and system uptime enumeration commands. Uses wildcard and regex matching against process.command_line.

Data Sources

Elastic Endpoint SecurityWinlogbeat with Sysmon moduleElastic Agent (endpoint integration)

Required Tables

logs-endpoint.events.process-*logs-system.security-*winlogbeat-*

False Positives & Tuning

  • Legitimate automation and CI/CD scripts using Start-Sleep for polling intervals between retries or service readiness checks
  • System administrators running 'net statistics server' or querying lastbootuptime for uptime reporting and SLA verification
  • Network engineers using high ping repeat counts (ping -n 500 127.0.0.1) as a delay mechanism during network configuration scripts
Download portable Sigma rule (.yml)

Other platforms for T1497.003


Testing Methodology

Validate this detection against 3 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 1Extended timeout delay for sandbox evasion

    Expected signal: Sysmon Event ID 1: Process Create for timeout.exe with '/t 180' argument. The process will be visible in task list for the duration of the delay. Security Event ID 4688 with command line.

  2. Test 2Ping-based sleep for sandbox evasion

    Expected signal: Sysmon Event ID 1: Process Create for ping.exe with '-n 300 127.0.0.1' arguments. Sysmon Event ID 3: Network Connection events to 127.0.0.1 (loopback).

  3. Test 3WMI uptime check for sandbox detection

    Expected signal: Sysmon Event ID 1: Process Create for wmic.exe with 'os get lastbootuptime' arguments. WMI Operational log entry for Win32_OperatingSystem query.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections