Skip to content

Stage IV - Secure Cloud Configuration

Current network topology (via Network Watcher) before securing the environment

Network Topology in Network Watcher

Network Topology in Network Watcher - isolated diagram

Implementing Security Controls

The MDC Security Score for the environment before hardening the environment:

MDC Security Score

Recommendations:

MDC Recommendations

Enabling Regulatory Compliance (NIST 800-53) in MDC

Adding NIST 800-53: Security and Privacy Controls for Information Systems and Organizations to Microsoft Defender for Cloud. Full Publication.

To add NIST 800-53, from the MDC home page click Regulatory Compliance from the left blade > Manage compliance policies

MDC - Regulatory Compliance

Select the environment scope you want to add the regulations to, I'm adding at the subscription level.

Environment Settings - MDC

Security Policies > Toogle NIST 800-53 Rev 5

Add 800-53 success page

It takes some time for the policy to add, after several hours it should appear in your MDC, under Regulatory Compliance

MDC Regulatory Compliance after adding 800-53

Implementing NIST 800-53 SC-7 Boundary Protection

Overview of System and Communications Protection, Section 7: Boundary Protection in MDC

NIST 800-53 SC-7

Currently, our storage account, key vault and virtual machines are on the public internet - and that's bad. To fix this we're going to apply a network security group to the environment at the subnet level. We're also going to enable private endpoints and firewalls on the storage account and the key vault to disable access from the public internet and make them accessible only from the (new) subnet.

Enable Firewall on Azure Key Vault

AKV > Networking > Firewalls and virtual networks > Disable public access > Apply

Enable AKV built-in FW

Enable Private Endpoint on Azure Key Vault

AKV > Networking > Private endpoint connections > Create

Create PE on AKV

Make sure the endpoint is in the same region as the other resources

Enable PE on AKV Validation

Enable Firewall on Azure Storage Account

Storage Account > Networking > Firewalls and virtual networks > Public network access > Disabled > Save

Enable Azure Storage Account built-in FW

Check endpoint creation in Windows VM

AKV FQDN

Resolves to private IP

AKV PE from Windows VM

Enable Private Endpoint on Azure Storage Account

Storage Account > Networking > Private endpoint connections > Private endpoint

Enable PE on AZ Storage Acct 1

Enable PE on AZ Storage Acct 2

Enable PE on AZ Storage Acct 3

Enable PE on AZ Storage Acct 4

Enable PE on AZ Storage Acct 5

Check endpoint creation in Windows VM

SA Blob service FQDN

Resolves to private IP. You can see both AKV and SA are on the same network as the Windows VM.

Check SA PE on Windows VM

Update Network Security Group Configuration

Create a network security group and attach to our subnet. It won't have any rules, but it satisfies the NIST 800-53 requirement to have a NSG attached to our subnet.

Create subnet nsg

To attach to our subnet, Virtual Networks > Select Network > Subnets > Select Subnet > Select NSG > Save

Attach subnet nsg

subnet nsg success

Update VM NSGs

Update the VM NSGs to remove rules exposing them to the public internet and add a rule only allowing traffic from your IP address(es)

windows-vm-nsg

Windows VM NSG before

Windows VM NSG after

linux-vm-nsg

Linux VM NSG before

Linux VM NSG after

Turn on Windows VM Firewall

This may be redundant given the NSG change, but just in case.

Windows Defender Firewall Enabled

Windows VM Firewall Enabled MSC

I also applied available updates to the VM.

Architecture After Hardening / Security Controls

Architecture Diagram

Attack Maps After Hardening / Security Controls

All map queries returned no results due to no instances of malicious activity for the 24-hour period after hardening.

NSG Allowed Malicious Inbound Flows

NSG Allowed Inbound Malicious Flows

Linux SSH Authentication Failures

Linux Syslog Auth Fail

Windows RDP/SMB Authentication Failures

Windows RDP/SMB Auth Fail

MS SQL Server Authentication Failures

MSSQL Server Auth Fail

Metrics After Hardening

To collect the metrics for the secured environment, Network Security Groups were hardened by blocking ALL traffic (with the exception of my workstation), and built-in firewalls enabled. Azure Key Vault and Storage Container were protected by disabling access to public endpoints and replacing them with private endpoints.

The following table shows the measurements taken after applying the security controls the environment and observing for another 24 hours:
Start Time: 1/26/2024 19:10:14
Stop Time: 1/27/2024 19:10:14

Metric Count
Security Events (Windows VMs) 11024
Syslog (Linux VMs) 1
SecurityAlert (Microsoft Defender for Cloud) 0
SecurityIncident (Sentinel Incidents) 0
NSG Inbound Malicious Flows Allowed 0

Impact of Security Controls

Metric Change post-hardening
SecurityEvent (Windows VMs) -61.99%
Syslog (Linux VMs) -99.99%
SecurityAlert (Microsoft Defender for Cloud) -100.00%
SecurityIncident (Sentinel Incidents) -100.00%
NSG Inbound Malicious Flows Allowed -100.00%

MDC Security Score after Hardening

Since this was a lab, I did not address every recommendation in Microsoft Defender for Cloud, but just a a few under SC-7 as a proof of concept. The MDC Security Score for the environment after hardening the environment:

MDC Secure Score After