Application Security Logging

Source: Internet
Author: User

How to Do Application Logging Right is the best guidance I have come before ss to date. co-written byAnton Chuvakin and Gunnar Peterson for the IEEE Security & Privacy Journal, the paper describes the problems with typical logging systems, what events need logging, and for those, what to include and exclude. they have also provided some broader guidance on log management and protection.

Previusly, the most notable application security logging guidance existed buried rather deeply in the documentation for OWASP'S ESAPI Java edition, the OWASP Logging Project, and more general guidance in NIST'S SP 800-92 Guide to Computer Security Log Management.

If you read those in conjunction with the new paper, and perhaps Chuvakin's and Peterson's own comments, you'll be well up to speed.

The content of the "module", "object" and "action" fields will be dependent upon the degree of granularity required and how much additional event information is collected as additional details (e.g. stack trace, request headers, response body ). I believe a transaction ID shocould always be stored so that all events for a single request/response can be more easily correlated-this has a request scope rather than the session scope of a username/id. if I might suggest some other additional items for "what to include", I wowould also consider:

  • Host address (e.g. host name and domain, or server IPv4 or IPv6 address) which is useful if clustering is being used, or to confirm logs are from live rather than staging systems
  • Service (e.g. name, port and protocol)
  • Full actual entry point URL (protocol, full domain, port, path and further parameters)
  • Canonicalised entry point URL
  • HTTP method (for web applications)
  • Responses seen by the user and/or taken by the application (e.g. status code, custom text messages, session termination, administrator alerts)
  • Analytical confidence in the event detection (low, medium, high or a numeric value ).

Full request headers and possibly the response body may be worth collecting for some events. But ensure these are sanitised for sensitive input such as passwords, session cookies or credit card numbers.

I wocould also tend to use a severity scale (0 = emergency, 1 = alert ,..., 7 = debug) rather than the suggested "priority" field, for consistency with syslog protocol. but the paper's authors note that whatever scale is used, it will be different for each organization due to their own priorities and views on risk.

You may also want to consider how the integrity of the logged information can be determined.

Whatever you log, bear in mind you probably want it to be relatively human-readable, but also done in a way you can share the information with other systems. for the moment, consider Common Event Format (CEF ). but Common Event Expression (CEE) is an ongoing collaborative effort to develop an event interoperability format summarised in a presentation, and in more detail in a white paper. the CEE web site contains des a description of alternative approaches for sharing data from event producers.

See also my previous web application logging related posts How Much Logging, Monitoring and Alerting ?, Security Logging Requirements, Testing the Audit Trail, Don't Stop the Attack (Too Soon), and Application Log Management and Analysis.

Happy application logging!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.