Learn & protect · Guide

Read Logs Like a Detective

Every login, download and connection leaves a record behind. Log analysis is reading those records like a detective reads a crime scene: timestamps, IP addresses and failed passwords instead of fingerprints.

When ransomware hits at 3 AM or data quietly flows to an unknown server, the logs show how it happened and who did it. By the end of this guide you'll know what's inside a log, how to read one, and the five red flags that mean "look closer."

What is a log?

A log is a diary that computers write about themselves, automatically, every second. Someone signs in: logged. A file is downloaded: logged. A device connects to the internet: logged.

You don't need to understand every log. Even experienced analysts don't. What matters is learning to spot patterns, the same way a detective doesn't read every page of a case file but knows which details matter.

The 5 parts of a log

Most log lines answer the same five questions. Not every log has all five, but this is what to look for.

QuestionPartWhat it tells youExample
When?TimestampWhen it happened. Always start here.2025-10-22 03:15:42
Where?SourceWhich system wrote the logSERVER-DB01, firewall-prod, 10.0.1.50
What?Event typeThe action that happenedLogin_Failed, file_deleted
Who?User or actorThe person, account or program behind itadmin, a service account
Did it work?OutcomeSuccess or failure. Failures are often the most interesting.Failed

Put together, one line looks like this:

2025-10-22 03:15:42 | SERVER-DB01 | Login_Failed | User: admin | Source IP: 192.168.1.100

In plain English: at 3:15 AM, someone at IP address 192.168.1.100 tried to sign in to SERVER-DB01 as "admin" and failed.

Read a log in 4 steps

Here's a short case to practice on. Read the lines, then follow the steps.

2025-10-22 03:14:05 | SERVER-DB01 | Login_Failed  | User: admin | Source IP: 192.168.1.100
2025-10-22 03:14:09 | SERVER-DB01 | Login_Failed  | User: admin | Source IP: 192.168.1.100
2025-10-22 03:14:12 | SERVER-DB01 | Login_Failed  | User: admin | Source IP: 192.168.1.100
2025-10-22 03:15:42 | SERVER-DB01 | Login_Success | User: admin | Source IP: 192.168.1.100
2025-10-22 03:17:10 | SERVER-DB01 | File_Download | User: admin | customer_list.csv (2.4 GB)
  1. Check the time. 3:14 AM. Is anyone supposed to be working on this server in the middle of the night?
  2. Look for repetition. Three failed logins in seven seconds from the same address. One failure is a typo. A burst like this is someone guessing.
  3. Watch for the turn. The failures stop and a success appears. That usually means the guess worked.
  4. Follow what happens next. Two minutes later, "admin" downloads a 2.4 GB customer file. Now you have a story: someone guessed the admin password at 3 AM and took customer data.

That last step is the one beginners skip. A single log line is a clue. The lines around it are the story.

5 red flags every analyst should know

Each of these is worth a closer look. None of them proves an attack on its own, so check for the innocent explanation before you sound the alarm.

Red flagWhat it looks likeCould be innocent if...
Failed logins, then a successSeveral failures, then a login that worksThe user forgot their password and finally got it right (check the IP and time)
After-hours activityAdmin accounts active at 3 AM, big weekend file transfers, accounts created overnightIt's planned maintenance or a scheduled backup
Impossible travelSigned in from New York at 9:00 AM, then China at 9:05 AMA VPN, cloud proxy or phone syncing makes the location look wrong
New or changed accountsA surprise admin account, sudden permission changes, an old account turned back onIT made the change and has a ticket for it
Unusual programs or connectionsPrograms running from temp folders, servers reaching out to the internet, odd portsNew software that hasn't been documented yet

Detective habits

Do
  • Know what normal looks like. An admin logging in at 2 AM for planned maintenance is normal. A regular user suddenly downloading 50 GB when they usually move a few megabytes is not. Write down what's typical so the odd stuff jumps out.
  • Start broad, then narrow. Filter by a username, an IP address or an event type. Only look at the logs that matter to your case.
  • Write down your searches. If you can't retrace your steps, no one can check your work, including future you.
Don't
  • Read logs in isolation. One line means little. The lines before and after it tell the story.
  • Skip the timestamps. Time is what connects one event to the next.
  • Treat every alert as an emergency. Most alerts are routine. Learning to tell routine from real is what keeps analysts sharp instead of burned out.

Your investigation checklist

Run through these six questions every time something looks off.

Try it on your own accounts

You don't need a company server to practice. Your Google, Microsoft and Apple accounts keep a log of every sign-in, and checking them takes five minutes. Look for the same red flags: a device you don't own, a city you've never been to, or a sign-in at a time you were asleep.

AccountWhere to lookWhat it shows
Googlemyaccount.google.com, then Security, then Security CheckupRecent security activity from the last 28 days, plus every device signed in
Microsoftaccount.microsoft.com, then Security, then Recent activityEach sign-in from the past 30 days, with device and location, including failed ones
Appleaccount.apple.com, then Devices (or on iPhone: Settings, then your name)Every device currently signed in to your Apple Account

Found something you don't recognize? Change that account's password from a device you trust, sign the unknown device out, and turn on two-step sign-in. If it's a work or school account, tell IT. That's escalating, the last step on your checklist.

Resources

Sources for the account steps: Google Security Checkup guide, Microsoft Recent activity page, Apple device list.

Need a hand?

See something strange on your phone or account? Bring it to either store and we'll check, clean and secure it.