LIVE · cybersecurity feed
Live wire
security

Linux Kernel Process Accounting, (Wed, Aug 12th)

A couple of days ago, Xavier posted about Atuin to gain more insight into the command history. Atuin does a great job of better organizing what is usually handled by "bash&#;x26;#;x5f;history"&#;x26;#;xc2;&#;x26;#;xa0;and collecting meaningful additional data. Our reader David commented that this can also be done quite well with Linux&#;x26;#;39;s kernel process accounting feature, and I think he

zeroday.news ·

A recent report highlighted the utility of Linux kernel process accounting as an alternative or supplementary method for gaining insight into command history and system activity. This discussion emerged in response to an earlier mention of the Atuin tool, which aims to enhance the organization and data collection capabilities beyond the standard bash history. The reader's comment suggested that the native kernel feature offers comparable benefits for system monitoring and forensic analysis.

Linux kernel process accounting, often managed via the `acct` or `sa` utilities, provides a robust mechanism for logging information about executed processes. When enabled, the kernel writes a record to a specified accounting file each time a process terminates. This record typically includes details such as the command name, user ID, group ID, start time, end time, CPU time consumed, memory usage, and the exit status of the process. This granular data can be invaluable for understanding system utilization patterns, identifying unusual activity, and reconstructing event sequences.

Unlike user-space command history mechanisms like `bash_history`, kernel process accounting operates at a lower level, making it more resilient to manipulation by unprivileged users or compromised applications. While `bash_history` records commands as they are typed in a shell, kernel accounting captures the execution of any process, regardless of how it was initiated. This includes scripts, background processes, and commands executed directly by other programs, offering a more comprehensive view of system activity.

Enabling kernel process accounting typically involves mounting the `acct` filesystem or configuring the `sysctl` parameter `kernel.acct`. The accounting file itself is usually located at `/var/log/account/pacct` or a similar path. Tools like `sa` (summarize accounting) can then be used to parse and present the collected data in a human-readable format, allowing administrators to quickly review process statistics and identify potential anomalies.

For technical users, the data provided by kernel process accounting can be particularly useful in security contexts. It can aid in incident response by providing a timeline of executed programs, helping to pinpoint the actions of an attacker or malicious software. In compliance environments, it can serve as an audit trail, demonstrating adherence to policies regarding system usage. Developers might also leverage this data to profile application behavior and resource consumption.

Typical mitigation guidance for issues related to system logging and auditing often emphasizes the importance of regularly reviewing logs, ensuring log integrity, and integrating log data into centralized security information and event management (SIEM) systems. While kernel process accounting provides rich data, its effectiveness is maximized when combined with other logging sources and active monitoring strategies to detect and respond to suspicious activities promptly.

In a broader context, the discussion highlights the ongoing interest in robust system observability and forensic capabilities within the Linux ecosystem. As systems become more complex and threats more sophisticated, the ability to accurately track and understand process execution remains a critical component of system administration, security, and compliance efforts. Leveraging native kernel features like process accounting offers a powerful, low-level approach to achieving this objective.

ShareXLinkedInWhatsAppFacebook

More News

view all →
security

Windows 11’s strongest security defenses can be bypassed without a screwdriver

Researchers from the University of Birmingham and Durham University have found a way to knock down some of the toughest protections in Windows 11 without physically opening or modifying the target machine. The attack assumes the attacker has already gained privileged access to the system. A chip that never checks who’s asking The attack, named “Download More RAM,” targets a small configuration chi

ai

Hazmat: Open-source containment for AI agents

Hazmat is an open-source tool that runs AI coding agents inside a separate account on your own machine. It wraps the harnesses people use: Claude Code, Codex, OpenCode, Cursor Agent, and several more, plus any script you write yourself. An agent launched the ordinary way runs as you, which means it can read anything you can read. That includes SSH keys, cloud credentials, and the pile of configura

nation-state

Product showcase: ScamNet looks for warning signs in suspicious calls and shady links

ScamNet: Anti-Scam Suite is a consumer security app from Synaptrex Technologies that helps users detect and block scams involving phone calls, text messages, websites, and other suspicious content. The app is available for iPhone, iPad, and Mac, with features varying by platform. Call protection is available on iPhone, while tools such as Visual Intelligence are supported on iPhone and iPad. The a

vulnerability

Microsoft blames AI for delayed Exchange update, can’t say when it will arrive

Dealing with machine-made bug backlog makes it hard to find a moment to deliver promised subscription service

breach

Chinese AI company Zhipu claims its new is a better bug-finder than Anthropic, OpenAI

PLUS: HCL, TCS, admit data breaches; Google, Apple, India bans some rideshare tips; and more!

breach

SafePal data breach impacts 39,798 customers, stolen info for sale

Cryptocurrency hardware wallet provider SafePal is warning of a data breach affecting about 39,798 customers after a flaw was exploited to steal customer order information, and a threat actor is now claiming to be selling the stolen data. [...]