Study guide

11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing

Computer Hacking Forensic Investigator CHFI 312-49

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Foundations of Digital Forensics & Cybercrime Investigation

1.1 Cybercrime Classifications, Forensic Science Principles & Legal Admissibility 1.2 RFC 3227 Order of Volatility, Live vs. Dead Acquisition & Forensic Readiness 1.3 Indicators of Compromise (IoCs), Cyber Attribution & Threat Intelligence 1.4 AI-Assisted Forensics, GitOps, Automation/Orchestration & Forensics-as-a-Service (FaaS)

2 Chapter 2: Modern Forensic Environments & Emerging Threats

2.1 Fileless Malware, In-Memory Execution & Living-off-the-Land (LotL) 2.2 IoT & Operational Technology (OT/SCADA) Forensic Fundamentals 2.3 Dark Web, Tor Network, Onion Routing & Hidden Services Forensics 2.4 Blockchain Transactions, Cryptocurrency Tracing & Digital Asset Investigations

3 Chapter 3: Legal Frameworks, Search Warrants & Evidence Rules

3.1 Federal Rules of Evidence (FRE 702, 901, 902, 1001-1003) & Daubert/Frye Standards 3.2 Fourth Amendment, Warrant Exceptions, Workplace Search & Consent Protocols 3.3 International Standards: ISO/IEC 27037, ACPO Principles & ENFSI Guidelines 3.4 Cybercrime Statutes, Privacy Compliance, CAN-SPAM & International Cooperation

4 Chapter 4: eDiscovery, Chain of Custody & Professional Ethics

4.1 Electronic Discovery Reference Model (EDRM) & Legal Spoliation Holds 4.2 Chain of Custody Documentation, Evidence Packaging & Tamper-Evident Handling 4.3 Expert Witness Testimony, Report Writing Standards & EC-Council Code of Ethics

5 Chapter 5: Storage Architecture, Boot Sequences & Media Forensics

5.1 Storage Media Architecture: Sectors, Clusters, RAM/File Slack & Unallocated Space 5.2 Partition Tables & Boot Structures: MBR, GPT, VBR, BIOS vs. UEFI Secure Boot 5.3 RAID Reconstruction (RAID 0, 1, 5, 6, 10) & SSD Forensic Challenges (TRIM, Wear Leveling)

6 Chapter 6: Windows File Systems: NTFS & FAT

6.1 NTFS Architecture: Master File Table ($MFT) Record Structure & Attribute Headers 6.2 NTFS Artifacts: Alternate Data Streams (ADS), Volume Shadow Copies (VSS) & $LogFile 6.3 FAT12/16/32 and exFAT Architecture, Directory Entries & File Deletion Mechanics

7 Chapter 7: Non-Windows File Systems & File Signatures

7.1 Linux File Systems: ext2/ext3/ext4 Inode Architecture, Superblocks & Journaling Forensics 7.2 macOS File Systems: HFS+ and Apple File System (APFS) Architecture & Snapshots 7.3 File Signatures, Magic Bytes, Hex Headers/Footers & File Carving Techniques

8 Chapter 8: Investigation Lifecycle, Lab Setup & First Response

8.1 Forensic Laboratory Accreditation: ISO/IEC 17025 Standards & Hardware/Software Controls 8.2 First Responder Duties: Crime Scene Containment, Electronic Triage & Volatile Triage 8.3 Physical Evidence Packaging, Anti-Static/Faraday Protection & Transport Security

9 Chapter 9: Forensic Acquisition & Verification Methodology

9.1 Hardware and Software Write-Blockers: Operational Validation & Bridge Verification 9.2 Bit-Stream Disk Imaging, Physical vs. Logical vs. Targeted Acquisition Methodology 9.3 Forensic Image Formats (RAW/DD, E01, AFF) & Cryptographic Hashing Verification (MD5, SHA-256)

10 Chapter 10: Anti-Forensics Techniques & Countermeasures

