Inspecting Kerberos Ticket Requests v1
Inspecting Kerberos Ticket Requests v1
Ticket Requests
Version: 1.0
Date: 2020
Confidentiality class: Public
1
whoami?
cname: Charlie Clark
2
Agenda
3
What is Kerberos?
4
Kerberos Most Basic Usage
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13
5
AS-REQ message type (10)
Request body
Domain name
6
TGS-REQ message type (12)
Server name (contains the service and host the ticket is for)
Encrypted authorization data – used when requesting service tickets for services on remote hosts
7
Pre-Authentication
8
Pre-Authentication – Abuse Tools
• While impacket’s getTGT.py automatically sends the first AS-REQ without pre-
authentication, neither Rubeus or kekeo do
9
Encryption Type
• The encryption type used to encrypt most encrypted sections of genuine
Kerberos messages is AES256 (18)
10
Rubeus AS-REQ Indicators
• KDC options differ from real traffic with canonicalize
disabled
• Incorrect supported etypes specified, genuine AS-
REQ’s includes 6 supported etypes
Missing
• rtime (renew time) field
• addresses field
11
Rubeus AS-REQ Indicators – Continued
Genuine AS-REQ Rubeus AS-REQ
12
Rubeus TGS-REQ Indicators
• PA DATA does not include the PA-PAC-OPTIONS
field
• KDC options differ from real traffic with
canonicalize disabled
• Incorrect supported etypes specified, genuine TGS-
REQ’s includes 5 supported etypes
• cname field included when not in genuine traffic
Missing
• enc-authorization-data field
13
Rubeus TGS-REQ Indicators - Continued
Genuine TGS-REQ Rubeus TGS-REQ
14
Rubeus TGS-REQ Indicators - Authenticator
Genuine Authenticator Rubeus Authenticator
15
Rubeus TGS-REQ Indicators – Unconstrained
Delegation
TGS-REP’s (replies to TGS-REQ’s) will set the ok-as-delegate bit within the
flags field of the enc-part section if the account with the SPN is configured for
unconstrained delegation
16
AS-REQ Comparison Table
Indicator Genuine Rubeus (asktgt) Kekeo (tgt::ask) Impacket
without pre-auth ✓ ✗ ✗ ✓
kdc-options 40810010 40800010 40800010 50800000
etypes -135, 3, 17, 18, 23, 24 18 17, 18, 23 18
rtime ✓ ✗ ✗ ✓
addresses ✓ ✗ ✗ ✗
till 2037-09-13 02:48:05 2037-09-13 02:48:05 2037-09-13 02:48:05 + 1 day
(UTC) (UTC) (UTC)
17
TGS-REQ Comparison Table
Indicator Genuine Rubeus (asktgs) Kekeo (tgs::ask) Impacket
PA-PAC-OPTIONS ✓ ✗ ✗ ✗
kdc-options 40810000 40800010 40800010 40810010
etypes -135, 17, 18, 23, 24 17, 18, 23, 24 17, 18, 23 3, 16, 18, 23
cname ✗ ✓ ✓ ✗
enc-authorization-data ✓ ✗ ✗ ✗
unconstrained TGS-REQ ✓ ✗ ✗ ✗
till 2037-09-13 02:48:05 2037-09-13 02:48:05 2037-09-13 02:48:05 + 1 day
(UTC) (UTC) (UTC)
authenticator cksum ✓ ✗ ✗ ✗
authenticator cusec ✓ Always 0 Always 0 ✓
authenticator seq- ✓ ✗ ✗ ✗
number
18
S4U2Self TGS-REQ Comparison Table
Indicator Genuine Rubeus Kekeo Impacket
PA-S4U-X509-USER ✓ ✗ ✗ ✗
kdc-options 40810000 40800018 40800018 40810000
etypes -135, 17, 18, 23, 24 17, 18, 23, 24 17, 18, 23 18, 23
cname ✗ ✓ ✓ ✗
till + 15 minutes 2037-09-13 02:48:05 2037-09-13 02:48:05 + 1 day
(UTC) (UTC)
PA USER name-type Enterprise Principal (10) Enterprise Principal (10) NT Principal (1) NT Principal (1)
sname name-type NT Principal (1) NT Principal (1) NT Principal (1) Unknown (0)
authenticator cksum ✓ ✗ ✗ ✗
authenticator cusec ✓ Always 0 Always 0 ✓
authenticator seq- ✓ ✗ ✗ ✗
number
19
S4U2Proxy TGS-REQ Comparison Table
Indicator Genuine Rubeus Kekeo Impacket
PA-PAC-OPTIONS ✓ ✓ ✗ ✓
kdc-options 40830000 40820010 40820010 40830000
etypes -135, 17, 18, 23, 24 17, 18, 23 17, 18, 23 3, 16, 18, 23
cname ✗ ✓ ✗ ✗
till + 15 minutes 2037-09-13 02:48:05 2037-09-13 02:48:05 + 1 day
(UTC) (UTC)
enc-authorization-data ✓ ✗ ✗ ✗
authenticator cksum ✓ ✗ ✗ ✗
authenticator cusec ✓ Always 0 Always 0 ✓
authenticator seq- ✓ ✗ ✗ ✗
number
20
Resolving Differences
ASKTGT
followed by
ASKTGS both
using the new
/opsec flag
21
Resolving Differences – S4U
S4U using the
new /opsec flag
PA-S4U-X509-USER
for the S4U2Self
is still a work in
progress
22
Resolving Differences – Github PR
The PR has been made:
https://github.com/GhostPack/Rubeus/pull/69
The modified version can be pulled from the “opsec” branch of my forked
Rubeus:
https://github.com/0xe7/Rubeus/tree/opsec
23
Further Considerations
24
Further Considerations - Continued
25
Questions?
26