SlideShare a Scribd company logo
Oct 2016 ver 1.2 MalwareArchaeology.com Page 1 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
RESOURCES: Places to get more information
1. MalwareArchaeology.com/cheat-sheets - More Windows cheat sheets and scripts to assist in your audit settings.
2. Log-MD.com – The Log Malicious Discovery tool reads security related log events and settings. Use Log-MD to audit your
log settings compared to the “Windows Logging Cheat Sheet” and Center for Internet Security (CIS) to help with
configuring your audit policy and refine file and registry auditing. List Event ID 4663 to see what files and folders might be
noise and can be removed from your audit policy.
3. technet.microsoft.com – Information on Windows auditing
4. https://msdn.microsoft.com/en-us/library/bb742512.aspx - Using Security Templates to set audit policies
5. Google! – But of course.
WHY AUDIT FILES AND FOLDERS:
Files are often added or changed by hackers and malware. By auditing key file and folder locations, any additions or changes
made by an attacker can be captured in the logs, harvested by a log management solution and potentially alerted on or
gathered during an investigation.
Building a base configuration for file and folder auditing provides you a great starting point to build upon. As you mature
your logging program, you can build upon and develop it as you find new locations that are important to monitor. We
recommend as a part of any Information Security program that you implement and practice “Malware Management”. You
can read more on what “Malware Management” is and how to begin doing in here:
 www.MalwareManagement.com
The basic idea of Malware Management is, as you find file and folder locations reported in an incident response firm’s
malware analysis, virus/malware reports and your own incidents and investigations, you can expand on the base auditing
listed in this cheat sheet and make it more mature and applicable to your specific needs or requirements.
This “Windows File Auditing Cheat Sheet” is intended to help you get started with
basic and necessary File and Folder Auditing. This cheat sheet includes some very
common items that should have auditing enabled, configured, gathered and
harvested for any Log Management, Information Security program or other security
log gathering solution. Start with these settings and add to the list as you
understand better what is in your logs and what you need to monitor and alert on.
Oct 2016 ver 1.2 MalwareArchaeology.com Page 2 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
ENABLE AND CONFIGURE::
1. FILE AUDITING: In order to collect file and folder auditing events (Event ID 4663) you must first apply the settings
found in the “Windows Logging Cheat Sheet”. These settings will allow a Windows based system to collect any events
on files and folders that have auditing enabled.
CONFIGURE:
1. LOCAL LOG SIZE: Increase the maximum size of your local Security log. Proper auditing will increase log data beyond
the default settings, your goal should be to keep local security logs for around 7 days.
 Security log set to 1GB (1,000,000KB) or larger (yes this is huge compared to defaults)
INFORMATION:
1. EVENT ID: There is only one Event ID that will appear in the Security log when file and folder auditing is enabled, 4663.
 4663 - An attempt was made to access an object. This is the only Event ID that will record the details of the
folder(s) and file(s) created as well as the process name that performed the actions.
REFINING AUDITING:
When using file and folder auditing, refinement will be needed in order to collect only the entries having actual security
value. Enabling folders that have a high rate of changes will fill up your logs causing them to rotate faster than you might
want to retain them and miss files you might actually want to catch. In addition, logging more than you need when using a
log management solution will have a potential impact to licensing and storage requirements. It is important to test and
refine file and folder auditing before applying it across your organization. Use Log-MD to assist you in refining your file and
folder audit policy which can be found here:
 Log-MD.com
