Tell if a Computer has a BIOS Password

Not interested in knowing WHAT the BIOS password is, just need an Analyses to tell me if a computer has a BIOS password enabled or not. Appreciate any help.

Thanks.

I don’t believe there is any Generic way to Determine this. Some manufacutres, e.g dell have tool that can query the Bios from within Windows Etc.

There is no way to do this without knowing the specific model of BIOS and being able to directly communicate with it, this is not part of the standard driver. It is possible , it’s just different for each model

1 Like

It is definately vendor specific as to whether they include any wmi options or ways to query the information, i know Lenovo has a tool that will query the bios settings and you can write the values to file to query later but that is an HTA (old school) and also queries wmi so you might as well query wmi direction if it’s available.

This is an example for Lenovo but you can execute in debugger to get an idea of what wmi objects are available.

selects “* from Lenovo_BiosSetting” of wmi “\root\wmi”

HP also had one quite a while back but we haven’t had HP’s in quite a few years so I can’t confirm that this is still available on them.

(select “* from HPBIOS_BIOSEnumeration” of wmi “\root\HP\InstrumentedBIOS”)

Once you identify the correct setting that you would like to query you can use a WHERE statement to isolate the setting that your looking for.

if(exists (select “CurrentSetting from Lenovo_BiosSetting WHERE CurrentSetting LIKE ‘NetworkBoot%25’” of wmi “\root\wmi”)) THEN (select “CurrentSetting from Lenovo_BiosSetting WHERE CurrentSetting LIKE ‘NetworkBoot%25’” of wmi “\root\wmi”) as string ELSE “N/A”

1 Like

Sorry for necro.

Lenovo has Supervisor, Power-on, and System Management passwords. Lenovo uses PasswordState to show which combination of these BIOS passwords are applied.

If you just want to check for Supervisor password:

integer value of select "PasswordState from Lenovo_BiosPasswordSettings" of wmi "root\wmi:Lenovo_BiosPasswordSettings" is contained by set of (2;3;6;7;10;11;66;67;70;71)

HP is simpler:

(integer value of properties "IsSet" of select objects "* from HP_BIOSSetting where name = 'Setup Password'" of wmis "root\hp\instrumentedbios") = 1
2 Likes

I would tweak these slightly:

exists integer values whose ( it is contained by set of (2;3;6;7;10;11;66;67;70;71) ) of selects "PasswordState from Lenovo_BiosPasswordSettings" of wmis "root\wmi:Lenovo_BiosPasswordSettings"

AND

exists integer values whose(it = 1) of properties "IsSet" of select objects "* from HP_BIOSSetting where name = 'Setup Password'" of wmis "root\hp\instrumentedbios"

Even if these shouldn’t ever return multiple results, I still like to write it as if it could, so then it would still work rather than error out.

1 Like