SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
April 2015 ver 1.3 MalwareArchaeology.com Page 1 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
ENABLE::
1. LOCAL LOG SIZE: Increase the size of your local logs. Don’t
worry you have plenty of disk space, CPU is not an issue
a. Application, Security & System to 32k or larger
b. PowerShell logs too
c. Whatever else you want as well
2. LOCAL SECURITY POLICY: Change Security Options –
“Audit: Force audit policy subcategory settings” to
ENABLE. This sets the system to force use of the
“Advanced Audit Policies”
3. GROUP POLICY: All settings mentioned should be set with
Active Directory Group Policy in order to enforce these
settings enterprise wide. There are cases where the Local
Security Policy would be used.
ENABLE::
1. DNS LOGS: Enable DNS Logging. Capture what DNS
queries are happening.
“systemrootSystem32DnsDns.log”
a. EventID =
2. DHCP LOGS: Add your DHCP Logs –
“%windir%System32Dhcp.” This will allow you to
detect rogue systems on your network that fall
outside your naming convention.
a. EventID = 10 – New IP address was leased
DEFINITIONS::
ENABLE: Things you must do to enable logging to start collecting and keeping events.
CONFIGURE: Configuration that is needed to refine what events you will collect.
GATHER: Tools/Utilities that you can use locally on the system to set or gather log related information – AuditPol,
WEvtUtil, Find, etc.
HARVEST: Events that you would want to harvest into some centralized Event log management solution like syslog, SIEM,
Splunk, etc.
RESOURCES: Places to get information on EventID’s
 www.ultimatewindowssecurity.com/securitylog/encyclopedia/Default.aspx - Better descriptions of Event OD’s
 www.EventID.Net – Most of the Event ID’s
 Google! – But of course
 IIS Error Codes - http://support.microsoft.com/kb/318380 - IIS Error Codes
 http://cryptome.org/2014/01/nsa-windows-event.pdf - Good Article
 http://technet.microsoft.com/en-us/library/dd772712(v=ws.10).aspx – MS Adv Security Audit Policy Descriptions
This “Windows Logging Cheat Sheet” is intended to help you get started setting up
basic and necessary Windows Audit Policy and Logging. By no means is this list
extensive; but it does include some very common items that should be enabled,
configured, gathered and harvested for any Log Management Program. Start with
these settings and add to it as you understand better what is in your logs and what
you need.
April 2015 ver 1.3 MalwareArchaeology.com Page 2 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
Windows Audit Policy settings may be set by the Local Security Policy, Group Policy (preferred) or by
command line using ‘AuditPol.exe’. Be sure to select “Configure the following audit events” box on items
that say “No Audit” or the policy will not apply. Any that are left blank will break the GPO and auditing will
not be applied.
CONFIGURE::
1. SYSTEM AUDIT POLICIES: In order to capture what you
want and need the following Advanced Audit Policies
must be set. You may expand these to your specific
needs, but here is a place to start.
List out the System audit policy
 Command: AuditPol /get /category:*
Category/Subcategory Setting
------------------------------- ------------------------
Account Logon
 Credential Validation Success and Failure
 Kerberos Authentication Service No Auditing
 Kerberos Service Ticket Oper No Auditing
 Other Account Logon Events Success and Failure
Account Management
 Application Group Management Success and Failure
 Computer Account Management Success and Failure
 Distribution Group Management Success and Failure
 Other Acct Management Events Success and Failure
 Security Group Management Success and Failure
 User Account Management Success and Failure
Detailed Tracking
 DPAPI Activity No Auditing
 Process Creation Success and Failure
 Process Termination Success and Failure
 RPC Events Success and Failure
DS Access
 Detailed Directory Service Repl No Auditing
 Directory Service Access No Auditing
 Directory Service Changes Success and Failure
 Directory Service Replication No Auditing
Logon/Logoff
 Account Lockout Success
 IPsec Main Mode No Auditing
 IPsec Quick Mode No Auditing
 IPsec Extended Mode No Auditing
 Logoff Success
 Logon Success and Failure
 Network Policy Server Success and Failure
 Other Logon/Logoff Events Success and Failure
 Special Logon Success and Failure
CONFIGURE::
SYSTEM AUDIT POLICIES: Continued
To set an item:
 Auditpol /set /category:"Account Management"
/success:enable /failure:enable
Category/Subcategory Setting
------------------------------- ------------------------
Object Access
 Application Generated Success and Failure
 Certification Services Success and Failure
 Detailed File Share Success
 File Share Success and Failure
 File System Success
 Filtering Platform Connection Success (Win FW)
 Filtering Platform Packet Drop No Auditing
 Handle Manipulation No Auditing
 Kernel Object Success and Failure
 Other Object Access Events No Auditing
 Registry Success
 SAM No Auditing
