Skip to content
← Back to blog
7 min en

Windows events to check first in SOC triage

What events 4624, 4625, 4688, 4672 and 4720 mean, the order to review them and which auditing must be enabled so they exist in the log.

Written by Eduardo Olivares, SOC analyst in Barcelona.

  • windows
  • event id
  • 4624
  • 4625
  • 4688
  • triage
  • soc
  • blue team

When an alert fires on a Windows machine, the security log usually holds the answers to the first questions: who logged in, from where, with what privileges and what they ran. This article is a reference to consult, with the events worth checking before the rest and the fields that matter in each one.

Short answer: start with 4624 and 4625 (successful and failed logons), match the Logon ID against 4672 (special privileges) and 4688 (process creation), and review 4720 and 4732 if you suspect new accounts or group changes. None of them exist unless the matching auditing is enabled, and 4688 does not include the command line unless a separate policy is enabled.

Before you start: no audit policy, no event

Each event depends on an audit subcategory. According to Microsoft's documentation, 4624 belongs to Audit Logon, 4625 to Audit Logon and Audit Account Lockout, 4688 to Audit Process Creation, 4672 to Audit Special Logon, 4720 to Audit User Account Management and 4732 to Audit Security Group Management. If the subcategory is not configured, the event is not generated. Check this before concluding that "nothing happened".

Process creation auditing and command line

To see 4688 you must enable the Audit Process Creation policy. Its default value is "not configured". The path is:

Computer Configuration > Policies > Windows Settings > Security Settings
  > Advanced Audit Configuration > Detailed Tracking > Audit Process Creation

With that the event appears, but the Process Command Line field is empty. To fill it you need a second policy, which only applies if the first one is enabled:

Computer Configuration > Policies > Administrative Templates > System
  > Audit Process Creation > Include command line in process creation events

Microsoft warns that, with that option, anyone who can read the security log will see the arguments of every process, and those arguments may contain passwords or user data. Decide who has access to the log before enabling it.

Reference table

  • 4624: successful logon. Key fields: Logon Type, New Logon (account and Logon ID), Source Network Address, Authentication Package, Elevated Token.
  • 4625: failed logon. Key fields: Logon Type, account name given, Status and Sub Status, Source Network Address.
  • 4672: special privileges assigned to a new logon. Key fields: account, Logon ID, list of privileges.
  • 4688: new process. Key fields: New Process Name, Creator Process Name, Process Command Line, Token Elevation Type.
  • 4720: user account created. Key fields: who created it (Subject), name of the new account, attributes and UAC.
  • 4732: member added to a security-enabled local group. Key fields: who did it, member added, group.

Logon: 4624 and 4625

4624 is generated on the machine being accessed, when the session is created. 4625 is generated on the machine where the attempt was made, and it exists on domain controllers, member servers and workstations. Look first at the account, the logon type and the source address. According to the documentation, the network fields depend on the protocol: with Kerberos there is probably no workstation name, and with NTLM there are no TCP/IP details.

Logon types and which ones matter

The Logon Type appears in 4624 and 4625. The documented values:

  • 2, Interactive: user at the machine itself.
  • 3, Network: access from the network, for example to a shared resource.
  • 5, Service: the Service Control Manager started a service.
  • 8, NetworkCleartext: access from the network with the password passed unhashed to the authentication package.
  • 10, RemoteInteractive: Remote Desktop or Terminal Services.
  • 11, CachedInteractive: locally stored credentials, without contacting the domain controller.

In triage, types 3 and 10 are usually the first ones you check against a remote access hypothesis. Microsoft also recommends watching for mismatches between logon type and account, for example a type 4 or 5 with a domain admin account.

4625 status and sub status codes

4625 carries Status and Sub Status. The documentation points to the list of NTSTATUS values and highlights these to watch for:

  • 0xC0000064: user does not exist or is misspelled. Several in a row can indicate user enumeration.
  • 0xC000006A: wrong password. It matters mostly on critical or service accounts, if it repeats.
  • 0xC000006F: logon outside authorized hours.
  • 0xC0000072: account disabled by an administrator.
  • 0xC0000234: account locked out, the value shown in the official example.

Look at both fields, because Microsoft says the value can be in Status or in Sub Status.

Privileges and accounts: 4672, 4720, 4732

4672 is generated when a new logon receives any of the sensitive privileges on the official list, such as SeDebugPrivilege, SeTcbPrivilege, SeBackupPrivilege or SeImpersonatePrivilege. Microsoft warns that you will see many, because every SYSTEM logon triggers it. Filter out the known accounts (system, local service, network service) and review the rest. The Logon ID lets you link it to the 4624 of the same session.

4720 records the creation of a user account and is generated on domain controllers, member servers and workstations. Compare who created it with who should be doing so. 4732 records each member added to a security-enabled local group, with one event per member. Microsoft recommends watching high-value groups, such as local administrators.

Processes: 4688 and its relationship with Sysmon

4688 is generated every time a process starts. In version 2 (Windows 10) it distinguishes Creator Subject and Target Subject, and adds Mandatory Label and Creator Process Name.

Sysmon generates its event 1 (Process Create) in the Applications and Services Logs/Microsoft/Windows/Sysmon/Operational log. It provides the full command line, the parent process, file hashes and a ProcessGUID for correlation. If Sysmon is deployed, event 1 is more complete than 4688. If it is not, 4688 with command line covers the basics.

From event to decision: a synthetic sequence

The following example is made up, with fictional names, only to show the reading order:

  1. Several 4625 with 0xC000006A for the account svc-demo, from the same internal test IP.
  2. A type 3 4624 for that account from the same IP. The password was eventually guessed.
  3. A 4672 with the same Logon ID: the session received special privileges.
  4. A 4688 with that Logon ID that launches a command interpreter from an unusual path.

Each step on its own may have an explanation; together they justify escalating. To query the log from PowerShell, Get-WinEvent supports hashtable filters with the keys LogName, Id and StartTime:

$desde = (Get-Date).AddDays(-1)
Get-WinEvent -FilterHashtable @{ LogName='Security'; Id=4625; StartTime=$desde }

You must run it as administrator to read the security log.

Links

For the general order of reviewing an alert, there is the article on alert triage in a SOC. If what you are reviewing is a domain, the first changes in Active Directory help you decide what to audit.

Frequently asked questions

Why don't I see event 4688 on my machine?

Because the Audit Process Creation subcategory is not configured. It is not by default, and without it no 4688 is generated.

Why is the command line field empty?

You also have to enable the "Include command line in process creation events" policy. It is not configured by default and the field stays empty.

Is it suspicious to see many 4672?

Not necessarily. Every logon of the SYSTEM account generates one. It matters when the account is not one of the system accounts and is not expected to have those privileges.

Is 4688 useful if I already have Sysmon?

Sysmon (event 1) provides hashes, ProcessGUID and the full command line. 4688 is the native Windows log and is useful when Sysmon is not deployed.