Microsoft Defender For Identity Security Alert Lab Setup - Microsoft Defender For Identity - Microsoft Learn
Microsoft Defender For Identity Security Alert Lab Setup - Microsoft Defender For Identity - Microsoft Learn
com/…
The purpose of the Microsoft Defender for Identity Security Alert lab is to illustrate
Defender for Identity's capabilities in identifying and detecting suspicious activities and
potential attacks against your network. This first lab in a four part series walks you
through creating a lab environment for testing against Defender for Identity's discrete
detections. The security alert lab focuses on Defender for Identity's signature-based
capabilities. The lab doesn't include advanced machine-learning, user or entity-based
behavioral detections since those detections require a learning period with real network
traffic of up to 30 days. For more information about each lab in this series, see the
Defender for Identity security alert lab overview.
Prerequisites
1. A lab domain controller and two lab workstations.
3. Download and install the latest version of the Defender for Identity sensor on your
lab's domain controller.
Recommendations
We recommend following the lab setup instructions as closely as possible. The closer
your lab is to the suggested lab setup, the easier it will be to follow the Defender for
Identity testing procedures. After the lab setup is complete, you'll be ready to perform
actions with the suggested hacking research tools and review Defender for Identity's
detections of these actions.
Your complete lab setup should look as similar as possible to the following diagram:
In the examples for these labs, the Forest NetBIOS name is CONTOSO.AZURE.
FQDN OS IP Purpose
As a Domain Admin, on ContosoDC, run the following to hydrate our Active Directory
Users:
# Create new AD user RonHD, create new Helpdesk SG, add RonHD to the
Helpdesk SG
New-ADUser -Name RonHD -DisplayName "Ron Helpdesk" -PasswordNeverExpires
$true -AccountPassword $ronHdSecurePass -Enabled $true
New-ADGroup -Name Helpdesk -GroupScope Global -GroupCategory Security
Add-ADGroupMember -Identity "Helpdesk" -Members "RonHD"
# Take note of the "AATPService" user below which will be our service ac‐
count for Defender for Identity.
# Create new AD user Defender for Identity Service
1. Find your SAM policy under: Policies > Windows Settings > Security Settings >
Local Policies > Security Options> "Network access: Restrict clients allowed to
make remote calls to SAM"_
2. Add the Defender for Identity service account, AATPService, to the list of approved
accounts able to perform this action on your modern Windows systems.
4. Select Save.
3 Defender for Identity service account privileges configured correctly for SAMR ☐
As the local administrator, set up local policies by running the automated PowerShell
script:
Inspect the Administrators group on VictimPC, making sure it appears to have at least
Helpdesk and JeffL as members:
Simulate helpdesk support on VictimPC
To simulate a working and managed network, create a Scheduled Task on the VictimPC
machine to run the "cmd.exe" process as RonHD.
2. Sign in to the machine as JeffL. The Cmd.exe process will start in context of RonHD
after sign-in, simulating Helpdesk managing the machine.
Without turning off antivirus solutions first, you'll be unable to download some of the
tools in the next section. Additionally, if antivirus is enabled after the attack tools are
staged, you'll need to redownload the tools after disabling antivirus again.
2 Warning
The following tools are presented for research purposes only. Microsoft does not
own these tools and Microsoft cannot and does not guarantee or warranty their
behavior. They are subject to change without notice. These tools should be run in a
test lab environment only.
To run the Defender for Identity Security Alert playbooks, download and copy the
following tools to VictimPC.
Tool URL
We thank the authors of these research tools for enabling the community to better
understand cyber risks and impacts.
1. Add Helpdesk to AdminPC and remove 'Domain Admins' from the Local Admin
Group by running the following PowerShell script:
2. After running the script, Helpdesk is located in the local Administrators >
Members list of AdminPC.
Simulate domain activities from AdminPC
Simulated domain activities are required from SamiraA. This step can be done manually,
or use the PowerShell script provided. The PowerShell script accesses the domain
controller every 5 minutes and will result in simulated network activity as Samira.
while ($true)
{
Invoke-Expression "dir \\ContosoDC\c$"
Start-Sleep -Seconds 300
}
5 Add Helpdesk and remove Domain Admins from AdminPC's local administrators ☐
group
Mission accomplished
Your Defender for Identity lab is now ready to use. The methods used in this set up were
chosen knowing that resources must be managed (by something or someone) and
management requires local admin privileges. There are other ways to simulate a
management workflow in the lab, such as:
For best results, choose a simulation method that you can automate in your lab for
consistency purposes.
Next steps
Test your Defender for Identity lab environment using the Defender for Identity Security
Alert playbooks for each phase of the cyber-attack kill chain starting with the
reconnaissance phase.