Policy Change
 Audit Policy Change Success and Failure
 Authentication Policy Change Success and Failure
 Authorization Policy Change Success and Failure
 Filtering Platform Policy Change Success (Win FW)
 MPSSVC Rule-Level Policy Change No Auditing
 Other Policy Change Events No Auditing
Privilege Use
 Non Sensitive Privilege Use No Auditing
 Other Privilege Use Events No Auditing
 Sensitive Privilege Use Success and Failure
System
 IPsec Driver Success and Failure
 Other System Events Failure
 Security State Change Success and Failure
 Security System Extension Success and Failure
 System Integrity Success and Failure
Global Object Access Auditing – ignore for now
April 2015 ver 1.3 MalwareArchaeology.com Page 3 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
CONFIGURE::
1. FILE AUDIT: Select directories you want to monitor file activity. Right-Click directory – Properties – Security –
Advanced – Auditing – Edit – Add – EVERYONE – (check names), OK -
a. Apply onto – THIS FOLDER ONLY (or what you want)
b. Create file / write data – Successful
c. Create folders / append data - Successful
2. DIRS TO AUDIT:
a. Perflogs b. ProgramData
c. Program Files d. Program Files (x86)
e. Windows f. System
g. System32 h. System32drivers
i. System32Wbem j. UsersPublic*
k. UsersXYZAppDataLocal l. UsersXYZAppDataLocallow
m. UsersXYZAppDataRoaming n. WindowsWeb
Whatever else you want to audit
3. To apply these audit settings it is a by system manual method or you can use PowerShell, subinacls(warning)
4. WEvtUtil: Use this utility to configure your log settings
a. WevtUtil gl Security – List settings of the Security Log
b. WevtUtil sl Security /ms:512000000 – Set the Security Log size to the number of bytes
c. WevtUtil sl Security /rt:false – Overwrite as needed
CONFIGURE::
1. REGISTRY AUDIT: Select Registry Keys you want to monitor changes to. Right-Click a Key – Permissions – Advanced –
Auditing – Add – EVERYONE – (check names), OK.
a. Apply onto – THIS KEY ONLY (or what you want)
b. Select ‘Set Value’, ‘Create Subkey’, ‘Create Link’, ‘Delete’, ‘Write DAC’ & ‘Write Owner’ to start
c. Be careful setting auditing to ‘Keys and subkeys’ as this can generate a lot of data
2. KEYS TO AUDIT:
a. HKCU & HKLMSoftwareMicrosoftWindowsCurrentVersion
i. Run
ii. RunOnce
b. HKLMSystemCurrentControlSet
i. Services (noisy)
c. HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows
i. AppInit_Dlls value
3. REG.EXE: Use this utility to query what is in a Key or the data within a key or value
a. Query a Key and all values - Reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun"
b. Query a value of a Key - Reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun" /v malware
April 2015 ver 1.3 MalwareArchaeology.com Page 4 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
GATHER::
1. AUDITPOL: Use this utility to view your current log settings
a. List all Policies categories: AuditPol /List /Subcategory:*
b. List what is SET: AuditPol /get /category:*
c. List what is SET for a subcategory:
 AuditPol /get /category:"Object Access”
