A San Diego engineering firm called us after ransomware encrypted its on-premises domain controller, its file server and every domain-joined PC. Thirteen people, a design team that lives in CAD and GIS files, and a Microsoft 365 tenant that nobody had looked at closely in years. Client details are withheld; the work is not.

This post walks through what we did in order: contain, check the cloud, rebuild identity and devices, lock down email, harden the network, and design the new file storage so the next attack has much less to hit.

AT A GLANCE
13
staff back to work on rebuilt, cloud-managed PCs
17
mailboxes migrated, zero failed users
~200
guest accounts brought under MFA
47%
starting Secure Score we built up from

1. Containment and recovery

The first job was stopping the spread. Infected machines were isolated from the network, the on-premises domain was treated as untrusted, and nothing from it was reconnected. Data recovery ran with a recovery partner while we kept the business working: staff installed GIS and CAD locally and worked from their laptops for several weeks rather than wait for the old environment.

We made one decision early that shaped everything after: we would not rebuild the old Active Directory domain. Every PC would be wiped and joined directly to Microsoft Entra ID (cloud identity) and managed by Intune, so there is no on-premises domain controller left for an attacker to take over.

2. Microsoft 365 compromise audit

Ransomware on the network does not prove the cloud is clean, so we audited the tenant before trusting it:

  • Sign-in logs, 30 days. We found sign-in attempts from outside the US against an old shared admin account, including password-spray attempts using legacy authentication from a known hostile address range. That account was retired and blocked.
  • Legacy protocols. We checked every POP3, IMAP and authenticated-SMTP sign-in for 30 days. None were in legitimate use, so POP and IMAP were disabled on all mailboxes and every mailbox plan; SMTP AUTH was already off tenant-wide.
  • Mailbox rules and forwarding. We reviewed for forwarding and delete rules of the kind attackers use to hide their tracks, and blocked automatic forwarding to outside addresses.
  • App consents and admin roles. We reviewed which apps had permission to company data and who held admin roles.
  • One suspicious PC. A workstation flagged during the incident turned out, after event-log forensics, to be adware from a malicious ad rather than a hands-on intrusion. Knowing the difference mattered: it was cleaned and reloaded, not treated as a second breach.

BASELINE  Starting Microsoft Secure Score: 47%


3. Identity: who can sign in, from where, and how

  • MFA for every user, enforced by Conditional Access, including the roughly 200 guest accounts the firm uses for agency partners.
  • Sign-ins blocked outside the United States.
  • Legacy authentication blocked by Conditional Access, so old protocols that bypass MFA cannot be used even if re-enabled somewhere.
  • Device-code sign-in blocked, closing a phishing technique that has become common against Microsoft 365.
  • Users can no longer grant apps access to company data on their own. Requests go to an admin approval workflow instead.
  • Ordinary users no longer become local administrators when they join a PC to the company.
  • Windows LAPS: every PC has a unique, rotating local administrator password stored in Entra ID, so one stolen password no longer opens every machine.
  • The old shared admin mailbox was retired; staff who were still on SMS-only MFA were moved toward the Authenticator app.

4. Devices: rebuilt, enrolled and enforced

Every PC was wiped and re-enrolled by a technician, joined to Entra ID and managed by Intune. Then we applied policy to all of them at once:

  • BitLocker full-disk encryption, with recovery keys escrowed to Entra ID.
  • Microsoft Defender with real-time and cloud protection at a high level, network protection, potentially-unwanted-app blocking and tamper protection, so malware cannot simply switch the antivirus off.
  • Attack Surface Reduction rules, rolled out in audit mode first and moved to block once we had seen what they would catch, the same staged approach we use everywhere so nobody's CAD software breaks on a Monday morning.
  • Endpoint Detection and Response onboarding for every device, plus a managed detection and response (MDR) agent with a 24/7 vendor security operations team watching it. The two run side by side.
  • Firewall on for every network profile, inbound blocked by default.
  • Browser lockdown in Edge and Chrome: extensions blocked except an approved list (the company password manager is force-installed), SmartScreen enforced, and web content filtering for adult, gambling, malicious and uncategorised sites.
  • Windows security baseline, tuned after a first pass proved too strict for daily work (a 14-character PIN and no right-click "run as administrator" went too far for a design office; we adjusted rather than let people work around it).
  • A clean-up pass in our remote-management platform removed ghost records left by the old domain-joined PCs, so monitoring and patching only see the real fleet.

