T1497.002 CrowdStrike LogScale · LogScale

Detect User Activity Based Checks in CrowdStrike LogScale

Adversaries may employ various user activity checks to detect and avoid virtualization and analysis environments. This includes checking mouse movement speed/frequency, click patterns, browser history and bookmarks, number of files on the desktop or in common directories, recently opened documents, and presence of user-created files. Some malware requires specific user interaction before activating, such as waiting for a document to close, a user to double-click an embedded image, or waiting for mouse button presses. Darkhotel checks mouse cursor position repeatedly, Okrum requires three left-clicks before executing, and FIN7 used embedded images requiring double-clicks to activate.

MITRE ATT&CK

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

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName = ProcessRollup2
| CommandLine = /(?i)(getcursorpos|getlastinputinfo|mouse_event|setcursorpos|getasynckeystate|getforegroundwindow|getdesktopwindow|recentdocs)/
  or (
    FileName = /(?i)^(cmd\.exe|powershell\.exe)$/
    and CommandLine = /(?i)(desktop|recent|downloads|documents)/
    and CommandLine = /(?i)(count|\.count|find\/c|measure-object)/
  )
  or (
    CommandLine = /(?i)(history|bookmarks|cookies|places\.sqlite)/
    and not FileName = /(?i)^(chrome\.exe|firefox\.exe|msedge\.exe|brave\.exe|opera\.exe)$/
  )
| mouse_check := if(CommandLine = /(?i)(getcursorpos|getlastinputinfo|mouse_event|setcursorpos|getasynckeystate)/, 1, 0)
| window_check := if(CommandLine = /(?i)(getforegroundwindow|getdesktopwindow)/, 1, 0)
| file_count_check := if(
    CommandLine = /(?i)(desktop|recent|downloads|documents)/
    and CommandLine = /(?i)(count|\.count|find\/c|measure-object)/,
    1, 0
  )
| recentdocs_check := if(CommandLine = /(?i)recentdocs/, 1, 0)
| browser_history_check := if(
    CommandLine = /(?i)(history|bookmarks|cookies|places\.sqlite)/
    and not FileName = /(?i)^(chrome\.exe|firefox\.exe|msedge\.exe|brave\.exe|opera\.exe)$/,
    1, 0
  )
| suspicion_score := (mouse_check * 2) + (window_check * 2) + file_count_check + recentdocs_check + browser_history_check
| suspicion_score > 0
| table([timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, ParentCommandLine, mouse_check, window_check, file_count_check, recentdocs_check, browser_history_check, suspicion_score])
| sort(timestamp, order=desc)
medium severity medium confidence

CrowdStrike LogScale (Falcon) detection for T1497.002 using ProcessRollup2 telemetry. Applies a top-level filter matching any process command line that references mouse or window Win32 API strings, RecentDocs, user directory file counts via cmd/PowerShell, or browser data paths from non-browser executables. Downstream eval fields compute per-category flags and a composite suspicion score (mouse/window checks weighted 2x) to aid analyst triage. Requires Falcon sensor with full command line capture enabled.

Data Sources

CrowdStrike Falcon Endpoint sensor (ProcessRollup2 events)Falcon LogScale via Falcon Data Replicator or direct ingest

Required Tables

ProcessRollup2

False Positives & Tuning

  • Authorised red team or penetration testing engagements where post-exploitation frameworks (Cobalt Strike, Metasploit) execute user-simulation modules that invoke mouse activity APIs
  • Enterprise endpoint management or RMM agents running PowerShell inventory scripts that enumerate file counts in Desktop or Downloads folders for asset management telemetry
  • Password managers or SSO desktop clients (1Password, LastPass, Okta Verify) that read browser cookie or history paths during credential auto-fill or profile discovery operations
Download portable Sigma rule (.yml)

Other platforms for T1497.002


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 1Check desktop file count for sandbox detection

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe with 'dir /b' + Desktop path, piped to find.exe. Two process events generated.

  2. Test 2Check RecentDocs registry for user activity

    Expected signal: Sysmon Event ID 1: Process Create for reg.exe with RecentDocs query. Sysmon Event ID 13: Registry key access event for the RecentDocs path.

  3. Test 3PowerShell mouse position check for sandbox detection

    Expected signal: Sysmon Event ID 1: PowerShell process with GetCursorPos in command line. PowerShell ScriptBlock Log Event ID 4104 with the full P/Invoke code and mouse check logic.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections