Book a demo
All posts
Detection

The first 24 hours of ransomware, in your logs

6 min read · HexaLogs Team · December 2026

Ransomware is the last step of an attack, not the first. Before any file is encrypted, the attacker logs in, takes over accounts and moves around, and each of those steps leaves a trace.

When people picture a ransomware attack they picture the ransom note. By then it is too late. The encryption is the final step of an attack that started hours or days earlier, and almost every step before it shows up somewhere in your logs.

A typical ransomware attack, step by step0 hWay inStolen password or VPN flawWHAT THE LOGS SHOWLogin from a new countryLogin at 2 a.m.~3 hTake overReaches Active DirectoryWHAT THE LOGS SHOWNew admin accountgroup changeHours–daysSpreadMoves to servers, steals dataWHAT THE LOGS SHOWRemote logons to many hostsbig uploadsNight or weekendEncryptBackups deleted, files lockedWHAT THE LOGS SHOWShadow copies deletedmass file changesTimings based on the Sophos Active Adversary Report 2026. Each step leaves a trace; an alert at step 1 or 2 stops step 4.

How fast it moves

Sophos's Active Adversary Report 2026, based on 661 incident response cases, gives a clear picture:

  • Attackers reached Active Directory a median of 3.4 hours after getting in.
  • The median time attackers stayed in a network before being found or stopped was three days.
  • 88% of ransomware was launched outside business hours, at night or at the weekend.
  • Two-thirds of the incidents started with an identity problem, such as a stolen or weak password.

So the window to act is real, but short, and it often opens when nobody is at their desk.

What to watch at each step

1. The way in. Most attacks start with a login. Watch for sign-ins from new countries, at unusual hours, after many failed attempts, or to a VPN account that has not been used for months. Watch your edge devices too: a new admin account on a firewall is never routine.

2. The takeover. Next the attacker wants admin rights. On Windows, a new account (event 4720) or a user added to Domain Admins or another privileged group (events 4728, 4732 and 4756) should raise an alert every time, day or night.

3. Spreading. With admin rights the attacker logs on to many machines, often with remote tools, and copies data out. Look for one account logging on to many hosts in a short time, new services being installed, and unusually large uploads to the internet.

4. Encryption. Just before encryption, attackers try to stop recovery. They delete shadow copies, stop backup services and turn off security tools. These steps are loud. If you only catch one stage, catch this one, because it gives you minutes, not hours.

Make sure the logs exist

Sophos also found that cases with missing logs doubled in a year, often because firewalls kept logs for only seven days, or even 24 hours, by default. An attack that started ten days ago cannot be investigated with a seven-day log. Send logs to a central place and keep them long enough. As a best-practice reference, the implementation guidance for Saudi Arabia's NCA Essential Cybersecurity Controls sets a retention period of not less than 12 months (see What NCA ECC expects from your event logs).

Someone has to be watching

An alert at 2 a.m. on a Saturday is only useful if someone sees it. Decide who receives critical alerts out of hours, by e-mail or phone, and what they are allowed to do: disable an account, isolate a machine, call the vendor. Write it down before you need it.

Where HexaLogs fits

HexaLogs SIEM collects logs from your servers, laptops, firewalls and Microsoft 365 in one place, detects the steps above and starts every alert with what to do next. Critical alerts reach your team by e-mail through Microsoft 365 within a minute, day or night.

See HexaLogs on your own environment.

Book a 30-minute demo. We will show you your own alerts, risks and fixes.