Courseiva
Mobile and Malware ForensicshardMultiple SelectObjective-mapped

Identifying Malware Persistence Mechanisms in Dynamic Analysis

During dynamic analysis of a suspected malware sample, an analyst observes the following behaviors: (1) The process creates a service named 'WindowsDefender' that starts automatically. (2) It writes an encrypted payload to the registry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. (3) It injects code into explorer.exe. (4) It attempts to resolve the domain 'malware-update.com'. (5) It creates a mutex named 'Global\MyMutex'. Which THREE behaviors are indicators of malware persistence? (Select THREE.)

Quick Answer

The correct answer is creating a service named 'WindowsDefender' that starts automatically, as this is a classic malware persistence mechanism that ensures the malicious code re-executes after a system reboot. In dynamic analysis, persistence mechanisms are behaviors that allow malware to survive restarts and maintain a foothold on the infected system; a service set to auto-start is one of the most reliable methods, as the Windows Service Control Manager will launch it at boot time regardless of user login. On the Computer Hacking Forensic Investigator CHFI exam, this question tests your ability to distinguish between persistence techniques and other runtime behaviors like process injection or network communication—common traps include confusing code injection into explorer.exe (which is also a valid persistence method) with mere evasion or privilege escalation. Remember that persistence always involves a mechanism that triggers on startup or logon, not just during the current session. A useful memory tip is "SIR" for Service, Injection, and Registry Run keys—the three classic persistence pillars to check during dynamic analysis.

⚠ Common exam trap

Test-takers frequently confuse indicators of execution or communication (like mutex creation or DNS resolution) with persistence mechanisms, which specifically ensure the malware re-executes automatically after a reboot or logon.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Injecting code into explorer.exe

Injecting code into explorer.exe (option A) is a persistence mechanism because the injected code runs within the context of a trusted system process that starts automatically at user logon. By hijacking explorer.exe, the malware ensures its malicious code executes every time the user logs into the system, surviving a reboot without needing a separate startup entry.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Injecting code into explorer.exe

    Why this is correct

    Code injection into a commonly running process helps maintain persistence.

  • Writing an encrypted payload to the registry under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

    Why this is correct

    Run keys are used for persistence.

  • Creating a mutex named 'Global\MyMutex'

    Why it's wrong here

    Mutexes are used for synchronization or to prevent multiple instances, not persistence.

  • Creating a service named 'WindowsDefender' that starts automatically

    Why this is correct

    Services set to auto-start are a persistence mechanism.

  • Attempting to resolve the domain 'malware-update.com'

    Why it's wrong here

    Domain resolution indicates C2 communication, not persistence.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 205 original CHFI practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on CHFI

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. During dynamic analysis of a malware sample, an analyst uses Process Monitor to monitor file system activity. The malware creates a file named 'C:\Users\Admin\AppData\Roaming\svchost.exe'. What does this likely indicate?

medium
  • A.The malware is a legitimate Windows update
  • B.The malware is extracting an archive
  • C.The malware is cleaning up temporary files
  • D.The malware is attempting to achieve persistence by placing a copy in a user directory

Why D: The creation of a file named 'svchost.exe' in the user's AppData\Roaming directory is a classic persistence technique. By placing a copy of itself with the name of a legitimate Windows system process (svchost.exe) in a user-writable location, the malware aims to execute automatically at startup (e.g., via a registry Run key or scheduled task) while evading suspicion. This is not a legitimate Windows update, as system files reside in C:\Windows\System32, not in a user profile directory.

Variation 2. During dynamic analysis of a malware sample, an analyst uses Process Monitor to capture registry and file system activity. Which filter would be MOST effective in identifying attempts to create a persistence mechanism?

medium
  • A.Filter for 'WriteFile' events in System32
  • B.Filter for 'RegSetValue' events with path containing 'CurrentVersion\Run'
  • C.Filter for 'Process Create' events
  • D.Filter for 'RegSetValue' events with path containing 'RunOnce'

Why B: The 'CurrentVersion\Run' registry key is a standard persistence location where malware adds entries to execute automatically at user logon. Filtering for 'RegSetValue' events targeting this path directly captures the act of writing a new value to that key, which is a common persistence mechanism. Process Monitor's 'RegSetValue' operation specifically monitors registry value modifications, making it the most effective filter for this purpose.

Variation 3. During a malware analysis session, an analyst uses Process Monitor (Procmon) to observe a suspicious executable. Which of the following behavioral indicators would MOST strongly suggest the malware is attempting to establish persistence?

medium
  • A.Making outbound TCP connections to an IP address
  • B.Creating a named mutex
  • C.Writing to HKCU\Software\Microsoft\Windows\CurrentVersion\Run
  • D.Creating files in the %TEMP% directory

Why C: Writing to HKCU\Software\Microsoft\Windows\CurrentVersion\Run is a classic persistence mechanism because Windows automatically launches programs listed in this registry key at user logon. Process Monitor capturing a write to this key directly indicates the malware is configuring itself to run on startup, which is the strongest evidence of persistence among the options.

Variation 4. A malware analyst is performing dynamic analysis of a suspected trojan in a sandbox environment. Which of the following behaviours are strong indicators that the malware is establishing persistence on the infected system? (Select THREE.)

hard
  • A.Creating a scheduled task that runs at system startup
  • B.Creating a Windows service named 'UpdateService'
  • C.Connecting to an IP address on port 443
  • D.Writing a value to HKCU\Software\Microsoft\Windows\CurrentVersion\Run
  • E.Creating a mutex named 'Global\MyMutex'

Why A: Creating a scheduled task that runs at system startup is a classic persistence mechanism. The Task Scheduler API (taskschd.dll) allows malware to register a task that executes at boot or user logon, ensuring the trojan re-executes after a reboot. This is a direct indicator of persistence because it modifies the system's startup behavior.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CHFI practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CHFI exam.