If you are examining malware in a lab for example, or doing an incident response investigation, over auditing may be
perfectly acceptable. Use the built-in Windows wevtutil.exe utility, PowerShell (get-eventlog), a security log tool like Log-
MD or your log management solution to review what is being captured and remove files and folders that are excessively
noisy and do not have significant security importance.
When setting auditing of files and folders there are some decisions on what to monitor. Using Explorer to select the folder
and set the auditing manually, you can see what options there are as seen from the image below. The goal of this cheat
sheet is to get you started using file and folder auditing on well-known folders and to enable just enough to provide
security value, but not too much as to create a lot of useless noise. What follows is our recommendation to get started
which you may tweak and improve as you need. The main goal is to look for things that are newly added by hackers and/or
malware. Monitoring for all changes is rather noisy and excess noise could cause you to miss a simple file creation.
Oct 2016 ver 1.2 MalwareArchaeology.com Page 3 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
CONFIGURE:
Select a Folder or file you want to audit and monitor.
Right-Click the Folder, select Permissions – Advanced –
Auditing – Add – EVERYONE – (check names), OK.
1. Apply onto – “THIS FOLDER and FILES” or “THIS
FOLDER, SUBFOLDERS and FILES” (or what you
want/need).
2. Select ‘Create files / write data’, ‘Create folders /
append data’, ‘Write extended attributes’, ‘Delete’,
‘Change permissions’ & ‘Take ownership’ to audit.
3. Be careful, setting auditing to ‘This folder, subfolders
and files’ as this can generate a lot of data and thus
noise.
CONFIGURE:
These are the only items that are recommended be set to
optimize what is needed security wise and keep noise to a
minimum. You may expand on these settings as necessary for
your environment, but these settings are a good place to
start.
User:
 EVERYONE
Applies to:
 “This folder, subfolders and files” – Audit all items in
this folder and all subfolders
OR
 “This folder and files” - Audit only the files in this
folder and NOT the subfolders
Access: Only select these items to keep down on the noise
 Create files / write data – File created
 Create folders / append data – Folder created
 Write extended attributes – Metadata that can be
placed in a file
 Delete – File is deleted
 Change permissions – permissions of a file change
 Take ownership – ownership changed
Oct 2016 ver 1.2 MalwareArchaeology.com Page 4 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
CONFIGURE: Recommend Folder and Files to enable auditing on
1. FOLDERS TO AUDIT:
THIS FOLDER AND FILES ONLY: Do NOT audit subfolders on these directories
 C:Program Files
 C:Program FilesInternet Explorer
 C:Program FilesCommon Files
 C:Program Files (x86)
 C:Program Files (x86) Common Files
 C:ProgramData
 C:Windows
 C:WindowsSystem32
 C:WindowsSystem32Drivers
 C:WindowsSystem32Driversetc
 C:WindowsSystem32Sysprep
 C:WindowsSystem32wbem
 C:WindowsSystem32WindowsPowerShellv1.0
 C:WindowsWeb
 C:WindowsSysWOW64
 C:WindowsSysWOW64Drivers
 C:WindowsSysWOW64wbem
 C:WindowsSysWOW64WindowsPowerShellv1.0
THIS FOLDER, SUBFOLDERS AND FILES:
 C:Boot
 C:Perflogs
 Any Anti-Virus folder(s) used for quarantine, etc.
 C:UsersAll UsersMicrosoftWindowsStart MenuProgramsStartup
 C:UsersPublic
 C:Users*AppDataLocal
 C:Users*AppDataLocalTemp
 C:Users*AppDataLocalLow
 C:Users*AppDataRoaming
 C:WindowsScripts
 C:WindowsSystem
 C:WindowsSystem32GroupPolicyMachineScriptsStartup Consider Scripts if no other dirs
 C:WindowsSystem32GroupPolicyMachineScriptsShutdown
 C:WindowsSystem32GroupPolicyUserScriptsLogon Consider Scripts if no other dirs
 C:WindowsSystem32GroupPolicyUserScriptsLogoff
 C:WindowsSystem32Repl Servers only

 C:WindowsSystem32Tasks
 C:Windowssystem32configsystemprofileAppData
 C:WindowssysWOW64sysprep