2. Reg.exe: Use this utility to query the registry
a. Changes to AppInit_Dlls - reg query "HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows" /v
AppInit_Dlls
b. Changes to Services Keys - reg query "HKLMSystemCurrentControlSetServices"
c. Changes to Machine Run Key - reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun”
d. Changes to Machine RunOnce Key - reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRunOnce”
e. Changes to User Run Key - reg query "HKCUSoftwareMicrosoftWindowsCurrentVersionRun”
f. Changes to User RunOnce Key - reg query "HKCUSoftwareMicrosoftWindowsCurrentVersionRunOnce”
g.
3. SC.exe: Use this utility to query the services (sc /? For help)
a. List all services in any state – sc.exe query state= all (Note: ‘space’ after the = sign)
b. Look for a specific service – sc.exe query state= all | find /I “telnet”
c. After finding the ‘Display_Name’ then look for the ‘Service_Name’ to get the short name
GATHER::
1. WEvtUtil: Use this utility to query your logs
a. WevtUtil qe Security – query the Security Log for events
i. Lots of flags here so read help “WevtUtil -?”
ii. /c:5 = Read 5 events
iii. /rd:true = newest events first
iv. /f:text = format text, also can do XML
b. Success & Failed Logons - WevtUtil qe Security /q:"*[System[(EventID=4624 or EventID=4625)]]" /c:5 /rd:true
/f:text >Parsed%computername%_Logon_Events_Win7.log
c. User Account Change - WevtUtil qe Security /q:"*[System[(EventID=4738)]]" /c:5 /rd:true /f:text
>ParsedR_%computername%_User_Account_Change_Win7.log
d. New Service Installed - WevtUtil qe Security /q:"*[System[(EventID=7045)]]" /c:5 /rd:true /f:text
>ParsedR_%computername%_New_Service_Installed_Win7.log
e. User Account Changes - wevtutil qe Security /q:"*[System[(EventID=4725 or EventID=4722 or EventID=4723 or
EventID=4724 or EventID=4726 or EventID=4767)]]" /c:10 /f:text
2. Filtering Log Results: Use this method to filter lines within the logs
a. Registry Changed – Find entries with ‘Object Name’ - WevtUtil qe Security /q:"*[System[(EventID=4657)]]" /c:5
/rd:true /f:text |find /i"Object Name"
b. File or Registry Changed – Find entries with ‘Object Name’ - WevtUtil qe Security /q:"*[System[(EventID=4663)]]"
/c:50 /rd:true /f:text |find /i "Object Name"
c. Files – Find new files with ‘Wbem’ - WevtUtil qe Security /q:"*[System[(EventID=4663)]]" /c:50 /rd:true /f:text
|find /i "wbem"
April 2015 ver 1.3 MalwareArchaeology.com Page 5 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
HARVEST::
1. SERVICES: Found in the SYSTEM log
d. 7045 - Message=A service was installed in the system.
e. 7040 - Message=The start type of the XYZ service was changed from auto start to disabled.
f. 7000 - Message=The XYX service failed to start due to the following error: The service did not respond to the start
or control request in a timely fashion.
g. 7022 - Message=The XYZ service hung on starting.
h. 7024 - Message=The XYZ service terminated with service-specific error %%2414.
i. 7031 - Message=The XYZ service terminated unexpectedly. It has done this 1 time(s). The following corrective
action will be taken in 60000 milliseconds: Restart the service.
j. 7034 - Message=The XYZ service terminated unexpectedly. It has done this 1 time(s).
k. 7035 – Service sent a request to Stop or Start
l. 7036 – Service was Started or Stopped
HARVEST::
1. LOG CLEAR: Watch for log clear messages
a. 104 – SYSTEM Log – The Application or System log
was cleared
b. 1102 – SECURITY Log – The audit log was cleared
2. TASKS: Watch for a Process to start and call other
processes
a. 4698 – SECURITY Log – New Task Created
3. DRIVER: Watch for an issue with a driver
a. 40 – Issue with Driver
4. OS VERSION: What OS do machines have
a. 6009 – Lists OS version, Service Pack and processor
type
HARVEST::
1. PROCESSES: Watch for a Process to start and call other
processes
a. 4688 – SECURITY Log – New Process Name, look
for Creator Process ID to link what process
launched what
2. INSTALLER: Watch for the Windows Installer activity
a. 1022 – Windows Installer updated the product
b. 1033 – Windows Installer installed the product
c. 1034 – Windows Installer removed the product
3. WINDOWS UPDATE: Watch for the Windows Update
Agent activity.
a. 18 = Ready, 19 = Installed, 20= Failure
4. WINDOWS TIME: Watch for the Windows Service
synchronization. Make sure your sources are what they
are supposed to be.
a. 35 – Time Service sync status and source
5. APPLICATION ERROR: Watch for application crashes.
a. 1000 – (Application Log) Application Fault
HARVEST::
1. ACCOUNTS: Monitor for attempts to change an account
password
a. 4724 – An attempt was made to reset an accounts
password.
b. 4735 – Local Group changed
c. 4738 – User account password changed
HARVEST::
1. APPLOCKER: Watch for triggers to AppLocker events (8000-
8027)
a. 8004 – Filename not allowed to run
2. SRP: Watch for triggers to Software Restriction Policies
b. 865 – Access to <filename> has been restricted
HARVEST::
1. AUDIT POLICY: Watch for changes to the Audit Policy that
are NOT “SYSTEM”
a. 4719 – System audit policy was changed
April 2015 ver 1.3 MalwareArchaeology.com Page 6 of 6
WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later
HARVEST::
1. NEW FILE ADDED: Watch for the creation of new files.
Requires File auditing of the directory(s) that you want to
monitor
b. 4663 – Accesses: WriteData (or AddFile)
c. GREAT for CryptoWare & Malware drops
HARVEST::
1. REGISTRY: Watch for the creation or modification of new registry keys and values
a. 4657 – Accesses: WriteData (or AddFile)
i. HKLM, HKCU & HKU – SoftwareMicrosoftWindowsCurrentVersion
1. Run, RunOnce
ii. HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows
1. Watch AppInit_Dlls
iii. HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionEMDMgmt
1. Watch Connection time of USB Devices
iv. HKLMSystemCurrentControlSetServices
1. Watch for NEW Services
v. HKLMSYSTEMCurrentControlSetEnumUSBSTOR
1. Watch for NEW USB devices
HARVEST::
2. FIREWALL: Windows Filtering Platform - Watch for
Inbound and Outbound connections – Requires
Windows Firewall to be enabled
a. This is the noisiest of all Events. Generating
easily 9,000 - 10,000 events per hour per system
b. Storage is required to utilize this event
c. 5156 – Message=The Windows Filtering
Platform has permitted a connection. Look for:
i. Direction:, Source Address:, Source
Port:, Destination Address: &
Destination Port:
HARVEST::
1. REGISTRY: Monitor certain Keys for Add, Changes and
Deletes. Setting auditing on the Specific keys is
required.
a. 4657 – A Registry value was modified
HARVEST::
1. EMAIL / VPN: Monitor for failed and successful logins
to your VPN and Webmail application. Consider
emailing user if login is from a new IP not in your
exclude list
a. sc_status=401 – Failed OWA login
b. "reason = Invalid password" – Failed VPN login
- Cisco
HARVEST::
1. LOGON TYPE: Monitor for what type of logons occur
a. 4624 - Message=An account was successfully
logged on.
i. Type 2 – Interactive – GUI
ii. Type 3 – Network – Net Use
iii. Type 4 – Batch
iv. Type 5 – Service
v. Type 7 – Unlock
vi. Type 8 – Network Clear Text
vii. Type 9 – New Credentials (RDP Tools)
viii. Type 10 – Remote Interactive (RDP)
ix. Type 11 – Cached Interactive (laptops)
b. 4625 - Message = An account failed to log on.
HARVEST::
1. SYSTEM INTEGRITY: Watch for files with page images with
bad hashes
a. 6281 – Failed – “page hashes of an image file are
not valid”