5. Email: moved, filtered and authenticated

  • Mail moved off the old hosting provider to Exchange Online. All 17 mailboxes were migrated in four batches with zero failed users, and the old provider was shut off.
  • Defender for Office 365 Standard protection turned on for the whole domain: anti-phishing with impersonation protection, anti-spam, anti-malware, Safe Links and Safe Attachments.
  • AI-based email security added on top of Microsoft's filtering, with a "Report phishing" button in Outlook for staff.
  • Unified audit logging switched on. It had been off, which meant there was no record of what happened in mailboxes during the incident. It now records.
  • Microsoft Teams meetings set so outside callers wait in the lobby.
  • SPF, DKIM and DMARC in place for the domain, so attackers cannot easily send mail pretending to be the firm.

6. Network: segmented and watched

  • The firewall's threat management was turned on: intrusion prevention on every network and honeypots on the internal networks, so a device probing the office gets noticed.
  • Remote-access apps blocked at the firewall except the one the firm actually uses, which removes a favourite route back in.
  • Staff work from home by connecting to dedicated office workstations, so project files never leave the building and no VPN to the file server is needed.

7. The new file server: smaller target, locked backup

The old server held everything, and that is what made the attack so damaging. The replacement is built on a different principle: keep as little on it as possible, and make sure a copy exists that ransomware cannot touch.

  • The existing server is rebuilt, not trusted. All-new drives and a clean install of a current, supported Windows Server, on its own protected section of the network. The old drives come out and are kept untouched as evidence.
  • Only active GIS and CAD projects live on it, about 1 TB, mirrored across two new enterprise SSDs so a failed drive loses nothing. We chose new drives over refurbished ones deliberately: on the server that holds the firm's work, a known-zero history is worth the price.
  • A continuous copy goes to Microsoft Azure with an immutable, locked backup that cannot be deleted or encrypted early, even by an administrator account.
  • The archive moved off the server entirely, to cloud storage with read-only access and version history, plus an encrypted offline copy.
  • Accounting moves to the cloud. The firm's desktop accounting software was years out of vendor support; rather than buy new hardware to keep running it on site, it moves to the vendor's cloud edition with MFA, and the old company file is kept read-only.
  • A real server instead of a NAS. We weighed both. A network storage box would have been cheaper, but it would sit outside the firm's identity and security tooling, cannot run the endpoint protection every other device runs, and these boxes are among the most targeted devices in small-business ransomware. The rebuilt server joins the same identity, the same protection and the same monitoring as everything else.

Recommendations for every small business

1Turn on MFA for everyone, including guests, and block legacy authentication so MFA cannot be bypassed.
2Restrict sign-ins by country if your staff work from one place.
3Use Windows LAPS so one local admin password does not unlock every PC.
4Audit the cloud after any on-premises infection. Check sign-ins, mailbox rules, forwarding and app consents before you trust it.
5Make sure audit logging is on today. If it is off when you are attacked, there is nothing to investigate.
6Keep a backup that cannot be deleted, offline or immutable, and test that you can restore from it.
7Put fewer eggs on the file server. Move archives and line-of-business apps to the cloud where it makes sense, and keep a locked copy of what stays.
8Have an incident response contact arranged before you need one.

Need help?

If ransomware or a suspected account compromise has hit your business, or you want your Microsoft 365 tenant reviewed before it does, contact TechiT Services. We handle ransomware recovery, incident response and Microsoft 365 security hardening for small businesses across San Diego.

Contact TechiT Services →