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
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -13,24 +13,24 @@ ms.author: msaleh
13
13
14
14
# How to audit Visual C++ Runtime version usage within your organization
15
15
16
-
The Microsoft Visual C++ Redistributable and the Visual C++ Studio Runtime (collectively, "VC Runtime") is a critical component 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 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.
17
17
18
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).
19
19
20
20
## Enabling NTFS File Auditing to determine usage of VC Runtime
21
21
22
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.
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 provides and recommends that you 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 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)
25
25
26
26
### Manually enable object access auditing on the system
27
27
28
28
Object access must be enabled before you enable file level auditing.
29
29
30
-
1. Open the Group Policy Editor (with gpedit.msc).
31
-
2. Navigate to Computer Configuration > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Object Access.
32
-
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 policy editor app
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
34
34
35
35
Alternatively, you may use auditpol.exe to enable object access.
36
36
@@ -41,35 +41,35 @@ Alternatively, you may use auditpol.exe to enable object access.
41
41
42
42
To monitor which process is accessing 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 **Security** tab.
45
45
46
46
* See the section below [VC Runtime installed locations](#vcruntime_install_location) to find the VC Runtime files installed on a machine.
47
47
48
-
2. Select Advanced.
48
+
2. Select **Advanced**.
49
49
50
-
3. In the Advanced Security Settings dialog box, select Auditing tab and then select Continue.
50
+
3. In the **Advanced Security Settings** dialog box, select **Auditing** tab and then select **Continue**.
51
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.
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
53
54
-
5. In the Type box, use the default of Success.
54
+
5. In the Type box, use the default of **Success**.
55
55
56
-
6. Select Show advance permissions, select Clear all and then select Traverse folder / execute file, and select OK.
56
+
6. Select **Show advance permissions**, select **Clear all** and then select **Traverse folder / execute file**, and select **OK**.
57
57
58
-
7. At this point there should be a new row in the Auditing entries: matching what you have selected. Select OK.
58
+
7. At this point there should be a new row in the **Auditing** entries matching what you have selected. Select **OK**.
59
59
60
-
8. In the Properties Dialog, select OK.
60
+
8. In the **Properties** Dialog, select **OK**.
61
61
62
62
The audit rule is enabled now.
63
63
64
64
### Manually review audit logs
65
65
66
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.
67
67
68
-
1. Open Event Viewer: Press Windows + R, type `eventvwr.msc`, and press Enter.
68
+
1. Open Event Viewer: Press Windows + R to open the **Run** dialog , type `eventvwr.msc`, and press Enter.
69
69
70
-
2. Navigate to Security Logs: In the Event Viewer, expand Windows Logs and select Security. The results pane lists individual security events.
70
+
2. Navigate to Security Logs: In the Event Viewer, expand Windows Logs and select **Security**. The results pane lists individual security events.
71
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).
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).
73
73
74
74
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)
75
75
@@ -140,7 +140,7 @@ ForEach-Object {
140
140
141
141
### PowerShell: Viewing file auditing events
142
142
143
-
PowerShell provides Get-WinEvent to obtain event records for various event logs.
143
+
PowerShell provides `Get-WinEvent` to obtain event records for various event logs.
144
144
145
145
The following PowerShell section of code will list all of the Auditing Event 4663 records over the past 24 hours.
146
146
@@ -193,15 +193,15 @@ ResourceAttributes : S:AI
193
193
194
194
### Next steps after auditing VC Runtime usage
195
195
196
-
After you have determined which processes are using the VC Runtime files or installing the VC Redistributable, uninstall those applications or upgrade them to newer versions that do not depend on unsupported VC Runtimes.
196
+
After you have determined which processes are using the VC Runtime files or which applications have installed the VC Redistributable, uninstall those applications or upgrade them to newer versions that don't depend on unsupported VC Runtimes.
197
197
198
-
Note that some Microsoft applicationsdo require legacy versions of the VC Runtime. For details, see [Visual C++ Redistributable and runtime libraries FAQ | Microsoft Learn](/lifecycle/faq/visual-c-faq).
198
+
Some Microsoft applications require legacy versions of the VC Runtime. For details, see [Visual C++ Redistributable and runtime libraries FAQ | Microsoft Learn](/lifecycle/faq/visual-c-faq).
199
199
200
200
<a id="vcruntime_install_location"></a>
201
201
202
-
## VC Runtime installed locations
202
+
## VC Runtime installation locations
203
203
204
-
The following section lists where each version of the VC Runtime component files are installed.
204
+
The following is where each version of the VC Runtime is installed.
205
205
206
206
| **Visual Studio Version**| **Installed Location(s)**|
207
207
| ------------- | ------------- |
@@ -213,6 +213,6 @@ The following section lists where each version of the VC Runtime component files
213
213
214
214
## See also
215
215
216
-
*[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)
217
-
*[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)
218
-
*[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)
216
+
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)<br/>
217
+
[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)<br/>
218
+
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)
0 commit comments