SlideShare a Scribd company logo
Why proper logging is important...
                                          ...in all phases of development?


             Péter Czanik
             community manager


Copyright 2013 BalaBit IT Security Ltd.
About me
      • Peter Czanik from Hungary

      • community manager at BalaBit: syslog-ng upstream
      • BalaBit is an IT security company with HQ in Budapest,
        Hungary with 100+ developers
      • part of the openSUSE testing team
      • openSUSE syslog-ng package maintainer




Copyright 2013 BalaBit IT Security Ltd.
Topics
      • no, it is not about cutting trees :-)

      •      what is syslog? and syslog-ng?
      •      who uses syslog-ng?
      •      what to log?
      •      free-form messages against name-value pairs
      •      the new buzzword: journal
      •      standardization efforts: CEE/Lumberjack
      •      name-value pairs at work: ELSA




Copyright 2013 BalaBit IT Security Ltd.
What is syslog?
      • logging: recording events
      • syslog:
              - application: collecting events
              - data: the actual log messages
              - protocol: forwarding events

      • history:
              - originally developed as a logging tool for sendmail
              - quickly many other apps started to use it

      • syslog-ng: “next generation” syslog server
              - since 1997

      - focus on central log collection

Copyright 2013 BalaBit IT Security Ltd.
What is syslog-ng
      • “Swiss army knife” of logging
      • OSE vs. PE

      •      high performance
      •      more input sources (files, programs, and so on)
      •      more destinations (databases, encrypted net, etc.)
      •      better filtering (not only priority, facility)
      •      processing (rewrite, parse, correlate, and so on)
      •      JSON output and parser
      •      AMQP




Copyright 2013 BalaBit IT Security Ltd.
Who uses syslog-ng?
      • syslog-ng is the default logging solution in SLES since
        SLES 10
              - Uses 2.0, an ancient version

      • syslog-ng is the default logging solution in Gentoo
      • syslog-ng is available in openSUSE (package is
        maintained by me :-) )

      • ...and?




Copyright 2013 BalaBit IT Security Ltd.
Who uses syslog-ng?




Copyright 2013 BalaBit IT Security Ltd.
What to log?
      • what: everything :-)
      • in more detail: SANS Top5 log reports:
              - authentication, change, resource access, etc.

      • during development logging is often an afterthought
              - some/many of the above is missing
              - aids just coding
              - difficult to debug or audit in production

      • logging should be an integral part of development
              - think also about production :-)
              - consult with operators → DEVOPS!!!
              - use a similar logging environment, as in production


Copyright 2013 BalaBit IT Security Ltd.
How to log?
      • short answer: centrally
      • long: centrally, because:
              - ease of use: one place to check instead of many
              - availability: even if the sender machine is down
              - security: logs are available even if sender machine is compromised




Copyright 2013 BalaBit IT Security Ltd.
Free form log messages
      • most log messages are: date + hostname + text
              Mar 11 13:37:56 linux-6965 sshd[4547]: Accepted
              keyboard-interactive/pam for root from 127.0.0.1
              port 46048 ssh2

      • text = English sentence with some variable parts
      • easy to read by a human




Copyright 2013 BalaBit IT Security Ltd.
Why it does not scale?
      •      few logs (workstation) → easy to find information
      •      many logs (server) → difficult to find information
      •      information is presented differently by each application
      •      difficult to process them with scripts




      • answer: structured logging
              - Events represented as name value pairs


Copyright 2013 BalaBit IT Security Ltd.
Solution from syslog-ng: PatternDB
      • syslog-ng: name-value pairs inside
              - date, facility, priority, program name, pid, etc.

      • PatternDB parser:
              - can extract useful information into name-value pairs
              - add status fields based on message text
              - message classification

      • example: an ssh login failure:
              - user=root, action=login, status=failure
              - classified as “violation”




Copyright 2013 BalaBit IT Security Ltd.
Journal
      • the logging component of system
      • name-value pairs inside:
              - message
              - trusted properties
              - sny additional name-value pairs

      • native support for name-value pair storage

      • persistent log storage can be disabled
      • logs can be forwarded to syslog-ng through a socket
      • syslog-ng can filter, process logs and forward them to
        central log server


Copyright 2013 BalaBit IT Security Ltd.
Journal: the enemy?
      •      FAQ: Q: is journal the enemy? A: No!
      •      Journal is local only (syslog-ng: client – server)
      •      Journal does not filter or process log messages
      •      Journal is limited to Linux/systemd (syslog-ng: all
             Linux/BSD/UNIX)




