Kerberoasting is a technique often used in domain penetration. This article will refer to public information and combine my own understanding to introduce the principle and implementation of Kerberoasting, as well as a method of backdoor utilization, and finally give defense suggestions.
The Service Principal Name (SPN) is a unique identifier for a service instance. Active Directory Domain Services and Windows provide support for Service Principal Names (SPNs), which are key components of the Kerberos mechanism through which a client authenticates a service.
There are two types of SPN, one is registered under the machine account (Computers) on the AD, and the other is registered under the domain user account (Users)
When the authority of a service is Local SystemOR Network Service, the SPN is registered under the machine account (Computers)
When the authority of a service is a domain user, the SPN is registered under the domain user account (Users)
SPN format
Description:
serviceclass can be understood as the name of the service, common ones include www, ldap, SMTP, DNS, HOST, etc.
There are two forms of host, FQDN and NetBIOS name, such as server01.test.com and server01
If the service is running on the default port, the port number (port) can be omitted
Query SPN
Initiating an LDAP query to the domain controller is part of the normal kerberos ticket behavior, so the operation of querying the SPN is difficult to detect