HOWTO: Detect Kerberos tickets that are encrypted using RC4 - The things that are better left unspoken (2024)

Reading Time: 4 minutes

HOWTO: Detect Kerberos tickets that are encrypted using RC4 - The things that are better left unspoken (1)

When it comes to encryption, many weak algorithms and ciphers are still heavily used and relied upon in Active Directory environments everywhere.

One of the typical weak algorithms used in encrypting Kerberos tickets is RC4; the cipher RC4-HMAC to be precise. Typically, RC4 is used by legacy systems, over misconfigured Active Directory trusts, and by attackers. A typical attack executed by attackers is Kerberoasting. RC4 is typically pronounced 'ARC4'.

As an Active Directory admin, it is important to have ‘disabling RC4’ on your to do list. The first question that comes to mind though is:

What breaks when we disable RC4?

That’s the question that this blogpost tries to answer.

These days, a Security Incident and Event Management (SIEM) solution seems top of mind for many security managers. With their built-in aggregation capabilities and detection rules, this type of solution is able to correlate security incidents and security events to detect the usage of RC4 encryption of Active Directory, with ease. Unfortunately, the cost of this type of solution (both in licensing, processes and hardware resources) hinders their adoption.

Luckily, detecting Kerberos tickets that are encrypted using RC4 can also be achieved without expensive SIEM implementations. Simply trawling through the logs on your Domain Controllers with Windows PowerShell uncovers this usage.

Note:
Insuring log data beyond the operational infrastructure is the paramount measure to ensure that log data is available for incident responders after a compromise. The information in this blogpost is not intended to alleviate that burden on IT departments or the IT budget.

Kerberoasting is a post-exploitation attack that was initially disclosed in 2014. It allows an attacker, as a valid domain user, to request a Kerberos service ticket for any service, capture the RC4-encrypted Ticket Granting Service (TGS) ticket from memory, and then attempt to crack the service credential hash offline.

You’ll need to meet the following requirements to detect Kerberos tickets that are encrypted using RC4:

Account Requirements

Sign in with an account that is a member of the Domain Admins group, or an account that has delegated permissions to:

  • Manage Group Policy objects, or has delegated permissions to Edit Settings or Edit settings, delete and modify security permissions on an existing Group Policy object
  • Read the logs on all Domain Controllers within the Active Directory environment.

System requirements

Sign in to a system with the Group Policy Management featuee (gpmc.msc) installed.

Auditing Kerberos Service Ticket Operations

Domain Controllers with default settings do not provide the information needed to detect Kerberoasting attacks. The Audit Kerberos Service Ticket Operations audit policy needs to be enabled. This can be achieved using Group Policy or using Windows PowerShell.

Perform these steps to enable auditing Kerberos Service Ticket Operations using Group Policy:

  • Press Start.
  • Search for Group Policy Management and click its search result, or run gpmc.msc.
    The Group Policy Management window appears.
  • In the left navigation pane, navigate to the Group Policy objects node.
  • Right-click the Group Policy objects node, select New from the menu and provide a name for the Group Policy object. Alternatively, select an existing Group Policy object that you may manage.
  • Right-click the Group Policy object and select Edit… from the menu.
    The Group Policy Management Editor window appears.
  • In the left navigation pane of the Group Policy Management Editor window, expand the Computer Configuration node, then Policies, Windows Settings, Security Settings, Advanced Audit Policy Configuration, Audit Policies and finally Account Logon.
  • In the main pane, locate the Audit Kerberos Authentication Service Group Policy setting. Double-click it. The Audit Kerberos Authentication Service Properties window appears.
  • Check the Configure the following audit events: option. Then, select the Success option.
  • Click OK to save the settings.
    This closes the Audit Kerberos Authentication Service Properties window.
  • Close the Group Policy Management Editor window.
  • In the Group Policy Management Console window, in the left navigation window, navigate to the Domain Controllers Organizational Unit.
  • Right-click the Domain Controllers Organizational Unit and select Link an existing GPO… from the menu.
  • In the Select GPO window, select the Group Policy object you created in step 4.
  • Click OK to link the Group Policy object to the Domain Controllers.

With the right settings in place, we can run a PowerShell script to go through the logs of each Domain Controller to search for Kerberos tickets using RC4.

Use the following lines of Windows PowerShell to do so:

