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:

  1. Open the Start menu and select Run.
  2. Enter gpedit.msc and select OK.
  3. Select Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.
  4. 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.

  5. In the Local Security Setting section, in the drop-down box, select Classic - local users authenticate as themselves.
  6. 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

When performing authenticated scans against Windows systems, there are several configuration options that must be enabled (see Credentialed Checks on Windows for more information):

  • 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.
  • Open TCP ports 139 and 445 between Nessus and the target.
  • Using either the AutoShareServer (Windows Server) or AutoShareWks (Windows Workstation), enable the following default administrative shares:

    • IPC$

    • ADMIN$

      Note: Windows 10 disables ADMIN$ by default. For all other operating systems, the three shares are enabled by default and can cause other issues if disabled by default. For more information, see http://support.microsoft.com/kb/842715/en-us.
    • C$