Oct 2016 ver 1.2 MalwareArchaeology.com Page 5 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
CONFIGURE::
EXCLUDE NOISY ITEMS: These folders will create events that do not provide much value. After setting auditing on the
parent folder, remove auditing from these folders and any other files and folders you find overly noisy with little security
benefit.
 C:ProgramDataMicrosoftRACTemp
 C:ProgramDataMicrosoftRACPublishedDataRacWmiDatabase.sdf
 C:ProgramDataMicrosoftRACStateDataRacDatabase.sdf
 C:ProgramData<Anti-Virus>Common Framework Insert your AV folder(s)
 C:ProgramDataMicrosoftSearchDataApplicationsWindowsMSS.chk
 C:ProgramDataMicrosoftSearchDataApplicationsWindowsMSS.log
 C:Users*AppDataLocalGDIPFONTCACHEV1.DAT
 C:Users*AppDataLocalGoogleChromeUser Data
 C:Users*AppDataLocalMicrosoftWindowsExplorerthumbcache_*
 C:Users*AppDataLocalMicrosoftWindowsTemporary Internet FilesContent.IE5
 C:Users*AppDataLocalMicrosoftOffice
 C:Users*AppDataLocalMicrosoftOutlook
 C:Users*AppDataLocalMicrosoftWindowsPowerShellCommandAnalysis
 C:Users*AppDataLocalMozillaFirefoxProfiles
 C:Users*AppDataLocalLowMicrosoftCryptnetUrlCache
 C:Users*AppDataRoamingMicrosoftExcel
 C:WindowsSysWOW64configsystemprofileAppDataLocalLowMicrosoftCryptnetUrlCache
 Any other normal applications that you have installed that produce a lot of log entries without significant security
value.
OPTIONS TO SET FILE AUDITING:
There are four ways to set file and folder auditing on each folder:
1. Create a security template that is applied using Group Policy and/or secedit. This is the most effective way of doing it for
a large amount of systems.
a. https://msdn.microsoft.com/en-us/library/bb742512.aspx
2. Set with a PowerShell script. Though this method does not work on certain directories owned by TrustedInstaller and
changing the ownership is not recommended
3. Set with a SetACL.exe, a utility by www.helgeklein.com
4. Set manually via Explorer. This does not scale as each system must be set manually, but may be fine for a malware lab or
investigation of a single or a few systems.
PREFETCH FOLDER AUDITING:
Auditing the Windows Prefetch or Superfetch folder is a good forensic addition since it will not generate very much log
data. In Win 7 and later with systems with an SSD, it is disabled. Enabling on Servers is an option. Enable the “Superfetch”
service on Workstations to Automatic and Start and enable the “EnableSuperfetch” key is set to “3”.
 HKLMSystemCurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters
Oct 2016 ver 1.2 MalwareArchaeology.com Page 6 of 6
WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later
USING SECURITY TEMPLATES TO SET AND REMOVE FILE AUDITING:
The following is how to create a Security template using the Microsoft Management Console (MMC). To create a custom
security template using the MMC snap-in:
1. Open the MMC console, choose Start, and then choose Run
2. Type “mmc” in the Open box, and then choose OK
3. From the File menu, choose Add/Remove Snap-in
4. Select Add/Remove Snap-in dialog box, choose Add
5. Select the list of available snap-ins, select Security Templates, choose Add, choose Close, and then choose OK
6. In the MMC main window, under the Console Root node, expand the Security Templates node, right-click the root
templates folder, and then choose New Template
7. Type a name and description for the template, and then choose OK
8. Choosing OK saves your template as an .inf file in:
 C:Users<username>DocumentsSecurityTemplates
 Or you may save them anywhere you would like
9. Add each folder and/or file you want to audit with the appropriate audit settings listed above
CHECK THE AUDITING OF A FOLDER OR FILE:
1. To check what the file auditing for a given folder or file is set to, use the following PowerShell script:
 Check_Auditing_Settings_File_Folder.ps1 – Check the auditing set on a specific folder or file
 Available at www.Malwarearchaeology.com/logging

More Related Content

PDF
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
PDF
Windows Registry Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology
PDF
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
PPTX
What's New in AlienVault v3.0?
PDF
Memory forensics cheat sheet
PDF
Windows logging cheat sheet
DOCX
Security Incident Log Review Checklist by Dr Anton Chuvakin and Lenny Zeltser
PDF
Understanding the Event Log
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows Registry Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
What's New in AlienVault v3.0?
Memory forensics cheat sheet
Windows logging cheat sheet
Security Incident Log Review Checklist by Dr Anton Chuvakin and Lenny Zeltser
Understanding the Event Log