More Related Content

PPTX
Threat Hunting with Splunk
PDF
How to Hunt for Lateral Movement on Your Network
PDF
You can detect PowerShell attacks
PDF
Hunting Lateral Movement in Windows Infrastructure
PDF
Finding attacks with these 6 events
PDF
Derbycon - The Unintended Risks of Trusting Active Directory
PPTX
Threat Hunting with Splunk
PDF
PHDays 2018 Threat Hunting Hands-On Lab
Threat Hunting with Splunk
How to Hunt for Lateral Movement on Your Network
You can detect PowerShell attacks
Hunting Lateral Movement in Windows Infrastructure
Finding attacks with these 6 events
Derbycon - The Unintended Risks of Trusting Active Directory
Threat Hunting with Splunk
PHDays 2018 Threat Hunting Hands-On Lab

What's hot (20)

PPTX
Abusing Microsoft Kerberos - Sorry you guys don't get it
PDF
ReCertifying Active Directory
PDF
Windows Threat Hunting
PDF
Threat hunting 101 by Sandeep Singh
PDF
Mobile Application Penetration Testing
PDF
OWASP Top 10 A4 – Insecure Direct Object Reference
PDF
Ace Up the Sleeve
PDF
OWASP Top 10 Web Application Vulnerabilities
PDF
Secure coding presentation Oct 3 2020
PPTX
Threat hunting for Beginners
PDF
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
PPTX
(Ab)Using GPOs for Active Directory Pwnage
PPT
Introduction to Web Application Penetration Testing
PDF
Hunting for Credentials Dumping in Windows Environment
PPTX
OWASP Top Ten 2017
PDF
Threat Hunting Playbook.pdf
PDF
Introduction to red team operations
PDF
MITRE ATT&CK Framework
PPTX
A2 - broken authentication and session management(OWASP thailand chapter Apri...
PDF
Threat Hunting
Abusing Microsoft Kerberos - Sorry you guys don't get it
ReCertifying Active Directory
Windows Threat Hunting
Threat hunting 101 by Sandeep Singh
Mobile Application Penetration Testing
OWASP Top 10 A4 – Insecure Direct Object Reference
Ace Up the Sleeve
OWASP Top 10 Web Application Vulnerabilities
Secure coding presentation Oct 3 2020
Threat hunting for Beginners
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
(Ab)Using GPOs for Active Directory Pwnage
Introduction to Web Application Penetration Testing
Hunting for Credentials Dumping in Windows Environment
OWASP Top Ten 2017
Threat Hunting Playbook.pdf
Introduction to red team operations
MITRE ATT&CK Framework
A2 - broken authentication and session management(OWASP thailand chapter Apri...
Threat Hunting
Ad

Viewers also liked (20)

PDF
Windows 7 forensics -overview-r3
PDF
Disk forensics
PPT
Mac Forensics
PDF
Sleuth kit by echavarro - HABEMUSHACKING
PPTX
Msra 2011 windows7 forensics-troyla
PDF
NTFS file system
PPT
Anti-Forensics: Real world identification, analysis and prevention
PPTX
Windows 8 Forensics & Anti Forensics
PPT
Registry forensics
PPT
Computer Forensics &amp; Windows Registry
PPTX
Social Media Forensics for Investigators
PPT
Windows forensic artifacts
PPT
Part6 Private Sector Concerns
PPTX
OSDF 2013 - Autopsy 3: Extensible Desktop Forensics by Brian Carrier
ODP
Introduction to memory forensics
PDF
Become an Internet Sleuth!
PPTX
Windows 10 Forensics: OS Evidentiary Artefacts
PDF
NTFS Forensics
PPTX
WinFE: The (Almost) Perfect Triage Tool
PDF
Forensic Anaysis on Twitter
Windows 7 forensics -overview-r3
Disk forensics
Mac Forensics
Sleuth kit by echavarro - HABEMUSHACKING
Msra 2011 windows7 forensics-troyla
NTFS file system
Anti-Forensics: Real world identification, analysis and prevention
Windows 8 Forensics & Anti Forensics
Registry forensics
Computer Forensics &amp; Windows Registry
Social Media Forensics for Investigators
Windows forensic artifacts
Part6 Private Sector Concerns
OSDF 2013 - Autopsy 3: Extensible Desktop Forensics by Brian Carrier
Introduction to memory forensics
Become an Internet Sleuth!
Windows 10 Forensics: OS Evidentiary Artefacts
NTFS Forensics
WinFE: The (Almost) Perfect Triage Tool
Forensic Anaysis on Twitter
Ad

Similar to Windows logging cheat sheet (20)

PDF
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
PDF
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
PDF
Windows Registry Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology
PDF
2009-08-24 The Linux Audit Subsystem Deep Dive
PDF
The Linux Audit Framework
PDF
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
PDF
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
PPT
PCD - Process control daemon - Presentation
PDF
Seven steps to better security
PPT
Free tools for win server administration
PPT
Agentless System Crawler - InterConnect 2016
PDF
Merged document
PPTX
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
PDF
CertsOut Checkpoint-156-587 exam dumps pdf
PPT
0828 Windows Server 2008 新安全功能探討
PDF
PPTX
Upgrade to 2008 Best of PASS
PDF
Auditing Data Access in SQL Server
PPTX
3 App Compat Win7
PPT
Bh Win 03 Rileybollefer
Windows Logging Cheat Sheet ver Jan 2016 - MalwareArchaeology
Windows splunk logging cheat sheet Oct 2016 - MalwareArchaeology.com
Windows Registry Auditing Cheat Sheet ver Oct 2016 - MalwareArchaeology
2009-08-24 The Linux Audit Subsystem Deep Dive
The Linux Audit Framework
2015-06-25 Red Hat Summit 2015 - Security Compliance Made Easy
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
PCD - Process control daemon - Presentation
Seven steps to better security
Free tools for win server administration
Agentless System Crawler - InterConnect 2016
Merged document
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
CertsOut Checkpoint-156-587 exam dumps pdf
0828 Windows Server 2008 新安全功能探討
Upgrade to 2008 Best of PASS
Auditing Data Access in SQL Server
3 App Compat Win7
Bh Win 03 Rileybollefer

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
Windows Incident Response is hard, but doesn't have to be
PDF
Introducing ArTHIR - ATT&CK Remote Threat Hunting Incident Response Windows tool
PDF
MITRE AttACK framework it is time you took notice_v1.0
PDF
Detecting WMI Exploitation v1.1
PDF
MW_Arch Fastest_way_to_hunt_on_Windows_v1.01
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
Windows IR made easier and faster v1.0
PDF
DIR ISF - Email keeps getting us pwned v1.1
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
Windows Incident Response is hard, but doesn't have to be
Introducing ArTHIR - ATT&CK Remote Threat Hunting Incident Response Windows tool
MITRE AttACK framework it is time you took notice_v1.0
Detecting WMI Exploitation v1.1
MW_Arch Fastest_way_to_hunt_on_Windows_v1.01
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
Windows IR made easier and faster v1.0
DIR ISF - Email keeps getting us pwned v1.1

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?

Windows logging cheat sheet

  • 1. April 2015 ver 1.3 MalwareArchaeology.com Page 1 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later ENABLE:: 1. LOCAL LOG SIZE: Increase the size of your local logs. Don’t worry you have plenty of disk space, CPU is not an issue a. Application, Security & System to 32k or larger b. PowerShell logs too c. Whatever else you want as well 2. LOCAL SECURITY POLICY: Change Security Options – “Audit: Force audit policy subcategory settings” to ENABLE. This sets the system to force use of the “Advanced Audit Policies” 3. GROUP POLICY: All settings mentioned should be set with Active Directory Group Policy in order to enforce these settings enterprise wide. There are cases where the Local Security Policy would be used. ENABLE:: 1. DNS LOGS: Enable DNS Logging. Capture what DNS queries are happening. “systemrootSystem32DnsDns.log” a. EventID = 2. DHCP LOGS: Add your DHCP Logs – “%windir%System32Dhcp.” This will allow you to detect rogue systems on your network that fall outside your naming convention. a. EventID = 10 – New IP address was leased DEFINITIONS:: ENABLE: Things you must do to enable logging to start collecting and keeping events. CONFIGURE: Configuration that is needed to refine what events you will collect. GATHER: Tools/Utilities that you can use locally on the system to set or gather log related information – AuditPol, WEvtUtil, Find, etc. HARVEST: Events that you would want to harvest into some centralized Event log management solution like syslog, SIEM, Splunk, etc. RESOURCES: Places to get information on EventID’s  www.ultimatewindowssecurity.com/securitylog/encyclopedia/Default.aspx - Better descriptions of Event OD’s  www.EventID.Net – Most of the Event ID’s  Google! – But of course  IIS Error Codes - http://support.microsoft.com/kb/318380 - IIS Error Codes  http://cryptome.org/2014/01/nsa-windows-event.pdf - Good Article  http://technet.microsoft.com/en-us/library/dd772712(v=ws.10).aspx – MS Adv Security Audit Policy Descriptions This “Windows Logging Cheat Sheet” is intended to help you get started setting up basic and necessary Windows Audit Policy and Logging. By no means is this list extensive; but it does include some very common items that should be enabled, configured, gathered and harvested for any Log Management Program. Start with these settings and add to it as you understand better what is in your logs and what you need.
  • 2. April 2015 ver 1.3 MalwareArchaeology.com Page 2 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later Windows Audit Policy settings may be set by the Local Security Policy, Group Policy (preferred) or by command line using ‘AuditPol.exe’. Be sure to select “Configure the following audit events” box on items that say “No Audit” or the policy will not apply. Any that are left blank will break the GPO and auditing will not be applied. CONFIGURE:: 1. SYSTEM AUDIT POLICIES: In order to capture what you want and need the following Advanced Audit Policies must be set. You may expand these to your specific needs, but here is a place to start. List out the System audit policy  Command: AuditPol /get /category:* Category/Subcategory Setting ------------------------------- ------------------------ Account Logon  Credential Validation Success and Failure  Kerberos Authentication Service No Auditing  Kerberos Service Ticket Oper No Auditing  Other Account Logon Events Success and Failure Account Management  Application Group Management Success and Failure  Computer Account Management Success and Failure  Distribution Group Management Success and Failure  Other Acct Management Events Success and Failure  Security Group Management Success and Failure  User Account Management Success and Failure Detailed Tracking  DPAPI Activity No Auditing  Process Creation Success and Failure  Process Termination Success and Failure  RPC Events Success and Failure DS Access  Detailed Directory Service Repl No Auditing  Directory Service Access No Auditing  Directory Service Changes Success and Failure  Directory Service Replication No Auditing Logon/Logoff  Account Lockout Success  IPsec Main Mode No Auditing  IPsec Quick Mode No Auditing  IPsec Extended Mode No Auditing  Logoff Success  Logon Success and Failure  Network Policy Server Success and Failure  Other Logon/Logoff Events Success and Failure  Special Logon Success and Failure CONFIGURE:: SYSTEM AUDIT POLICIES: Continued To set an item:  Auditpol /set /category:"Account Management" /success:enable /failure:enable Category/Subcategory Setting ------------------------------- ------------------------ Object Access  Application Generated Success and Failure  Certification Services Success and Failure  Detailed File Share Success  File Share Success and Failure  File System Success  Filtering Platform Connection Success (Win FW)  Filtering Platform Packet Drop No Auditing  Handle Manipulation No Auditing  Kernel Object Success and Failure  Other Object Access Events No Auditing  Registry Success  SAM No Auditing Policy Change  Audit Policy Change Success and Failure  Authentication Policy Change Success and Failure  Authorization Policy Change Success and Failure  Filtering Platform Policy Change Success (Win FW)  MPSSVC Rule-Level Policy Change No Auditing  Other Policy Change Events No Auditing Privilege Use  Non Sensitive Privilege Use No Auditing  Other Privilege Use Events No Auditing  Sensitive Privilege Use Success and Failure System  IPsec Driver Success and Failure  Other System Events Failure  Security State Change Success and Failure  Security System Extension Success and Failure  System Integrity Success and Failure Global Object Access Auditing – ignore for now
  • 3. April 2015 ver 1.3 MalwareArchaeology.com Page 3 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later CONFIGURE:: 1. FILE AUDIT: Select directories you want to monitor file activity. Right-Click directory – Properties – Security – Advanced – Auditing – Edit – Add – EVERYONE – (check names), OK - a. Apply onto – THIS FOLDER ONLY (or what you want) b. Create file / write data – Successful c. Create folders / append data - Successful 2. DIRS TO AUDIT: a. Perflogs b. ProgramData c. Program Files d. Program Files (x86) e. Windows f. System g. System32 h. System32drivers i. System32Wbem j. UsersPublic* k. UsersXYZAppDataLocal l. UsersXYZAppDataLocallow m. UsersXYZAppDataRoaming n. WindowsWeb Whatever else you want to audit 3. To apply these audit settings it is a by system manual method or you can use PowerShell, subinacls(warning) 4. WEvtUtil: Use this utility to configure your log settings a. WevtUtil gl Security – List settings of the Security Log b. WevtUtil sl Security /ms:512000000 – Set the Security Log size to the number of bytes c. WevtUtil sl Security /rt:false – Overwrite as needed CONFIGURE:: 1. REGISTRY AUDIT: Select Registry Keys you want to monitor changes to. Right-Click a Key – Permissions – Advanced – Auditing – Add – EVERYONE – (check names), OK. a. Apply onto – THIS KEY ONLY (or what you want) b. Select ‘Set Value’, ‘Create Subkey’, ‘Create Link’, ‘Delete’, ‘Write DAC’ & ‘Write Owner’ to start c. Be careful setting auditing to ‘Keys and subkeys’ as this can generate a lot of data 2. KEYS TO AUDIT: a. HKCU & HKLMSoftwareMicrosoftWindowsCurrentVersion i. Run ii. RunOnce b. HKLMSystemCurrentControlSet i. Services (noisy) c. HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows i. AppInit_Dlls value 3. REG.EXE: Use this utility to query what is in a Key or the data within a key or value a. Query a Key and all values - Reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun" b. Query a value of a Key - Reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun" /v malware
  • 4. April 2015 ver 1.3 MalwareArchaeology.com Page 4 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later GATHER:: 1. AUDITPOL: Use this utility to view your current log settings a. List all Policies categories: AuditPol /List /Subcategory:* b. List what is SET: AuditPol /get /category:* c. List what is SET for a subcategory:  AuditPol /get /category:"Object Access” 2. Reg.exe: Use this utility to query the registry a. Changes to AppInit_Dlls - reg query "HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows" /v AppInit_Dlls b. Changes to Services Keys - reg query "HKLMSystemCurrentControlSetServices" c. Changes to Machine Run Key - reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRun” d. Changes to Machine RunOnce Key - reg query "HKLMSoftwareMicrosoftWindowsCurrentVersionRunOnce” e. Changes to User Run Key - reg query "HKCUSoftwareMicrosoftWindowsCurrentVersionRun” f. Changes to User RunOnce Key - reg query "HKCUSoftwareMicrosoftWindowsCurrentVersionRunOnce” g. 3. SC.exe: Use this utility to query the services (sc /? For help) a. List all services in any state – sc.exe query state= all (Note: ‘space’ after the = sign) b. Look for a specific service – sc.exe query state= all | find /I “telnet” c. After finding the ‘Display_Name’ then look for the ‘Service_Name’ to get the short name GATHER:: 1. WEvtUtil: Use this utility to query your logs a. WevtUtil qe Security – query the Security Log for events i. Lots of flags here so read help “WevtUtil -?” ii. /c:5 = Read 5 events iii. /rd:true = newest events first iv. /f:text = format text, also can do XML b. Success & Failed Logons - WevtUtil qe Security /q:"*[System[(EventID=4624 or EventID=4625)]]" /c:5 /rd:true /f:text >Parsed%computername%_Logon_Events_Win7.log c. User Account Change - WevtUtil qe Security /q:"*[System[(EventID=4738)]]" /c:5 /rd:true /f:text >ParsedR_%computername%_User_Account_Change_Win7.log d. New Service Installed - WevtUtil qe Security /q:"*[System[(EventID=7045)]]" /c:5 /rd:true /f:text >ParsedR_%computername%_New_Service_Installed_Win7.log e. User Account Changes - wevtutil qe Security /q:"*[System[(EventID=4725 or EventID=4722 or EventID=4723 or EventID=4724 or EventID=4726 or EventID=4767)]]" /c:10 /f:text 2. Filtering Log Results: Use this method to filter lines within the logs a. Registry Changed – Find entries with ‘Object Name’ - WevtUtil qe Security /q:"*[System[(EventID=4657)]]" /c:5 /rd:true /f:text |find /i"Object Name" b. File or Registry Changed – Find entries with ‘Object Name’ - WevtUtil qe Security /q:"*[System[(EventID=4663)]]" /c:50 /rd:true /f:text |find /i "Object Name" c. Files – Find new files with ‘Wbem’ - WevtUtil qe Security /q:"*[System[(EventID=4663)]]" /c:50 /rd:true /f:text |find /i "wbem"
  • 5. April 2015 ver 1.3 MalwareArchaeology.com Page 5 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later HARVEST:: 1. SERVICES: Found in the SYSTEM log d. 7045 - Message=A service was installed in the system. e. 7040 - Message=The start type of the XYZ service was changed from auto start to disabled. f. 7000 - Message=The XYX service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. g. 7022 - Message=The XYZ service hung on starting. h. 7024 - Message=The XYZ service terminated with service-specific error %%2414. i. 7031 - Message=The XYZ service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service. j. 7034 - Message=The XYZ service terminated unexpectedly. It has done this 1 time(s). k. 7035 – Service sent a request to Stop or Start l. 7036 – Service was Started or Stopped HARVEST:: 1. LOG CLEAR: Watch for log clear messages a. 104 – SYSTEM Log – The Application or System log was cleared b. 1102 – SECURITY Log – The audit log was cleared 2. TASKS: Watch for a Process to start and call other processes a. 4698 – SECURITY Log – New Task Created 3. DRIVER: Watch for an issue with a driver a. 40 – Issue with Driver 4. OS VERSION: What OS do machines have a. 6009 – Lists OS version, Service Pack and processor type HARVEST:: 1. PROCESSES: Watch for a Process to start and call other processes a. 4688 – SECURITY Log – New Process Name, look for Creator Process ID to link what process launched what 2. INSTALLER: Watch for the Windows Installer activity a. 1022 – Windows Installer updated the product b. 1033 – Windows Installer installed the product c. 1034 – Windows Installer removed the product 3. WINDOWS UPDATE: Watch for the Windows Update Agent activity. a. 18 = Ready, 19 = Installed, 20= Failure 4. WINDOWS TIME: Watch for the Windows Service synchronization. Make sure your sources are what they are supposed to be. a. 35 – Time Service sync status and source 5. APPLICATION ERROR: Watch for application crashes. a. 1000 – (Application Log) Application Fault HARVEST:: 1. ACCOUNTS: Monitor for attempts to change an account password a. 4724 – An attempt was made to reset an accounts password. b. 4735 – Local Group changed c. 4738 – User account password changed HARVEST:: 1. APPLOCKER: Watch for triggers to AppLocker events (8000- 8027) a. 8004 – Filename not allowed to run 2. SRP: Watch for triggers to Software Restriction Policies b. 865 – Access to <filename> has been restricted HARVEST:: 1. AUDIT POLICY: Watch for changes to the Audit Policy that are NOT “SYSTEM” a. 4719 – System audit policy was changed
  • 6. April 2015 ver 1.3 MalwareArchaeology.com Page 6 of 6 WINDOWS LOGGING CHEAT SHEET - Win 7/Win 2008 or later HARVEST:: 1. NEW FILE ADDED: Watch for the creation of new files. Requires File auditing of the directory(s) that you want to monitor b. 4663 – Accesses: WriteData (or AddFile) c. GREAT for CryptoWare & Malware drops HARVEST:: 1. REGISTRY: Watch for the creation or modification of new registry keys and values a. 4657 – Accesses: WriteData (or AddFile) i. HKLM, HKCU & HKU – SoftwareMicrosoftWindowsCurrentVersion 1. Run, RunOnce ii. HKLMSoftwareMicrosoftWindows NTCurrentVersionWindows 1. Watch AppInit_Dlls iii. HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionEMDMgmt 1. Watch Connection time of USB Devices iv. HKLMSystemCurrentControlSetServices 1. Watch for NEW Services v. HKLMSYSTEMCurrentControlSetEnumUSBSTOR 1. Watch for NEW USB devices HARVEST:: 2. FIREWALL: Windows Filtering Platform - Watch for Inbound and Outbound connections – Requires Windows Firewall to be enabled a. This is the noisiest of all Events. Generating easily 9,000 - 10,000 events per hour per system b. Storage is required to utilize this event c. 5156 – Message=The Windows Filtering Platform has permitted a connection. Look for: i. Direction:, Source Address:, Source Port:, Destination Address: & Destination Port: HARVEST:: 1. REGISTRY: Monitor certain Keys for Add, Changes and Deletes. Setting auditing on the Specific keys is required. a. 4657 – A Registry value was modified HARVEST:: 1. EMAIL / VPN: Monitor for failed and successful logins to your VPN and Webmail application. Consider emailing user if login is from a new IP not in your exclude list a. sc_status=401 – Failed OWA login b. "reason = Invalid password" – Failed VPN login - Cisco HARVEST:: 1. LOGON TYPE: Monitor for what type of logons occur a. 4624 - Message=An account was successfully logged on. i. Type 2 – Interactive – GUI ii. Type 3 – Network – Net Use iii. Type 4 – Batch iv. Type 5 – Service v. Type 7 – Unlock vi. Type 8 – Network Clear Text vii. Type 9 – New Credentials (RDP Tools) viii. Type 10 – Remote Interactive (RDP) ix. Type 11 – Cached Interactive (laptops) b. 4625 - Message = An account failed to log on. HARVEST:: 1. SYSTEM INTEGRITY: Watch for files with page images with bad hashes a. 6281 – Failed – “page hashes of an image file are not valid”