Understand Linux authentication logs at the binary level
Each UID has exactly one 292-byte record. Hover over the bytes to see what they mean.
An attacker brute-forces SSH, gets root, creates a backdoor. Each log source captures different aspects.
Notice how the colored tags show which log source captured each event. Only auth.log sees the full picture. lastlog and wtmp only capture the successful logins.
lastlog: last login per UID
wtmp: full session history
auth.log: all auth events including failures
correlate: cross-reference discrepancies
hidemylogs wipe -a IP wipe IP from all log fileshidemylogs forge --uid 0 -t TIME fake lastloghidemylogs wipe -t 03:00-04:00 --and time-range wipe
All with preserved atime/mtime
Remote syslog (rsyslog, syslog-ng)
File integrity monitoring (AIDE)
Immutable audit logs (auditd)
Network telemetry (NetFlow, DNS)
Logs already shipped to remote server
Network-level captures (PCAP)
EDR memory forensics
Cross-source correlation (--correlate)
The tool parses 3 fundamentally different file formats. Here's how each one is read.
--file | --wtmp | --auth-loguint32 ll_time 4Bchar[32] ll_line 32Bchar[256] ll_host 256B"I32s256s"short ut_type 2Bpad 2Bint ut_pid 4Bchar[32] ut_line 32Bchar[4] ut_id 4Bchar[32] ut_user 32Bchar[256] ut_host 256B... exit, session, tv, addr 52B"hhi32s4s32s256shhiii4I20s"regex sshd Acceptedregex sshd Failedregex sudo COMMAND=Paste hex bytes from a lastlog record and see them decoded in real time.
When --correlate is used, the tool loads all 3 sources and cross-references them: