Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Active Directory and Windows attacks

Lab · Medium · 2.5 hoursFree account

Attacking Enterprise Networks

Full attack chain from external foothold to domain admin in a lab network.

  • enterprise-network
  • pentest-methodology
  • active-directory
  • lateral-movement
On this page 14 sections
  1. ·What you need first
  2. ·Build the target
  3. 1Map the external segment
  4. 2Recover a credential from an open share
  5. Locked: Get a shell and confirm the pivot
  6. Locked: Pivot into the internal network
  7. Locked: Enumerate the domain through the pivot
  8. Locked: Map the domain with BloodHound
  9. Locked: Kerberoast svc-backup and crack the ticket
  10. Locked: Move laterally and escalate to Domain Admin
  11. Locked: Technique map
  12. Locked: Check
  13. Locked: Clean-up
  14. Locked: Next lab

Before you start

An enterprise engagement rarely ends at the first shell. The attacker chains an external foothold into credential recovery, pivots into Active Directory, enumerates the domain with BloodHound, Kerberoasts a service account, and escalates through a DACL gap to Domain Admin. Incident reports show this exact pattern in most ransomware intrusions, which is why the chain — not any one trick — is the thing a defender must break.

Lab Objectives

  • Map an external segment and find the one host that gives a foothold
  • Recover a credential from a misconfigured share and turn it into a shell
  • Pivot from a dual-homed host into an internal Active Directory network
  • Enumerate the domain through the pivot and build an attack path with BloodHound
  • Kerberoast a service account, crack its ticket, and move laterally with the password
  • Escalate to Domain Admin through a DACL misconfiguration and prove the compromise
  • Map each stage of the chain to the event ID or signal a defender would check

What you need first

Complete these items before you start:

These are not required, but they go deeper into single stages of this chain:

Build the target

KaliRange hosts no targets, no virtual machines and no lab files. You run this lab on your own machine, against a network that you build. The domain CORP.LOCAL and every address below are the example values of this lab. Replace them with your own.

HostRoleAddress
Kali attack hostYour machine. Starts on the external segment only.192.168.50.50
WEB01A domain-joined application server, exposed on the external segment and also on the internal domain network (dual-homed). This is the only host you can reach at the start.192.168.50.10 (external), 10.10.10.5 (internal)
DC01Domain Controller for CORP.LOCAL. Reachable only from the internal segment.10.10.10.10
WS01A domain-joined workstation used by the help-desk team. Reachable only from the internal segment.10.10.10.25
  • On WEB01, an anonymous SMB share that holds a script with the plaintext credential CORP\svc-web / LabWebDeploy#1 (Step 2). svc-web is a domain account, and WinRM (port 5985) is open on WEB01.
  • The domain accounts svc-web and svc-backup, with svc-web a member of the group IT-Support (Step 6).
  • svc-backup has a Service Principal Name, with the password LabSummer2026! set weak enough for your wordlist to crack it (Step 7).
  • svc-backup holds GenericAll over the Domain Admins group (Steps 6 and 8).
  • An open session of svc-backup on WS01 (Step 6), for example a scheduled task or a mapped drive that you start and leave running.

Build such a network from free, legal parts. Install evaluation copies of Windows Server from the Microsoft Evaluation Center (180 days) in virtual machines on your own computer, promote one to a domain controller and join the others. Or start from GOAD ("Game of Active Directory"), a deliberately vulnerable Active Directory lab that Orange Cyberdefense publishes on GitHub, and add the dual-homed server and the open share yourself. Isolate the network from the internet.

Authorized lab only. Run every step of this lab only against a network that you own or have written permission to test, never a real organisation. Take a snapshot of all four hosts before Step 1. Step 8 adds an account to Domain Admins and dumps domain secrets; the snapshot is how you undo both.

In this lab, a foothold is the first host you get a credential or a shell on. A pivot is a second host you route traffic through to reach a network your attack host cannot reach directly. The attack path is the chain of accounts and permissions that leads from the foothold to Domain Admin.

Step 1: Map the external segment

1

Scan the external segment

Scan the external segment for open ports and service versions. Find the one host that answers.

Your Kali host sits on 192.168.50.0/24 at the start. DC01 and WS01 are not on this segment, so you cannot scan them yet.

bashscan the external segment
nmap -sV -p- --open -T4 192.168.50.0/24
textExample output: open hosts
Nmap scan report for 192.168.50.10
Host is up (0.004s latency).
PORT    STATE SERVICE      VERSION
80/tcp  open  http         Microsoft IIS httpd 10.0
135/tcp open  msrpc        Microsoft Windows RPC
139/tcp open  netbios-ssn  Microsoft Windows netbios-ssn
445/tcp open  microsoft-ds Windows Server 2019 Standard 17763 microsoft-ds
5985/tcp open  http         Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)

192.168.50.10 (WEB01) is the only host that answers. Port 445 means SMB, and port 5985 means WinRM is open, both worth checking next.

Why this matters. A real engagement starts from the outside with no known credentials. The first task is always to find the one host that gives you a way in, not to attack every open port at once.

What a defender sees. A full-port scan of a whole subnet from one source address is loud. A firewall or network IDS with a port-scan signature logs and often blocks it. On a real engagement, this traffic belongs in the client's own monitoring, not in a Windows event log.

Step 2: Recover a credential from an open share

2

List and read an anonymous SMB share

List the shares on WEB01 with a null session. Read the files in any share that allows it. Look for a credential.

A server exposed for deployment often has a share left open for build or release tooling. Null-session SMB access needs no credential at all.

bashlist and read the share
smbclient -L //192.168.50.10 -N
smbclient //192.168.50.10/Deploy -N -c 'get deploy.ps1'
cat deploy.ps1
textExample output: share listing and file content
	Sharename       Type      Comment
	---------       ----      -------
	ADMIN$          Disk      Remote Admin
	C$              Disk      Default share
	Deploy          Disk      Release automation
	IPC$            IPC       Remote IPC

getting file \deploy.ps1 of size 211 as deploy.ps1 (12.4 KiloBytes/sec)

$cred = New-Object System.Management.Automation.PSCredential(
  "CORP\svc-web", (ConvertTo-SecureString "LabWebDeploy#1" -AsPlainText -Force))
Invoke-Command -ComputerName WEB01 -Credential $cred -ScriptBlock { Restart-Service w3svc }

The script holds a domain credential in clear text: CORP\svc-web / LabWebDeploy#1. svc-web is a domain account, so this credential also works on other hosts.

Why this matters. A credential left in an automation script is one of the most common real foothold paths. It needs no exploit, only enumeration of what a host already exposes.

What a defender sees. Anonymous access to a share, when auditing for object access is on, writes event 5140 (A network share object was accessed) with the ANONYMOUS LOGON account name (SID S-1-5-7). A rule that alerts on anonymous SMB access to any share other than well-known defaults catches this stage. Disabling null-session access removes the path entirely.

Sign in to continue

10 more sections are for signed-in members. It is free: sign in with Google.

Related