Why Security.evtx Is Your Best Forensic Ally

In any incident response investigation, Security.evtx is the first artifact every analyst reaches for. This log concentrates authentication, authorization, and auditing events from the Windows operating system — and it’s precisely where an attacker’s lateral movement leaves its traces.

The problem is usually not a lack of data, but an excess of it. Security.evtx can contain millions of events on an Active Directory server. The key is knowing which Event IDs to look for and how to interpret them in context.

Tools like masstin parse these events automatically and unify them into a lateral movement timeline, saving you hours of manual analysis.

Where it is and how to open it

The file is C:\Windows\System32\winevt\Logs\Security.evtx. In a triage or a disk image it is at that same path. To look at it by hand, Windows’ Event Viewer will do (double-click the file); to read all of it at once, masstin.

Each event is written on the machine where it happens. A network logon is recorded on the destination machine; Kerberos events, on the domain controller. This is the first thing to be clear about: to know who got into a server you have to look at that server’s log.


A domain logon as seen in Security.evtx, in the order masstin puts it. Each entry of the account leaves four events in a row: 4768 (asks for the TGT), 4769 (asks for the service ticket), 4648 (explicit credentials) and 4624 (logs on).

A domain logon as seen in Security.evtx, in the order masstin puts it. Each entry of the account leaves four events in a row: 4768 (asks for the TGT), 4769 (asks for the service ticket), 4648 (explicit credentials) and 4624 (logs on).

Logon and Logoff Events

Event ID 4624 — Successful Logon

This is arguably the most important event for tracking lateral movement. Every time an account authenticates on a machine, a 4624 is generated on that destination machine.

What matters isn’t just whether the event exists — it’s the Logon Type:

Logon Type Meaning Forensic Relevance
2 Interactive logon (console) User was physically present or via KVM
3 Network logon SMB, share access, PsExec, remote WMI — classic lateral movement
7 Screen unlock Generally irrelevant for lateral movement
10 Remote interactive logon (RDP) Full RDP session — lateral movement via Remote Desktop
11 Cached credentials logon Offline logon, no DC contact

Key fields to examine:

  • TargetUserName / TargetDomainName: who authenticated.
  • IpAddress / IpPort: where the connection came from. For logon types 3 and 10, this is the attacker’s IP.
  • LogonProcessName: NtLmSsp for NTLM, Kerberos for Kerberos, User32 for interactive logons.
  • AuthenticationPackageName: distinguishes NTLM from Kerberos.
  • WorkstationName: source machine name (NTLM only).

Forensic tip: A type 3 logon from a workstation to a server using a Domain Admin account at 3:00 AM is an immediate red flag.

Event ID 4625 — Failed Logon

Failed logons are indicators of access attempts. A spike in 4625 events may indicate:

  • Brute force against local or domain accounts.
  • Password spraying (many accounts, few passwords).
  • Expired stolen credentials that the attacker is trying to reuse.
Sub Status Code Meaning
0xC000006A Wrong password
0xC0000064 Nonexistent user
0xC0000072 Disabled account
0xC000006D Generic logon failure
0xC0000234 Account locked out

Key correlation: If you see a burst of 4625 events followed by a successful 4624 with the same account, the attacker found the correct credentials.

Event ID 4634 / 4647 — Logoff

Event ID Type Description
4634 System logoff System closes the session (timeout, network disconnect)
4647 User-initiated logoff User actively logged off

These events let you calculate session duration. A type 3 logon session lasting 2 seconds suggests automated access (PsExec, WMI). A type 10 session lasting 45 minutes suggests manual operation via RDP.


Explicit Credentials

Event ID 4648 — Logon with Explicit Credentials (RunAs)

Generated when a process authenticates with credentials different from those of the current session. This includes:

  • Use of runas.exe or RunAs from the GUI.
  • Tools like PsExec with the -u flag.
  • Any API calling LogonUser() with supplied credentials.
