icrosoft Windows allows you to define various password policy rules. Specifically, it allows you to enable the "Password must meet complexity requirements" setting using the Policy Editor. This validates user passwords against password filter(s) (system DLL(s)). Usually, people use the default filter. However, many admins say they'd prefer a Linux-style validation, which would allow them to install various pluggable authentication modules (Linux-PAM modules) to filter user passwords (authentication tokens). You can easily adapt these modules to reflect your organization's security policy with help of Linux configuration text files. The ability to add-on such modules creates more flexibility in composing password policies. With help of such custom modules (of course, these modules should be developed by a Linux programmers), Linux administrators may even author a regular expression for matching user passwords. Go to www.kernel.org/pub/linux/libs/pam/
for more detailed information about Linux-PAM and the available modules.
The Linux model described above may be employed on Windows machines as well.
|What You Need: Windows NT/2000/XP
In this article, learn how to create a Custom Password Filter
(DLL in C++) that validates passwords against a configurable regular expression. The RegEx functionality is implemented based on the Boost
open source library because it has wide support for regular expressions.
Let's start with an overview of the Windows Security system.
Windows Security is a policy-based system with a set of rules that compose security settings for a local machine or domain. The work of policy-based systems usually has three major stages:
- Creating rules to compose a policy.
- Searching for evidences.
- Enforcing policy based on the evidences.
There is a parallel between the above stages and real-life legal systems. Most countries have an authority (usually parliament or senate) that makes laws. This corresponds to the first stagecomposing the policy). Police departments are the guards of the legal system, responsible for collecting evidence (e.g. measuring car speed on highways) and enforcing the existing laws based on evidences (e.g. canceling driving license in case of exceeding the speed limit). So, a police force corresponds to the second and third stages.
In Windows security, system administrators play the role of parliament. They dictate the policy for an organization domain. In some cases, regular users also design security policy (e.g. when choosing their own passwords). The police uniform is given to the local security authority (LSA) Windows sub-system. LSA collects evidences for decision-making and enforces the policies (laws). The LSA sub-system is represented by the lsass.exe Windows process and several system DLLs.