# Auditing Files and Folders

# Steps to Audit File Access on Windows File Server using Event Logs

Here are the steps to track who read a file on Windows File Server.


1. Configure ‘**Audit Object Access**’ audit policy
2. Enable auditing on the files that you want to track
3. Search relevant Event IDs in Windows Event Viewer to track who reads the file

## **Step 1 – Configure ‘Audit Object Access’ policy**

Follow these steps one by one to enable the “Audit object access” audit policy:


 1. Launch “**Group Policy Management**” console. For that, on the primary “**Domain Controller**”, or on the system where “**Administration Tools**” is installed, type “`gpmc.msc`” in the “`Run`” dialog box, and click “OK”.
 2. After you have opened the “**Group Policy Management**” window, you will have to create a new GPO, or edit an existing one.
 3. To edit an existing GPO, in the left pane, right-click on the default or a user-created GPO, and click “**Edit**” on the context menu. This action opens the Editor window of Group Policy Management Editor.

    **Note:** If you want to track multiple folders, you will have to configure an audit for every folder individually.
 4. Navigate to “**Security**” tab.

    **Note:** It is suggested to create a new GPO, link it to the domain, and edit it.
 5. In the “**Group Policy Management Editor**” window, you have to set the appropriate audit policy.
 6. To audit file accesses, you have to set the “**Audit object access**” policy. For that, navigate to “**Computer Configuration**” → “**Windows Settings**” → “**Security Settings**” → “**Local Policies**” → “**Audit Policy**”. All the available policies under “**Audit Policy**” are displayed in the right panel.

    
    ![Audit Object Access policy](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS8wOTYzZDE1MS01Mzk2LTRjZWUtOGZhNi00Y2ZiNDAzOWRkNzgvRmlndXJlMS0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.3gD-xuKSAEhNp0ulKbm0YISpJvThzKBzohCFBDQHEJk " =698x501")

    
 7. Double-click the “**Audit object access**” policy to open its “**Properties**”.

    
    ![Properties of Audit Object Access Policy](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS85YjViNDg4OS0yYWViLTQ4ZmMtYThiZS01NjU2MTU5YmE3ZTAvRmlndXJlMi0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.7c7i0bZxFfiECpHfJ22yBVTSZukT_Jj0HMPuEV1R7mc " =430x314")

    
 8. On this window, click the “**Define these policy settings**” checkbox. Then, you get two options to audit – “**Success**” and “**Failure**”. The former lets you audit successful attempts made to access the objects, whereas the latter lets you audit failed attempts.
 9. Select any one or both the options as per requirement. It is recommended to select both options. In our case, we have selected both options because we want to audit both the successful and the failed attempts.
10. Click “**Apply**” and “**OK**” to close the window.
11. To immediately update the Group Policy instead of waiting for it to auto-update, run the following command in the “**Command Prompt**”:

    ```bash
    Gpupdate /force
    ```

## **Step 2 – Enable auditing on the files that you want to track**

After configuring GPO, you have to set auditing on each file individually, or on folders that contain the files. Here are the steps:


 1. Open “Windows Explorer” and navigate to the file or folder that you want to audit.
 2. Right-click the file and select “Properties” from the context menu. The file’s properties window appears on the screen.

    **Note:** If you want to track multiple files, put them into one, two or more folders to enable their auditing easily. Doing this saves you from repeating these steps for each file.
 3. By default, the “General” tab of the “Properties” window appears on the screen. Go to the “Security” tab.

    
    ![Advanced Security Settings](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS81ZDkxYzExMC00ZTAxLTQ5MDgtODM1MS0wZTk5NGQ4MjRiNTYvRmlndXJlNC0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.gCWNUH5i-VX6JM3ilQEjfhPlKbvjj5nW7KHs01MIcXA " =377x516")

    
 4. On the “**Security**” tab, click “**Advanced**” to access the “Advanced Security Settings for” window that appears on the screen.
 5. In the “Advanced Security Settings for” window, go to the “Auditing” tab.

    
    ![auditing tab](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS8yNWM0MDkyYy01NTVjLTQxNjktYjU1NC1jYTRmODMxYzdmMDMvRmlndXJlNS0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.4MFnX-evITyyttYnshQ7mEz_hGVn4WPXhI53xrYX1RI " =721x427")

    
 6. On this tab, you have to create a new audit entry. For that, click “Add”. The “Auditing Entry for” window appears on the screen.
 7. In the “Auditing Entry for” window, at first, select users whose actions you want to audit. Click “Select a Principal”, to open the “Select User, Computer, Service Account, or Group” dialog box.
 8. Here, choose users to audit. If you want to audit all users’ activities, enter “Everyone” in the “Enter the object name to select” field, and click “Check Names”. In our case, we enter “Everyone”.

    
    ![Auditing Entry window](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS85N2RiNzkxZS0xNThkLTQ2ODYtYmFhNC01YTZlZGRjNTM3MGIvRmlndXJlNi0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.NqixulhzbJClvWc02faEZZT_FQPlkWKionfZysn6kBk " =471x258")

    
 9. Click “OK” to close the dialog box.
10. Three options are available in the “Type” picklist: “Success”,” Fail”, and “All”. We select the “All” option because we want to audit both successful and failed attempts.
11. In the “Permissions” section, you can select all activities that you want to audit. In the case of audit file read, select “Traverse Folder/Execute File”, “List Folder/Read data”, “Read attributes”, and “Read extended attributes” permissions.

    **NOTE:** If you want to audit all the activities, select the “Full Control” checkbox.
12. Click “OK” to close the “Auditing Entry for File Access auditing” window.

    
    ![The file access event](https://outline.cybersift.io/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MwNWNhZDYzLTA0ZmEtNGFmZC04NjMwLTI3MjNjZDYwZWZkNS83NjIzNDA1Mi01YTkzLTQ3MWItOTEzMC0xYzgwMGIxMzRkZjIvRmlndXJlNy0xLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk1MTQ3MjAwLCJleHAiOjE3OTUyMzM2MDB9.7TPvG7mXC0X72cr9xM8AxoKrHg8koq-w6QbdJyyYO5k " =731x500")

    
13. Back in the “Advanced security settings” window, now you see the new audit entry.
14. Click “Apply” and “OK” to close the window.
15. Click “Apply” and “OK” to close file properties.

---

**Documents**

- [Logs and Architecture](https://outline.cybersift.io/s/sentio-siem/doc/logs-and-architecture-acvUiDgvI5)
- [Sentio](https://outline.cybersift.io/s/sentio-siem/doc/sentio-KuYAbF5grr)
- [ISO27001:2022](https://outline.cybersift.io/s/sentio-siem/doc/iso270012022-7S5IzvF6a0)
- [FAQ](https://outline.cybersift.io/s/sentio-siem/doc/faq-vVyRNyNb60)