Field What to Review
SubjectUserName Who executed the action
TargetUserName What account was used to authenticate
TargetServerName What server was targeted
ProcessName What executable did it (e.g., C:\Windows\System32\runas.exe)

Forensic tip: If the SubjectUserName is a service account and the TargetUserName is a Domain Admin, you have a clear case of privilege escalation followed by lateral movement.

Unlike the 4624, the 4648 is written on the origin machine: the one that uses the credentials, not the one that receives them.

The 4648 tells you which session did it. Every session open on a machine has a number, the logon ID. The SubjectLogonId of the 4648 is the logon ID of the session whose process used the credentials, and it is the same number the 4624 that opened that session carries. Masstin keeps it in the logon_id column.

An example: someone gets into B from A (a 4624 on B) and then, from B, hops to C (a 4648 on B). Both events carry the same logon ID, so it can be stated that the hop from B to C was made by the session that came from A.


Kerberos Events

The lab's 4768 events, without the machine accounts: who asked for a TGT, from which domain controller and from which address.

The lab's 4768 events, without the machine accounts: who asked for a TGT, from which domain controller and from which address.

Kerberos events are fundamental for reconstructing authentication in Active Directory environments. They are generated on the Domain Controller.

Four words so as not to get lost:

  • Kerberos: the system a Windows domain uses to check who everyone is. Instead of sending the password to every server, it hands out tickets.
  • TGT: the first ticket, requested at logon. It is the proof that you have already identified yourself.
  • TGS or service ticket: the one requested afterwards, with the TGT, to get into a particular service (a share, a database).
  • Pre-authentication: the password check before the TGT is given. If an account has it turned off, anyone can ask for material encrypted with its password and try to crack it at home. That attack is called AS-REP Roasting. The equivalent with service tickets is Kerberoasting.

A ticket is not a logon on the domain controller. A successful 4768, 4769 or 4770 (and a 4776 too) is an authentication at the DC on the way somewhere else. Masstin’s window (its graphical interface, which draws the paths between machines) treats them as “connect”, so a path does not jump to a DC just because someone asked it for a ticket. In the CSV they are written as they always were.

Event ID 4768 — TGT Request (AS-REQ)

Logged when a user requests a Ticket Granting Ticket from the KDC. This is the first step in Kerberos authentication.

Field Relevance
TargetUserName Account requesting the TGT
IpAddress IP where the request originated
TicketEncryptionType 0x17 (RC4) is an old cipher. In a modern domain, seeing it is a reason to look at that request: attack tools that ask for tickets from the password hash use it
PreAuthType Pre-authentication type used

Related attack: Attackers performing AS-REP Roasting target accounts without required pre-authentication. You’ll see 4768 events with PreAuthType 0 (no pre-auth).

Event ID 4769 — Service Ticket Request (TGS-REQ)

Generated when a user with a valid TGT requests a service ticket to access a resource.

Field Relevance
ServiceName Requested service (e.g., cifs/server.domain.com, http/web01)
TargetUserName Account requesting the ticket
IpAddress Request origin
TicketEncryptionType 0x17 (RC4) may indicate Kerberoasting

Related attack: In a Kerberoasting attack, the adversary requests service tickets for accounts with configured SPNs (the SPN, Service Principal Name, is the name a service is registered under in the domain), then attempts to crack the ticket offline. Look for bursts of 4769 events with TicketEncryptionType 0x17 from a single IP.

Event ID 4770 — TGT Renewal

Generated when an existing TGT is renewed. An abnormal volume of renewals from an unexpected IP may indicate a Golden Ticket (the attacker indefinitely renews a forged TGT).

Event ID 4771 — Kerberos Pre-Authentication Failure

The Kerberos equivalent of 4625. Indicates that the supplied password doesn’t match what’s stored in AD.

Failure Code Meaning
0x6 Principal does not exist
0x12 Credentials revoked: the account is disabled, expired or locked out
0x17 Password expired
0x18 Wrong password — most common in brute force
0x25 Clock skew