Copyright 2013 BalaBit IT Security Ltd.
CEE
      • Journal, syslog-ng, Windows eventlog, rsyslog, auditd,
        and so on are based on name-value pairs
      • All use different field names
      • Standardization is a must: CEE → Common Event
        Expression
      • Events: name-value pairs instead of free-form text
      - Taxonomy: name-value pairs to describe events (example: status)
      - Dictionary: name-value pairs for event parameters (example: user)

      • PatternDB can turn free-form messages into CEE




Copyright 2013 BalaBit IT Security Ltd.
Name-value pairs in action: ELSA
      •      ELSA: Enterprise Log Search and Archive
      •      based on syslog-ng, PatternDB and MySQL
      •      simple and powerful web GUI
      •      extreme scalability
      •      patterns focused on network security:
              - firewalls: Cisco, iptables
              - IDS: Snort, Suricata, Bro
              - HTTP, Windows logs, etc.




Copyright 2013 BalaBit IT Security Ltd.
Search




Copyright 2013 BalaBit IT Security Ltd.
Graph




Copyright 2013 BalaBit IT Security Ltd.
Map




Copyright 2013 BalaBit IT Security Ltd.
So, why syslog-ng?
      •      15 years of open source development
      •      high performance log management
      •      flexible configuration
      •      excellent documentation
      •      PatternDB message parsing




Copyright 2013 BalaBit IT Security Ltd.
Questions? (and some answers)
      • Questions?

      • Some useful syslog-ng resources:
              - Syslog-ng: http://www.balabit.com/network-security/syslog-ng
              - SANS top5 essential log reports extended:
              http://chuvakin.blogspot.hu/2010/08/updated-with-community-
              feedback-sans_06.html
              - Many books at http://oreilly.com/
              - ELSA: http://code.google.com/p/enterprise-log-search-and-archive/
              - My blog: http://czanik.blogs.balabit.com/




Copyright 2013 BalaBit IT Security Ltd.
Thank You!
                                             Péter Czanik
                                            community manager
                                          peter.czanik@balabit.com




Copyright 2013 BalaBit IT Security Ltd.

More Related Content

PPTX
Protect your private data with ORC column encryption
PPT
Building a lightweight discovery interface for Chinese patents
PDF
Core Principles Of Ci
PPTX
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
PPTX
Secure360 - Attack All the Layers! Again!
PPTX
Structor - Automated Building of Virtual Hadoop Clusters
PDF
ION Belfast - Securing BGP - David Freedman
PDF
NiFi Developer Guide
Protect your private data with ORC column encryption
Building a lightweight discovery interface for Chinese patents
Core Principles Of Ci
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Secure360 - Attack All the Layers! Again!
Structor - Automated Building of Virtual Hadoop Clusters
ION Belfast - Securing BGP - David Freedman
NiFi Developer Guide

What's hot (13)

PPTX
Hdp security overview
PDF
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
PPTX
Overview of HDFS Transparent Encryption
PDF
Hadoop & Security - Past, Present, Future
PPTX
Hadoop Security Today and Tomorrow
PPTX
Open Source Security Tools for Big Data
PDF
Dataflow Management From Edge to Core with Apache NiFi
PDF
Attack all the layers secure 360
PPTX
Hadoop Security Today & Tomorrow with Apache Knox
PPTX
Scale your Alfresco Solutions
PPT
Hadoop Security Architecture
PPTX
Redis for Security Data : SecurityScorecard JVM Redis Usage
PPTX
PostgreSQL Security. How Do We Think?
Hdp security overview
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
Overview of HDFS Transparent Encryption
Hadoop & Security - Past, Present, Future
Hadoop Security Today and Tomorrow
Open Source Security Tools for Big Data
Dataflow Management From Edge to Core with Apache NiFi
Attack all the layers secure 360
Hadoop Security Today & Tomorrow with Apache Knox
Scale your Alfresco Solutions
Hadoop Security Architecture
Redis for Security Data : SecurityScorecard JVM Redis Usage
PostgreSQL Security. How Do We Think?
Ad

Similar to Why proper logging is important (20)

