Log Management · Topic 2 of 5

Windows, Linux and Mac Logs

Learn Windows event logs, key event IDs and logon types, Sysmon, Linux log files under /var/log and macOS unified logging for SOC analysis on CSA 312-39.

  • 5 min
In a nutshell
  • 4624 success, 4625 failure, 4688 process created, 4720 account created, 4740 lockout, 1102 log cleared.
  • Logon type 2 is interactive, 3 network, 10 Remote Desktop.
  • Sysmon 1 is process creation, 3 network connection, 10 process access, 22 DNS query.

What it is

Each operating system records security events in its own place and format. Windows uses binary event logs, Linux writes text files under /var/log and the systemd journal, and macOS uses unified logging.

A SOC analyst must know where each log lives, which entries matter and which patterns signal an attack.

WindowsEvent Viewer, .evtxLinux/var/log, journalmacOSunified logAnalystpatterns and timeline

How it works

Windows event logs

Windows stores logs as .evtx files in C:\Windows\System32\winevt\Logs and shows them in Event Viewer. The main logs are Application, Security, Setup, System and Forwarded Events. Other logs, such as PowerShell and Sysmon, sit under Applications and Services Logs.

Event IDLogMeaning
4624SecurityAn account successfully logged on
4625SecurityAn account failed to log on
4634SecurityAn account was logged off
4648SecurityLogon attempted using explicit credentials
4672SecuritySpecial privileges assigned to new logon
4688SecurityA new process has been created
4697SecurityA service was installed in the system
4698SecurityA scheduled task was created
4720SecurityA user account was created
4732SecurityA member was added to a security enabled local group
4740SecurityA user account was locked out
4768 and 4769SecurityKerberos TGT and service ticket requested
4776SecurityCredentials validated with NTLM
1102SecurityThe audit log was cleared
7045SystemA new service was installed
4104PowerShell OperationalScript block logging recorded script content

Logon types

Events 4624 and 4625 include a logon type that says how the logon happened.

TypeNameExample
2InteractiveKeyboard logon at the console
3NetworkAccess to a shared folder over SMB
4BatchScheduled task
5ServiceA service starting under an account
7UnlockUnlocking the workstation
8NetworkCleartextCredentials sent in clear text, such as IIS basic authentication
9NewCredentialsRunAs with the /netonly option
10RemoteInteractiveRemote Desktop (RDP)
11CachedInteractiveLogon with cached domain credentials

For a 4625 failure, the status code helps triage. 0xC000006A means a wrong password for a valid user, and 0xC0000064 means the user name does not exist. Many 0xC0000064 codes suggest an attacker guessing account names.

Sysmon

System Monitor (Sysmon), a free Microsoft Sysinternals tool, adds detailed events to the Microsoft-Windows-Sysmon/Operational log:

Sysmon IDEvent
1Process creation, with full command line and hashes
3Network connection
7Image loaded
8CreateRemoteThread (a sign of code injection)
10ProcessAccess (for example, access to lsass.exe)
11File created
13Registry value set
22DNS query

Linux logs

LocationContent
/var/log/auth.log (Debian, Ubuntu)Authentication, sudo and SSH events
/var/log/secure (Red Hat family)The same, on Red Hat based systems
/var/log/syslog (Debian) or /var/log/messages (Red Hat)General system messages
/var/log/kern.logKernel messages
/var/log/wtmp and /var/log/btmpSuccessful and failed logins, read with last and lastb
/var/log/lastlogMost recent login of each user, read with lastlog
/var/log/audit/audit.logLinux Audit daemon (auditd) records
/var/log/cron or the syslog fileScheduled job activity

Systems running systemd also keep a binary journal read with journalctl. A typical SSH brute force shows many lines of "Failed password for" one user from one address, then "Accepted password for" from the same address.

macOS logs

macOS uses unified logging, a compressed, structured store for system and app messages. Analysts read it with the Console app or the log command, for example log show --last 1h.

Some text logs still exist, such as /var/log/install.log for software installs, along with app logs under /Library/Logs and ~/Library/Logs. Items to watch: authentication and sudo use, new launch agents and launch daemons (a common persistence method), and Gatekeeper or XProtect messages.

Many failed logons4625 or Failed passwordOne success4624 or AcceptedNew account or task4720, 4698Log cleared1102

A worked example

A domain controller shows 4625 events with logon type 3 and status 0xC000006A for 40 different accounts, each tried once or twice from the same workstation in ten minutes. Then a 4624 type 3 succeeds for one account, followed by 4672 for that account.

One password tried across many accounts is password spraying. The 4672 means the compromised account has administrative privileges, so the analyst escalates at high priority and asks for the account to be disabled.

How the exam asks about this

  • "Which logon type appears in event 4624 when a user connects with Remote Desktop?" → Type 10.
  • "Which file holds SSH authentication events on a Red Hat based system?" → /var/log/secure.
  • "Which Windows event ID records process creation in the Security log?" → 4688.

What to remember for the exam

  • 4624 success, 4625 failure, 4688 process created, 4720 account created, 4740 lockout, 1102 log cleared.
  • Logon type 2 is interactive, 3 network, 10 Remote Desktop.
  • Sysmon 1 is process creation, 3 network connection, 10 process access, 22 DNS query.
  • Linux authentication goes to /var/log/auth.log (Debian) or /var/log/secure (Red Hat).
  • macOS uses unified logging, read with Console or log show.
Watch out

Event 4688 records the command line only when the "Include command line in process creation events" policy is enabled. Sysmon event 1 records it by default, which is one reason SOCs deploy Sysmon.

Common mistakes

Mixing up 4624 and 4625. The lower number is the success. A run of 4625s followed by one 4624 is the classic brute force pattern.

Ignoring logon type. A type 10 logon to a database server at 3 a.m. is far more suspicious than a type 3 file share access.

Looking for auth.log on every Linux system. Red Hat based systems use /var/log/secure.

Check yourself

  • What does status code 0xC0000064 in event 4625 mean?

    The user name does not exist, which suggests account name guessing.

  • Which commands read the Linux login records in wtmp and btmp?

    last reads successful logins in wtmp, and lastb reads failed logins in btmp.

  • Which Sysmon event can reveal credential dumping from memory?

    Event 10, ProcessAccess, when a process opens lsass.exe.

Topic 2 of 5 in Log Management

Test yourself on Log Management

The full EC-Council 312-39 question bank has 700 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by EC-Council. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.