NTLM Authentication

Event ID 4776 — NTLM Credential Validation

Generated on the Domain Controller when it receives an NTLM validation request (pass-through authentication). If the result is successful, the Status field will be 0x0.

Field Relevance
TargetUserName Authenticated account
Workstation Machine where the authentication originated
Status 0x0 = success, 0xC000006A = wrong password

Forensic tip: In a modern environment with Kerberos, heavy 4776 traffic may indicate a downgrade attack where the adversary forces NTLM to capture hashes or perform relay attacks.


RDP Sessions

Event ID 4778 — RDP Session Reconnect

Generated when a user reconnects to an existing RDP session (one that was disconnected, not closed).

Event ID 4779 — RDP Session Disconnect

Generated when a user disconnects from an RDP session without closing it.

Field Description
AccountName Session user
ClientName Client machine name
ClientAddress Client machine IP
SessionName Session name (e.g., RDP-Tcp#5)

These events complement 4624 type 10 events for complete RDP activity reconstruction, including disconnections and reconnections.


Event ID Summary

Event ID Category Description Lateral Movement Relevance
4624 Logon Successful logon High (types 3 and 10)
4625 Logon Failed logon Medium-High (brute force, spraying)
4634 Logoff System logoff Medium (session duration)
4647 Logoff User logoff Medium (session duration)
4648 Credentials Explicit logon (RunAs) High (escalation + movement)
4768 Kerberos TGT request High (AS-REP Roasting)
4769 Kerberos Service Ticket request High (Kerberoasting)
4770 Kerberos TGT renewal Medium (Golden Ticket)
4771 Kerberos Pre-auth failure Medium-High (Kerberos brute force)
4776 NTLM NTLM validation High (NTLM relay, downgrade)
4778 RDP RDP reconnect Medium (session tracking)
4779 RDP RDP disconnect Medium (session tracking)

The Security.evtx Rotation Problem

There’s something every DFIR analyst discovers sooner or later: Security.evtx rotates constantly. On a busy Active Directory server, security logs can rotate every few days — or even every few hours in heavily audited environments.

This means that when you arrive to investigate an incident, Security.evtx likely only covers the last 2-3 days. Earlier events have been lost to rotation.

Why is this a problem?

Because the attacker may have been in the network for weeks or months before detection. If you only have 3 days of Security.evtx, you’re missing the entire initial phase of the attack.

What’s the solution?

That’s why masstin doesn’t stop at Security.evtx. Other Windows event logs rotate far less frequently:

  • TerminalServices-LocalSessionManager can cover months or even years of RDP sessions
  • SMBServer/Security and SMBClient/Connectivity typically have much longer retention
  • System.evtx keeps service installation records for extended periods

Masstin combines all these artifacts into a single timeline precisely to overcome Security.evtx rotation limitations. When Security.evtx doesn’t cover your timeframe, the other logs fill the gaps.


How Masstin Parses Security.evtx

Masstin automatically extracts from Security.evtx events 4624, 4625, 4634, 4647, 4648, 4768, 4769, 4770, 4771, 4776, 4778, 4779 and the share accesses 5140 and 5145, and puts them in a CSV with the same format for all: when, on which machine, from where, with which account and what kind of event.

masstin -a parse -d /evidence/logs/ -o timeline.csv

The output includes all Security.evtx events alongside those from other logs (Terminal Services, SMB, etc.), sorted chronologically and ready for analysis or Neo4j ingestion. This lets you see exactly when Security.evtx events start and how much ground the other artifacts cover before that date.


Conclusion

Security.evtx is the cornerstone of any Windows lateral movement investigation, but it’s not enough on its own. Frequent rotation means it often covers only a fraction of the period you need to investigate. Knowing these Event IDs and combining them with other artifacts (Terminal Services, SMB, System) is what lets you reconstruct the full story.

If you need to process these artifacts at scale, masstin unifies all these sources into a single timeline in seconds.