Protocols

Kerberos

Protocol for authentication. Grants a TGT allowing to ask for TGS granting access to services.

Ports:

  • 88: Key Distribution Center (KDC), the actual Kerberos server

  • 464: kpasswd5, a subservice for password change request

LDAP

Protocol to manage directory services (CRUD).

In AD it'ss also used for authorization by querying permissions for an object.

Ports:

  • 389: Unencrypted LDAP

  • 636: LDAPS (over SSL/TLS)

Used for speeding up cross-domain queries and enabling forest-wide searches:

  • 3268: Global Catalog service over LDAP

  • 3269: Global Catalog service over LDAPS

Kerberos + LDAP

circle-info

LDAP and Kerberos work in conjunction in AD environments to guarantee users are authenticated and authorized to perform actions.

Here is the workflow for login into a workstation:

  1. User enters credentials on a domain-joined machine.

  2. Local LSASS forwards credentials to domain controller.

  3. Domain controller's KDC receives the credentials.

  4. KDC validates the credentials against the AD database NTDS.dit (instead of local SAM).

  5. KDC issues a TGT allowing to request TGS.

  6. LDAP pulls Group Policies to apply to the workstation, like firewall rules or software restrictions.

Kerberos and LDAP also run on top of other protocols. Example with file sharing with SMB:

  • Kerberos: The KDC authenticates the user for access to the shared drive by granting a TGS.

  • LDAP: The SMB server then queries AD via LDAP to obtain the user's group memberships to enforce permissions on different folders

SMB

Use for file and hardware (mostly printers) sharing

Port:

  • 445

Netbios

Older versions of SMB used to run via Netbios. It's here mostly for retro-compatibility.

Port:

  • 139

MS-RPC

Microsoft's implementation of the RPC standard. It can use TCP, Netbios or even HTTP.

Ports:

  • 135: Endpoint mapper

  • Higher ports: Dedicated services

  • 593: RPC over HTTP

HTTP

The HTTP protocol is used by various services in AD

  • 80/443: Web server with Microsoft IIS

  • 5985/5986: Microsoft HTTP API allowing applications to send/receive HTTP req

  • 593: RPC over HTTP

  • 9389: ADWS - Provides an HTTP API interface to manage Active Directory

Last updated