User Activity Based Checks

T1497.002

Sub-technique of T1497 Virtualization/Sandbox Evasion.View on attack.mitre.org

About this technique

Adversaries may employ various user activity checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from Virtualization/Sandbox Evasion during automated discovery to shape follow-on behaviors.

Adversaries may search for user activity on the host based on variables such as the speed/frequency of mouse movements and clicks , browser history, cache, bookmarks, or number of files in common directories such as home or the desktop. Other methods may rely on specific user interaction with the system before the malicious code is activated, such as waiting for a document to close before activating a macro or waiting for a user to double click on an embedded image to activate.

Detection rules0

Rules on DetectionCode tagged with T1497.002.

Sigma0

No Sigma rules are mapped to this technique yet.

Splunk0

No Splunk rules are mapped to this technique yet.

Groups2

Software5

Campaigns0

None recorded.

Procedure examples7

Groups2

Used byProcedure example
GroupDarkhotel

Darkhotel has used malware that repeatedly checks the mouse cursor position to determine if a real user is on the system.

GroupFIN7

FIN7 used images embedded into document lures that only activate the payload when a user double clicks to avoid sandboxes.

Software5

Used byProcedure example
MalwareCobalt Strike

The Cobalt Strike loader can use the `MessageBoxA` API to prompt for user interaction as an anti-sandbox measure.

MalwareOkrum

Okrum loader only executes the payload after the left mouse button has been pressed at least three times, in order to avoid being executed within virtualized or emulated environments.

MalwareROAMINGHOUSE

ROAMINGHOUSE can check for specific mouse movements and user activity before initiating malicious activity.

MalwareSpark

Spark has used a splash screen to check whether an user actively clicks on the screen before running malicious code.

MalwareTONESHELL

TONESHELL has leveraged `GetForegroundWindow` to detect virtualization or sandboxes by calling the API twice and comparing each window handle.

References4

  1. Deloitte Environment Awareness Open source
    Torello, A. & Guibernau, F. (n.d.). Environment Awareness. Retrieved September 13, 2024.
  2. FireEye FIN7 April 2017 Open source
    Carr, N., et al. (2017, April 24). FIN7 Evolution and the Phishing LNK. Retrieved April 24, 2017.
  3. Sans Virtual Jan 2016 Open source
    Keragala, D. (2016, January 16). Detecting Malware and Sandbox Evasion Techniques. Retrieved April 17, 2019.
  4. Unit 42 Sofacy Nov 2018 Open source
    Falcone, R., Lee, B.. (2018, November 20). Sofacy Continues Global Attacks and Wheels Out New ‘Cannon’ Trojan. Retrieved April 23, 2019.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.