Preventing Lateral Movement Using Network Access Groups

Mike Burns
Apr 19, 2018 · 8 min read

At least once a week I get on a rant about network segmentation. After all, it is one of the NSA Top Ten Cybersecurity Mitigation Strategies.

If you talk to any Security Engineer, Penetration Tester, your Uncle Bob, they always talk about “lateral movement.” Someone will penetrate your network and jump from device to device until they can use one of them to their advantage. Segmenting your network is one way to prevent this.

I often encounter networks that have little to no network segmentation. When I walk through the door, it is one of the first things I recommend. This strategy will improve the security posture of the network immediately. Clients love it when I tell them there is often no hardware to buy. They most likely already have everything we need to engineer the solution.

Problem is the labor. In order for us to pull this off with flawless execution, the amount of planning and discovery is pretty intense. We need to understand everything about your network. What devices do you have in your network? What applications, how do they communicate? What ports do they use, who do they need to talk to? etc, etc, etc. Like I said, I talk about this a lot.

Typically, this strategy is done by building VLANs within your switches and firewalls. Today, I am going to show you what I believe to be a much easier way.

One thing we do know about enterprise networks is, very rarely do workstations need to communicate directly to other workstations. The exception to the rule is IT Admins. Their workstations are the only workstations in the network that need to facilitate this kind of connection.

Using Active Directory, Group Policy, and Windows Firewall, I am going to provide a step by step instruction on how to prevent workstation to workstation communication while still allowing IT Admin Workstations and Domain Controllers to still have inbound communication to your client workstations.

A visual representation of what I’m blogging about.

Do not perform this in your production environment until you have fully validated the configuration in a lab environment.

Creating an Active Directory IT Admin Workstations Security Group

  1. Open Active Directory Users and Computers

Creating a Windows Firewall Group Policy Object

  1. Open Group Policy Management Edit.

We are first going to enable the Windows Firewall for all profiles: Domain, Private, and Public.

  1. Right Click Windows Firewall and choose properties. Configure the following Settings:
  • Firewall State: On (recommended)

Each profiles state should be configured as pictured below.


There are little to no unsolicited inbound connections required for the typical user’s workstation. There are obviously going to be exceptions to this, but for the most part, the theory will hold true. You may be asking, “What about my Softphone application? Well, most installed applications initiate outbound connections to establish connectivity to a given server/service. The Windows Firewall allows this solicited inbound traffic through the firewall because it was requested by the workstation.

Click Customize Under Settings. Apply the following Settings

  • Display a notification: No

For the rules merging settings, you will want to set these to ‘Yes’ during testing and the initial phase of your deployment. If you screw anything up, you will be able to modify the firewall locally on the workstation to get your self out of a jam. Once you are confident that you have a solid configuration, I recommend the last step to set these rules to ‘No’.

  • Click Customize Under Settings
  • Click ‘OK’ and save your settings.

Creating Connection Security Rules

Next, we’re going to skip to the Connection Security Rules. This is critical to pulling off this deployment. Connection Security Rules will ensure that authentication occurs between two computers before they begin to communicate. This is how your workstations will know to trust an IT Admin Workstation and drop all unsolicited inbound connects from all other devices.

Right click Connection Security Rules and select New rule

Rule Type

  • Select Server-to-server

Endpoints

Since I want all windows devices to authentication to each other, I am leaving ‘Any IP Address’ selected.

  • Next

Requirements

  • Request authentication for inbound and outbound connections

It is important that you choose ‘Request’. Once you are confident all your Windows devices have a connection policy, I would suggest upgrading to ‘Require Authentication for inbound connections and request authentication for outbound connections’. ‘Require for inbound and outbound’ seemed like overkill and actually prevented my machine from reach the internet, so don’t do it.

Authentication Method

******This requires a Certificate Authority in your network.

  • Computer Certificate

I chose my domain’s root certificate authority. If you don’t have one, you will need to create one. (A later blog article)

Profile

  • Check Domain

Since we do not plan on having our IT Admins making inbound connections on anything other than our Domain. This security policy will only apply to the Domain Profile.

Name

I named this “Computer Authentication” because it will be used as the authentication mechanism when my domain connected workstations/servers connect to one another.


Final step for your Connection Security Rules

  • Right Click Your new connection policy and choose properties

Creating Inbound Rules

Still working within your new Window Firewall Group Policy Object, we will create inbound firewall rules that only let IT Admin Workstations and Domain Controllers make inbound requests into your workstations and block everything else.

Create Block All Rule

Once we lock down a solid a solid firewall config, this rule will act as a cleanup rule to block everything we have not explicitly approved.

  1. Right click Inbound Rules > New Rule

Create Allow Domain Controllers Rule

Our Domain Controllers are one of the few servers that will need inbound connectivity to our workstations. Active Directory relies on many ports for group policy, global catalogs, authentication, security tokens, kerberos and a bunch of other background noise no one really understands or gets. They just know it needs to happen. For this reason, we will allow Domain Controllers to have inbound access to our clients.

Create Allow IT Workstations Rule

  1. Right Click: Inbound

Create Allow IT Admin Workstations

IT Admin Workstations are another group of devices that will need inbound access to client workstations to efficiently support them remotely. For this reason, our new security group IT Admin Workstations will be granted the rights to facilitate unsolicited inbound connections to client workstations.

  1. Repeat Steps 1–8.

Once all is said and done, your Windows Firewall Rules should look like the image below.

Final Steps

Apply your Windows Firewall Group Policy to all workstations. Before IT Admin workstations can being to make inbound requests to member workstations, you will need to reboot all workstations so they can update their Connection Security Rules.

Once your reboots are complete, try having a IT Admin Workstation ping a member workstation and vice versa.

(In order for your Domain Controllers to be able to make inbound connections, you will need to create Connection Security Rules on your DCs before they can make inbound connections to your member workstations).

Again, first implement this into a lab settings prior to production.

Summary

I could continue on and on about other mitigation steps but you just get to a point where people want you to stop talking.

What I can end with is that Penetration Testers will hate this. Their ping scans, port scans, nmap scans, any network footprinter tools will come up with minimal results when fully implementing this strategy.

Credits

Think|Stack

Innovation, tech and strategy news from the IT experts

Mike Burns

Written by

Think|Stack Director of Security + Known ties to Bills Mafia

Think|Stack

Innovation, tech and strategy news from the IT experts

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade