Skip to content

Sudo Last Run

Evidence: Sudo Last Run
Description: Collect Sudo Last Run
Category: System
Platform: macos
Short Name: slr
Is Parsed: Yes
Sent to Investigation Hub: Yes
Collect File(s): No

The sudo timestamp files track when users last successfully authenticated with sudo, allowing password-less sudo execution within a timeout period. These timestamps reveal privilege escalation activities and administrative command execution. Understanding sudo usage is essential for detecting unauthorized privilege escalation, lateral movement, and administrative access abuse.

This collector gathers structured data about sudo last run.

FieldDescriptionExample
UIDUID123
UserUserExample value
SourceSourceExample value
SudoRunTimestampSudo Run Timestamp2023-10-15 14:30:25+03:00

This collector parses binary timestamp files from /private/var/db/sudo/ts/, extracting user IDs and last sudo execution timestamps for each user who has used sudo on the system.

Sudo timestamp data reveals when users gained elevated privileges, indicating administrative activities, privilege escalation attempts, or unauthorized access. Unexpected sudo usage may indicate compromised credentials, privilege escalation attacks, or malicious administrative actions. This evidence helps establish timelines for privileged activities and identify unauthorized elevated access.