Skip to content

epomatti/azure-endpoint-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Azure Endpoint Security

Sample resources for Intune, Defender for Endpoint, and more.

Setup

Set the variables file:

cp config/local.auto.tfvars .auto.tfvars

Set the required variables:

subscription_id       = ""
entraid_tenant_domain = ""
allowed_public_ips    = [""]

Tip

Check for the latest Windows images available.

Create the resources:

terraform init
terraform apply -auto-approve

Users

Important

You must manually assign an Intune license to all users.

The users described in this section will be created.

Intune administrator

A user named IntuneAdmin@example.com will be created to manage Intune.

The following roles will be assigned:

  • Intune Administrator
  • Security Administrator

This will allow access to the following applications:

Endpoint user

A user named EndpointUser@example.com will be created to operate the endpoint.

Depending on the architecture, the device enrollment can take one of these forms:

Defender for Endpoint

Connect MDE with Intune. (Microsoft Intune Plan)

πŸ’‘ An addon or equivalent license needs to be purchased for this integration.

Microsoft Defender Antivirus works together with Microsoft Defender for Endpoint

Intune EDR policy (onboard)

This video shows how to configure Device Guard with Microsoft Intune.

πŸ’‘ Device guard - Prevents malicious code from running by ensuring only allowed and known good code can run, such as malware or ransomware. (Only Windows Enterprise client)

Among other available services is controlled folder access.

Admins

Guests may be allowed as administrators through the unlicensed admins option.

Device-only licenses are also available for devices that are not associated with a user.

Company Portal

A license is also required. EDR enables Azure Advanced Threat Protection

Make sure to also allow MDM user scope to enroll (Mobility MDM and WIP) - Microsoft Intune

πŸ’‘ This helpful video shows how to enable Defender for Endpoint.

LAPS

For Local Administrator Password Solution (LAPS), make sure you've enabled it in the device settings blade:

In Intune, create an account protection policy:

  1. Select Endpoint security > Account protection > Create policy
  2. Select Windows 10 and Windows LAPS
  3. Create the policy for all devices

Intune

If MDE is enabled, it can take a while after joining Intune until everything is synced.

Access will be granted after the compliance check:

Configuration as Code

Microsoft has provided instructions on how to manage configuration as code for Intune.

Web protection

This section shows web protection.

Attack Surface Reduction - Web protection

An example with Microsoft Edge:

Select the appropriate configuration for the profile:

To test SmartScreen, use a sample URL, such as this demo malware page.

Security can be further enhanced with Alerts, and monitoring can use Reports.

Defender - Web content filtering

With MDE, it is also possible to turn on web content filtering:

Protection includes: adult content, high bandwidth, legal liability, leisure, and uncategorized.

A policy can be created using a blade in the same view above, like this:

Device Guard

Credential guard, VBS, and UEFI, memory integrity, etc.

Security Policies

Entra ID Authentication

When using a virtual machine as opposed to the real device, follow this procedure to enable Entra ID authentication.

Note

The required RBAC roles already already added by the Terraform configuration

Example using the Azure CLI command:

az vm extension set --publisher Microsoft.Azure.ActiveDirectory --name AADLoginForWindows --resource-group rg-endpoint --vm-name vm-win11

Important

Before signing in to the VM, make sure to do the first login with the user account and register the MFA.

Download the RPD file and login.

BitLocker / Disk Encryption

Create the encryption policy and assign to the groups.

Control the conditional access depending on your use case.

Make sure the device is a member of the Entra ID assigned group.

Antivirus

Create the antivirus policies:

Defender Update Controls

Antivirus updates (like security intelligence, engine updates, and platform updates) are delivered and applied.

Microsoft Defender Antivirus

Updates to the antivirus behavior ( real-time protection, scanning options, tamper protection, and remediation actions).

Device Lock

Add a new policy:

  1. Device > Configuration Profiles > Settings catalog
    • Add Settings > Device Lock > Max Inactivity Time Device Lock
  2. Toggle "Device Password Enabled" to Enabled
  3. Set the time to the desired value (in minutes)

Apps

Tip

You can choose for it to be available as a featured app in the Company Portal. Also, choose if required or available.

Check the troubleshoot article in case of issues. For example, this URL will help with installation issues:

https://aka.ms/IntuneAppDeployment

https://learn.microsoft.com/en-us/troubleshoot/mem/intune/app-management/apps-appear-unavailable

Install an App

  1. In the Apps blade, create a new policy.
  2. Select a source, such as Microsoft Store.
  3. Select an app, such as DBeaver.

Remove an App

  1. In the Apps blade, create a new policy.
  2. Select a source, such as Microsoft Store.
  3. In the assignment, select to uninstall an app.

Disable AutoPlay

To check the AutoPlay configuration:

  1. Open gpedit.msc
  2. Computer Configuration β†’ Administrative Templates β†’ Windows Components β†’ AutoPlay Policies

The configuration should be Not Configured.

To create the policy on Intune, following this reference to set up device restrictions:

  1. Create a profile, settings option
  2. Search for AutoPlay
  3. Select all options (10 in total)

Test by inserting a USB drive with an autorun.inf file. Ensure no automatic execution occurs.

Compliance

Create a compliance policy and assign to the required devices.

Other Services

https://learn.microsoft.com/en-us/mem/intune/apps/app-management

https://github.com/microsoft/Intune-PowerShell-SDK

Windows images

Windows Server

To find updated Windows Server images:

az vm image list-skus -l eastus2 -p MicrosoftWindowsServer -f WindowsServer --query [].name

Windows 11

To find updated Windows 11 images:

az vm image list-skus -l eastus2 -p MicrosoftWindowsDesktop -f Windows-11 --query [].name

Suffixes details:

Code Description
avd Azure Virtual Desktop
ent Enterprise
entn Enterprise (not with media player)
pro Professional
pro-zh-cn Simplified Chinese
pron Professional (not with media player)

Releases

No releases published

Packages

No packages published

Languages