Active Directory: signing, legacy passwords, delegation and service accounts

Unit 2 of 5 in Active Directory, cloud and cluster assessment.

You will be able to audit four classic directory configuration weaknesses without attacking anything, rate them, fix them and re-test with the same commands.

Lesson

Signing: measure first, then enforce

Microsoft explains SMB signing as a feature that uses the session key and cipher suite to add a signature to a message, containing a hash of the whole message and the identities of the sender and intended recipient. If someone tampers with the message in transit, the hash no longer matches; the page says signature mismatches alert users to possible foul play and help protect against relay and spoofing attacks. Requirements can apply to outbound traffic, inbound traffic, both or neither.

For LDAP, Microsoft's article says you can significantly improve a directory server's security by making it reject SASL binds that do not request signing and simple binds over a clear-text connection. It also warns that after the change, clients that depend on unsigned binds stop working, so the directory logs a summary event (2887) once every 24 hours with the count of such binds, and, with extra diagnostic logging turned on, a detailed event (2889) with the client's address and identity. The assessment method follows from that: measure the setting, use the logs to find who would break, enforce, and re-test with the same commands. The signing lab never relays anything; it only checks and sets configuration.

A legacy setting that stored passwords

Microsoft's MS14-025 article says some Group Policy Preferences could store a password, that the functionality was being removed because the password was stored insecurely, and that existing preferences containing a password cannot be updated, only deleted or disabled. The stored value sits in an attribute called cpassword.

That makes the finding simple and safe to check: the attribute exists in a policy file kept in the directory's shared policy folder, which the lab shows you how to search. You never need to decode a stored value to report it. The lab plants a harmless decoy file with no real password, finds it the way Microsoft's own detection approach does, and then fixes it by removing the preference and rotating whatever the old password protected. Removing the file without rotating the credential would leave the same password valid.

Delegation: who may act as whom

Microsoft describes Kerberos constrained delegation as a safer form of delegation that restricts the services to which a given server can act on a user's behalf. The article explains the risk it manages: a front-end service that could delegate to a back-end service is a potential attack point, and if the server hosting the front end is compromised, the back-end services it can delegate to could be compromised too. Resource-based constrained delegation moves the decision to the administrator who owns the resource being accessed.

So the audit is an inventory with owners. Which accounts and computers are trusted for delegation, to which services, and who agreed? Rate each entry and remove or narrow what is not needed. The lab reads three documented attributes and changes them; it requests no tickets and impersonates nobody.

Service accounts: owner, age and encryption

Service accounts are often the oldest and least owned identities in a domain. Microsoft's group managed service account (gMSA) page describes an account whose password management is handled by Windows: a domain controller computes the password from a key distributed by the Key Distribution Service, the keys change periodically, and member hosts obtain current and previous values from a domain controller.

The same page notes that a managed account depends on the Kerberos encryption types supported: a domain controller reads the account's msDS-SupportedEncryptionTypes attribute to decide what encryption the server supports, DES has been disabled by default since Windows Server 2008 R2, and if a host is configured not to support RC4 authentication fails when the attribute is not set. For an audit, rate each service account on four questions: who owns it, how old is its password, how privileged is it, and which encryption types does it allow. Fix by setting AES-only with a test, and by moving the service to a gMSA where it supports one.

Key points

Sources

Practice in the labs

Audit and fix four settings in your lab domain, one lab each, and re-test with the same commands.

Knowledge check

  1. After you require LDAP signing, what happens to clients that send unsigned binds? Answer: They stop working, which is why you find them first using the directory's logged events. Microsoft's article says such clients stop working and describes events 2887 and 2889 for finding them before you enforce.
  2. You find a Group Policy Preferences file with a stored password. What are the two steps of the fix? Answer: Remove the preference and rotate whatever credential it held. Microsoft says affected preferences can only be deleted or disabled; because the old password was readable, it must be rotated too.
  3. Why is a delegation audit written as an inventory with owners? Answer: A compromised front-end server can reach every service it is trusted to delegate to, so each entry needs a reason and an owner. Microsoft describes the risk to back-end services if a delegating front end is compromised; constrained and resource-based delegation limit and move that decision.
  4. What does a group managed service account change for the people running a service? Answer: Windows manages and rotates the password, so no one has to store or remember it. The gMSA overview says Windows handles password management using a key distribution service and a domain controller computes the password.

Back to the syllabus or see all classes.

Related