A web application lets staff sign in, then asks the organisation's central directory which groups each person belongs to before it shows any page.
Directories, LDAP and the systems that check sign-ins
An organisation keeps one central list of its people, computers and groups, and its email, Wi-Fi, printers and network equipment all ask that list before they let anyone in. The list is a directory, and a small family of protocols carries the questions to it. No background is assumed. A security professional has to know which protocol does which job, what each one protects, and which are too weak to keep.
By the end of this unit you will be able to:
- Explain what a directory service holds and how LDAP is used to query it
- Explain why NTLM is weak and what pass the hash does
- Tell apart RADIUS, TACACS+ and Diameter by purpose, transport and what each protects
- Choose an authentication method for a device or a service as well as for a person
Disabled everywhere except the switches
An illustrative example
A group of veterinary practices uses a contractor to look after its network. When the contract ends, the office manager disables his account in the central directory. His email stops, his Wi-Fi access stops and his remote access stops.
A month later the network switches in two practices are found reconfigured. The contractor had signed in to them directly. Each switch had its own administrator account and password, set up years earlier and known to him.
Disabling the central account stopped everything else. Why did it not stop his access to the switches?
A directory is the list every other system asks
A directory service is a central database of the people, computers, groups and other resources of an organisation, and a service that answers questions about them. A typical entry describes one person: name, department, telephone number, group memberships, and the information used to check a password.
Its value is that it is the one place to change. Add a person to the finance group, and every system that asks the directory now treats her as finance. Disable an account, and every system that asks refuses it. A system with its own private accounts, like the switches in the opening case, is outside that control and needs its own leaver process.
X.500 is a family of international standards from the ITU-T that defines how such a directory is organised. Entries are arranged in a tree, and each is made of named attributes such as a name or a telephone number. Most modern directories follow its data model.
One common example is Microsoft's Active Directory Domain Services (AD DS). Its domain controllers are the servers that hold copies of the directory, copy changes to one another, and authenticate users who sign in to the organisation's Windows computers.
LDAP: how programs ask the directory
The Lightweight Directory Access Protocol (LDAP) is the standard way for a program to search and update a directory over a network. It was designed as a lighter alternative to the access protocol that X.500 itself defines.
Every entry has a distinguished name (DN), its full and unique address in the tree, read from the entry itself up to the top. For example: CN=Amina Patel,OU=Finance,DC=example,DC=org. CN is the common name, OU an organisational unit and DC a part of the organisation's domain name.
- The program connects to the directory server.
- It performs a bind: it authenticates to the directory, often with a name and password.
- It searches, for example for the groups that a user belongs to.
- It uses the answer to decide what the user may do.
LDAP's plain form uses port 389. A simple bind sends the password across the network without , so anyone listening can read it. The standard discourages this unless the connection is protected by Transport Layer Security (TLS), the encryption used by secure websites. There are two ways to add it. LDAPS runs LDAP inside TLS from the start, on port 636. The StartTLS command switches an ordinary connection on port 389 to TLS.
Directories also serve . Group memberships stored in the directory are what many applications read to decide what a user may do.
NTLM, and why a stored hash can act as a password
NTLM is an older Microsoft sign-in protocol that uses challenge-response: the server sends a random number, and the client proves knowledge of the password by computing an answer from it.
- The client sends the user name.
- The server returns an 8-byte random challenge.
- The client encrypts the challenge with a of the user's password and sends the result.
- The domain controller repeats the calculation with the hash it holds and compares.
The password itself never travels. But the hash does all the work, so the hash is as good as the password. In pass the hash, an attacker who has copied a password hash from a computer's memory or storage authenticates with it directly, without ever learning the password.
Kerberos is stronger: it uses tickets, mutual authentication and timestamps. Microsoft has deprecated every version of NTLM and recommends the Negotiate method, which uses Kerberos and falls back to NTLM only when it must. The oldest version, NTLMv1, is removed from Windows 11 version 24H2 and Windows Server 2025.
RADIUS, TACACS+ and Diameter: sign-in for networks and equipment
Network equipment such as a access point, a remote-access gateway or a switch should not keep its own list of users. It passes each sign-in attempt to a central AAA server, which performs authentication, authorisation and accounting and asks the directory in turn. Three protocols carry those requests.
| Protocol | Main use | Transport and port | What is protected | Remember |
|---|---|---|---|---|
| RADIUS | People joining a network: Wi-Fi, remote access | , port 1812; accounting on 1813 | Only the password is hidden; the rest travels readable | Authentication and authorisation come back together in one reply |
| TACACS+ | Administrators managing routers and switches | , port 49 | The whole message body is scrambled with a shared key | Separates the three A's, so each command can be authorised and logged |
| Diameter | Large networks and newer access services that outgrew RADIUS | TCP or SCTP, port 3868 | Protected with TLS or DTLS, on port 5868 | Designed to fix RADIUS's limits, with reliable delivery and failover |
UDP and TCP are the two common ways of carrying data across a network. UDP sends each message once and does not check that it arrived; TCP sets up a connection and resends anything lost. SCTP and DTLS are a further transport and its secure form.
Security texts describe TACACS+ as encrypting the whole body while RADIUS encrypts only the password, and that is the answer to choose. Its current standard, RFC 8907, calls the method obfuscation and says it gives no meaningful protection against someone reading or changing traffic. Standards now exist for carrying both RADIUS and TACACS+ inside TLS, which adds real encryption.
Devices and services prove who they are too
People are not the only subjects. A laptop joining the network and a program reading a database are also asking for access, and each needs an identity and a way to prove it.
- Certificate-based authentication
- The subject holds a private key and a that binds its name to the matching public key. It proves itself by signing a challenge. A smart card does this for a person; a certificate stored in the device does it for a laptop or phone.
- Mutual TLS
- Both ends of an encrypted connection present certificates, so the client checks the server and the server checks the client. It is common between services that call each other.
- Network access control with 802.1X
- A switch or Wi-Fi access point admits a device only after an AAA server, usually over RADIUS, has authenticated the device or its user.
- Service identity
- A program that calls another program authenticates with a certificate, a key or a token issued for it, never with a person's password. Each service gets its own identity, so that its access can be limited and its actions traced.
Device and service credentials need the same as a person's: issued to one owner, stored safely, renewed before they expire, and revoked when the device or service is retired.
A question, worked through
A logistics company has 60 routers and switches. Engineers sign in to them with one shared administrator password. An auditor requires a personal account for each engineer, held in the central directory. Every command must be authorised against the engineer's role, and every command typed must be recorded.
Which protocol BEST meets all three requirements?
Decide on your answer, then open the reasoning
- The question asks for one protocol that gives personal accounts, authorisation of each command and a record of each command on network equipment.
- Rule out c: an LDAP search can check a password and read groups, but it has no way to authorise individual commands or record them. A simple bind would also expose passwords unless TLS is added.
- Rule out d: Kerberos proves who the engineer is. It does not authorise commands on a router or record what was typed.
- Between a and b: RADIUS can authenticate each engineer against the directory, but it returns authentication and authorisation together in one reply at sign-in.
- TACACS+ separates the three A's, so the AAA server can authorise each command as it is typed and account for it. Option b is the best answer.
Answer: B. TACACS+ between each device and a central AAA server
Choosing between good answers
- The requirement is to authorise and log each command an administrator types on network equipment
- choose TACACS+. It separates authentication, authorisation and accounting, and uses TCP port 49.
- The requirement is to check users joining Wi-Fi or remote access against a central server
- choose RADIUS, keeping in mind that it hides only the password.
- A question describes reusing a stolen password hash to sign in
- it is pass the hash, an attack on NTLM-style challenge-response. The fix is to move to Kerberos and protect stored hashes.
- An application binds to a directory over port 389 with a plain password
- the password crosses the network readable. Choose LDAPS on port 636 or StartTLS.
- A system keeps its own local accounts outside the directory
- treat it as a gap in deprovisioning. Connect it to the central AAA service, or add it to the leaver checklist.
Check your understanding
5 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.
These questions are drafts that no named reviewer has approved yet.
Question 1 of 5
What to remember
- A directory service is the central list of people, devices and groups. X.500 defined its model, and LDAP is how programs query it.
- LDAP uses port 389 and LDAPS port 636. A simple bind without TLS exposes the password.
- NTLM proves knowledge of a password hash, so a stolen hash can be passed as if it were the password. Kerberos replaces it.
- RADIUS (UDP 1812) hides only the password and combines authentication with authorisation. TACACS+ (TCP 49) scrambles the whole body and separates all three A's.
- Diameter was designed to overcome RADIUS's limits, with reliable transport and failover, on port 3868.
- Devices and services authenticate with certificates, keys or tokens of their own, never with a person's password.
Say it from memory
Which systems authenticate and authorise users, devices and services across an organisation, and what is each one for?
A directory service (X.500 model, queried with LDAP on 389 or LDAPS on 636) holds identities and groups. Kerberos issues tickets for single sign-on; NTLM is the deprecated challenge-response fallback open to pass the hash. RADIUS checks network sign-ins and hides only the password; TACACS+ separates AAA for device administration; Diameter improves on RADIUS. Devices and services use certificates or keys.
Why is a directory service the one place to change, and what do Active Directory domain controllers do?
Every system that asks the directory follows it: add a person to a group, or disable an account, and every such system acts on the change. A system with its own private accounts is outside that control. Domain controllers hold copies of the directory, copy changes to one another, and authenticate users signing in to the organisation's Windows computers.
What is an LDAP distinguished name, why is a simple bind risky, and how do LDAPS and StartTLS differ?
A distinguished name is an entry's full and unique address in the tree, such as CN=Amina Patel,OU=Finance,DC=example,DC=org. A simple bind sends the password across the network without encryption. LDAPS runs LDAP inside TLS from the start, on port 636. StartTLS switches an ordinary connection on port 389 to TLS.
How does NTLM authenticate, and what is pass the hash?
The client sends the user name, the server returns an 8-byte random challenge, the client encrypts it with a hash of the password, and the domain controller repeats the calculation and compares. Because the hash does all the work, an attacker who copies it can authenticate directly with it, without learning the password. Microsoft has deprecated every version of NTLM.
How do devices and services prove who they are, using mutual TLS, 802.1X and service identities?
In mutual TLS both ends present certificates, so client and server check each other. With 802.1X, a switch or Wi-Fi access point admits a device only after an AAA server, usually over RADIUS, has authenticated it or its user. A service authenticates with its own certificate, key or token, never with a person's password.
Sources
- RFC 4511: Lightweight Directory Access Protocol (LDAP): The Protocol, IETFLDAP as the protocol for accessing directories following the X.500 data and service models, and the bind, search and StartTLS operations.
- RFC 4513: LDAP Authentication Methods and Security Mechanisms, IETFSimple bind with a name and password, and that clear text passwords should not be supported by default unless the session is protected by TLS.
- RFC 4514: LDAP: String Representation of Distinguished Names, IETFThe string form of a distinguished name, with attribute types such as CN, OU and DC.
- Active Directory Domain Services overview, MicrosoftA directory service storing user accounts, computers and other objects, domain controllers holding replicated copies, and sign-in authentication integrated with the directory.
- Service Name and Transport Protocol Port Number Registry, IANAPorts 389 for LDAP, 636 for LDAPS, 49 for TACACS, 1812 and 1813 for RADIUS, and 3868 and 5868 for Diameter.
- Microsoft NTLM, MicrosoftNTLM as challenge-response with an 8-byte challenge encrypted with the password hash, checked by the domain controller, and Kerberos as more secure and preferred through Negotiate.
- Deprecated features in the Windows client, MicrosoftAll versions of NTLM deprecated in June 2024, and NTLMv1 removed from Windows 11 version 24H2 and Windows Server 2025.
- Use Alternate Authentication Material: Pass the Hash (T1550.002), MITREPass the hash: authenticating with a stolen password hash without the cleartext password.
- RFC 2865: Remote Authentication Dial In User Service (RADIUS), IETFRADIUS between a network access server and a shared authentication server, carrying authentication and authorisation, over UDP on port 1812, with the password hidden using MD5.
- RFC 2866: RADIUS Accounting, IETFRADIUS accounting as a separate exchange on port 1813.
- RFC 8907: The Terminal Access Controller Access-Control System Plus (TACACS+) Protocol, IETFTACACS+ over TCP port 49, the separation of authentication, authorisation and accounting for device administration and individual commands, and its body protection described as obfuscation, not encryption.
- RFC 9887: Terminal Access Controller Access-Control System Plus (TACACS+) over TLS 1.3, IETFRunning TACACS+ inside TLS 1.3.
- RFC 6614: Transport Layer Security (TLS) Encryption for RADIUS, IETFRunning RADIUS inside TLS.
- RFC 6733: Diameter Base Protocol, IETFDiameter as an AAA protocol addressing RADIUS limits such as failover, run over TCP or SCTP on port 3868, with TLS or DTLS security.
- SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations, NISTIdentifying and authenticating devices before connection, for example with 802.1X, EAP and RADIUS (IA-3), and services and applications with digital certificates (IA-9).
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3, IETFTLS client authentication with certificates, which with server authentication gives mutual TLS.