What's hot (18)

PDF
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
PDF
Logging for Hackers v1.0
PPTX
Event log analyzer by me
PPT
Securing Windows web servers
PDF
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
PDF
Commodity malware means YOU
PDF
BlueHat v17 || Go Hunt: An Automated Approach for Security Alert Validation
PDF
Security Automation Simplified - BSides Austin 2019
PDF
Oracle security 08-oracle network security
PPTX
Logs: Can’t Hate Them, Won’t Love Them: Brief Log Management Class by Anton C...
PDF
Sandbox vs manual malware analysis v1.1
PDF
Introducing ArTHIR - ATT&CK Remote Threat Hunting Incident Response Windows tool
PPTX
Securing Hadoop with OSSEC
PPT
香港六合彩-六合彩
PDF
Chapter 14 sql injection
PPT
Troubleshooting the Windows Installer
PPTX
Splunk Enterprise for Information Security Hands-On Breakout Session
PPTX
Logging tracing and metrics in .NET Core and Azure - dotnetdays 2020
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
Logging for Hackers v1.0
Event log analyzer by me
Securing Windows web servers
Sigma Hall of Fame - EU ATT&CK User Workshop, October 2021
Commodity malware means YOU
BlueHat v17 || Go Hunt: An Automated Approach for Security Alert Validation
Security Automation Simplified - BSides Austin 2019
Oracle security 08-oracle network security
Logs: Can’t Hate Them, Won’t Love Them: Brief Log Management Class by Anton C...
Sandbox vs manual malware analysis v1.1
Introducing ArTHIR - ATT&CK Remote Threat Hunting Incident Response Windows tool
Securing Hadoop with OSSEC
香港六合彩-六合彩
Chapter 14 sql injection
Troubleshooting the Windows Installer
Splunk Enterprise for Information Security Hands-On Breakout Session
Logging tracing and metrics in .NET Core and Azure - dotnetdays 2020
Ad

Viewers also liked (20)

PPTX
Melissa in medicina
PDF
21° giornata e classifica
PPTX
OM_MAO_2012_Jun
PPT
Presentation1 dia de los muertis
PDF
Letter of Recommendation_Splunk
PDF
Nach 40 Jahren kommt die Serialisierung - EurimPharm
DOCX
Proyecto de intr.cientifica
PPT
My holiday in a lifetime.
DOCX
Proyecto final
PPTX
Acqua fonte di vita
PDF
Splunk 6.5.0-pivot tutorial (7)
PPT
123123Presentation1
PDF
Resiliencia y deporte
PDF
2015 Future Book Forum Summary
PPT
Project ψηφιακής 2013
RTF
Kata pengantar, abstrak dan daftar isi
PPT
Logika scientifika 3
PPTX
Acqua fonte di vita
PDF
Data Onboarding
PPTX
Windows OS Architecture in Summery
Melissa in medicina
21° giornata e classifica
OM_MAO_2012_Jun
Presentation1 dia de los muertis
Letter of Recommendation_Splunk
Nach 40 Jahren kommt die Serialisierung - EurimPharm
Proyecto de intr.cientifica
My holiday in a lifetime.
Proyecto final
Acqua fonte di vita
Splunk 6.5.0-pivot tutorial (7)
123123Presentation1
Resiliencia y deporte
2015 Future Book Forum Summary
Project ψηφιακής 2013
Kata pengantar, abstrak dan daftar isi
Logika scientifika 3
Acqua fonte di vita
Data Onboarding
Windows OS Architecture in Summery
Ad

Similar to Windows File Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology (20)