PPTX
State of the art logging
PDF
Regulatory compliance and system logging
ODP
Get the most out of your security logs using syslog-ng
PDF
Scaling your logging infrastructure using syslog-ng
PDF
Scaling Your Logging Infrastructure With Syslog-NG
PPTX
You Can't Correlate what you don't have - ArcSight Protect 2011
PDF
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
PPT
The importance of logs - DefCamp 2012
PDF
Configuring Syslog by Octavio
PDF
syslog-ng: from log collection to processing and information extraction
PDF
Syslog Centralization Logging with Windows ~ A techXpress Guide
PDF
LOADays 2015 - syslog-ng - from log collection to processing and infomation e...
DOCX
Advanced Log Processing
PDF
2015. Libre Software Meeting - syslog-ng: from log collection to processing a...
PDF
Trouble shoot with linux syslog
PDF
Python vs JLizard.... a python logging experience
DOC
Logging "BrainBox" Short Article
PPT
Syslog.ppt
PDF
Cloud Application Logging for Forensics
PDF
Balabit Company Overview
State of the art logging
Regulatory compliance and system logging
Get the most out of your security logs using syslog-ng
Scaling your logging infrastructure using syslog-ng
Scaling Your Logging Infrastructure With Syslog-NG
You Can't Correlate what you don't have - ArcSight Protect 2011
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
The importance of logs - DefCamp 2012
Configuring Syslog by Octavio
syslog-ng: from log collection to processing and information extraction
Syslog Centralization Logging with Windows ~ A techXpress Guide
LOADays 2015 - syslog-ng - from log collection to processing and infomation e...
Advanced Log Processing
2015. Libre Software Meeting - syslog-ng: from log collection to processing a...
Trouble shoot with linux syslog
Python vs JLizard.... a python logging experience
Logging "BrainBox" Short Article
Syslog.ppt
Cloud Application Logging for Forensics
Balabit Company Overview
Ad

More from BalaBit (15)

PDF
NIAS 2015 - The value add of open source for innovation
PDF
Les Assises 2015 - Why people are the most important aspect of IT security?
PDF
Big Data Science - hype?
ODP
DevAssistant, Docker and You
PDF
Linux Kernel – Hogyan csapjunk bele?
PPTX
Swift -Helyzetjelentés az iOS programozás új nyelvéről
PPTX
DATA DRIVEN DESIGN - avagy hogy fér össze a kreativitás a tényekkel
PPTX
eCSI - The Agile IT security
PDF
Top 10 reasons to monitor privileged users
PDF
Hogyan maradj egészséges irodai munka mellett?
ODP
Kontrolle und revisionssichere Auditierung privilegierter IT-Zugriffe
PPTX
Techreggeli - Logmenedzsment
PDF
BalaBit IT Security cégismertető prezentációja
PDF
The Future of Electro Car
PDF
Compliance needs transparency
NIAS 2015 - The value add of open source for innovation
Les Assises 2015 - Why people are the most important aspect of IT security?
Big Data Science - hype?
DevAssistant, Docker and You
Linux Kernel – Hogyan csapjunk bele?
Swift -Helyzetjelentés az iOS programozás új nyelvéről
DATA DRIVEN DESIGN - avagy hogy fér össze a kreativitás a tényekkel
eCSI - The Agile IT security
Top 10 reasons to monitor privileged users
Hogyan maradj egészséges irodai munka mellett?
Kontrolle und revisionssichere Auditierung privilegierter IT-Zugriffe
Techreggeli - Logmenedzsment
BalaBit IT Security cégismertető prezentációja
The Future of Electro Car
Compliance needs transparency