10.1 Steganography Detection: Spatial/Frequency Domain Steganalysis & Hidden Carrier Extraction 10.2 Timestomping Countermeasures: Comparing $STANDARD_INFORMATION vs $FILE_NAME Timestamps 10.3 Secure Wiping, Degaussing, File Shredding Countermeasures & Residual Artifact Recovery

11 Chapter 11: Windows Operating System Forensics

11.1 Windows Registry Forensics: SYSTEM, SOFTWARE, SAM & NTUSER.DAT Hive Analysis 11.2 Execution Artifacts: Prefetch (.pf), Shimcache (AppCompatCache), Amcache.hve & UserAssist 11.3 User Activity Artifacts: ShellBags, LNK Shortcut Files, Jump Lists & Recycle Bin ($I/$R) 11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing

12 Chapter 12: Memory Forensics & Malware Analysis

12.1 Volatile Memory Acquisition: RAM Capture, Crash Dumps, Hiberfil.sys & Pagefile.sys 12.2 Memory Analysis with Volatility 3: pslist, pstree, malfind, netscan & Vadinfo 12.3 Static Malware Triage: Strings, PE Headers, Import Tables, Hashes & YARA Rule Matching 12.4 Dynamic Malware Analysis: Sandboxing, Process Monitor (Procmon), Regshot & Network Callouts 12.5 .NET Managed Malware Analysis & the GOOTLOADER Fileless Infection Chain

13 Chapter 13: Network, Web Application & Email Forensics

13.1 Network Forensics: PCAP Analysis, Protocol Dissection, Snort/Suricata & Flow Analysis 13.2 Web Server Forensics: Apache/IIS Access Logs, SQL Injection, XSS & Web Shell Detection 13.3 Email Forensics: RFC 5322 Headers, Authentication (SPF, DKIM, DMARC) & Mbox/PST Extraction 13.4 SIEM Event Correlation, Cross-Source Timeline Analysis & Super-Timeline Construction 13.5 Investigating Directory Traversal, Command Injection, Parameter Tampering, XXE, Cookie Poisoning & Brute Force 13.6 Network Device & Service Log Forensics: Firewall, IDS, Honeypot, Router, DHCP, Switch, VPN, DNS & SSH 13.7 Wireless Network Forensics: Rogue APs, Evil Twins, MAC Spoofing, Deauthentication & Jamming

14 Chapter 14: Mobile, Cloud & IoT Forensics

14.1 Mobile Device Forensics: Manual, Logical, File System & Physical Extraction (Android/iOS) 14.2 Mobile Artifact Analysis: Call Logs, SMS/Chat SQLite Databases, Location Data & Plists 14.3 Cloud Forensics: AWS CloudTrail, Azure Activity Logs & Multi-Tenant Evidence Collection 14.4 IoT Forensics: UART/JTAG Physical Interfaces, Firmware Extraction & Sensor Telemetry

15 Chapter 15: Commercial & Open-Source Forensic Suites

15.1 Commercial Forensic Platforms: EnCase Forensic, FTK (Forensic Toolkit) & FTK Imager 15.2 Open-Source Forensic Platforms: Autopsy, The Sleuth Kit (TSK) & SIFT/CAINE Workstations 15.3 Specialized DFIR Utilities: Eric Zimmerman Tools (EZ Tools) & Sysinternals Forensic Suite

16 Chapter 16: Analysis Toolkits, Python Scripting & Tool Validation

16.1 Reverse Engineering & Password Cracking: Ghidra, IDA Pro, Hashcat & John the Ripper 16.2 Python for Digital Forensics: Parsing Raw Artifacts, Custom Scapy Scripts & Evidence Automation 16.3 Forensic Tool Testing & Validation: NIST CFTT Methodology, ISO/IEC 17025 Standards & Daubert Compliance

17 Chapter 17: Database Forensics & Web Application Firewalls

17.1 MySQL Forensics: Internal Architecture, Data Directory, Information Schema & Utility Programs 17.2 SQL Server Forensics: SSMS, ApexSQL, SQLCMD Transaction-Log Collection, Plan Cache & Trace Files 17.3 Web Application Firewall (WAF) Architecture, Audit Logs, Benefits & Limitations