PDF
FileAudit Presentation | Windows File System Auditing
PDF
Proper logging can catch breaches like retail PoS
PDF
Proper logging can catch breaches like retail PoS
PDF
Logs, Logs, Logs - What you need to know to catch a thief
PDF
MW_Arch Fastest_way_to_hunt_on_Windows_v1.01
PDF
Windows Incident Response is hard, but doesn't have to be
PDF
The top 10 windows logs event id's used v1.0
PDF
Finding attacks with these 6 events
DOCX
Managing security settings in windows server with group policy
PDF
Logging for Hackers - What you need to know to catch them
PDF
RMISC logging for hackers
PDF
BP301: Q: What’s Your Second Most Valuable Asset and Nearly Doubles Every Year?
PDF
Logging for hackers SAINTCON
PDF
Ask a Malware Archaeologist
PPT
Vista Forensics
PDF
Windows IR made easier and faster v1.0
PPT
Chetan-Mining_Digital_Evidence_in_Microsoft_Windows
PDF
Mw arch mac_tips and tricks v1.0
PDF
SANS Digital Forensics and Incident Response Poster 2012
PPTX
INVESTIGATE 2.pptx jksjadnkk ksaxka ja axkaka skaxkk
FileAudit Presentation | Windows File System Auditing
Proper logging can catch breaches like retail PoS
Proper logging can catch breaches like retail PoS
Logs, Logs, Logs - What you need to know to catch a thief
MW_Arch Fastest_way_to_hunt_on_Windows_v1.01
Windows Incident Response is hard, but doesn't have to be
The top 10 windows logs event id's used v1.0
Finding attacks with these 6 events
Managing security settings in windows server with group policy
Logging for Hackers - What you need to know to catch them
RMISC logging for hackers
BP301: Q: What’s Your Second Most Valuable Asset and Nearly Doubles Every Year?
Logging for hackers SAINTCON
Ask a Malware Archaeologist
Vista Forensics
Windows IR made easier and faster v1.0
Chetan-Mining_Digital_Evidence_in_Microsoft_Windows
Mw arch mac_tips and tricks v1.0
SANS Digital Forensics and Incident Response Poster 2012
INVESTIGATE 2.pptx jksjadnkk ksaxka ja axkaka skaxkk

More from Michael Gough (20)

PDF
Hacking a backup power solution(s) for your home, Tornado tested!
PDF
Can_We_Really_Detect_These_So_Called_Sophisticated_Attacks?
PDF
My InfoSec journey led me to create my own IR tools, how, and why you should too
PDF
Sophisticated Attacks - Can We Really Detect Them _v1.2.pdf
PPTX
Incident Response Fails
PDF
When Security Tools Fail You
PDF
You need a PROcess to catch running processes and their modules_v2.0
PDF
MITRE AttACK framework it is time you took notice_v1.0
PDF
Detecting WMI Exploitation v1.1
PDF
You can detect PowerShell attacks
PDF
BSidesOK_You_CAN_detect_PowerShell_attacks_v1.1
PDF
Cred stealing emails bsides austin_2018 v1.0
PDF
InnoTech 2017_Defend_Against_Ransomware 3.0
PDF
EDR, ETDR, Next Gen AV is all the rage, so why am I ENRAGED?
PDF
Email keeps getting us pwned - Avoiding Ransomware and malware
PDF
Email keeps getting us pwned v1.1
PDF
DIR ISF - Email keeps getting us pwned v1.1
PDF
Email keeps getting us pwned v1.0
PDF
Sandbox vs manual analysis v2.1
PDF
What can you do about ransomware
Hacking a backup power solution(s) for your home, Tornado tested!
Can_We_Really_Detect_These_So_Called_Sophisticated_Attacks?
My InfoSec journey led me to create my own IR tools, how, and why you should too
Sophisticated Attacks - Can We Really Detect Them _v1.2.pdf
Incident Response Fails
When Security Tools Fail You
You need a PROcess to catch running processes and their modules_v2.0
MITRE AttACK framework it is time you took notice_v1.0
Detecting WMI Exploitation v1.1
You can detect PowerShell attacks
BSidesOK_You_CAN_detect_PowerShell_attacks_v1.1
Cred stealing emails bsides austin_2018 v1.0
InnoTech 2017_Defend_Against_Ransomware 3.0
EDR, ETDR, Next Gen AV is all the rage, so why am I ENRAGED?
Email keeps getting us pwned - Avoiding Ransomware and malware
Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1
Email keeps getting us pwned v1.0
Sandbox vs manual analysis v2.1
What can you do about ransomware

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
August Patch Tuesday
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Hybrid model detection and classification of lung cancer
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
A Presentation on Touch Screen Technology
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Chapter 5: Probability Theory and Statistics
Unlocking AI with Model Context Protocol (MCP)
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Tartificialntelligence_presentation.pptx
Hindi spoken digit analysis for native and non-native speakers
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A comparative study of natural language inference in Swahili using monolingua...
August Patch Tuesday
Heart disease approach using modified random forest and particle swarm optimi...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Programs and apps: productivity, graphics, security and other tools
Web App vs Mobile App What Should You Build First.pdf
Hybrid model detection and classification of lung cancer
Group 1 Presentation -Planning and Decision Making .pptx
A comparative analysis of optical character recognition models for extracting...
A Presentation on Touch Screen Technology
Univ-Connecticut-ChatGPT-Presentaion.pdf
Chapter 5: Probability Theory and Statistics

