You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/windows/redist-version-auditing.md
+44-59Lines changed: 44 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: "cpp-redist-version-auditing"
3
-
description: "This article provides a detailed guide for auditing usage of Visual C++ Runtime versions within your organization."
2
+
title: "How to audit Visual C++ Runtime version usage"
3
+
description: "A detailed guide for auditing Visual C++ Runtime file usage."
4
4
ms.date: 12/2/2024
5
5
helpviewer_keywords:
6
6
[
@@ -11,89 +11,74 @@ author: MahmoudGSaleh
11
11
ms.author: msaleh
12
12
---
13
13
14
-
# How to audit Visual C++ Runtime version usage within your organization
14
+
# How to audit Visual C++ Runtime version usage
15
15
16
-
The Microsoft Visual C++ Redistributable and the Visual Studio C++ Runtime (collectively, "VC Runtime") are critical components to thousands of applications. Across your enterprise network, machines may still be running applications that install and use an out-of-support version of the VC Runtime. NTFS File Auditing can be used to identify such usage as a step towards helping you replace these applications with ones that take a dependency on a supported version of the VC Runtime. This guide will walk you through setting up NTFS File Auditing, provide troubleshooting tips, and highlight the benefits of regular audits.
16
+
The Microsoft Visual C++ Redistributable and the Visual Studio C++ Runtime (collectively, "VC Runtime") are critical components of many applications. Across your network, machines may still be running applications that install and use an out-of-support version of the VC Runtime. You can use NTFS File Auditing to identify such usage as a step towards helping you replace these applications with ones that take a dependency on a supported version of the VC Runtime. This guide walks you through setting up NTFS File Auditing, provided troubleshooting tips, and highlights the benefits of regular audits.
17
17
18
-
For details on the versions of VC Runtime no longer supported, see [Microsoft Visual C++ Redistributable latest supported downloads](/cpp/windows/latest-supported-vc-redist).
18
+
For more information about the versions of VC Runtime that are no longer supported, see [Microsoft Visual C++ Redistributable latest supported downloads](/cpp/windows/latest-supported-vc-redist).
19
19
20
-
## Enabling NTFS File Auditing to determine usage of VC Runtime
20
+
## Enable NTFS file auditing to determine VC Runtime usage
21
21
22
-
NTFS File Auditing can be used to determine which process is calling VC Runtime files. You can use this information on machines with legacy versions of the VC Runtime already installed to determine which applications are calling the unsupported versions of the VC Runtime.
22
+
You can use NTFS file auditing to determine which applications are calling the unsupported versions of the VC Runtime.
23
23
24
-
This guide will first provide steps to manually enable NTFS File Auditing and review logs. Because there are several component files that can be used by an application, this guide also shows how to use PowerShell's [Get-Acl](/powershell/module/microsoft.powershell.security/get-acl) and [Set-Acl](/powershell/module/microsoft.powershell.security/set-acl) cmdlets to update Auditing permissions. For details on how to configure the audit policies on a file, see [Apply a basic audit policy on a file or folder.](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder)
24
+
This guide provides the steps to manually enable NTFS file auditing and review audit events. Because there are several files that can be used by an application, this guide also shows how to use PowerShell's [`Get-Acl`](/powershell/module/microsoft.powershell.security/get-acl) and [`Set-Acl`](/powershell/module/microsoft.powershell.security/set-acl) cmdlets to update auditing permissions. For more information about how to configure audit policies for a file, see [Apply a basic audit policy on a file or folder.](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder)
25
25
26
26
### Manually enable object access auditing on the system
27
27
28
-
Object access must be enabled before you enable file level auditing.
28
+
Object access must be enabled before you enable file level auditing:
29
29
30
-
1. Open Group Policy: Press Windows + R to open the **Run** dialog , type `gpedit.msc`, and press Enter.
3. Double-click on **Audit File System**. In the **Audit File System Properties** dialog, select **Configure the following audit events**, select**Success**and then select**OK**.
33
-
4. Close the Group Policy Editor app
30
+
1. Open Group Policy by pressing Windows + R to open the **Run** dialog, then type `gpedit.msc`, and press Enter.
1. Double-click **Audit File System**. In the **Audit File System Properties** dialog, select **Configure the following audit events** >**Success**>**OK**.
33
+
1. Close the Group Policy Editor.
34
34
35
-
Alternatively, you may use auditpol.exe to enable object access.
35
+
Alternatively, you may use `auditpol.exe` to enable object access:
36
36
37
37
1. List the current settings with `AuditPol.exe /get /category:"Object Access"`.
38
-
2. Enable/Disable with `AuditPol.exe /set /category:"Object Access" /subcategory:"File System" /success:enable`.
To monitor which process is accessing a VC Runtime file, enable auditing on the file.
42
+
To monitor which process accesses a VC Runtime file, enable auditing on the file:
43
43
44
-
1. Right-click on the file that you want to audit, select **Properties**, and then select **Security** tab.
44
+
1. Right-click on the file that you want to audit, select **Properties**, and then select the **Security** tab. For more information about finding installed VC Runtime files, see [VC Runtime installed locations](#vcruntime_install_location).
45
+
1. Select **Advanced**.
46
+
1. In the **Advanced Security Settings** dialog box, select the **Auditing** tab and then select **Continue**.
47
+
1. To add a new auditing rule, select **Add**. In the **Auditing Entry** dialog, select a principal, then type the name of the user or group you want to add such as **(Everyone)**, and then select **OK**.
48
+
1. In **Type**, select ensure that **Success** is selected.
1. There should now be a new row in the **Auditing** entries matching what you have selected. Select **OK**.
51
+
1. In the **Properties** Dialog, select **OK**.
45
52
46
-
* See the section below [VC Runtime installed locations](#vcruntime_install_location) to find the VC Runtime files installed on a machine.
47
-
48
-
2. Select **Advanced**.
49
-
50
-
3. In the **Advanced Security Settings** dialog box, select **Auditing** tab and then select **Continue**.
51
-
52
-
4. To add a new auditing rule, select **Add**. In the **Auditing Entry** dialog, select a principal, then type the name of the user or group you want to add (Everyone) and then select OK.
53
-
54
-
5. In the Type box, use the default of **Success**.
55
-
56
-
6. Select **Show advance permissions**, select **Clear all** and then select **Traverse folder / execute file**, and select **OK**.
57
-
58
-
7. At this point there should be a new row in the **Auditing** entries matching what you have selected. Select **OK**.
59
-
60
-
8. In the **Properties** Dialog, select **OK**.
61
-
62
-
The audit rule is enabled now.
53
+
The audit rule is now enabled.
63
54
64
55
### Manually review audit logs
65
56
66
-
NTFS File Auditing will generate ["Event 4663: An attempt was made to access an object"](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663) for each file that includes + audit permission and the+ process accessing process namethe file.
57
+
NTFS file auditing generates ["Event 4663: An attempt was made to access an object"](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663) for each file that includes the audit permission and that is accessed by a process.
67
58
68
-
1. Open Event Viewer: Press Windows + R to open the **Run** dialog , type `eventvwr.msc`, and press Enter.
69
-
70
-
2. Navigate to Security Logs: In the Event Viewer, expand Windows Logs and select **Security**. The results pane lists individual security events.
71
-
72
-
3. Filter and Analyze the Logs: Use the **Filter Current Log** option to narrow down the events to Event ID 4663 (Audit Success for the File System Category).
59
+
1. Open the Event Viewer by pressing `Windows` + `R` to open the **Run** dialog. Then type `eventvwr.msc`, and press Enter.
60
+
1. Navigate to the **Security** logs in the Event Viewer by expanding **Windows Logs** > **Security**. The results pane lists security events.
61
+
1. Filter and Analyze the logs by choosing **Filter Current Log...** in the **Actions** pane. Narrow down the events to **Event ID 4663 (Audit Success for the File System Category)** by entering **4663 into the Includes/Excludes Event IDs** text box.
73
62
74
63
For an example of a File Access Auditing Event 4663, see ["4663(S): An attempt was made to access an object."](/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4663)
0 commit comments