Tactics: Stealth, Discovery · Platforms: Linux, macOS, Windows
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 may include enumerating time-based properties, such as uptime or the system clock.…
Sub-technique of Virtualization/Sandbox Evasion (T1497).
Sigma detection rules (3)
T1497.003 Virtualization/Sandbox Evasion: Time Based Checks
title: "T1497.003 Virtualization/Sandbox Evasion: Time Based Checks"
id: 7cc18188-6255-4b87-ab90-80a4559cc5fb
description: 'Detect Time-Based Evasion via PowerShell sleep/elapsed-time comparison patterns (Start-Sleep combined with Measure-Command or manual Get-Date/TotalSeconds delta checks) commonly used to detect accelerated sandbox clocks. Note: the underlying API-level checks (GetTickCount, GetSystemTimeAsFileTime) are not directly visible in standard Windows Security/Sysmon logs; this rule is a scripting-layer proxy, not a full detection of native API-based timing checks. (Data Component: Process Creation; baseline tier: windows-eventid.) Tune using: SleepDurationThreshold, TimeBetweenExecutionAndNextStage, UserContext.'
references:
- https://attack.mitre.org/techniques/T1497/003
author: Shahrukh Khan
date: 2026-06-16
license: MIT
tags:
- attack.stealth
- attack.discovery
- attack.t1497.003
logsource:
category: process_creation
product: windows
detection:
selection_sleep_measure:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
CommandLine|contains|all:
- 'Start-Sleep'
- 'Measure-Command'
selection_sleep_totalseconds:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
CommandLine|contains|all:
- 'Start-Sleep'
- 'TotalSeconds'
filter_system_account:
User|contains:
- 'SYSTEM'
- 'LOCAL SERVICE'
- 'NETWORK SERVICE'
condition: 1 of selection_* and not filter_system_account
falsepositives:
- Legitimate performance-testing or benchmarking scripts using Measure-Command/Start-Sleep; System and service accounts (SYSTEM, LOCAL SERVICE, NETWORK SERVICE) performing the same action are excluded via filter_system_account; tune further with script-path allowlists if noise remains.
level: medium
T1497.003 Virtualization/Sandbox Evasion: Time Based Checks
title: "T1497.003 Virtualization/Sandbox Evasion: Time Based Checks"
id: d4b011a9-7f19-4a33-888f-083e817222b7
description: 'Detect Time-Based Evasion via long-duration Sleep invocations; a single sleep call cannot distinguish a sandbox time-check loop from a benign delay, so this base rule stays informational-only and is paired with a companion event_count correlation rule that raises severity when the same audit session repeats long sleeps several times in a short window, approximating the sleep-then-compare-timestamp loop the technique describes. (Retargeted to the process_creation auditd telemetry that actually captures this techniques behavior; see logsource below.) Tune using: SleepLoopCount, ExecutionScriptType.'
references:
- https://attack.mitre.org/techniques/T1497/003
author: Shahrukh Khan
date: 2026-04-09
license: MIT
tags:
- attack.stealth
- attack.discovery
- attack.t1497.003
logsource:
category: process_creation
product: linux
detection:
selection:
type: EXECVE
a0|endswith:
- '/sleep'
a1|re: '^[0-9]{3,}