How Are Passwords Stored in Active Directory

Published
Length
3 min read

Luis Felipe Dias

All posts

Active Directory stores user passwords as encrypted cryptographic hashes inside a central database file. Knowing how are passwords stored in active directory helps teams protect their core domain servers. Most admins set up strict domain groups to protect these stored secrets. Yet broad admin roles still allow users to run dangerous commands after they log in. Understanding how are passwords stored in active directory Domain controllers never save plain text passwords on disk by default. When

Active Directory + Just-in-Time Access: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

Active Directory stores user passwords as encrypted cryptographic hashes inside a central database file. Knowing how are passwords stored in active directory helps teams protect their core domain servers. Most admins set up strict domain groups to protect these stored secrets. Yet broad admin roles still allow users to run dangerous commands after they log in.

Understanding how are passwords stored in active directory

Domain controllers never save plain text passwords on disk by default. When a user sets a password, the server converts the text into a one-way hash. It uses the NT hash format to make this fixed string of characters. You cannot reverse this hash back into the original word with simple math.

The domain controller writes this hash into a single database file on its local disk. The server also creates Kerberos keys from the password at the same time. These keys help users log in to other apps across the corporate network. The operating system guards the database file so regular users cannot read it.

Active Directory adds extra encryption layers on top of the stored hashes. A local system key encrypts the password data inside the directory database. A unique secret key on the domain controller adds a second lock. The system only unlocks these hashes in memory when it needs to check a login.

How domain controllers check user logins and protect hashes

When a person logs in, their computer does not send the raw password across the network. Instead, the client machine uses its local hash to prove identity to the domain controller. With Kerberos, the user machine encrypts a timestamp with its secret key. The domain controller checks this timestamp against the stored key in its memory.

Older systems may fall back to legacy protocols that check the NT hash directly. Even then, the server compares values through a challenge and response process. This setup keeps the actual password hash off the wire during normal work. Attackers who watch network traffic cannot read the raw password from the login packet.

Admins can also turn on a setting that saves passwords with reversible encryption. Most security teams keep this option off unless an old app needs it. Reversible encryption acts a lot like storing plain text secrets on the server. Anyone who steals the database and the system key can read those passwords.

Active Directory + Just-in-Time Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Where native directory controls leave a runtime gap

Strong hash storage stops attackers from reading plain text passwords out of the directory file. It proves who a person is when they first log in to a server. Still, directory storage rules only cover the login step at the front door. They do not watch or control what an engineer does inside a live session.

Once Active Directory approves a login, the target database or server trusts that user role. An engineer with broad admin rights can run any query or shell command they want. Directory controls cannot block a bad drop statement or rewrite sensitive fields in query results. They also cannot mask emails, phone numbers, card numbers, or national IDs during live queries.

Also, an attacker who gains admin access on a domain controller can still dump memory. With the right privileges, they can extract the hashes and use them directly. Protecting the stored hash is vital, but teams must also control every action in flight.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does Active Directory store passwords in plain text?

No, Active Directory stores passwords as one-way cryptographic hashes by default. Plain text exposure only happens if an admin turns on reversible encryption for specific accounts.

Why do attackers steal password hashes if they cannot reverse them?

Attackers do not always need the plain text word to log in to network systems. Some protocols accept the raw hash itself as proof of identity during a login check.

How can teams protect stored hashes on domain controllers?

Teams should limit who has domain admin rights and turn off old login protocols. Enforcing long passwords also makes stolen hashes much harder to guess offline with cracking tools.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.