Windows Local Scan#
This page describes how vulnerabilities are detected and how to configure scans when you install the scanner on a Windows server and scan it (Local Scan).
Local Scan is one of the two methods of "Server OS Scan". For how to install the scanner, see "Installation".
On a Windows server, the method used to detect vulnerabilities differs depending on the type of software. You can use the following three methods together on the same server, depending on the target software.
| Method | Target | Information used for detection | Required work |
|---|---|---|---|
| Windows Scan | Vulnerabilities fixed by Windows updates | Application status of updates (KBs) | Install the scanner. Depending on the Windows Update source, change the settings (see "Scanning Windows under WSUS") |
| CPE Scan (CPE Assignment) | Software not managed by KB | CPEs assigned to the software (identifiers that represent the product name and version) | Check the assigned CPEs and assign CPEs manually as needed (see "Using CPE Scan to Manage Vulnerabilities in Software Not Managed by KB") |
| Lockfile Scan | Libraries that applications depend on | Application dependency files (lockfiles) | Specify the lockfiles in the configuration file (see "Lockfile Scan") |
For users of older scanners
A Windows scanner older than vuls-v0.24.1 build-9d8e510 requires a manual update. To check the version, see "How to check the scanner version".
How Windows Server Vulnerability Management Works#
1. Windows Scan: Overview of Vulnerability Management using KB (Microsoft Knowledge Base)#
KB (Microsoft Knowledge Base) is a repository of technical and support information provided by Microsoft. Each KB article is assigned a unique ID number (e.g., KB0000001). Windows updates are assigned a KBID, with some exceptions, and a single update may fix multiple vulnerabilities. Therefore, you can use the KBIDs of installed updates to determine which vulnerabilities have been fixed.
FutureVuls's Windows Scan detects vulnerabilities in the following flow.
- The scanner collects the status of Windows updates (which updates are applied and which are not applied).
- If the KB that fixes a vulnerability cannot be confirmed as applied, the CVE IDs linked to that KB are detected as vulnerabilities present on the system. They are detected not only when the KB is confirmed as not applied, but also when its application status cannot be confirmed. However, if no applied KB can be identified at all, only the CVE IDs linked to KBs confirmed as not applied are detected.
- For how KBs are displayed when a newer KB supersedes an older KB, see "Advisory List".
- Microsoft Edge is assessed using its installed version. Vulnerabilities in Microsoft products other than the OS, such as Teams and Visual Studio Code, may also be detected.
Because KBIDs are converted to CVE IDs for management, the vulnerabilities can be evaluated using the same metrics as other managed targets like Linux and libraries. Triage and response based on information such as security alerts and exploit code are also possible.
You can select the source of update information (the Windows Update service) to suit your environment. Specify the source with serverSelection in the scanner's configuration file (config.toml).
| Environment | Source of update information | serverSelection value |
Setup procedure |
|---|---|---|---|
| Can connect to Windows Update on the internet | Windows Update on the internet | 2 (default) |
No configuration change required |
| Under WSUS | WSUS on the local network | 1 |
"Scanning Windows under WSUS" |
| Cannot connect to either Windows Update or WSUS | Cab file (wsusscn2.cab) |
3 |
Local Scan uses the same settings as Remote Scan. For the procedure, see "Configuring a Scan Using a Cab File" on the Remote Scan page |
In all cases, the server where the scanner is installed must be able to upload scan results to FutureVuls. If you cannot install the scanner or cannot upload to FutureVuls, use Remote Scan from a relay server that can upload, or use "Paste Scan". For the selection flow, see "Selecting a Scan Method > Windows Servers".
How update application information is obtained
During a local scan, the following commands are primarily used to obtain information about applied updates:
Get-HotfixGet-Package -ProviderName msu- UpdateSearcher commands such as
IUpdateSearcher::Search,UpdateSearcher::QueryHistory systeminfo.exe
For detailed behavior, see the OSS Vuls code that collects update application information. For a detailed explanation of the Windows OS vulnerability detection mechanism, see the blog post "Mechanism of Windows OS Vulnerability Detection".
2. CPE Scan (CPE Assignment): Overview of Asset and Vulnerability Management for Software Not Managed by KB#
Definition of 'Not Managed by KB'
In this manual, software that meets either of the following criteria is defined as "not managed by KB".
- Software that is not a target for update management
- Software whose updates are not associated with a KBID
- For example, some Microsoft Office updates are not associated with a KBID.
FutureVuls provides the CPE Scan feature to perform asset and vulnerability management for this software that is not managed by KB. For details, see "Detecting Vulnerabilities in Software Not Managed by KB".
Windows Scan: Vulnerability Management using KB (Microsoft Knowledge Base)#
How to Run a Scan#
The Windows scanner runs automatically once a day via Task Scheduler.
To run the scanner immediately after installation or at any other time, see "Scanner Execution and Scheduling".
How to Check Scan Results#
After the scan finishes, the results appear in the FutureVuls UI once FutureVuls finishes processing them. If the scan results are not reflected after a few minutes, or if the scan fails, check the logs by following "Scanner Execution and Scheduling".
If an error occurs, please refer to the Windows Scanner FAQ.
If there are missed detections in the scan results
When checking the Advisory List for the scanned Windows system, if you find any missed detections for applied or unapplied updates, you can supplement them using the Manual KBID Registration feature.
Scan Configuration File Location#
The configuration file used for scans is C:\Program Files\vuls-saas\config.toml. It is created when you install the scanner.
If you reference Windows Update on the internet, you can scan without editing this file. The following example shows the contents after the first scan.
PS C:\> type 'C:\Program Files\vuls-saas\config.toml'
# See README for details: https://vuls.io/docs/en/usage-settings.html
version = "v2"
[saas]
GroupID = 0000
Token = "xxxx-xxxxxxxx-xxxx-xxxxxx-xxxxxxxxx"
URL = "https://xxxxxxxxxxxx"
[default]
[servers]
[servers.server1]
host = "localhost"
port = "local"
scanMode = ["fast-root"]
[servers.server1.uuids]
server1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
[servers.server1.windows]
serverSelection = 2
The combination of host = "localhost" and port = "local" scans the server on which the scanner is installed. serverSelection is the source of update information (see the table in "1. Windows Scan: Overview of Vulnerability Management using KB (Microsoft Knowledge Base)").
To change the settings, see "Scanner Settings".
Scanning Windows under WSUS#
By configuring config.toml, you can detect unapplied KBs by referencing a WSUS server on the local network.
To use WSUS, set serverSelection in config.toml to serverSelection = 1.
<hostname> in the examples represents the computer name recorded in the configuration file by the installer. Keep the server name and UUID values as they are, and add or change only the settings you need.
~ snip ~
[servers]
[servers.<hostname>]
host = "localhost"
port = "local"
[servers.<hostname>.uuids]
<hostname> = "xxxx-xxxx-xxxx"
[servers.<hostname>.windows]
serverSelection = 1
~ snip ~
If errors or missed detections occur when scanning Windows under WSUS, refer to the following:
Customizing Uploaded Information#
You can filter the information uploaded to FutureVuls by specifying the JSON keys of the information to exclude from the upload in ignoredJSONKeys in config.toml. This can only be configured for Windows scans.
As an example, the setting to not upload the list of installed software is as follows. With this setting, installed software is not registered in FutureVuls, so it is also not subject to the automatic and manual CPE assignment described in "Using CPE Scan to Manage Vulnerabilities in Software Not Managed by KB".
For the JSON keys to specify in config.toml, see "What information is uploaded to FutureVuls? (Windows scan)".
<hostname> in the examples represents the computer name recorded in the configuration file by the installer. Keep the server name and UUID values as they are, and add or change only the settings you need.
~ snip ~
[servers]
[servers.<hostname>]
host = "localhost"
port = "local"
ignoredJSONKeys = ["packages"]
~ snip ~
Using CPE Scan to Manage Vulnerabilities in Software Not Managed by KB#
You can assign CPEs to software not managed by KB automatically or manually.
| Feature | Behavior | User Action |
|---|---|---|
| Automatic CPE Assignment | When "CPE Auto Assignment" in Group Settings is enabled, FutureVuls matches the software collected by the scanner against the verified CPE dictionary at scan time and assigns CPEs. It is enabled by default in newly created groups | Check the assignment status in the "CPE Assignment Type" column of the Software List |
| Manual CPE Assignment | You assign CPEs to software to which a CPE was not assigned automatically | Assign a CPE from the software details screen |
For details, please see "CPE/PURL Assignment".
Reference Information for Determining if Software is Not Managed by KB#
None of the methods introduced below can accurately determine whether software is managed by KB. Please use them only as reference information. If you need accurate information on whether each product is managed by KB, please contact Microsoft.
- Software that is not a target of Windows Update / Microsoft Update is highly likely to have updates without an associated KBID, meaning it is likely not managed by KB.
- By searching for software in the "Microsoft Update Catalog", you can check if there are vulnerabilities with associated KBs for that product. You can also check the update method for each software in the "MSRC Security Update Guide". If no vulnerabilities with associated KBs appear on these sites, the software is likely not managed by KB.
Manually Registering Software#
For Windows systems registered via methods other than the Windows scanner, or for software that the scanner could not recognize, you can register the software manually. For more details, see CPE Registration.
Lockfile Scan: Vulnerability Management Using Application Dependency Files#
Lockfile Scan is a feature that analyzes application dependency files (lockfiles) and detects vulnerabilities in the libraries that the applications use. Because lockfiles are also scanned when the Windows scanner runs a scan, you can manage OS vulnerabilities and library vulnerabilities as a single server on FutureVuls.
Scan Targets#
You can scan the following types of lockfiles on Windows.
| Language | Example lockfiles |
|---|---|
| Node.js | package-lock.json, yarn.lock |
| Python | requirements.txt, Pipfile.lock, poetry.lock |
| Ruby | Gemfile.lock |
| PHP | composer.lock |
| .NET (C# / F# / VB.NET) | packages.lock.json |
| Go | go.mod |
| Rust | Cargo.lock |
| Java | pom.xml, gradle.lockfile |
For detailed scan targets, please refer to Dependency Library Scan.
How to Scan#
Lockfiles are not scanned by default. If you configure either of the following in config.toml, lockfiles are also analyzed during a Windows scan, and vulnerabilities in their dependency libraries are registered in FutureVuls.
| Setting | Description |
|---|---|
lockfiles |
Specify the paths of the lockfiles to scan, file by file |
findLock / findLockDirs |
If you specify findLock = true, the scanner searches for lockfiles automatically. Specify the directories to search with findLockDirs |
How to Configure#
The following is an example of specifying lockfile paths.
<hostname> in the examples represents the computer name recorded in the configuration file by the installer. Keep the server name and UUID values as they are, and add or change only the settings you need.
[servers.<hostname>]
host = "localhost"
port = "local"
lockfiles = ["C:\\path\\to\\package-lock.json", "C:\\path\\to\\Gemfile.lock"]
[servers.<hostname>.uuids]
<hostname> = "xxxx-xxxx-xxxx"
For configuration examples and notes on using findLock and findLockDirs, see "Scan by specifying a Lockfile with Vuls Scanner".
Troubleshooting#
Check the common causes and fixes on the following pages.