Free tech learning for everyone, from basics to pro

Security OperationsCyber SecurityIntermediate

Log sources and log analysis: Windows, Linux, firewall and web logs

In short: Logs are the SOC's main evidence. Identity, endpoint, firewall, DNS, email and cloud logs cover most attacks. Knowing a few key Windows event IDs, the main Linux log files and the fields in firewall and web logs lets you answer when, where, who, what and with what result.

What to monitor first

You cannot collect everything, so start with logs that show the steps attackers almost always take: signing in, running programs, changing permissions and moving data. Collecting the right ten sources well beats collecting a hundred badly.

Log sources a SOC relies onSIEMcentral storeIdentitysign-ins, MFAEndpointsEDR, OS logsFirewallallow, denyDNS and proxyweb lookupsEmaildelivery, clicksCloudadmin actions
Figure 1. The main log sources feeding a SIEM. Identity and endpoint logs usually give the most value first.

Windows event logs

Windows records security events in the Security log. A few event IDs are worth learning by heart:

Event IDMeaningWhy it matters
4624Successful sign-inShows who logged on, from where and how (logon type)
4625Failed sign-inMany failures can mean password guessing
4672Special privileges assigned at sign-inMarks administrator-level logons
4688New process createdShows programs run; enable command-line logging for full value
4720 / 4732Account created / added to a local groupNew or newly privileged accounts
1102Security log clearedAttackers sometimes clear logs to hide

Many organisations also install Sysmon, a free Microsoft tool that records richer process, network and file events.

Linux, firewall and web logs

  • Linux: authentication events go to /var/log/auth.log (Debian, Ubuntu) or /var/log/secure (Red Hat family). On systemd systems, journalctl reads the journal. Look for failed SSH logins, sudo use and new users.
  • Firewall logs: source and destination IP, ports, protocol, rule matched and action (allow or deny). Denied outbound traffic from an internal server is often more interesting than denied inbound noise.
  • Web server logs: client IP, time, method, requested path, status code, size and user agent. Bursts of 404 errors suggest scanning; long, strange query strings can suggest injection attempts.
journalctl -u ssh --since "1 hour ago"
grep "Failed password" /var/log/auth.log
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 50

A method for log analysis

Reading a log lineWhentimestampWherehost, sourceWhouser, IPWhatevent, actionResultsuccess orfail
Figure 2. Five questions to ask of any log entry.
  1. Normalise time: convert every source to one time zone, ideally UTC.
  2. Start from the alert: note the host, user and time.
  3. Widen the window: look 30 minutes before and after for related events.
  4. Pivot: search other sources for the same user, IP or file hash.
  5. Build a timeline: list events in order with their source, then decide what happened.

Watch out for common traps. A missing log does not prove nothing happened; it may mean logging was off or the attacker cleared it. Shared accounts make the "who" impossible to answer, so avoid them. Network address translation and proxies can hide the real source address, so check the device that saw the original connection. Finally, write down every query you run and what it returned, so another analyst can repeat your steps and reach the same conclusion.

Tip: protect logs from tampering by forwarding them quickly to a central store that ordinary administrators cannot edit, and keep them long enough to investigate slow attacks.

Real-world example: a small shop's web server

The owner of a fictional online craft shop notices the site is slow. The IT contractor checks the web server logs and sees thousands of requests from a handful of IP addresses for login pages that do not exist, all with 404 status codes, followed by repeated POST requests to the real admin login. The auth logs show no successful admin sign-ins from those addresses. The contractor blocks the addresses, adds rate limiting to the login page, turns on MFA for the admin account and sets up an alert for more than 20 failed logins in five minutes.

Practice

Which Windows event ID records a failed sign-in, and what might many of them suggest?
4625. Many failures in a short time may suggest password guessing or password spraying.
Where are authentication events stored on Ubuntu?
In /var/log/auth.log, and in the systemd journal readable with journalctl.
Why convert all log timestamps to one time zone before analysis?
So events from different systems line up correctly in one timeline; mixed time zones make the order of events misleading.

Key takeaways

  • Start with identity, endpoint, firewall, DNS, email and cloud logs.
  • Learn key Windows event IDs such as 4624, 4625, 4688 and 1102.
  • Linux sign-ins live in auth.log or secure, or in the journal.
  • Ask of every log: when, where, who, what and result.
  • Normalise time, pivot across sources and build a timeline.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.