Join our Newsletter — 33% off our NHI Course
Home› Guides› How to Hunt for Ransomware Precursors: Discovery, Credential…
Guide SOC & Detection Engineering

How to Hunt for Ransomware Precursors: Discovery, Credential Theft and Backup Tampering

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 12 min read
On this page

Hunting for ransomware precursors means looking for the discovery, credential theft and backup tampering that human-operated ransomware crews carry out in the days or hours before they encrypt anything. This guide sets out three hunts you can run on a schedule: one for domain and network discovery, one for credential theft, and one for attempts to inhibit recovery. Each has a hypothesis, the data it needs, illustrative queries and triage steps.

It is written for threat hunters and SOC analysts working on Windows and Active Directory estates. If you need the detection programme view, including correlation rules and which signals should page someone, read Ransomware Early Warning Signs. For hunting method in general, see the Threat Hunting Guide. This page focuses on running the hunts.

Key takeaways

  • Most ransomware incidents are the final stage of an intrusion that was visible earlier. CISA's #StopRansomware Guide notes that a ransomware event may be evidence of a previous, unresolved network compromise.
  • Three precursor behaviours are reliable hunting targets: discovery of domains, trusts and hosts; theft of credentials from LSASS memory or the Active Directory database; and tampering with shadow copies, backups and boot recovery settings.
  • Almost all of these behaviours use legitimate administrative tools. The hunt is about context: who ran the tool, from where, at what time and in what sequence.
  • Backup tampering is often the last warning before encryption. Any unplanned shadow copy deletion on a server should be treated as an incident until proven otherwise.
  • The accounts used in these stages are frequently privileged service and administrator accounts. Hunting results must feed directly into credential rotation and access review.
  • All queries on this page are illustrative and must be adapted and tested on your own data.

Why hunt for precursors rather than ransomware

By the time an encryptor runs, the attacker already has domain level access, has usually taken data and has tried to destroy your ability to recover. Detection at that point limits damage but rarely prevents it. Precursor activity happens earlier and over a longer window, which gives defenders time to act.

CISA's #StopRansomware Guide lists the signs responders should look for, including evidence of precursor dropper malware, newly created Active Directory accounts or accounts with escalated privileges, signs of enumeration of Active Directory, LSASS credentials being dumped, unexpected use of PsExec and other PsTools, unexpected remote monitoring and management software, unexpected endpoint to endpoint communication, newly created services and scheduled tasks, and misuse of tools that affect backups, shadow copies or boot configuration. That list is written for incident response, but every item is also a proactive hunt hypothesis.

The three hunts below map to MITRE ATT&CK techniques so that results can be tracked against coverage:

Data sources and readiness

Check that you can see these before you start. A hunt without the data is just a guess.

  • Process creation with full command lines: Sysmon event 1, which Microsoft describes as providing the full command line, a ProcessGUID for correlation and a hash of the image, or the Microsoft Defender XDR DeviceProcessEvents table, which carries FileName, ProcessCommandLine, AccountName, InitiatingProcessFileName and InitiatingProcessCommandLine among other columns.
  • Process access: Sysmon event 10, which Microsoft notes can reveal credential theft such as reading LSASS memory.
  • Network connections: Sysmon event 3, which is disabled by default and must be enabled in configuration, or your EDR network table.
  • PowerShell logging: CISA recommends turning on module, script block and transcription logging and retaining the two PowerShell event logs for at least 180 days.
  • Domain controller security logs and directory change auditing: needed for new accounts and group membership changes.
  • Backup platform logs: job deletions, retention changes and administrator logons on the backup console. These are often missing from the SIEM.

The Sysmon Guide and Windows Event Log Guide cover collection.

Hunt 1: discovery of domains, trusts and hosts

Hypothesis: an intruder with a foothold is mapping domain controllers, trusts, hosts and shares in preparation for lateral movement and mass deployment.

Discovery uses built-in tools that administrators also use. Microsoft documents that nltest /dclist: lists all domain controllers in a domain, nltest /domain_trusts returns a list of trusted domains (with filters such as /All_Trusts), and nltest /dsgetdc: queries DNS for domain controllers and checks connectivity to each. Alongside these, look for net commands enumerating groups and computers, PowerShell Active Directory cmdlets run from unusual hosts, and third party directory enumeration tools that have no business on the host.