18 Chapter 18: Social, Virtualized, Multimedia & Browser Investigations

18.1 Social Media, Social Engineering, Insider Threat & Identity Theft Forensics 18.2 Virtualization, Container & Microservices Forensics, Bluetooth and Electron Chat Applications 18.3 Multimedia Forensics: Image, Audio & Video Authentication, EXIF, PRNU and Deepfake Detection 18.4 Browser Artifact Recovery, Private Browsing, USB Enumeration, Partition Recovery & Packer Unpacking Tools

11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing

Key Takeaways Explain This Topic AI

Windows Event Logs utilize the binary XML (.evtx) architecture, structured into 64 KB self-contained chunks (ElfChnk) with string tables and tokenized templates, enabling record carving from unallocated space.

Event ID 4624 records successful logons; Logon Types differentiate access vectors including Type 2 (Interactive/Console), Type 3 (Network/SMB/PsExec), Type 9 (NewCredentials/RunAs), and Type 10 (RemoteInteractive/RDP).

Event ID 4625 captures failed logons; Substatus codes distinguish username enumeration (0xC0000064 - User does not exist) from password spraying and brute force attacks (0xC000006A - Valid user, wrong password).

Event ID 4688 records process creation, capturing exact command-line parameters, token elevation states, and parent process trees essential for detecting living-off-the-land techniques.

System Event ID 7045 exposes persistence and lateral movement by logging newly installed services (including PsExec PSEXESVC.exe and malicious drivers), while Security Event ID 1102 detects anti-forensic log clearance.

Last updated: September 2026

11.4 Windows Event Log Forensics: Security Audit IDs (4624, 4625, 4688, 4720, 7045) & EVTX Parsing

