Using Subnets to Prevent Ransomware Lateral Movement

A "flat network" is a hacker's dream environment. When an entire enterprise—workstations, servers, printers, and IoT devices—operates on a single /16 subnet, compromising just one receptionist's computer grants the attacker unrestricted, unmonitored access to the entire business infrastructure.

In modern cybersecurity, network segmentation via Variable Length Subnet Masking (VLSM) and VLANs is the foundational bedrock of a Zero-Trust architecture. Here is how proper subnetting stops ransomware dead in its tracks.

The Concept of Lateral Movement

When ransomware (like LockBit or Conti) infects a machine, its immediate goal is to spread. It achieves this by scanning the local broadcast domain for open SMB ports (445), RDP vulnerabilities (3389), or unpatched systems.

If the infected computer is on a massive flat network, the ransomware can scan and encrypt hundreds of machines in minutes without ever passing through a firewall or an Intrusion Prevention System (IPS).

How Segmentation Contains the Blast Radius

By breaking your network into strictly sized, highly isolated subnets using VLSM, you create physical and logical boundaries. Traffic within a subnet is freely switched, but traffic between subnets must pass through a Layer 3 router or a Next-Generation Firewall.

Real-World Security Design:

  • Workstation Subnets: Segmented by floor or department (e.g., HR gets a /26, Sales gets a /25). If an HR laptop gets infected, the ransomware can only scan the other 60 computers in HR. It cannot natively see the Sales laptops.
  • Server Subnets: Servers should never be on the same subnet as workstations. Place Domain Controllers, File Servers, and Database Servers in heavily restricted /27 or /28 blocks.
  • IoT Subnets: Smart TVs, security cameras, and smart thermostats are notoriously insecure. Isolate them completely on a /24 guest or IoT network that is denied access to the corporate subnets via strict Access Control Lists (ACLs).

Segment Your Network Properly

Planning a secure, segmented network requires precise IP boundaries to avoid overlap. Use our VLSM tool to generate your secure network architecture.

Open the VLSM Calculator →

Implementing the ACLs (Access Control Lists)

Once your subnets are mathematically defined, you apply security rules using Wildcard Masks on your firewall. For example, to completely block the HR subnet (10.1.1.64/26) from accessing the sensitive Database Server subnet (10.1.2.16/28), you simply write an ACL denying that specific IP block.

By enforcing strict subnet boundaries, you ensure that even if ransomware enters the building, its "blast radius" is limited to a single, small department rather than bringing down the entire company.