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.
Windows event logs
Windows records security events in the Security log. A few event IDs are worth learning by heart:
| Event ID | Meaning | Why it matters |
|---|---|---|
| 4624 | Successful sign-in | Shows who logged on, from where and how (logon type) |
| 4625 | Failed sign-in | Many failures can mean password guessing |
| 4672 | Special privileges assigned at sign-in | Marks administrator-level logons |
| 4688 | New process created | Shows programs run; enable command-line logging for full value |
| 4720 / 4732 | Account created / added to a local group | New or newly privileged accounts |
| 1102 | Security log cleared | Attackers 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,journalctlreads the journal. Look for failed SSH logins,sudouse 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
- Normalise time: convert every source to one time zone, ideally UTC.
- Start from the alert: note the host, user and time.
- Widen the window: look 30 minutes before and after for related events.
- Pivot: search other sources for the same user, IP or file hash.
- 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?
Where are authentication events stored on Ubuntu?
Why convert all log timestamps to one time zone before analysis?
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.
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.