Why proper logging is important

  • 1. Why proper logging is important... ...in all phases of development? Péter Czanik community manager Copyright 2013 BalaBit IT Security Ltd.
  • 2. About me • Peter Czanik from Hungary • community manager at BalaBit: syslog-ng upstream • BalaBit is an IT security company with HQ in Budapest, Hungary with 100+ developers • part of the openSUSE testing team • openSUSE syslog-ng package maintainer Copyright 2013 BalaBit IT Security Ltd.
  • 3. Topics • no, it is not about cutting trees :-) • what is syslog? and syslog-ng? • who uses syslog-ng? • what to log? • free-form messages against name-value pairs • the new buzzword: journal • standardization efforts: CEE/Lumberjack • name-value pairs at work: ELSA Copyright 2013 BalaBit IT Security Ltd.
  • 4. What is syslog? • logging: recording events • syslog: - application: collecting events - data: the actual log messages - protocol: forwarding events • history: - originally developed as a logging tool for sendmail - quickly many other apps started to use it • syslog-ng: “next generation” syslog server - since 1997 - focus on central log collection Copyright 2013 BalaBit IT Security Ltd.
  • 5. What is syslog-ng • “Swiss army knife” of logging • OSE vs. PE • high performance • more input sources (files, programs, and so on) • more destinations (databases, encrypted net, etc.) • better filtering (not only priority, facility) • processing (rewrite, parse, correlate, and so on) • JSON output and parser • AMQP Copyright 2013 BalaBit IT Security Ltd.
  • 6. Who uses syslog-ng? • syslog-ng is the default logging solution in SLES since SLES 10 - Uses 2.0, an ancient version • syslog-ng is the default logging solution in Gentoo • syslog-ng is available in openSUSE (package is maintained by me :-) ) • ...and? Copyright 2013 BalaBit IT Security Ltd.
  • 7. Who uses syslog-ng? Copyright 2013 BalaBit IT Security Ltd.
  • 8. What to log? • what: everything :-) • in more detail: SANS Top5 log reports: - authentication, change, resource access, etc. • during development logging is often an afterthought - some/many of the above is missing - aids just coding - difficult to debug or audit in production • logging should be an integral part of development - think also about production :-) - consult with operators → DEVOPS!!! - use a similar logging environment, as in production Copyright 2013 BalaBit IT Security Ltd.
  • 9. How to log? • short answer: centrally • long: centrally, because: - ease of use: one place to check instead of many - availability: even if the sender machine is down - security: logs are available even if sender machine is compromised Copyright 2013 BalaBit IT Security Ltd.
  • 10. Free form log messages • most log messages are: date + hostname + text Mar 11 13:37:56 linux-6965 sshd[4547]: Accepted keyboard-interactive/pam for root from 127.0.0.1 port 46048 ssh2 • text = English sentence with some variable parts • easy to read by a human Copyright 2013 BalaBit IT Security Ltd.
  • 11. Why it does not scale? • few logs (workstation) → easy to find information • many logs (server) → difficult to find information • information is presented differently by each application • difficult to process them with scripts • answer: structured logging - Events represented as name value pairs Copyright 2013 BalaBit IT Security Ltd.
  • 12. Solution from syslog-ng: PatternDB • syslog-ng: name-value pairs inside - date, facility, priority, program name, pid, etc. • PatternDB parser: - can extract useful information into name-value pairs - add status fields based on message text - message classification • example: an ssh login failure: - user=root, action=login, status=failure - classified as “violation” Copyright 2013 BalaBit IT Security Ltd.
  • 13. Journal • the logging component of system • name-value pairs inside: - message - trusted properties - sny additional name-value pairs • native support for name-value pair storage • persistent log storage can be disabled • logs can be forwarded to syslog-ng through a socket • syslog-ng can filter, process logs and forward them to central log server Copyright 2013 BalaBit IT Security Ltd.
  • 14. Journal: the enemy? • FAQ: Q: is journal the enemy? A: No! • Journal is local only (syslog-ng: client – server) • Journal does not filter or process log messages • Journal is limited to Linux/systemd (syslog-ng: all Linux/BSD/UNIX) Copyright 2013 BalaBit IT Security Ltd.
  • 15. CEE • Journal, syslog-ng, Windows eventlog, rsyslog, auditd, and so on are based on name-value pairs • All use different field names • Standardization is a must: CEE → Common Event Expression • Events: name-value pairs instead of free-form text - Taxonomy: name-value pairs to describe events (example: status) - Dictionary: name-value pairs for event parameters (example: user) • PatternDB can turn free-form messages into CEE Copyright 2013 BalaBit IT Security Ltd.
  • 16. Name-value pairs in action: ELSA • ELSA: Enterprise Log Search and Archive • based on syslog-ng, PatternDB and MySQL • simple and powerful web GUI • extreme scalability • patterns focused on network security: - firewalls: Cisco, iptables - IDS: Snort, Suricata, Bro - HTTP, Windows logs, etc. Copyright 2013 BalaBit IT Security Ltd.
  • 17. Search Copyright 2013 BalaBit IT Security Ltd.
  • 18. Graph Copyright 2013 BalaBit IT Security Ltd.
  • 19. Map Copyright 2013 BalaBit IT Security Ltd.
  • 20. So, why syslog-ng? • 15 years of open source development • high performance log management • flexible configuration • excellent documentation • PatternDB message parsing Copyright 2013 BalaBit IT Security Ltd.
  • 21. Questions? (and some answers) • Questions? • Some useful syslog-ng resources: - Syslog-ng: http://www.balabit.com/network-security/syslog-ng - SANS top5 essential log reports extended: http://chuvakin.blogspot.hu/2010/08/updated-with-community- feedback-sans_06.html - Many books at http://oreilly.com/ - ELSA: http://code.google.com/p/enterprise-log-search-and-archive/ - My blog: http://czanik.blogs.balabit.com/ Copyright 2013 BalaBit IT Security Ltd.
  • 22. Thank You! Péter Czanik community manager peter.czanik@balabit.com Copyright 2013 BalaBit IT Security Ltd.