sudo log

sudo logs every use to syslog (auth.log or secure), recording the user, terminal, working directory, target account and the full command.

LinuxEvent and service logsParser: sudo_log9 fieldsCollected by priority triage

What Sudo Log is

Event and service logs record what the operating system and its services saw: logons, process starts, service changes, errors and security events.

Forensic value

What Sudo Log can tell an investigator:

  • Privilege escalation: who became root, and what they ran.
  • Failed sudo attempts that show probing.

What it does not prove

  • Commands run inside a root shell started with sudo -i or sudo bash are not individually logged by sudo; use auditd and shell history for those.

Where it is stored

Arcsentry looks for Sudo Log at these locations inside a collection, disk image or mounted volume:

**/etc/localtime
**/etc/timezone
**/var/log/auth.log*
**/var/log/secure*
**/var/log/sudo.log*

What Arcsentry records

Each Sudo Log record is written to Arcsentry's common schema with these fields, alongside the host, timestamp and provenance every record carries:

FieldTypeMeaning
messageVARCHARHuman-readable message
log_fileVARCHARSource log file path
log_line_numberBIGINTLine number within the source log file
process_pidBIGINTProcess identifier
user_nameVARCHARUser name
commandVARCHARCommand text from sudo activity or sudoers policy
process_ttyVARCHARProcess controlling terminal
process_working_directoryVARCHARProcess working directory
user_target_nameVARCHARTarget user name

Time

Arcsentry keeps each record's own time and labels its time zone when the source does not state one. A record with no time of its own stays untimed; Arcsentry never substitutes the collection time.

Collecting Sudo Log with Arcsentry Collector

Arcsentry Collector gathers Sudo Log in these triage profiles: linux::profile::triage::priority, linux::profile::triage::offline, linux::profile::triage::full, linux::profile::triage::server. It is read straight from the file system, on a live host or inside a disk image, without mounting.

The collection targets that pick it up: linux::execution::docker_ondisk, linux::filesystem::bodyfile, linux::logs::var_log, linux::software_inventory::apt, linux::software_inventory::dpkg, linux::system_state::etc.

sudo ./arcsentry-collect collect --local -t linux::profile::triage::priority \
  -o /mnt/ir -f host.arcx --password-file /mnt/ir/pw.txt

Every file lands in one AES-256 archive with a SHA-256 recorded for it, and the collection log notes which target collected it. See everything each profile collects.

Already collected with something else? Arcsentry also reads KAPE, Velociraptor and UAC collections, so Sudo Log can come from the tools you already use.

Analysing Sudo Log in Arcsentry

Ask in plain English, for example "show Sudo Log records from the incident window, newest first", and Arcsentry shows the query before it runs. Or write it in AQL:

filter event_type == "sudo_log"
sort {-timestamp}
take 100

Mark a record malicious or suspicious and it joins the timeline in its kill-chain lane. Add its values as indicators and Arcsentry matches them across every host. When the AI investigator works the case, it reads Sudo Log records with the same tools and cites them by event ID.

Corroborate with

No single artifact settles a question on its own. Check Sudo Log against:

  • auditd: Parses /var/log/audit/audit.log* and correlates the SYSCALL, EXECVE, CWD, PATH and USER_* records of one audit event by its stamp (time and serial).
  • Bash history: Parses shell and interactive interpreter command history files (bash, zsh, fish, ash and other shells, Python, Node.js, irb and database shell clients such as psql, MySQL and Redis).
  • Syslog: Parses Linux syslog and auth.log files.

Frequently asked

Where does sudo log commands?

To syslog, usually /var/log/auth.log or /var/log/secure, and to the systemd journal. I/O logging can be configured separately.

Does Arcsentry parse Sudo Log?

Yes. Arcsentry's Sudo Log parser (sudo_log) reads it from Linux evidence and records 9 fields per record, with provenance back to the source file.

How do I collect Sudo Log?

Arcsentry Collector gathers it with the priority triage profile (linux::profile::triage::priority), live or from a disk image, sealed in an AES-256 archive with a SHA-256 for every file.

Parse Sudo Log on your own evidence.

Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.

Request a trial