Windows File Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology

  • 1. Oct 2016 ver 1.2 MalwareArchaeology.com Page 1 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later RESOURCES: Places to get more information 1. MalwareArchaeology.com/cheat-sheets - More Windows cheat sheets and scripts to assist in your audit settings. 2. Log-MD.com – The Log Malicious Discovery tool reads security related log events and settings. Use Log-MD to audit your log settings compared to the “Windows Logging Cheat Sheet” and Center for Internet Security (CIS) to help with configuring your audit policy and refine file and registry auditing. List Event ID 4663 to see what files and folders might be noise and can be removed from your audit policy. 3. technet.microsoft.com – Information on Windows auditing 4. https://msdn.microsoft.com/en-us/library/bb742512.aspx - Using Security Templates to set audit policies 5. Google! – But of course. WHY AUDIT FILES AND FOLDERS: Files are often added or changed by hackers and malware. By auditing key file and folder locations, any additions or changes made by an attacker can be captured in the logs, harvested by a log management solution and potentially alerted on or gathered during an investigation. Building a base configuration for file and folder auditing provides you a great starting point to build upon. As you mature your logging program, you can build upon and develop it as you find new locations that are important to monitor. We recommend as a part of any Information Security program that you implement and practice “Malware Management”. You can read more on what “Malware Management” is and how to begin doing in here:  www.MalwareManagement.com The basic idea of Malware Management is, as you find file and folder locations reported in an incident response firm’s malware analysis, virus/malware reports and your own incidents and investigations, you can expand on the base auditing listed in this cheat sheet and make it more mature and applicable to your specific needs or requirements. This “Windows File Auditing Cheat Sheet” is intended to help you get started with basic and necessary File and Folder Auditing. This cheat sheet includes some very common items that should have auditing enabled, configured, gathered and harvested for any Log Management, Information Security program or other security log gathering solution. Start with these settings and add to the list as you understand better what is in your logs and what you need to monitor and alert on.
  • 2. Oct 2016 ver 1.2 MalwareArchaeology.com Page 2 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later ENABLE AND CONFIGURE:: 1. FILE AUDITING: In order to collect file and folder auditing events (Event ID 4663) you must first apply the settings found in the “Windows Logging Cheat Sheet”. These settings will allow a Windows based system to collect any events on files and folders that have auditing enabled. CONFIGURE: 1. LOCAL LOG SIZE: Increase the maximum size of your local Security log. Proper auditing will increase log data beyond the default settings, your goal should be to keep local security logs for around 7 days.  Security log set to 1GB (1,000,000KB) or larger (yes this is huge compared to defaults) INFORMATION: 1. EVENT ID: There is only one Event ID that will appear in the Security log when file and folder auditing is enabled, 4663.  4663 - An attempt was made to access an object. This is the only Event ID that will record the details of the folder(s) and file(s) created as well as the process name that performed the actions. REFINING AUDITING: When using file and folder auditing, refinement will be needed in order to collect only the entries having actual security value. Enabling folders that have a high rate of changes will fill up your logs causing them to rotate faster than you might want to retain them and miss files you might actually want to catch. In addition, logging more than you need when using a log management solution will have a potential impact to licensing and storage requirements. It is important to test and refine file and folder auditing before applying it across your organization. Use Log-MD to assist you in refining your file and folder audit policy which can be found here:  Log-MD.com If you are examining malware in a lab for example, or doing an incident response investigation, over auditing may be perfectly acceptable. Use the built-in Windows wevtutil.exe utility, PowerShell (get-eventlog), a security log tool like Log- MD or your log management solution to review what is being captured and remove files and folders that are excessively noisy and do not have significant security importance. When setting auditing of files and folders there are some decisions on what to monitor. Using Explorer to select the folder and set the auditing manually, you can see what options there are as seen from the image below. The goal of this cheat sheet is to get you started using file and folder auditing on well-known folders and to enable just enough to provide security value, but not too much as to create a lot of useless noise. What follows is our recommendation to get started which you may tweak and improve as you need. The main goal is to look for things that are newly added by hackers and/or malware. Monitoring for all changes is rather noisy and excess noise could cause you to miss a simple file creation.
  • 3. Oct 2016 ver 1.2 MalwareArchaeology.com Page 3 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later CONFIGURE: Select a Folder or file you want to audit and monitor. Right-Click the Folder, select Permissions – Advanced – Auditing – Add – EVERYONE – (check names), OK. 1. Apply onto – “THIS FOLDER and FILES” or “THIS FOLDER, SUBFOLDERS and FILES” (or what you want/need). 2. Select ‘Create files / write data’, ‘Create folders / append data’, ‘Write extended attributes’, ‘Delete’, ‘Change permissions’ & ‘Take ownership’ to audit. 3. Be careful, setting auditing to ‘This folder, subfolders and files’ as this can generate a lot of data and thus noise. CONFIGURE: These are the only items that are recommended be set to optimize what is needed security wise and keep noise to a minimum. You may expand on these settings as necessary for your environment, but these settings are a good place to start. User:  EVERYONE Applies to:  “This folder, subfolders and files” – Audit all items in this folder and all subfolders OR  “This folder and files” - Audit only the files in this folder and NOT the subfolders Access: Only select these items to keep down on the noise  Create files / write data – File created  Create folders / append data – Folder created  Write extended attributes – Metadata that can be placed in a file  Delete – File is deleted  Change permissions – permissions of a file change  Take ownership – ownership changed
  • 4. Oct 2016 ver 1.2 MalwareArchaeology.com Page 4 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later CONFIGURE: Recommend Folder and Files to enable auditing on 1. FOLDERS TO AUDIT: THIS FOLDER AND FILES ONLY: Do NOT audit subfolders on these directories  C:Program Files  C:Program FilesInternet Explorer  C:Program FilesCommon Files  C:Program Files (x86)  C:Program Files (x86) Common Files  C:ProgramData  C:Windows  C:WindowsSystem32  C:WindowsSystem32Drivers  C:WindowsSystem32Driversetc  C:WindowsSystem32Sysprep  C:WindowsSystem32wbem  C:WindowsSystem32WindowsPowerShellv1.0  C:WindowsWeb  C:WindowsSysWOW64  C:WindowsSysWOW64Drivers  C:WindowsSysWOW64wbem  C:WindowsSysWOW64WindowsPowerShellv1.0 THIS FOLDER, SUBFOLDERS AND FILES:  C:Boot  C:Perflogs  Any Anti-Virus folder(s) used for quarantine, etc.  C:UsersAll UsersMicrosoftWindowsStart MenuProgramsStartup  C:UsersPublic  C:Users*AppDataLocal  C:Users*AppDataLocalTemp  C:Users*AppDataLocalLow  C:Users*AppDataRoaming  C:WindowsScripts  C:WindowsSystem  C:WindowsSystem32GroupPolicyMachineScriptsStartup Consider Scripts if no other dirs  C:WindowsSystem32GroupPolicyMachineScriptsShutdown  C:WindowsSystem32GroupPolicyUserScriptsLogon Consider Scripts if no other dirs  C:WindowsSystem32GroupPolicyUserScriptsLogoff  C:WindowsSystem32Repl Servers only   C:WindowsSystem32Tasks  C:Windowssystem32configsystemprofileAppData  C:WindowssysWOW64sysprep
  • 5. Oct 2016 ver 1.2 MalwareArchaeology.com Page 5 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later CONFIGURE:: EXCLUDE NOISY ITEMS: These folders will create events that do not provide much value. After setting auditing on the parent folder, remove auditing from these folders and any other files and folders you find overly noisy with little security benefit.  C:ProgramDataMicrosoftRACTemp  C:ProgramDataMicrosoftRACPublishedDataRacWmiDatabase.sdf  C:ProgramDataMicrosoftRACStateDataRacDatabase.sdf  C:ProgramData<Anti-Virus>Common Framework Insert your AV folder(s)  C:ProgramDataMicrosoftSearchDataApplicationsWindowsMSS.chk  C:ProgramDataMicrosoftSearchDataApplicationsWindowsMSS.log  C:Users*AppDataLocalGDIPFONTCACHEV1.DAT  C:Users*AppDataLocalGoogleChromeUser Data  C:Users*AppDataLocalMicrosoftWindowsExplorerthumbcache_*  C:Users*AppDataLocalMicrosoftWindowsTemporary Internet FilesContent.IE5  C:Users*AppDataLocalMicrosoftOffice  C:Users*AppDataLocalMicrosoftOutlook  C:Users*AppDataLocalMicrosoftWindowsPowerShellCommandAnalysis  C:Users*AppDataLocalMozillaFirefoxProfiles  C:Users*AppDataLocalLowMicrosoftCryptnetUrlCache  C:Users*AppDataRoamingMicrosoftExcel  C:WindowsSysWOW64configsystemprofileAppDataLocalLowMicrosoftCryptnetUrlCache  Any other normal applications that you have installed that produce a lot of log entries without significant security value. OPTIONS TO SET FILE AUDITING: There are four ways to set file and folder auditing on each folder: 1. Create a security template that is applied using Group Policy and/or secedit. This is the most effective way of doing it for a large amount of systems. a. https://msdn.microsoft.com/en-us/library/bb742512.aspx 2. Set with a PowerShell script. Though this method does not work on certain directories owned by TrustedInstaller and changing the ownership is not recommended 3. Set with a SetACL.exe, a utility by www.helgeklein.com 4. Set manually via Explorer. This does not scale as each system must be set manually, but may be fine for a malware lab or investigation of a single or a few systems. PREFETCH FOLDER AUDITING: Auditing the Windows Prefetch or Superfetch folder is a good forensic addition since it will not generate very much log data. In Win 7 and later with systems with an SSD, it is disabled. Enabling on Servers is an option. Enable the “Superfetch” service on Workstations to Automatic and Start and enable the “EnableSuperfetch” key is set to “3”.  HKLMSystemCurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters
  • 6. Oct 2016 ver 1.2 MalwareArchaeology.com Page 6 of 6 WINDOWS FILE AUDITING CHEAT SHEET - Win 7/Win 2008 or later USING SECURITY TEMPLATES TO SET AND REMOVE FILE AUDITING: The following is how to create a Security template using the Microsoft Management Console (MMC). To create a custom security template using the MMC snap-in: 1. Open the MMC console, choose Start, and then choose Run 2. Type “mmc” in the Open box, and then choose OK 3. From the File menu, choose Add/Remove Snap-in 4. Select Add/Remove Snap-in dialog box, choose Add 5. Select the list of available snap-ins, select Security Templates, choose Add, choose Close, and then choose OK 6. In the MMC main window, under the Console Root node, expand the Security Templates node, right-click the root templates folder, and then choose New Template 7. Type a name and description for the template, and then choose OK 8. Choosing OK saves your template as an .inf file in:  C:Users<username>DocumentsSecurityTemplates  Or you may save them anywhere you would like 9. Add each folder and/or file you want to audit with the appropriate audit settings listed above CHECK THE AUDITING OF A FOLDER OR FILE: 1. To check what the file auditing for a given folder or file is set to, use the following PowerShell script:  Check_Auditing_Settings_File_Folder.ps1 – Check the auditing set on a specific folder or file  Available at www.Malwarearchaeology.com/logging