$Events = Get-WinEvent -Logname security -FilterXPath "Event[System[(EventID=4769)]]and Event[EventData[Data[@Name='TicketEncryptionType']='0x17']]or Event[EventData[Data[@Name='TicketEncryptionType']='0x18']]" |

Select-Object
`
@{Label='Time';Expression={$_.TimeCreated.ToString('g')}},
@{Label='UserName';Expression={$_.Properties[0].Value}},
@{Label='IPAddress';Expression={$_.Properties[6].Value}},
@{Label="ServiceName";Expression={$_.properties[2].value}},
@{Label="EncryptionType";Expression={$_.properties[5].value}}

$Events | Out-Gridview

When you know the Kerberos tickets using RC4 as the encryption algorithm, you can reconfigure, upgrade or decommission the product that uses it and afterward, disable RC4 on every domain-joined system and/or place all users in the Protected Users security group… unless you never change passwords.

Further reading

Azure AD Connect’s Seamless SSO breaks when you disable RC4_HMAC_MD5Leveraging NTLM Hashes using Kerberos RC4-HMAC encryptionAudit Kerberos Service Ticket Operations (Windows 10) – Windows securityLessons in Disabling RC4 in Active Directory

HOWTO: Detect Kerberos tickets that are encrypted using RC4 - The things that are better left unspoken (2024)

FAQs

How to check Kerberos encryption types? ›

The encryption types supported by the Kerberos libraries are defined in the /etc/krb5. conf file, inside the [libdefaults] section, via the permitted_enctypes parameter. This parameter contains a space-separated list of encryption type names, in order of preference.

What is RC4 encryption in Kerberos? ›

RC4 is a common and early stream cipher and widely used, but RC4 is considered to pose many security risks. RC4 usage should be rare on a modern network since Windows Vista & Windows Sever 2008 and newer support AES Kerberos encryption.

What are the problems with RC4 encryption? ›

* The RC4 algorithm, as used in the TLS protocol and SSL protocol, has many single-byte biases, which makes it easier for remote attackers to conduct plaintext-recovery attacks via statistical analysis of ciphertext in a large number of sessions that use the same plaintext.

How do I disable RC4 encryption for Kerberos? ›

Disable RC4 in Operations Manager

On the Management Server, go to Local Group Policy Editor > Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options > Network security: Configure encryption types allowed for Kerberos > Disable RC4.

How do I monitor Kerberos authentication? ›

To verify that the client is using Kerberos, take a packet capture from the client and use the display filter to view Kerberos requests. If Kerberos authentication is in use, you will see Kerberos requests and responses between the client and the Domain Controller as well as the Kerberos ticket in the GET request.

What is the difference between Kerberos AES and RC4? ›

Kerberos keys for an account are derived directly from its password – e.g. the RC4 key is literally the NT MD4 hash, whereas AES keys are PBKDF2 hashes – meaning, it is not possible to for Windows to "upgrade" them as it doesn't know the original password.

Why is RC4 no longer recommended for use? ›

Not only is RC4 increasingly irrelevant as a BEAST workaround, there has also been mounting evidence that the RC4 cipher is weaker than previously thought. In 2013, biases in RC4 were used to find the first practical attacks on this cipher in the context of TLS.

What is the weakness of RC4? ›

RC4 is especially vulnerable when the beginning of the output key stream isn't discarded, or when non-random or related keys are used.

What are the risks of RC4 encryption? ›

RC4 suffers from biases in its key scheduling algorithm, which can lead to statistical biases in the generated keystream. An attacker can exploit these biases to deduce information about the key and potentially recover parts of the plaintext. The initial bytes generated by RC4 are particularly weak.

How to avoid the use of RC4 ciphers? ›

Deactivating RC4 on IIS
  1. Open registry editor: ...
  2. Navigate to: ...
  3. Right-click on Ciphers >> New >> Key. ...
  4. Right-click on RC4 40/128 >> New >> DWORD (32-bit) Value. ...
  5. Double-click the created Enabled value and make sure that there is zero (0) in Value Data: field >> click OK.

How strong is RC4 encryption? ›

While it is remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, rendering it insecure. It is especially vulnerable when the beginning of the output keystream is not discarded, or when nonrandom or related keys are used.

What still uses RC4 encryption? ›

Plenty of stream ciphers exist, but RC4 is among the most popular. It's simple to apply, and it works quickly, even on very large pieces of data. If you've ever used an application like TSL (transport layer security) or SSL (secure socket layer), you've probably encountered RC4 encryption.

How to check Kerberos encryption type? ›

You can filter the Security log in Event Viewer for events 4769 and 4768.
  1. Event ID 4769 will show the encryption type of issued service tickets.
  2. Event ID 4768 will show the encryption type for issued Ticket Granting Tickets (TGTs).
Dec 12, 2017

What happens if we disable RC4? ›

In this manner any server or client that is talking to a client or server that must use RC4, can prevent a connection from happening. Clients that deploy this setting will not be able to connect to sites that require RC4 while servers that deploy this setting will not be able to service clients that must use RC4.

What is Kerberos RC4? ›

RC4 encryption for Kerberos is weak and susceptible to roasting attacks. The msDS-SupportedEncryptionTypes attribute value of the target account will determine the ticket encryption for service ticket requests (AS-REQ). When the value is blank the KDC will default to RC4.

How do I check my Kerberos? ›

Steps to view Kerberos authentication events using Event Viewer
  1. Press Start, search for Event Viewer, and click to open it.
  2. In the Event Viewer window, on the left pane, navigate to Windows log ⟶ Security.
  3. Here, you will find a list of all the Security Events that are logged in the system.

How do you tell if you are using NTLM or Kerberos? ›

If you need to identify what is being used at this moment the only way to recognize this is from the logs at log level 4. Once Kerberos authentication is enabled in EasySSO settings - the server and the browser will start exchanging "Negotiate" headers.

What type of encryption is used in Kerberos? ›

Contemporary non-Windows implementations of the Kerberos protocol support RC4 and AES 128-bit and AES 256-bit encryption. Most implementations, including the MIT Kerberos protocol and the Windows Kerberos protocol, are deprecating DES encryption.

How do I check my Keytab encryption? ›

The contents of keytab file can be verified using either Unix/linux ktutil or klist commands or java ktab utility. Alternatively you can also use Klist or Ktab utility that comes with standard java. Key tab: krba01. keytab, 2 entries found.

Top Articles
Small Business Insurance Canada | Zensurance
How to Get Credit Card Without Credit Score or CIBIL Score
Po Box 7250 Sioux Falls Sd
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Avonlea Havanese
Obituary (Binghamton Press & Sun-Bulletin): Tully Area Historical Society
Words From Cactusi
Best Theia Builds (Talent | Skill Order | Pairing + Pets) In Call of Dragons - AllClash
Barstool Sports Gif
Acbl Homeport
Azeroth Pilot Reloaded - Addons - World of Warcraft
Bros Movie Wiki
Springfield Mo Craiglist
Love In The Air Ep 9 Eng Sub Dailymotion
Midlife Crisis F95Zone
Craftology East Peoria Il
Eva Mastromatteo Erie Pa
Mzinchaleft
Palm Coast Permits Online
NHS England » Winter and H2 priorities
Bj Alex Mangabuddy
Unity - Manual: Scene view navigation
Governor Brown Signs Legislation Supporting California Legislative Women's Caucus Priorities
Hampton University Ministers Conference Registration
Jordan Poyer Wiki
How to Make Ghee - How We Flourish
Walmart Pharmacy Near Me Open
Beaufort 72 Hour
Kroger Feed Login
4Oxfun
JVID Rina sauce set1
Marokko houdt honderden mensen tegen die illegaal grens met Spaanse stad Ceuta wilden oversteken
Ou Football Brainiacs
Miles City Montana Craigslist
Angel Haynes Dropbox
Publix Christmas Dinner 2022
Craftsman Yt3000 Oil Capacity
Motor Mounts
Kamzz Llc
4083519708
Second Chance Apartments, 2nd Chance Apartments Locators for Bad Credit
Pain Out Maxx Kratom
6576771660
Here's Everything You Need to Know About Baby Ariel
Lady Nagant Funko Pop
Crigslist Tucson
Devotion Showtimes Near Showplace Icon At Valley Fair
552 Bus Schedule To Atlantic City
Diccionario De Los Sueños Misabueso
Sam's Club Fountain Valley Gas Prices
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6677

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.