Quick Answer: Windows Event Logs ( %SystemRoot%\System32\Winevt\Logs\ ) are stored in binary XML ( .evtx ) format, arranged in 64 KB chunks ( ElfChnk ) with independent string and template tables that facilitate forensic carving from unallocated space. Key security audit events include Event ID 4624 (Successful Logon), where Logon Types differentiate console access ( Type 2 ), SMB/PsExec network pivots ( Type 3 ), and RDP sessions ( Type 10 ). Event ID 4625 tracks failed logons, utilizing Substatus codes like 0xC0000064 (unknown username) and 0xC000006A (valid user, incorrect password) to pinpoint password spraying. Event ID 4688 records process creation with complete command-line strings and parent process IDs. Finally, Event ID 7045 in System.evtx flags newly installed services (critical for catching persistence and lateral movement like PsExec's PSEXESVC.exe ), while Event ID 1102 alerts on audit log clearing.

Windows Event Log Architecture (.evtx)

Introduced in Windows Vista and Windows Server 2008, the Windows Event Log subsystem replaced the legacy binary .evt architecture with the structured binary XML .evtx format. Understanding the underlying file layout is critical when carving deleted logs or handling file corruption.

EVTX Binary File Structure

Event logs are stored in %SystemRoot%\System32\Winevt\Logs\ (e.g., C:\Windows\System32\Winevt\Logs\Security.evtx ). The binary structure consists of a single File Header followed by a continuous series of self-contained 64 KB Chunks : +-------------------------------------------------------------------------+

  • | EVTX BINARY FILE ARCHITECTURE |
  • +-------------------------------------------------------------------------+
  • | File Header (4,096 bytes) |
  • | • Magic Signature: "ElfFile\x00" (0x45 0x6C 0x66 0x46 0x69 0x6C...) |
  • | • First Chunk Number / Last Chunk Number |
  • | • Next Record Identifier |
  • | • Header Checksum & File Status Flags |
  • +-------------------------------------------------------------------------+
  • | Chunk 0 (65,536 bytes - 64 KB) |
  • | • Chunk Header: Magic "ElfChnk\x00" |
  • | • First Event Record Number / Last Event Record Number |
  • | • String Tables (Offset pointers to commonly repeated string tokens) |
  • | • Template Tables (Tokenized binary XML schema definitions) |
  • | • Event Records Array (Variable length binary XML event records) |
  • | • Chunk Checksum |
  • +-------------------------------------------------------------------------+
  • | Chunk 1 (65,536 bytes - 64 KB) |
  • | • [Self-contained ElfChnk structure...] |
  • +-------------------------------------------------------------------------+
  • Forensic Carving Advantage of the 64 KB Chunk Model

In legacy .evt files, records relied heavily on global headers. In modern .evtx files, each 64 KB chunk ( ElfChnk ) is completely self-contained :

It houses its own string table, template definitions, and record indexing.

Forensic Implication: If an adversary clears an event log or runs anti-forensic tools to truncate .evtx files, examiners can scan raw unallocated disk clusters or Volume Shadow Copies for the magic signature ElfChnk\x00 . Even if the primary file header is destroyed, carved individual chunks can be fully parsed and reconstructed into coherent event records.

Legacy .evt Structures: ELF_LOGFILE_HEADER, EVENTLOGRECORD and ELF_EOF_RECORD

Pre-Vista hosts — and the archived .evt exports that organizations still retain for retention compliance — use a completely different layout, and the blueprint names its three structures explicitly. A legacy event log is a fixed-size circular file built from a header, a run of event records, and an end-of-file record.

1. ELF_LOGFILE_HEADER — always 0x30 (48) bytes.

  • Field Size Forensic meaning
  • HeaderSize / EndHeaderSize 4 bytes each Both always 0x30 ; a mismatch signals truncation or tampering

Signature 4 bytes Always 0x654C664C (ASCII eLfL ); stored little-endian, so the bytes on disk read 4C 66 4C 65 = LfLe , the string carvers search for

  • MajorVersion / MinorVersion 4 bytes each Both always 1
  • StartOffset 4 bytes Offset to the oldest record
  • EndOffset 4 bytes Offset to the ELF_EOF_RECORD
  • CurrentRecordNumber 4 bytes Number of the next record to be written
  • OldestRecordNumber 4 bytes 0 when the file is empty

MaxSize / Retention 4 bytes each Written at creation from the Eventlog registry key; the service does not normally refresh them

Flags 4 bytes Log status — see below

The Flags field carries four status bits that matter in an investigation:

ELF_LOGFILE_HEADER_DIRTY ( 0x0001 ) — records were written but the log was never cleanly closed. The service sets this bit before the first write and clears it only at an orderly shutdown, so a dirty flag is the artifact of a crash, a hard power pull, or a log pulled from a running machine. Critically, the service resynchronizes a live log that is dirty but treats a backup log with the dirty bit as corrupt and refuses to open it — a routine cause of "the tool will not load my .evt " during examination.

ELF_LOGFILE_HEADER_WRAP ( 0x0002 ) — the records have wrapped, so the file no longer begins at record 1.

ELF_LOGFILE_LOGFULL_WRITTEN ( 0x0004 ) — the last write failed for want of space; a burst of events was lost, which matters when an examiner argues about a gap in the timeline.

ELF_LOGFILE_ARCHIVE_SET ( 0x0008 ) — the file's archive attribute is set.

2. EVENTLOGRECORD — fixed portion 0x38 (56) bytes, then variable data.

The fixed portion is Length , Reserved , RecordNumber , TimeGenerated , TimeWritten , EventID , EventType , NumStrings , EventCategory , ReservedFlags , ClosingRecordNumber , StringOffset , UserSidLength , UserSidOffset , DataLength , and DataOffset . It is followed by SourceName , Computername , UserSid , the replacement Strings , the event-specific Data , DWORD alignment padding, and a second copy of Length . Three details are examinable:

Reserved holds the same 0x654C664C ( eLfL ) signature as the file header, so every record is independently carvable from unallocated space.

Length is stored at both ends of the record , which is what lets a parser walk the log forward or backward and lets a carver validate a candidate record by checking that the leading and trailing sizes agree.

TimeGenerated and TimeWritten are 32-bit counts of seconds since 1 January 1970 UTC — Unix epoch seconds, not the 64-bit 100-nanosecond FILETIME used by modern .evtx . Feeding a legacy value into a FILETIME converter throws the timestamp into the 17th century; it is the most common conversion error on mixed-era evidence.

EventType is a bit value: 0x0001 Error, 0x0002 Warning, 0x0004 Information, 0x0008 Success Audit , 0x0010 Failure Audit . The last two carry the authentication story in a legacy log.

3. ELF_EOF_RECORD — always 0x28 (40) bytes.

It sits immediately after the newest record and exists so the service can rebuild a damaged header. RecordSizeBeginning and RecordSizeEnd are both 0x28 , and four fixed identifiers — 0x11111111 , 0x22222222 , 0x33333333 , 0x44444444 — make the structure trivially greppable in a hex editor. It also repeats BeginRecord (offset of the oldest record), EndRecord (offset of the structure itself), CurrentRecordNumber , and OldestRecordNumber , which is how an examiner recovers the true record range when the header is zeroed.

Organization of Event Records: Wrapping vs. Non-Wrapping

A fresh or freshly cleared .evt is non-wrapping : header, record 1, record 2, …, EOF record. Once the log reaches MaxSize , retention settings may turn it into a circular buffer , and the layout becomes discontinuous — the oldest surviving record may be number 102 because the space holding records 1–101 was reclaimed. Two consequences show up in casework:

The system frees an integral number of whole records to make room, so a slice of wasted space sits between the EOF record and the oldest record. That gap is unallocated log space and frequently still holds parsable fragments of purged records.

A record that reaches the physical end of the file is split in two , with the remainder written immediately after the header. If fewer than 0x38 bytes remain — less than the fixed EVENTLOGRECORD portion — the whole record is written at the beginning instead, and the leftover tail bytes are padded with the repeating pattern 0x00000027 . Seeing that filler pattern is positive confirmation that the log wrapped rather than being truncated by a wiper.

Security Audit Forensics: Logon & Authentication

Authentication events within Security.evtx establish the timeline, origin, identity, and method of actor access.

Event ID 4624: Successful Logon

Logged whenever an account successfully authenticates to the host. Crucial fields include:

TargetUserName / TargetUserSid : The identity of the authenticated user.

TargetDomainName : Domain or local computer name.

LogonProcessName : Subsystem handling the logon (e.g., User32 , Advapi , Kerberos , NtLmSsp ).

AuthenticationPackageName : Protocol used ( Negotiate , Kerberos , NTLM ).

WorkstationName : NetBIOS name of the initiating endpoint.

IpAddress & IpPort : Source IP address and ephemeral source port.

TargetLogonId : Unique 64-bit Locally Unique Identifier (LUID) assigned to the logon session. Used to correlate with subsequent logoff events.

The Critical Logon Types

The LogonType numerical field reveals the exact vector through which the session was established: +-------------------------------------------------------------------------+

  • | WINDOWS LOGON TYPES MATRIX (EVENT 4624) |
  • +-------------------------------------------------------------------------+
  • | Type | Name | Description & Forensic Context |
  • |------|---------------------|--------------------------------------------|
  • | **2**| Interactive | Physical console logon (user typed credentials|
  • | | | at physical keyboard or local virtualized |
  • | | | console). |
  • | **3**| Network | Remote network connection (e.g., SMB file |
  • | | | share access, RPC, PsExec remote execution, |
  • | | | WMI execution). Normal for file servers. |
  • | **4**| Batch | Scheduled task execution or batch process |
  • | | | running under assigned service credentials.|
  • | **5**| Service | Service Control Manager (SCM) launching a |
  • | | | registered background Windows service. |
  • | **7**| Unlock | Workstation unlocked (user entered password|
  • | | | to dismiss a locked screen saver). |
  • | **8**| NetworkCleartext | Network logon with plaintext credentials |
  • | | | (e.g., IIS Basic Authentication). |
  • | **9**| NewCredentials | RunAs /netonly or Cobalt Strike make_token |
  • | | | (local token clones caller, outbound uses |
  • | | | alternate credentials). |
  • |**10**| RemoteInteractive | Remote Desktop Protocol (RDP), Terminal |
  • | | | Services, or Remote Assistance sessions. |
  • |**11**| CachedInteractive | Interactive console logon using cached |
  • | | | domain credentials while disconnected from |
  • | | | the Active Directory Domain Controller. |
  • +-------------------------------------------------------------------------+
  • Event ID 4625: Failed Logon & Substatus Attack Profiling

Logged whenever an authentication attempt fails. The FailureReason , Status , and Substatus NTSTATUS hexadecimal codes reveal the exact cause of failure: +-------------------------------------------------------------------------+

  • | FAILED LOGON SUBSTATUS CODES (EVENT 4625) |
  • +-------------------------------------------------------------------------+
  • | Substatus Code | NTSTATUS Name | Forensic Interpretation |
  • |----------------|-----------------------------|--------------------------|
  • | **0xC0000064** | STATUS_NO_SUCH_USER | The specified username |
  • | | | does not exist. Indicates|
  • | | | account enumeration. |
  • | **0xC000006A** | STATUS_WRONG_PASSWORD | The username is valid, |
  • | | | but password was wrong. |
  • | **0xC000006D** | STATUS_LOGON_FAILURE | General bad credentials |
  • | | | or unknown auth package. |
  • | **0xC000006E** | STATUS_ACCOUNT_RESTRICTION | Account restriction |
  • | | | (e.g., unauthorized hours|
  • | | | or workstation rules). |
  • | **0xC0000072** | STATUS_ACCOUNT_DISABLED | Attempt to authenticate |
  • | | | to a disabled account. |
  • | **0xC0000193** | STATUS_ACCOUNT_EXPIRED | Account has expired. |
  • | **0xC0000234** | STATUS_ACCOUNT_LOCKED_OUT | Account was locked out |
  • | | | due to failed attempts. |
  • +-------------------------------------------------------------------------+
  • Differentiating Brute Force vs. Password Spraying

Targeted Brute Force: A single TargetUserName associated with thousands of Event 4625 records occurring within minutes, all exhibiting Substatus 0xC000006A (valid user, wrong password), culminating in 0xC0000234 (Account Locked Out).

Password Spraying: Hundreds of different TargetUserName entries each registering only 1 or 2 failed Event 4625 attempts every few hours from the same IpAddress , deliberately staying beneath account lockout thresholds.

Session Duration Tracking: Event IDs 4634 & 4647

Event 4634: An account was logged off.

Event 4647: User-initiated logoff (user clicked Start -> Sign Out).

Timeline Reconstruction: Correlating the TargetLogonId (e.g., 0x00000000:0x4E2B1 ) from Event 4624 to the identical TargetLogonId in Event 4634 establishes the exact start, duration, and termination of the interactive session.

Process Creation Auditing: Event ID 4688

Event ID 4688 is logged in Security.evtx whenever a new process is spawned. However, the standard default configuration records only the executable path. High-maturity forensic environments enable Command-Line Auditing via Group Policy: Computer Configuration -> Administrative Templates -> System -> Audit Process Creation -> Include command line in process creation events .

Crucial Fields in Event 4688

NewProcessName : Full path of the newly spawned process (e.g., C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ).

CommandLine : The exact command-line string, arguments, flags, and obfuscated payloads passed to the process: powershell.exe -ExecutionPolicy Bypass -NoProfile -EncodedCommand JABjAGwAaQBl...

CreatorProcessName / ParentProcessName : Path of the process that spawned the new process.

ProcessId & ProcessId (New): Process Identifier (PID) in hexadecimal format.

SubjectUserName / SubjectUserSid : Identity of the user whose token was used.

TokenElevationType :

Type 1 (Default) : Full token without elevation splitting (standard user or UAC disabled).

Type 2 (Full) : Elevated administrator process running with administrative rights.

Type 3 (Limited) : Process running with filtered, restricted token under UAC.

Detecting Process Anomalies & LOTL Attacks

Command-line auditing enables detection of malicious process tree hierarchies:

winword.exe or excel.exe spawning cmd.exe or powershell.exe (classic macro/document exploit).

w3wp.exe (IIS Web Server) spawning cmd.exe or whoami.exe (web shell execution).

Native system utilities ( certutil.exe , bitsadmin.exe , mshta.exe ) making outbound network requests.

Account Management Auditing (4720, 4726, 4728, 4732)

Adversaries create rogue accounts and modify group memberships to establish persistent, elevated access. +-------------------------------------------------------------------------+

  • | CORE ACCOUNT MANAGEMENT EVENT IDs |
  • +-------------------------------------------------------------------------+
  • | Event ID | Event Description |
  • |----------|--------------------------------------------------------------|
  • | **4720** | A user account was created (Records TargetUserName, Creator) |
  • | **4722** | A user account was enabled |
  • | **4724** | An attempt was made to reset an account's password |
  • | **4726** | A user account was deleted |
  • | **4728** | A member was added to a security-enabled global group |
  • | **4732** | A member was added to a security-enabled local group (e.g., |
  • | | adding an account to Administrators, SID S-1-5-32-544) |
  • | **4738** | A user account was modified |
  • +-------------------------------------------------------------------------+

When investigating Event ID 4720, always cross-reference SubjectUserName (who created the rogue account) with TargetUserName (the newly created account) to establish initial compromise attribution.

System & Service Events: Event ID 7045 & Anti-Forensics

While user authentication and process creation reside in Security.evtx , service installations and log manipulations reside in System.evtx .

Event ID 7045: A New Service Was Installed

Logged in System.evtx by the Service Control Manager whenever a new Windows service is registered.

Threat Relevance: Primary indicator of persistence, privilege escalation, and lateral movement.

PsExec: When Sysinternals PsExec pivots across a network, it remotely writes a binary to ADMIN$ and registers a temporary service named PSEXESVC .

Malware Persistence: Ransomware and backdoors frequently establish persistent services.

Crucial Fields in 7045:

ServiceName : Name of the registered service (e.g., PSEXESVC or MaliciousBackdoor ).

ServiceFileName : Image path, including binary location and command-line execution parameters.

ServiceType : user mode service or kernel driver (identifies rootkit installation).

StartType : Auto Start , Demand Start , or Disabled .

ServiceAccount : The account context assigned to run the service (typically LocalSystem ).

Anti-Forensics: Event Log Clearance Detection

When an adversary attempts to conceal their actions by purging event logs, Windows records immutable clearing events in the newly initialized log:

Event ID 1102 (Security.evtx): "The audit log was cleared."

Captures SubjectUserName , SubjectUserSid , SubjectDomainName , and SubjectLogonId of the actor who cleared the Security log.

Event ID 104 (System.evtx): "The log file was cleared."

Logged when the System log, Application log, or custom operational channels are wiped.

Caution

The presence of Event ID 1102 or 104 without an approved change control ticket is a high-confidence indicator of active adversary containment evasion or anti-forensic activity.

Modern Event Log Analysis Tools & Automation

Parsing gigabytes of EVTX records manually is impossible during active incidents. Forensic analysts leverage purpose-built automation suites: # 1. Parsing EVTX with Eric Zimmerman's EvtxECmd

EvtxECmd.exe -d "C:\Windows\System32\Winevt\Logs" --csv "C:\Cases\EVTX_Parsed" --inc 4624,4625,4688,7045,1102

  • # 2. Querying Live EVTX via PowerShell Get-WinEvent (High Performance FilterHashtable)
  • Get-WinEvent -FilterHashtable @{
  • LogName = 'Security'
  • Id = 4625
  • StartTime = (Get-Date).AddDays(-7)
  • } | Select-Object TimeCreated, Id, Message | Export-Csv -Path C:\Cases\FailedLogons.csv
  • # 3. High-Speed Threat Hunting with Hayabusa (Sigma Rule EVTX Engine)
  • hayabusa.exe search-timeline -d "C:\Windows\System32\Winevt\Logs" -o C:\Cases\hayabusa_timeline.csv

Loading diagram... Windows Event Log Correlation: Lateral Movement & Persistence Workflow