Skip to content

Commit 8b617f4

Browse files
authored
edit pass
1 parent 0572c07 commit 8b617f4

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

docs/windows/redist-version-auditing.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@ ms.author: msaleh
1313

1414
# How to audit Visual C++ Runtime version usage
1515

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.
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 replacing those applications with ones that use a supported version of the VC Runtime. This guide walks you through setting up NTFS file auditing, provides troubleshooting tips, and highlights the benefits of regular audits.
1717

1818
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).
1919

2020
## Enable NTFS file auditing to determine VC Runtime usage
2121

2222
You can use NTFS file auditing to determine which applications are calling the unsupported versions of the VC Runtime.
2323

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)
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).
2525

2626
### Manually enable object access auditing on the system
2727

2828
Object access must be enabled before you enable file level auditing:
2929

30-
1. Open Group Policy by pressing Windows + R to open the **Run** dialog, then type `gpedit.msc`, and press Enter.
30+
1. Open the Local Group Policy Editor by pressing Windows + R to open the **Run** dialog, then type `gpedit.msc`, and press Enter.
3131
1. Navigate to **Computer Configuration** > **Windows Settings** > **Security Settings** > **Advanced Audit Policy Configuration** > **System Audit Policies** > **Object Access**.
3232
1. Double-click **Audit File System**. In the **Audit File System Properties** dialog, select **Configure the following audit events** > **Success** > **OK**.
3333
1. Close the Group Policy Editor.
3434

3535
Alternatively, you may use `auditpol.exe` to enable object access:
3636

37-
1. List the current settings with `AuditPol.exe /get /category:"Object Access"`.
38-
1. Enable access with `AuditPol.exe /set /category:"Object Access" /subcategory:"File System" /success:enable`.
37+
1. List the current settings from the command line with `AuditPol.exe /get /category:"Object Access"`.
38+
1. Enable object access with `AuditPol.exe /set /category:"Object Access" /subcategory:"File System" /success:enable`.
3939

4040
### Manually enable auditing on a file
4141

4242
To monitor which process accesses a VC Runtime file, enable auditing on the file:
4343

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).
44+
1. Right-click 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).
4545
1. Select **Advanced**.
4646
1. In the **Advanced Security Settings** dialog box, select the **Auditing** tab and then select **Continue**.
4747
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**.
@@ -50,15 +50,15 @@ To monitor which process accesses a VC Runtime file, enable auditing on the file
5050
1. There should now be a new row in the **Auditing** entries matching what you have selected. Select **OK**.
5151
1. In the **Properties** Dialog, select **OK**.
5252

53-
The audit rule is now enabled.
53+
The audit rule is now enabled for the file.
5454

5555
### Manually review audit logs
5656

5757
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.
5858

5959
1. Open the Event Viewer by pressing `Windows` + `R` to open the **Run** dialog. Then type `eventvwr.msc`, and press Enter.
6060
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.
61+
1. Find the audit events 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.
6262

6363
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)
6464

@@ -125,9 +125,7 @@ ForEach-Object {
125125

126126
### PowerShell: View file audit events
127127

128-
PowerShell provides `Get-WinEvent` to obtain event records for various event logs.
129-
130-
The following PowerShell code lists all of the Auditing Event 4663 records over the past 24 hours:
128+
PowerShell provides `Get-WinEvent` to obtain event records for various event logs as shown in the following PowerShell code which lists all of the Auditing Event 4663 records over the past 24 hours:
131129

132130
```powershell
133131
function Get-AuditEntries {
@@ -156,8 +154,6 @@ function Get-AuditEntries {
156154
Get-AuditEntries -oldestTime (Get-Date).AddHours(-24)
157155
```
158156

159-
Example output from the previous code:
160-
161157
```output
162158
TimeCreated : 11/20/2024 5:00:11 AM
163159
Accesses : Execute/Traverse
@@ -178,7 +174,7 @@ ResourceAttributes : S:AI
178174

179175
### Next steps after auditing VC Runtime usage
180176

181-
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.
177+
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.
182178

183179
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).
184180

@@ -198,6 +194,6 @@ The following is where each version of the VC Runtime is installed.
198194

199195
## See also
200196

201-
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)<br/>
202-
[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)<br/>
197+
[Redistributing Visual C++ Files](redistributing-visual-cpp-files.md)\
198+
[The latest supported Visual C++ downloads](latest-supported-vc-redist.md)\
203199
[Lifecycle FAQ - Visual C++ Redistributable and runtime libraries](/lifecycle/faq/visual-c-faq)

0 commit comments

Comments
 (0)