Enable Windows Logins for Local and Remote Audits
The most important aspect about Windows credentials is that the account used to perform the checks should have privileges to access all required files and registry entries, which in many cases means administrative privileges. If Nessus is not provided the credentials for an administrative account, at best it can be used to perform registry checks for the patches. While this is still a valid method to determine if a patch is installed, it is incompatible with some third party patch management tools that may neglect to set the key in the policy. If Nessus has administrative privileges, then it will actually check the version of the dynamic-link library (.dll) on the remote host, which is considerably more accurate.
Configure a Local Account
To configure a stand-alone Windows server with credentials to be used that is not part of a domain, simply create a unique account as the administrator.
Make sure that the configuration of this account is not set with a typical default of Guest only: local users authenticate as guest. Instead, switch this to Classic: local users authenticate as themselves.
Configuring a Domain Account for Local Audits
To create a domain account for remote host-based auditing of a Windows server, the server must first be Windows 2000 Server, Windows XP Pro, or Windows 2008 Server and be part of a domain.
To configure the server to allow logins from a domain account, use the Classic security model. To do this, follow these steps:
- Open the Start menu and select Run.
gpedit.mscand select OK.
- Select Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.
In the list, select Network access: Sharing and security model for local accounts.
The Network access: Sharing and security model for local accounts window appears.
- In the Local Security Setting section, in the drop-down box, select Classic - local users authenticate as themselves.
- Click OK.
This will cause users local to the domain to authenticate as themselves, even though they are not physically local on the particular server. Without doing this, all remote users, even real users in the domain, will authenticate as a guest and will likely not have enough credentials to perform a remote audit.
Configuring Windows XP
When performing authenticated scans against Windows XP systems, there are several configuration options that must be enabled:
- The WMI service must be enabled on the target.
- The Remote Registry service must be enabled on the target.
- File & Printer Sharing must be enabled in the target’s network configuration.
- Ports 139 and 445 must be open between the Nessus scanner and the target.
- An SMB account must be used that has local administrator rights on the target.
You may be required to change the Windows local security policies or they could block access or inherent permissions. A common policy that will affect credentialed scans is found under:
Administrative Tools > Local Security Policy > Security Settings > Local Policies > Security Options > Network access: Sharing and security model for local accounts.
If this local security policy is set to something other than Classic - local users authenticate as themselves, a compliance scan will not run successfully.
Configuring Windows Server, Vista, 7, 8, and 10.
When performing authenticated scans against Windows systems, there are several configuration options that must be enabled:
- Under Windows Firewall > Windows Firewall Settings, enable File and Printer Sharing.
- Using the Run prompt, run gpedit.msc and enable Group Policy Object Editor. Navigate to Local Computer Policy > Administrative Templates > Network > Network Connections > Windows Firewall > Standard Profile > Windows Firewall : Allow inbound file and printer exception and enable it.
- While in the Group Policy Object Editor, navigate to Local Computer Policy > Administrative Templates > Network > Network Connections > Prohibit use of Internet connection firewall on your DNS domain. This option must be set to either Disabled or Not Configured.
- Windows User Account Control (UAC) must be disabled, or a specific registry setting must be changed to allow Nessus audits. To turn off UAC completely, open the Control Panel, select User Accounts and then set Turn User Account Control to Off. Alternatively, you can add a new registry DWORD named LocalAccountTokenFilterPolicy and set its value to “1”. This key must be created in the registry at the following location: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system\LocalAccountTokenFilterPolicy. For more information on this registry setting, consult the MSDN 766945 KB.
- The Remote Registry service must be enabled (it is disabled by default). It can be enabled for a one-time audit, or left enabled permanently if frequent audits are performed.