FreeBSD 6.2 nears release

Robert Watson on the new security event auditing system

Internet Security Threat Report 2014

Some files and data are managed directly by the kernel because root should not be able to access them. How much can we trust the kernel? We have already seen some attacks that let you gain kernel level access...

Robert Watson: The question of implementing system integrity, and hence log integrity, is a challenging one. Classically, UNIX systems have three security layers: the kernel environment, which has complete control over system hardware and runs in a privileged execution mode, processes owned by the root user, which are typically denied most direct hardware access, but are able to access all facilities through system calls, and user processes, which are constrained to a subset of those facilities and by inter-user protections such as file permissions.

Components required to provide system security are referred to as the Trusted Code Base (TCB), and audit is largely about logging interactions between untrusted users and the trusted code base. In classic UNIX, both the kernel and root user are central to the TCB, as the kernel deals with implementing most access control, but the notions of user authentication and rights assignment occur entirely in user space as the root user.

When audit is added to this sort of system, the kernel and root user typically have the right to modify and view the audit log, but normal users can neither submit records nor view them. The kernel manages the audit trail for two reasons: because it's a primary source of events (system calls), and because it is in a position to make guarantees about log reliability that user processes cannot easily make. In FreeBSD 6.2, we basically follow this model, wherein the root user is able to configure and manage the trail, although there is an audit review group, so users can be added to that group to review logs without root privilege, but the basic model remains the same.

In systems with more complex security models, such as the Biba integrity model present in TrustedBSD and other systems, the notion of the TCB is significantly refined. Operating as the root user doesn't necessarily imply write access to the audit trail - for example, when combining integrity models with the audit trail mechanism, the audit trail is typically considered "high integrity", and can only be directly manipulated by subjects authorised to modify high integrity objects. Trail entries can be appended by lower integrity subjects, but existing records cannot be changed.

Audit support does not, and is not intended to eliminate, these structural concerns. Audit records are, in the end, data, and data has to be protected using the protection mechanisms you have at hand. If the security model has an all-powerful root user, then a root compromise can lead to modified or deleted local logs. This doesn't mean that audit isn't still useful.

For example, audit logs can be piped to a remote machine, meaning that audit logs will capture the behaviour of the attacker, including the initial compromise, up until the point where the audit system is disabled or becomes untrustworthy. It's also important to remember that many attacks don't actually involve root compromise: when performing post-mortem analysis of an insider attack, a web server compromise, or sniffed/grabbed/brute-forced passwords, root access is neither the goal nor required by the attacker.

Is there any support for automatically crypting logs?

Robert Watson:Currently there is no explicit support for this. When logs are cycled, we support running a configurable script, however, and this can be used for encryption, moving trail files around the network, archiving to CD or other write-once media, compression, etc. We don't currently support this as a continuous action on a live stream, although it's something under discussion.

Does the framework provide a secure way to forward logs?

Robert Watson: Currently, no. As with encryption, it's possibly to set up scripted handling of completed trail files, but we don't include native network support. Security distributed audit trail distribution and management is high on the todo list for a future OpenBSM release.

Another thing high on our to do list is support for multiple parallel trails with different security properties on a single system. Right now we have the notion of a single "system" audit trail, although applications can use the BSM library to construct records and write them to either the system trail or to a file they maintain themselves. We'd like to add support for the system to host multiple concurrent trails, perhaps associated with specific applications, jails, and so on, which operate independently and can be accessed using different privilege sets.

For those interested in trying out experimental Audit support in FreeBSD 6.2, an excellent starting point is the FreeBSD Handbook chapter on configuring and adminstering audit support. There are also fairly extensive man pages covering both administration and the programming environment.

Programmers of IDS systems may be particularly interested in the auditpipe(4) facility, which allows applications to tap the live event stream, specify filters on what audit records are delivered to the application, etc. This is a great tool and allows IDS systems to directly control record gathering without interfering with the system trail or other monitoring applications that have different record requirements.

This article originally appeared in Security Focus.

Copyright © 2006, SecurityFocus

Security for virtualized datacentres

More from The Register

next story
Microsoft WINDOWS 10: Seven ATE Nine. Or Eight did really
Windows NEIN skipped, tech preview due out on Wednesday
Business is back, baby! Hasta la VISTA, Win 8... Oh, yeah, Windows 9
Forget touchscreen millennials, Microsoft goes for mouse crowd
Apple: SO sorry for the iOS 8.0.1 UPDATE BUNGLE HORROR
Apple kills 'upgrade'. Hey, Microsoft. You sure you want to be like these guys?
ARM gives Internet of Things a piece of its mind – the Cortex-M7
32-bit core packs some DSP for VIP IoT CPU LOL
Microsoft on the Threshold of a new name for Windows next week
Rebranded OS reportedly set to be flung open by Redmond
prev story


Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.