r/Hacking_Tutorials • • 1d ago

Question Which line in these Linux auth.log SSH entries would you investigate first during triage—and why?

I’ve been brushing up on practical log triage and incident response habits lately, and one thing that always stands out when reviewing raw authentication logs is how easy it is to get tunnel-visioned on noisy failure spam while glossing over the one entry that actually changed state. When a server is exposed to the internet on port 22, background noise is practically guaranteed, so separating routine brute-force chatter from high-impact anomalies is half the battle.

Suppose you're reviewing a Linux server's /var/log/auth.log and pull up this tight 14-second window of sshd activity:

Oct 12 14:22:01 server sshd[1234]: Failed password for invalid user admin from 192.0.2.45 port 22 ssh2

Oct 12 14:22:04 server sshd[1235]: Failed password for invalid user root from 203.0.113.19 port 22 ssh2

Oct 12 14:22:09 server sshd[1236]: Accepted password for user alice from 198.51.100.7 port 22 ssh2

Oct 12 14:22:11 server sshd[1237]: Failed password for user alice from 203.0.113.19 port 22 ssh2

Oct 12 14:22:15 server sshd[1238]: Failed password for invalid user test from 192.0.2.45 port 22 ssh2

At a glance, you've got invalid-user probes (admin, root, test), a failed password attempt against a valid local account (alice), and a successful password authentication for alice right in the middle of the sequence. Even with a small snippet like this, different analysts and sysadmins will prioritize their first pivot differently depending on whether they lead with "state change first" (successful access), "known user targeting" (a valid account being hit), or "source correlation" (seeing if the same IPs show up across broader windows or other services).

To make it easy to jump in whether you're deep into blue-team work or just learning how to read auth.log, here are four prompts to unpack it:

  1. First pivot: Which IP address and log line would you investigate first, and what is your reasoning behind prioritizing it over the others?
  2. Successful auth: What does the Accepted password for user alice from 198.51.100.7 entry suggest—and what context (like known VPN/office IPs, normal login hours, or password vs. SSH key usage) would tell you whether it's legitimate or a compromise?
  3. Automated noise vs. targeted probing: Do the repeated invalid user attempts from 192.0.2.45 (and the root / alice hits from 203.0.113.19) point to automated scanning/credential stuffing, or could there be more going on here?
  4. Next investigation steps: Once you look at that initial line, what do you check next—other log files (like syslog, auditd, or web/auth logs), alice's account/session activity and sudo history, active network connections, or firewall/fail2ban rules?

Beginners are more than welcome to answer just the first question—share your reasoning and how you approach reading logs like this in the real world!

2 Upvotes

9 comments sorted by

1

u/EverythingIsFnTaken 1d ago

I find the blue team's existence to be a harrowing phenomenon, the likes of which arguably demonstrates a genuine beacon of humanity's odds of maybe not being extinct quite yet. I mean no offense when I say that not only is it inherently impossible to ever let your guard down as a window maker and protector in a world where a rock could just fall off a cliff on its own, let alone billions of assholes who don't even need to know what an arm is being able and arguably tantalized to throw them at wherever direction, who cares, just hurl it and listen for a crash... lol sorry... Not only that, I also find it incredibly tedious. I just wanted to note that my read on this was made from an almost exclusively red team oriented area of focus.

Anyway, I'm scrutinizing 203.0.113.19 and 192.0.2.45 because if the accepted password wasn't the real alice then why is there a subsequent failure of the password attempt two seconds later. I reckon the two sources are the same prowler trying to cut down on being rate limited. That entity I reckon is fuzzing for users perhaps with a credential that might be inclined to believe is valid for someone on the network.

1

u/NoreVyni 1d ago

your red team brain is doing the most here lol, i'm over here just trying to figure out which line even matters first

1

u/EverythingIsFnTaken 1d ago

I don't know what you read, but uhh, I specified which sources I was interested in and why I was interested. I was assuming you could see which line contained the source that I had explicitly specified being as how the line is where I found the sources I selected interesting ones from.

1

u/EverythingIsFnTaken 1d ago

I didn't mean for that to have sounded as rude as I realize now that it must have.

Full disclosure, I only now just realized that you weren't OP, which is why I had been so curt, as I had assumed the one who made the post would have known what was going on here. My apologies.

1

u/Royalspleasurez 1d ago

your red team angle makes the whole thing feel like a game instead of just homework, lowkey love how you connected those two IPs like that

1

u/softynuzzle 1d ago

your red team angle on those ips makes the whole thing feel like a game of cat and mouse

1

u/EverythingIsFnTaken 1d ago

Pretty much... except the mice are innumerable, and they have machine guns with bottomless clips, and the cat is responsible for making sure every square inch of the house is safely not being penetrated my a single bullet... so the cat must devise clever and sophisticated methods of mitigating the bullets in novel ways, and all the mice need to do is keep their fingers on their triggers, constant streams of bullets effectively hosing down every square inch of the house from every angle until one gets through one way or another.

Those who find themselves leaning towards the blue team path are absolute masochists. Intent on protecting everything, while red team is happy with breaking anything.

0

u/AmberTeasee 1d ago

lol your red team lens is kinda hot, zeroing in on that repeat offender trying to slip through like that

1

u/mrawsum1 11h ago

How many times are we going to post this same thing over and over