Illustrative KQL:

DeviceProcessEvents | where Timestamp > ago(14d) | where FileName =~ "nltest.exe" or (FileName in~ ("net.exe","net1.exe") and ProcessCommandLine has_any ("group","view","computers")) | summarize Commands = make_set(ProcessCommandLine, 20), Count = count() by DeviceName, AccountName, InitiatingProcessFileName | order by Count desc

What turns this from noise into a lead:

  • Burst behaviour: several discovery commands from the same account on the same host within minutes.
  • Unusual parent: discovery launched by an Office process, a browser, a script host, a remote management agent you do not use, or a process running from a user-writable folder.
  • Unusual host: discovery from a workstation that has never run it before, or from a server role that never administers the domain.
  • Unusual account: discovery by a service account whose job has nothing to do with directory administration.

Stack results by host and account over a 30 to 90 day window. Administrators who run these tools routinely will appear consistently; an intruder appears as a new combination.

Hunt 2: credential theft from LSASS and Active Directory

Hypothesis: an intruder is harvesting credentials from LSASS memory on endpoints or servers, or extracting the Active Directory database from a domain controller, to gain the privilege needed to deploy ransomware everywhere.

LSASS access

Sysmon event 10 reports when one process opens another. Microsoft gives reading LSASS memory as an example of what it can reveal. Hunt for event 10 where the target image is lsass.exe and the source image is not one of a short list of expected security and system processes on that host type. Stack by source image and hash; legitimate accessors are consistent across the estate, while a dumping tool or a renamed utility is rare.

Also hunt process creation for command lines that create memory dumps of LSASS, such as built-in diagnostic DLLs or debugging utilities called with a process ID and an output path. Sysmon event 11 (file creation) can catch the dump file being written, so look for new files with dump extensions in temporary or public folders on servers.

Active Directory database theft

CISA names NTDSutil.exe alongside Mimikatz as a sign of credential dumping. Hunt for ntdsutil, and for shadow copy creation followed by file copies from the shadow copy path, on domain controllers outside planned maintenance. Any process on a domain controller writing a file named like the directory database to a non-standard location is a high priority lead.

Illustrative KQL:

DeviceProcessEvents | where Timestamp > ago(30d) | where FileName =~ "ntdsutil.exe" or ProcessCommandLine has_any ("ntds.dit","ifm") | project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine

Triage questions

  • Is the account an administrator or a service account, and was it used from a host where it normally appears?
  • Did the activity happen within a documented change window or backup job?
  • Was the dump file then compressed, copied off the host or deleted?
  • Do the same host or account appear in Hunt 1 results within the previous few days?

CISA's guide also lists hardening that reduces this risk: the attack surface reduction rule for LSASS, Credential Guard, LSA protection, limiting NTLM and WDigest, and Remote Credential Guard or restricted admin mode for RDP. Record which hosts lack these as a data point in your hunt report.

Hunt 3: backup, shadow copy and recovery tampering

Hypothesis: an intruder is preparing for encryption by deleting shadow copies, removing backup catalogues, disabling boot recovery or tampering with security tools.

CISA names the tools to watch: bcdedit.exe, fsutil.exe used to delete the USN journal, vssadmin.exe, wbadmin.exe, and wmic.exe used against shadow copies or shadow storage. CISA notes that misuse of these tools is a common ransomware technique to inhibit system recovery, and that many ransomware variants try to find and delete or encrypt accessible backups.

Microsoft documents the vssadmin syntax as vssadmin delete shadows /for=<volume> [/oldest | /all | /shadow=<ID>] [/quiet], and warns that deleting a shadow copy is permanent and cannot be recovered. The combination of /all and /quiet is the pattern most worth hunting, because it removes every restore point on a volume without prompting.

Illustrative KQL:

DeviceProcessEvents | where Timestamp > ago(30d) | where (FileName =~ "vssadmin.exe" and ProcessCommandLine has_all ("delete","shadows")) or (FileName =~ "wbadmin.exe" and ProcessCommandLine has "delete") or (FileName =~ "bcdedit.exe" and ProcessCommandLine has_any ("recoveryenabled","bootstatuspolicy")) or (FileName =~ "wmic.exe" and ProcessCommandLine has "shadowcopy") or (FileName =~ "fsutil.exe" and ProcessCommandLine has "deletejournal") | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName

