Skip to main content

Detecting Persistent WMI Consumers

Learn how attackers abuse WMI for persistence and detect it with event logs and forensic artefacts.

Task 1: Introduction

Task 2: WMI Event Subscriptions

Task 3: How Attackers Abuse WMI Event Subscriptions for Persistence

Task 4: Detecting WMI Persistence via Event Logs

Task 5: Detecting WMI Persistence via Forensic Artefacts

Task 6: Hands-On Investigation

Task 7: Prevention and Mitigation Strategies

Task 8: Conclusion

Back to all walkthroughs
Room Icon

Detecting Persistent WMI Consumers

Max room.

Learn how attackers abuse WMI for persistence and detect it with event logs and forensic artefacts.

medium

120 min

95

User profile photo.
User profile photo.
User profile photo.

To access material, start machines and answer questions login.

Groups like Cozy Bear (APT29), Turla, and FIN8 have used event subscriptions as a mechanism for years, and it remains one of the most effective techniques in their playbook precisely because most defenders don't know to look for it. APT29's POSHSPY backdoor, for example, uses WMI for persistence while executing a payload that survives every reboot. In this room, you will learn about WMI and how to investigate WMI persistence.

Learning Objectives

  • Understand what WMI is and how its event subscription model works.
  • Understand how attackers abuse WMI event subscriptions for persistence.
  • Detect WMI persistence artefacts using event log analysis.
  • Detect WMI persistence artefacts using analysis.
  • Mitigate WMI-based persistence in Windows environments.

Prerequisites

Before starting this room, you should be familiar with the following TryHackMe rooms:

Lab Access

Before moving forward, let's get your lab set up. You can start and access the lab machine from the browser. If you are using your own machine, connect to the TryHackMe network using the OpenVPN configuration file from your account settings, then into the lab machine using the credentials below. Accept the certificate when prompted, and you should be logged into the remote system.

Credentials

Only needed if you are using your own machine.

Username
DFIRUser
Password
TryH@ckMe1!433
IP address
MACHINE_IP
Connection via
RDP

Set up your virtual environment

To successfully complete this room, you'll need to set up your virtual environment. This involves starting the Lab Machine, ensuring you're equipped with the necessary tools and access to tackle the challenges ahead.
Lab machine
Status:Off

Once connected to the machine, all the tools will be in the folder C:\Users\DFIRUser\DFIR Tools.

Answer the questions below

Let's begin!