{"id":528,"date":"2026-11-15T11:47:00","date_gmt":"2026-11-15T19:47:00","guid":{"rendered":"https:\/\/blog.canutethegreat.com\/?p=528"},"modified":"2026-11-15T11:47:00","modified_gmt":"2026-11-15T19:47:00","slug":"kerberoasting-as-rep-roasting-service-tickets","status":"publish","type":"post","link":"https:\/\/blog.canutethegreat.com\/index.php\/2026\/11\/15\/kerberoasting-as-rep-roasting-service-tickets\/","title":{"rendered":"Kerberoasting and AS-REP roasting: how service tickets get cracked offline, and what actually stops it"},"content":{"rendered":"<h2>The attack lives mostly outside your logs<\/h2>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/blog.canutethegreat.com\/wp-content\/uploads\/2026\/11\/kerb-flow.png\" alt=\"Flow diagram: an attacker with any domain user requests service tickets from the domain controller, carries them offline for cracking, with detection points and a bar comparison of RC4, AES256 and gMSA guessing speed\" \/><\/figure>\n<p>The diagram shows where Kerberoasting is visible to defenders and why the encryption type changes the cost of guessing.<\/p>\n<p>Most Active Directory attacks that matter share one trait: the noisy part happens on the attacker&#8217;s own hardware. Kerberoasting is the cleanest example. Tim Medin presented it in 2014, and it still works in 2026 on a depressing share of the domains I get to look at, because it needs nothing but an ordinary domain account.<\/p>\n<p>Here is the mechanism. Any authenticated user can ask a domain controller for a service ticket (a TGS) for any account that has a service principal name (SPN) registered. The KDC doesn&#8217;t check whether you&#8217;re allowed to use the service. Authorization is the service&#8217;s job. Part of that ticket is encrypted with a key derived from the service account&#8217;s password. So the attacker requests tickets for every SPN-bearing account, carries them away, and guesses passwords against them at GPU speed. No lockouts, no failed logons, no traffic to the target service.<\/p>\n<p>If the service account password is &#8220;Summer2019!&#8221; the game is over in seconds. If it&#8217;s 25 random characters, the game is also over, but in the defender&#8217;s favor.<\/p>\n<h2>Why the encryption type decides everything<\/h2>\n<p>The ticket is encrypted with whatever the account supports. For RC4 (etype 23), the key is the account&#8217;s NT hash, which is an unsalted MD4 of the password. Cracking it means computing MD4 and a couple of HMAC-MD5 rounds per guess. That is very fast on a GPU. Public hashcat benchmarks put a single modern card in the billions of guesses per second for this mode (hashcat mode 13100).<\/p>\n<p>For AES256 (etype 18, RFC 3962), the key comes from PBKDF2 with 4096 iterations and a salt built from the realm and principal name. Each guess costs thousands of HMAC computations, and the salt kills precomputed tables. Hashcat handles these too (modes 19600 for etype 17 and 19700 for etype 18), and the speed difference against RC4 is orders of magnitude. I won&#8217;t quote an exact ratio because it varies by card and by version.<\/p>\n<p>The attacker picks the encryption type in the request, and the KDC will usually go along with RC4 if the account allows it. That is why &#8220;AES only&#8221; on service accounts matters more than most password policy tweaks. It turns a weak password from an instant loss into a slow one, and a strong password from a hard problem into a practically impossible one.<\/p>\n<h2>AS-REP roasting is the same idea, one step earlier<\/h2>\n<p>Kerberos pre-authentication makes a client prove it knows the password before the KDC hands anything back. If an account has the &#8220;Do not require Kerberos preauthentication&#8221; flag (DONT_REQ_PREAUTH), anyone on the network can send an AS-REQ for that user and get back an AS-REP, part of which is encrypted with the user&#8217;s key. No domain credentials are needed at all, which is the difference from Kerberoasting. Hashcat mode 18200 covers the RC4 flavor.<\/p>\n<p>I&#8217;ve never found a legitimate modern reason for this flag. It exists for ancient Kerberos clients and for the occasional &#8220;temporary&#8221; fix that nobody reverted. Finding it is trivial:<\/p>\n<pre tabindex=\"0\" class=\"wp-block-code\"><code>Get-ADUser -Filter 'DoesNotRequirePreAuth -eq $true' -Properties DoesNotRequirePreAuth |\n  Select-Object SamAccountName, Enabled<\/code><\/pre>\n<p>Clear the flag, and if something breaks, fix the something.<\/p>\n<h2>Finding your exposure<\/h2>\n<p>Start by listing which user accounts carry SPNs and what encryption they advertise. Computer accounts have random 120-character passwords that rotate, so ignore them. User accounts are the problem.<\/p>\n<pre tabindex=\"0\" class=\"wp-block-code\"><code>Get-ADUser -Filter 'ServicePrincipalName -like \"*\"' `\n  -Properties ServicePrincipalName, PasswordLastSet, 'msDS-SupportedEncryptionTypes' |\n  Select-Object SamAccountName, PasswordLastSet,\n    @{n='EncTypes';e={$_.'msDS-SupportedEncryptionTypes'}},\n    @{n='SPNs';e={$_.ServicePrincipalName -join ';'}}<\/code><\/pre>\n<p>An empty or zero `msDS-SupportedEncryptionTypes` means the domain default applies, and for years that default allowed RC4. Microsoft has been tightening the KDC defaults away from RC4 over several rounds of updates, so check your own domain controllers&#8217; behavior instead of assuming. Sort by `PasswordLastSet`. A service account whose password predates the person who currently runs the service is the first one I&#8217;d fix.<\/p>\n<h2>The fixes, in the order I&#8217;d do them<\/h2>\n<p>First, move service accounts to group managed service accounts (gMSA) wherever the software supports it. The domain generates a long random password and rotates it on a schedule (30 days by default), and nobody ever types it. Kerberoasting a gMSA gets the attacker a ticket they will never crack. Plenty of older software can&#8217;t use gMSAs, which is the whole reason the other fixes exist.<\/p>\n<p>Second, for accounts that must stay as ordinary users, set a long random password. Twenty-five characters from a password manager is fine. Length matters more than complexity rules here, because the attacker is guessing offline against the hash.<\/p>\n<p>Third, restrict the account to AES:<\/p>\n<pre tabindex=\"0\" class=\"wp-block-code\"><code>Set-ADUser svc_sql -KerberosEncryptionType AES128,AES256<\/code><\/pre>\n<p>Test this on a non-production service first. A service host or an old client that only speaks RC4 will start failing, and you want to learn that in a maintenance window. Also, changing the supported types doesn&#8217;t change the stored keys until the password is next changed, so reset the password after setting the flag.<\/p>\n<p>Fourth, strip privileges. A Kerberoastable account in Domain Admins is a disaster waiting for a lazy password. I&#8217;ve seen SQL service accounts with domain admin rights because someone once needed to get an install working. Cracking that one ticket is the whole engagement.<\/p>\n<h2>Detection that has a decent signal-to-noise ratio<\/h2>\n<p>Event ID 4769 (a Kerberos service ticket was requested) fires constantly in a normal domain, so alerting on it raw is useless. What works is filtering on shape.<\/p>\n<p>Ticket Encryption Type 0x17 (RC4) against a user-account SPN, in a domain where almost nothing should still negotiate RC4, is a strong signal. A single account requesting tickets for many different SPNs in a short window is the other. Roasting tools usually enumerate every SPN in one pass, so a burst of 4769 events from one client for dozens of services stands out against a baseline of one or two.<\/p>\n<p>For AS-REP roasting, look at event 4768 with Pre-Authentication Type 0 for any account. After you&#8217;ve cleared the flag, any hit is an attempt against an account that shouldn&#8217;t exist.<\/p>\n<p>My favorite control is cheap. Create a decoy user with an SPN that looks juicy (something like `MSSQLSvc\/backup-sql01`), give it a 30-character random password and no real privileges, and alert on any ticket request for it. Nobody has a legitimate reason to request that ticket, so there&#8217;s no baseline to tune. The only caveat is that it catches the attacker who roasts everything, not the one who picks a single target.<\/p>\n<h2>What this doesn&#8217;t solve<\/h2>\n<p>Everything above makes cracking harder or noisier. None of it stops the ticket request, because the KDC is behaving as designed. If a domain account can be phished or purchased, the attacker gets to try. So pair it with controls on the first foothold: phishing-resistant MFA, tiering so service accounts can&#8217;t log on interactively to workstations, and limited blast radius for every account that holds an SPN.<\/p>\n<p>I&#8217;d also be wary of any assessment that reports Kerberoasting as &#8220;found 40 roastable accounts&#8221; as the finding. The useful measure is how many of those would fall to a 10-billion-guess wordlist attack and what each one can reach. A roastable account with a 25-character password and no privileges is mostly a note. A roastable account with a seven-year-old password in a privileged group is an incident you haven&#8217;t had yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The attack lives mostly outside your logs The diagram shows where Kerberoasting is visible to defenders and why the encryption type changes the cost of guessing. Most Active Directory attacks that matter share one trait: the noisy part happens on the attacker&#8217;s own hardware. Kerberoasting is the cleanest example. Tim Medin presented it in 2014, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[106,48,347,345,346],"class_list":["post-528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","tag-active-directory","tag-detection-engineering","tag-gmsa","tag-kerberos","tag-password-cracking"],"_links":{"self":[{"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/posts\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/comments?post=528"}],"version-history":[{"count":1,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":806,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/posts\/528\/revisions\/806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/media\/529"}],"wp:attachment":[{"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/categories?post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.canutethegreat.com\/index.php\/wp-json\/wp\/v2\/tags?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}