Extend the hunt beyond the endpoint:

  • Backup consoles: deleted jobs, shortened retention, disabled immutability or object lock, and new administrator accounts. CISA recommends delete protection or object lock on storage that ransomware targets, so changes to those settings are significant.
  • Security tooling: services stopped, exclusions added or policies changed on endpoint protection, mapped to T1685 Disable or Modify Tools. See the MITRE ATT&CK T1685.001 Disable or Modify Tools guide for event log tampering.
  • Hypervisors and storage: snapshot deletion on virtualisation platforms. The ESXi Ransomware Playbook covers that environment.

Unlike discovery, legitimate shadow copy deletion with /all /quiet on servers is rare. Establish which backup products and maintenance scripts do it, allow list them by parent process and hash, and treat everything else as urgent.

Correlating the three hunts

Each hunt on its own produces leads with a moderate false positive rate. The same host or account appearing in more than one hunt within a short period is far stronger evidence. A practical approach is to score each lead and sum by account and host over a rolling seven day window:

  • Discovery burst from an unusual parent or host.
  • LSASS access or directory database activity outside change windows.
  • Recovery tampering command outside an allow listed backup process.
  • New service, scheduled task or remote management tool on the same host, which CISA also lists. The How to Hunt for Persistence on Windows guide covers that hunt.
  • Unexpected endpoint to endpoint connections, especially SMB and remote execution between workstations (T1021.002 SMB/Windows Admin Shares).

Any account or host that scores in two or more categories should go straight to incident response. Because the time between precursor activity and encryption can be short, agree in advance that the hunt team can raise an incident directly without waiting for the next reporting cycle.

Where identity fits

Ransomware deployment is an identity problem as much as a malware problem. Attackers need accounts that can reach every host, and they usually get them by stealing credentials from LSASS or the directory, or by abusing existing privileged service accounts used for backup, deployment and monitoring. CISA warns that malicious actors often use domain controllers as a staging point to spread ransomware across the network, and recommends auditing Active Directory for excessive privileges, using the Protected Users group for privileged accounts and reviewing admin accounts for inactive or unauthorised access every quarter.

For hunters this means:

  • Treat backup, deployment and monitoring service accounts as high value. Unexpected interactive logons or discovery commands from them are strong leads.
  • When credential theft is confirmed, assume every credential cached on that host is exposed, including service account passwords, and plan rotation through incident response.
  • Feed findings into access review so that standing privilege shrinks after each hunt.

The Identity Threat Hunting Guide and Service Account Security Guide go further.

Common failure patterns

  • Hunting for tool names only. Renamed binaries and built-in alternatives slip past simple name matching. Match on command line content and original file name where your telemetry provides it.
  • Allow listing whole accounts. Excluding an administrator or backup account from hunts creates exactly the blind spot an attacker who steals that account will use.
  • No backup platform telemetry. Many estates watch endpoints closely but never send backup console logs to the SIEM, so deleted jobs and changed retention go unseen.
  • Treating hunts as reports. A confirmed shadow copy deletion found during a weekly hunt needs an incident, not an entry in next month's report.
  • Sysmon network events left disabled. Microsoft notes event 3 is disabled by default, so endpoint to endpoint traffic is invisible unless configured.
  • Short log retention. Precursor activity can start weeks before encryption. CISA's 180 day recommendation for PowerShell logs is a useful minimum for other sources too.

Practitioner checklist

  • Confirm process creation with command lines, process access and network connections are collected from servers and workstations.
  • Turn on PowerShell module, script block and transcription logging and retain the logs for at least 180 days.
  • Run the discovery hunt and stack results by host, account and parent process over at least 30 days.
  • Run the LSASS and directory database hunt on all servers and domain controllers.
  • Run the recovery tampering hunt and build an allow list of legitimate backup processes by parent and hash.
  • Bring backup console and hypervisor logs into the SIEM.
  • Correlate leads across hunts by host and account over a rolling seven day window.
  • Agree an escalation path that lets hunters raise an incident immediately.
  • Record hardening gaps (LSA protection, Credential Guard, object lock) in each hunt report.
  • Convert repeatable findings into scheduled detections.

Standards and references

Related NHI Mgmt Group resources: Threat Hunting Guide · Ransomware Early Warning Signs · Ransomware Prevention Guide · Identity Threat Hunting Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.