Title
#general
j

junhui

10/27/2021, 9:24 AM
Hey guys, total noobie here, is there a way to get the password policies on Windows/Linux by using osquery? Like the minimum password length and whatnot. Mainly for compliance checking. Thanks!
d

Dhruv Rathod

10/27/2021, 11:28 AM
Not sure but on windows you can use this:
SELECT SPLIT(key,'\\', 6) PROPERTY, data FROM REGISTRY WHERE PATH LIKE 'HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\PolicyManager\default\DeviceLock\%\value';
j

junhui

10/28/2021, 2:06 AM
Oh, thanks! This seems to work but the MinDevicePasswordLength shows 4 while the 'net accounts' command shows 8, any idea?
d

Dhruv Rathod

10/28/2021, 4:48 AM
no idea, but you can check this out here : https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-devicelock there's also few compliance cases on the nav bar you can look out for
j

junhui

10/28/2021, 7:38 AM
A quick glance it seems like I need something called "Mobile Device Management" enabled for the DeviceLock to work.. hmm Nevertheless, thank you for your help!