Phase 8: baseline snapshot and reset; validated attack path

snapshot freezes each golden disk into images/base/ and boots a thin
overlay; reset recreates the overlay in about a second. Shutdown now asks
the guest over WinRM because ACPI powerdown is ignored by Server 2022.

dc01-post: grant GenericAll with dsacls (the .NET ACL API reported success
but never persisted the ACE) and set MinPasswordAge to zero, without which
the ACL reset fails.

Attack path validated end to end against the live lab: web -> SMB creds ->
AS-REP -> Kerberoast -> WinRM -> GenericAll reset -> DCSync.
This commit is contained in:
2026-10-21 20:10:06 -04:00
parent 645adea875
commit 71e05d6aa6
6 changed files with 96 additions and 26 deletions
+13 -12
View File
@@ -84,19 +84,15 @@ try {
Write-LabLog 'dc01: pre-auth disabled on j.contractor'
# ACL abuse: svc_backup has GenericAll on a Domain Admin.
$target = Get-ADUser 't.smith'
$sid = (Get-ADUser 'svc_backup').SID
$aclPath = "AD:\$($target.DistinguishedName)"
$acl = Get-Acl $aclPath
$already = $acl.Access | Where-Object { $_.IdentityReference -eq $sid -and $_.ActiveDirectoryRights -match 'GenericAll' }
if (-not $already) {
$rule = New-Object System.DirectoryServices.ActiveDirectoryAccessRule(
$sid,
[System.DirectoryServices.ActiveDirectoryRights]::GenericAll,
[System.Security.AccessControl.AccessControlType]::Allow)
$acl.AddAccessRule($rule)
Set-Acl -Path $aclPath -AclObject $acl
# dsacls is used instead of the .NET ACL API, which returns success but
# does not persist the ACE through the AD provider.
$targetDn = (Get-ADUser 't.smith').DistinguishedName
$aclCheck = dsacls.exe $targetDn | Select-String 'svc_backup'
if (-not $aclCheck) {
$null = dsacls.exe $targetDn /G '@@NETBIOS@@\svc_backup:GA'
Write-LabLog 'dc01: GenericAll granted to svc_backup over t.smith'
} else {
Write-LabLog 'dc01: svc_backup already has an ACE on t.smith'
}
# ------------------------------------------------------------ dns
@@ -125,6 +121,11 @@ try {
Set-Acl -Path $flagDir -AclObject $acl
Write-LabLog 'dc01: root.txt in place'
# The GenericAll path ends in a password reset; the default one-day
# minimum password age blocks it, and it is a plausible weak setting.
Set-ADDefaultDomainPasswordPolicy -Identity '@@DOMAIN@@' -MinPasswordAge '00:00:00'
Write-LabLog 'dc01: minimum password age set to zero'
# ------------------------------------------------------------ auditing
# Legacy policy off, advanced subcategories on: this is what the blue-team
# debrief reads back from the event log.