How to Do Application Logging Right

Monday, August 16, 2010

Anton Chuvakin

Ebb72d4bfba370aecb29bc7519c9dac2

Just wanted to highlight another useful resource on logging: "How to Do Application Logging Right” by Gunnar Peterson and myself.

Following on our previous IEEE paper (here [PDF]), we explored application logging from a developer's perspective. As Gunnar already pointed out, “audit logs are one of the quick, dirty and cheap things that can improve enterprise security.”

Here is a fun except:

“Organizations have finally gotten network device logging and—to some extent—server logging under control. However, after getting used to neat Cisco Adaptive Security Appliance or other firewall logs and Linux “password accepted” messages, security incident investigators trying to respond to the next wave of attacks have been thrust into the horrific world of application logging.”

and

“We can start by establishing  criteria for good security audit logs (which we just call “logs” from now on). […]  On the basis of the six Ws, the following list [see paper] provides a starting point for what to include [in each application log message]”

and

“Software architects and developers must “get” logging; there’s no other way. This is because infrastructure logging from network devices and operating systems won’t cut it for detecting and investigating application-level threats. Security teams will need to guide developers and architects through useful, effective logging.”

Grab the paper here [PDF] and enjoy!

And, Raffy, you owe me another beer for “We thank Raffy Marty of Loggly for his thoughtful review of the draft article.” :-) In fact, I think me using the word “thoughtful” here justifies “beer+2”…

Cross-posted from Security Warror

Possibly Related Articles:
2579
Webappsec->General
Web Application Security
Post Rating I Like this!
D5e39323dd0a7b8534af8a5043a05da2
Fred Williams Very good subject, Anton. I'm a developer in the Java, open source world and I recommend the open sourced Log4j logging - part of the Apache project. It is very easy to download and configure to use in your applications.

Log4j can send logs to a file, but also to SYSLOG, and eventually on to centralized logging facilities like Splunk.

Be mindful that there are pitfalls to logging - such as how much logging to do in production vs. test environments. How many log files to keep for history. The format of each log file. Different levels of logging: severe, informational, debugging, fatal, etc.

I'm going to use your suggestions on "What to include" and "What to log" sections in my system requirements.

Great paper!
1281992617
Ebb72d4bfba370aecb29bc7519c9dac2
Anton Chuvakin Thanks a lot for the comment. Indeed, log4j is the way to go in regards to HOW to log, and my paper is more about WHAT to log.
1281994740
The views expressed in this post are the opinions of the Infosec Island member that posted this content. Infosec Island is not responsible for the content or messaging of this post.

Unauthorized reproduction of this article (in part or in whole) is prohibited without the express written permission of Infosec Island and the Infosec Island member that posted this content--this includes using our RSS feed for any purpose other than personal use.