Campfire-2

Description

Forela's Network is constantly under attack. The security system raised an alert about an old admin account requesting a ticket from KDC on a domain controller. Inventory shows that this user account is not used as of now so you are tasked to take a look at this. This may be an AsREP roasting attack as anyone can request any user's ticket which has preauthentication disabled.

AS-REP Roasting Attack

In the MITRE ATT&CK Framework, the AS-REP Roasting attack is categorized as T1558.004arrow-up-right under the 'Steal or Forge Kerberos Tickets' attack technique. It exploits a vulnerability in Kerberos when the 'Do not require Kerberos preauthentication' setting is enabled. This vulnerability allows adversaries to extract user hashes, enabling them to decrypt passwords offline. This attack poses a significant threat to IT networks worldwide, as it can provide unauthorized access to domain resources.

Source: AS-REP Roasting Attack Explained - MITRE ATT&CK T1558.004arrow-up-right

Detection Methods for the AS-REP Roasting Attack

Detection of AS-REP Roasting attacks is crucial in order to mitigate the risk of password theft. One way to detect such attacks is to monitor for changes to the setting that controls whether Kerberos preauthentication is enabled.

Event ID 4738 - A user account was changed.

  • Key Description Fields: Security ID, Account Name, Account Domain, Logon ID, Security ID, Account Name

For instance, during this kind of an attack, the Event ID 4738 is generated. This event indicates a Kerberos authentication service ticket request and will contain parameters such as the Ticket Encryption Type (0x17), Ticket Options (0x40800010), and Service Name (krbtgt). If these parameters are found in the event logs, it may indicate that an AS-REP Roasting attack is taking place, as this event is generated during the manipulation of domain objects by the attacker.

file|700

Event ID 5136 - A directory service object was modified.

  • Key Description Fields: Security ID, Account Name, Account Domain, Logon ID, DN, GUID, Class, LDAP Display Name

Another option is to monitor Event ID 5136, which provides information about changes made to user accounts within a Windows environment. By analyzing the logs from this event, it is possible to identify any user accounts that have had the setting for Kerberos preauthentication changed.

Reading

Files

We are given evtx file which is Windows System Events Logs file.

evtx can be converted to csv via powershell and analyzed in TimelineExplorer.

Writeup.png
circle-info

Note: Ctrl+R to reset sizes of columns (so you don't have Message column stretching over the horizon).

Tasks

Task 1. When did the ASREP Roasting attack occur, and when did the attacker request the Kerberos ticket for the vulnerable user?

We are looking for an indicator of ASREP. In Detection Methods for the AS-REP Roasting Attack section it's mentioned that if "Encryption Type (0x17), Ticket Options (0x40800010), and Service Name (krbtgt)" is found it may indicate that we are dealing with ASREP attack.

Writeup-1.png

For the answer I had to consult evtx file itself via Windows Event Viewer.

Writeup-2.png

We can see SystemTime is off by 4hours in csv.

circle-check

Task 2. Please confirm the User Account that was targeted by the attacker.

circle-check

Task 3. What was the SID of the account?

circle-check

Task 4. It is crucial to identify the compromised user account and the workstation responsible for this attack. Please list the internal IP address of the compromised asset to assist our threat-hunting team.

circle-check

Task 5. We do not have any artifacts from the source machine yet. Using the same DC Security logs, can you confirm the user account used to perform the ASREP Roasting attack so we can contain the compromised account/s?

After the ASREP event we can see Kerberos service ticket being requested. Failure Code: 0x0 indicates successful logon.

Writeup-3.png
circle-check

Last updated