User Logon

Windows 10

Windows 7

Flynn Weeks

Flynn Weeks

April 21, 2022

Enabled by default

Service: Microsoft Windows security auditing.

Log type: Security

A users login will likely be the first sign of an attack and can indicate suspicious behavior. It can also give an analyst a starting time to create a timeline of events. This log is recquired in the HIPAA and PCI DSS regulations and is recommended by the NSA Event Forwarding Guidance and JPCERT.

Windows 10 Professional does not log this by default. To enable logging of this activity, launch the Group Policy Editor. From here, expand the Windows settings folder and open the Security Settings tab. Finally, expand the Local Policies tab and click to enter the Audit Policy header. In order to turn on login auditing, double click "Audit login events". Clicking the Success box will allow for the auditing of all successful login attempts.

Windows 10 Home does not require login auditing be turned on and is done by default.

To view this log in the Event Viewer, open the event viewer and navigate to the Windows Logs heading and then the Security Tab. From here, select the find function and search for the value 4624 , or filter the log for the ID 4624.

To view this log in the command line with Get-WinEvent, open PowerShell as an administrator. From here, enter the command Get-WinEvent -FilterHashTable @{LogName='Security';ID='4624'} -MaxEvents 1 | Format-List

To view this log in the command line with wevtutil, open PowerShell or Command Prompt as an administrator. From here, enter the commandwevtutil qe Security "/q:*[System [(EventID=4624)]]"

View Logs
Get-WinEvent -FilterHashTable @{LogName='Security';ID='4624'} -MaxEvents 1 | Format-List
Check Logging Status
auditpol /get /subcategory:"logon"
Disable Logging
auditpol /set /subcategory:"logon" /Success:Disable /Failure:Disable
Enable Logging
auditpol /set /subcategory:"logon" /Success:Enable /Failure:Enable
Language: PowerShell
View Log Pile