SANS Workshop: Shadow Steps
Understanding and Detecting User Impersonation and Lateral Movement in Active Directoryβ
Huge shout out to @ladhaAleem converting the "SANS Workshop: Shadow Steps: Understanding and Detecting User Impersonation and Lateral Movement in Active Directory" workshop created by Jean-FranΓ§ois Maes to an ansible playbook and making it work with Ludus as well!
Description from SANS Workshop: Shadow Steps: Understanding and Detecting User Impersonation and Lateral Movement in Active Directoryβ
This hands-on, scenario-driven workshop delves into how attackers move stealthily through Active Directory environments using user impersonation and lateral movement techniques. Participants will explore how attackers exploit credentials and trust relationships to expand their access, and how defenders can detect, prevent, and respond to such threats.
Through simulated exercises and guided labs, participants will walk through real-world attack paths such as (over)Pass-the-Hash, Kerberoasting, and token impersonation.
Learning Objectives:
- Understand the key mechanisms behind user impersonation in Active Directory.
- Demonstrate how attackers perform lateral movement via tools and techniques such as:
- Pass-the-Hash
- Pass-the-Ticket/Overpass-the-Hash
- Remote Services Abuse (SMB, WMI, RDP, WinRM)\
- SOCKS PTH
- Kerberoasting
- Token Impersonation
- Token Creation
- This hands-on workshop is ideal for Penetration Testers with limited knowledge about AD internals.
Have fun !
Access the workbook here:β
Deploymentβ
1. Add rolesβ
Add the badsectorlabs.ludus_elastic_container and badsectorlabs.ludus_elastic_agent roles to your Ludus server
ludus ansible roles add badsectorlabs.ludus_elastic_container
ludus ansible roles add badsectorlabs.ludus_elastic_agent
2. Deploy the VMsβ
Set and deploy the configuration for the lab.
git clone https://github.com/aleemladha/SANS-Workshop-LateralMovement
ludus range config set -f SANS-Workshop-LateralMovement/ad/SANS/providers/ludus/config.yml
ludus range deploy
# Wait for the range to successfully deploy
# You can watch the logs with `ludus range logs -f`
# Or check the status with `ludus range status`
3. Install requirementsβ
Install ansible and its requirements for the lab on your local machine.
# You can use a virtualenv here if you would like
python3 -m venv sans-lat-ludus
source sans-lat-ludus/bin/activate
python3 -m pip install ansible-core
python3 -m pip install pywinrm
ansible-galaxy install -r SANS-Workshop-LateralMovement/ansible/requirements.yml
4. Setup the inventory filesβ
The inventory file is already present in the providers folder and replace RANGENUMBER with your range number with sed (commands provided below)
- Linux
- macOS
cd SANS-Workshop-LateralMovement/ansible
export RANGENUMBER=$(ludus range list --json | jq '.rangeNumber')
# `sudo apt install jq` if you don't have jq
sed -i "s/RANGENUMBER/$RANGENUMBER/g" ../ad/SANS/providers/ludus/inventory.yml
cd SANS-Workshop-LateralMovement/ansible
export RANGENUMBER=$(ludus range list --json | jq '.rangeNumber')
# `brew install jq` if you don't have jq
sed -i '' "s/RANGENUMBER/$RANGENUMBER/g" ../ad/SANS/providers/ludus/inventory.yml