Windows Time-Based Evasion via Choice Exec
Detection of choice.exe used in batch files for time-based evasion, a technique observed in SnakeKeylogger malware, indicating potential stealthy code execution and persistence.
This brief focuses on the detection of choice.exe being used within batch files as a time-delay tactic, a technique notably employed by the SnakeKeylogger malware. The analysis leverages data from Endpoint Detection and Response (EDR) agents, scrutinizing process names and command-line executions. This behavior is significant because it suggests the implementation of time-based evasion techniques designed to circumvent detection mechanisms. Successful evasion could enable attackers to execute malicious code covertly, remove incriminating files, and establish persistent access on compromised systems. The use of choice.exe for such purposes warrants immediate investigation by security operations center (SOC) analysts due to the potential for significant system compromise and data exfiltration.
Attack Chain
- The attacker gains initial access via an unknown vector.
- A batch script is executed on the target system.
- The batch script uses
choice.exewith the/Tand/Nparameters to introduce a time delay. The/Tparameter specifies a timeout period, and the/Nparameter suppresses the display of choices. - This delay allows the malware to evade time-sensitive detection mechanisms.
- After the delay, the script executes further commands, potentially downloading and executing a payload.
- The payload executes, installing a keylogger such as SnakeKeylogger or 0bj3ctivity Stealer.
- The keylogger captures sensitive information such as keystrokes and clipboard data.
- The stolen data is exfiltrated to a remote server.
Impact
Compromised systems can lead to data theft, intellectual property loss, and financial fraud. SnakeKeylogger and similar malware have been used to steal credentials and sensitive information from various targets. Successful exploitation could result in significant financial losses, reputational damage, and legal liabilities. The number of victims and the extent of the damage depend on the attacker’s objectives and the compromised systems’ value.
Recommendation
- Deploy the Sigma rule
Detect Choice.exe Time Delayto your SIEM to detect the use ofchoice.exewith time-delay parameters (log source:process_creation). - Enable Sysmon process creation logging (Event ID 1) to capture the necessary process execution data for the Sigma rule.
- Investigate any instances of
choice.exebeing used with the/Tand/Nparameters to determine if it is part of a malicious script. - Block the execution of unsigned or untrusted batch scripts to prevent the initial execution of the malicious code.
- Monitor endpoint activity for suspicious processes and network connections originating from systems where
choice.exehas been detected.
Detection coverage 2
Detect Choice.exe Time Delay
mediumDetects the use of choice.exe with time-delay parameters, a technique used for evasion.
Detect Batch Script with Choice.exe Time Delay
mediumDetects batch script execution using choice.exe for time delays, indicative of potential evasion techniques.
Detection queries are kept inside the platform. Get full rules →