The upcoming release of FreeBSD 6.2 includes the new Security Event Auditing system, that "permits the selective and fine-grained logging of security-relevant system events for the purposes of post-mortem analysis, intrusion detection, and run-time monitoring analysis." Federico Biancuzzi interviewed Robert Watson, founder of the TrustedBSD project, and discussed the advantages and potentialities it brings.
Editor's note: as of this writing, FreeBSD 6.2 is in beta3 status with the final release expected very soon.
Could you introduce yourself?
Robert Watson: I first touched a BSD box in around 1994, thanks to the donation of a BSD/OS system and SLIP connection from UUNet to my high school. It was love at first sight! Discovering FreeBSD not long after, I've been a regular FreeBSD user since around 1995, although I only became involved in FreeBSD development in 1999, gaining a "commit bit" to help maintain the FreeBSD portions of the Coda distributed file system, a project I had worked on while at Carnegie Mellon University. My undergraduate degree is in Logic and Computation, from CMU's philosophy department, along with a double major in Computer Science, but it became clear that my greatest interest lay in operating systems and security. After working on file system ACLs and mandatory access control for FreeBSD, I started the TrustedBSD Project in 2000, with the goal of bringing more advanced security features to the platform.
In 2001, while working at Network Associates Laboratories (NAI Labs, and later McAfee Research), I proposed and became Principal Investigator on a research project as part of DARPA's CHATS research program, which was investigating security and open source. This project included sponsoring and developing UFS2, OpenPAM, the TrustedBSD MAC Framework, NSS support, PAE support, several network stack hardening projects (including syncache and syncookies for FreeBSD), GEOM, and GBDE. Since that time, I've lead projects to port the SELinux FLASK/TE module to FreeBSD, implement Audit on Mac OS X and FreeBSD, and to port the TrustedBSD MAC Framework to Mac OS X. I've also become actively involved in the FreeBSD SMP network stack work, become a FreeBSD Core Team member, a member of the security officer and release engineering teams, and president of the FreeBSD Foundation.
In the autumn of 2004, I left employment at SPARTA, Inc., as a Senior Principal Scientist to start work on a PhD at the Computer Laboratory at the University of Cambridge, working in the areas of operating systems, windowing systems, and application security. My work on FreeBSD continues as part of my research, intermittently under contract to various FreeBSD-consuming companies, and quite extensively in my spare time.
What is the Security Event Auditing that has recently been included in FreeBSD?
Robert Watson: Security Event Auditing refers to the fine-grained logging of security events in the system, and is basic security functionality long overdue in open source operating systems. There are three things that differentiate auditing from traditional OS logging facilities such as syslog: security/reliability, granularity, and configurability. Security standards require that audit trails be both secure and reliable--for example, that log records only be accepted from trusted sources, and that they be delivered with reliability guarantees to the audit log. They require the ability to track very fine-grained security events, including files accesses, network events, and so on. Finally, the standards require that this be configurable so that the rate and content of logging can be usefully managed. UNIX syslog does none of these facilities well, if at all, as it is a general purpose log mechanism.
Our code is derived from the Mac OS X audit implementation created by McAfee Research for Apple's Mac OS X Common Criteria evaluation, which was generously released by Apple under the BSD license. During the work for Apple, we identified Sun's BSM API and file format as the de facto industry standard for UNIX audit implementations -- it was extensively documented, the foundation of a previously evaluated system, and was extensible to new events and data types. As an added bonus, it was already widely supported by intrusion detection and other software systems that consume audit records. Our implementation maintains the flexibility to switch to other formats in the future, but BSM appears to be serving us very well currently.
The Apple implementation consists of three parts: a kernel audit event engine and event sources, a userland library and toolset for managing audit data, and extensions to applications to generate audit logs. We ported the kernel portion to FreeBSD, enhancing it significantly as part of our "audit3" implementation. This included making it endian-independent, extending is coverage of events, and adding facilities to support live intrusion detection, such as audit pipes. These allow applications to attach to the live audit stream and specify interest in types of events to track.
We also enhanced the library and tool suite significantly, making it endian-independent, adding 64-bit support, adding missing APIs, documenting it, and generally cleaning things up. We have released this code as OpenBSM, which is portable to a number of systems, including FreeBSD, Mac OS X, and Linux. This means you can process audit compatible trails from FreeBSD, sparc64-based Solaris and Mac OS X on any of these platforms, and it is a relatively simple task to port to additional platforms. Finally, we re-implemented the application extensions for FreeBSD, such as changes to login(1) and su(8), which differ significantly across operating systems.
We have also spent a lot of time creating documentation, writing a FreeBSD Handbook chapter on configuring audit, man pages, and so on. Users will also find that much of the existing Mac OS X and Solaris audit documentation applies directly to FreeBSD, especially as relates to configuration files.