lithnet / ad-password-protection

Active Directory password filter featuring breached password checking and custom complexity rules
MIT License
490 stars 52 forks source link

bannedwords number's sequences #41

Closed haidepc closed 4 years ago

haidepc commented 4 years ago

I have tried to include on bannedwords number's sequences like "12345" or years "2020" but it doesn't work. Exemple "password2020" Is there someway to include "numbers"?

ryannewington commented 4 years ago

@haidepc at this stage, no there isnt. Banned words are used to prevent passwords based on common words and well-known substitutions, so adding 'password' would block 'password2020', but adding numbers to the banned word store wont achieve what you are looking for.

haidepc commented 4 years ago

thank you for your reply. Finally I have tried with regular expressions and It's working . Exemple: Passwords that contains Years from 2010 to 2099 or 123 ^((?!20[1-9][0-9])(?!123).)*$

ryannewington commented 4 years ago

Ah! Great idea! A very creative solution.

dm2746374 commented 4 years ago

That regex is just a line in your bannedwords store? Works ok? Pretty slick

ryannewington commented 4 years ago

The regex goes in the group policy. There's a specific entry for preventing passwords based on a regular expression

ryannewington commented 4 years ago

If you need any additional help with this, then just reopen this issue.