ISSUE #007
First, kill the lights.
One by one, they went dark. Firewall. Endpoint protection. Backups. Shadow copies. Event logs. In the dead of night, a PowerShell script was systematically dismantling a company’s defenses.
Analytics
EE. UU.
IT services
Ransomware
Contenido
One by one, they went dark. Firewall. Endpoint protection. Backups. Shadow copies. Event logs. In the dead of night, a PowerShell script was systematically dismantling a company’s protection, clearing the way for a ransomware attack. But one line of defense remained.
Plunged in to darkness
The script began by opening the doors. It switched on Remote Desktop and Remote Registry, then opened the firewall to Remote Desktop connections. Next, it stopped and disabled every service tied to SQL, Exchange, Veeam, or backups: the company’s databases, its email, and its backup software.
Our analyst read on. The script switched the Windows firewall off entirely, then went after Windows Defender, trying to shut it down and ordering it to delete every threat definition it had—anything that could block what came next. It told Defender to ignore the C:\Users\Public\Music folder, every .exe file, and one executable sitting in that folder: xxx.exe.
Then it burned the way back. One command deleted every shadow copy: the snapshots Windows keeps so files can be restored. Its last line tried to cover the attacker’s tracks, wiping the event logs that served as the record of everything the script had just done.
The hours before encryption
Admins clear logs during overnight maintenance and delete shadow copies on specific drives. Seen one at a time, steps like these can pass for routine work.
Here, every shadow copy went at once, from a process that wasn’t a backup tool, in a script that had already taken the firewall down and told Defender where not to look.
This was pre-ransomware activity, and in our team’s experience, exactly what the hours before encryption look like.
Our analyst didn’t wait for them to run out. They isolated multiple endpoints across the environment and escalated the activity to the customer.
- Reviewed a case that chained several detections into one picture of post-exploitation activity.
- Traced every detection to one PowerShell script block timestamped 3:48 AM.
- Identified the Defender exclusions covering the Public Music folder, all .exe files, and xxx.exe.
- Flagged the deletion of every shadow copy as pre-ransomware activity.
- Escalated the activity to the customer, who requested a call.
Ransomware by Monday
Had nobody acted, our team’s assessment is that the customer would have woken up to a ransomware attack, by Monday morning at the latest. Files could have been encrypted, with the shadow copies that might have rolled them back already deleted and the backup services switched off. Sensitive data might have left the network along the way. The first calls of the week would have gone to an insurer and an incident response firm, and the company could have been left deciding whether to pay.
For an IT services provider, the risk might not have stopped at its own network. The company may hold access to parts of its clients’ environments. Depending on how much access those clients had granted, an attacker could have tried to follow it further.
Because of MDR, that didn’t happen.
Nothing in this script was new. Attackers reuse these steps because they work. The script had an off switch for the firewall, Defender, the backups, and the logs. It didn’t have one for our team.
Reconstrucción
Desde la primera señal hasta el traspaso completo
Detections at 3:48 AM
A case arrives in the dead of night, with several detections, all tracing back to a single PowerShell script.
Too much at once
Each individual step had a routine explanation, but stacked together they look like ransomware preparation.
Every shadow copy, gone
The script deletes all shadow copies, and the process behind it isn’t a backup tool.
Endpoints isolated
Our analyst isolates multiple endpoints and escalates the activity to the customer.
Back to the customer
The customer requests a call and remediates the affected endpoints.