SlideShare une entreprise Scribd logo
1  sur  69
Télécharger pour lire hors ligne
NetBSD syslogd/IETF Syslog Protocols –
            Final Report

              Martin Schütte




             18 October 2008
BSD Syslog                IETF    TLS             Protocol & API   Syslog-Sign          Future




                                 Project Overview


 Google Summer of Code project: Improve NetBSD’s syslogd

 Deliverables:
   • TLS network transport
   • New message format
   • Digital Signatures




             Martin Schütte         syslogd with IETF protocols       EuroBSDCon 2008    2 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign          Future




 BSD Syslog

 IETF

 TLS

 Protocol & API

 Syslog-Sign

 Future



             Martin Schütte        syslogd with IETF protocols       EuroBSDCon 2008    3 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign          Future




                                 Using Log Data


    • Debugging
    • Statistics/Planning
    • Accountability for user actions
    • Detect ongoing attacks
    • Examine security incidents




             Martin Schütte        syslogd with IETF protocols       EuroBSDCon 2008    4 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign          Future




                                   BSD Syslog

    • primarily designed for programming/debugging
    • simple, uniform, easy to use and configure
    • easy remote logging using UDP
    • de facto standard for logging on Unix
 Combination of:
   • API
   • message format
   • daemon
   • IPC protocol


             Martin Schütte        syslogd with IETF protocols       EuroBSDCon 2008    5 / 40
BSD Syslog                IETF              TLS              Protocol & API       Syslog-Sign          Future




                                                        API
 SYSLOG(3)                    NetBSD Library Functions Manual         SYSLOG(3)

 NAME
     syslog, vsyslog, openlog, closelog, setlogmask -- control system log

 LIBRARY
      Standard C Library (libc, -lc)

 SYNOPSIS
      #include <syslog.h>

      void
      syslog(int priority, const char *message, ...);

      void
     openlog(const char *ident, int logopt, int facility);

      void
      closelog(void);

      int
      setlogmask(int maskpri);

             Martin Schütte                    syslogd with IETF protocols           EuroBSDCon 2008    6 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign          Future




                                 Syslog Message Format

 <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991
 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out


   • Priority
   • Header                                          By convention:
       • Timestamp                                     • Priority not written to logfile
       • Hostname                                      • only printable ASCII
   • Message                                           • up to 1024 characters
       • Tag
       • Content



             Martin Schütte            syslogd with IETF protocols       EuroBSDCon 2008    7 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign          Future




                                 Syslog Message Format

 <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991
 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out


   • Priority
   • Header                                          By convention:
       • Timestamp                                     • Priority not written to logfile
       • Hostname                                      • only printable ASCII
   • Message                                           • up to 1024 characters
       • Tag
       • Content



             Martin Schütte            syslogd with IETF protocols       EuroBSDCon 2008    7 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign          Future




                                 Syslog Message Format

 <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991
 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out


   • Priority
   • Header                                          By convention:
       • Timestamp                                     • Priority not written to logfile
       • Hostname                                      • only printable ASCII
   • Message                                           • up to 1024 characters
       • Tag
       • Content



             Martin Schütte            syslogd with IETF protocols       EuroBSDCon 2008    7 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign          Future




                                 Syslog Message Format

 <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991
 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out


   • Priority
   • Header                                          By convention:
       • Timestamp                                     • Priority not written to logfile
       • Hostname                                      • only printable ASCII
   • Message                                           • up to 1024 characters
       • Tag
       • Content



             Martin Schütte            syslogd with IETF protocols       EuroBSDCon 2008    7 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign          Future




                                 Syslog Message Format

 <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991
 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out


   • Priority
   • Header                                          By convention:
       • Timestamp                                     • Priority not written to logfile
       • Hostname                                      • only printable ASCII
   • Message                                           • up to 1024 characters
       • Tag
       • Content



             Martin Schütte            syslogd with IETF protocols       EuroBSDCon 2008    7 / 40
BSD Syslog                IETF    TLS             Protocol & API   Syslog-Sign          Future




                                 daemon: syslogd


    • collects messages from kernel, applications, and network
    • filters by priority
    • writes to files, programs, terminals, or network (UDP)

    • newer implementations/versions with additional features:
        • filter by host/program/regexp
        • different message and timestamp formats
        • memory buffers, TCP, or SQL servers as destinations




             Martin Schütte         syslogd with IETF protocols       EuroBSDCon 2008    8 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign          Future




                                 “Transport Protocol“


 Input from
   • local applications: socket(AF_UNIX, SOCK_DGRAM, 0);
   • network: socket(AF_INET, SOCK_DGRAM, 0);
   • kernel: open("/dev/klog", O_RDONLY, 0);
      (file interface to ring buffer)
 ⇒ One message per recvfrom()/read().




             Martin Schütte           syslogd with IETF protocols       EuroBSDCon 2008    9 / 40
BSD Syslog                IETF     TLS             Protocol & API   Syslog-Sign         Future




                                 Problems with UDP

 Advantage:
   • simple and efficient (usable for embedded devices)
 Problems:
   • possible packet loss
   • no sender authentication
 from man syslogd:
 The ability to log messages received in UDP packets is equivalent to an
 unauthenticated remote disk-filling service. . .

 ⇒ move to TCP transport, optionally tunneled over SSL/TLS



             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   10 / 40
BSD Syslog                IETF         TLS              Protocol & API   Syslog-Sign         Future




                                  IETF Working Group
                              “Security Issues in Network Event Logging”


    • RFC 3164: The BSD Syslog Protocol (informational)
    • RFC 3195: Reliable Delivery for Syslog
    • current Drafts:
        • The Syslog Protocol
        • UDP transport mapping for Syslog
        • TLS transport mapping for Syslog
        • Signed Syslog Messages
        • Syslog Management Information Base
 Current status:
 syslog-protocol, transport-udp, transport-tls in RFC-Editor’s Queue,
 syslog-sign in IESG/AD evaluation, next draft in preparation

             Martin Schütte               syslogd with IETF protocols      EuroBSDCon 2008   11 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                 TLS Overview
                                       Internet Draft


    • point-to-point encryption, integrity, and authentication
    • requires server and client certificates
    • authenticate by CA or certificate/subject/fingerprint
    • datagram encapsulation with length prefix,
        is transparent but not self-synchronizing:
        APPLICATION - DATA = 1* SYSLOG - FRAME
        SYSLOG - FRAME = MSG - LEN SP SYSLOG - MSG
        MSG - LEN = NONZERO - DIGIT * DIGIT

    • message length: 2048 octets MUST, 8192 octets SHOULD
        be supported, no upper limit

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   12 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                 TLS Overview
                                       Implementation



    • uses OpenSSL library
    • accepts arbitrary message sizes
    • buffers messages on connection loss
    • implements draft-ietf-syslog-transport-tls-13
    • still misses draft-14 requirements:
        internationalized hostnames and wildcard matching
        in subjectAltName/dNSName



             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   13 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                         Problems introduced with TLS


    • many new settings in syslog.conf
      ⇒ keyword=value configuration
    • a send can fail
      ⇒ message buffers
    • concurrency from non-blocking sockets, events, timeouts
      ⇒ connection states




             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   14 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                 syslog.conf: extended options for TLS
 tls_ca ="/ etc / my . cacert "
 tls_cadir ="/ etc / openssl / CA "
 tls_cert ="/ etc / localhost . crt "
 tls_key ="/ etc / localhost . key "
 tls_gen_cert = on
 tls_verify = off

 tls_server = on
 tls_bindhost ="192.168.1.2"
 tls_bindport =" syslog - tls "
 t l s_ a l lo w_f in ge rp r i n t s = sha -1: E4 : E1 : A6 :1 C :...
 t l s _a ll o w_c lien tce r t s ="/ etc / somehost . crt "

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   15 / 40
BSD Syslog                IETF         TLS             Protocol & API   Syslog-Sign         Future




                              syslog.conf: TLS destinations


 mark ,*.*                    @ [ somehost ]( ←
                                       cert ="/ etc / somehost . crt ")
 mail .*                      @ [ logserver ]:1514( ←
                                       fingerprint =" MD5 :00: A2 :...:27")
 user .*                      @ [ fe80 ::211:9 ff : fe41 : be53 ]:1234( ←
                                       verify =" off ")
 *. alert                     @ [10.1.2.3]: syslog - tls ( ←
                                       subject =" logserver . example . org ")




             Martin Schütte              syslogd with IETF protocols      EuroBSDCon 2008   16 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                 Buffer Queue


    • every message is passed as a struct buf_msg
    • every destination has a STAILQ of unsent buffers
    • only one instance for every message, counts references
    • unreliable transports: send a buffer and forget it
    • reliable transports: append, send, then remove from STAILQ
    • count number and size of messages per queue to control
        memory usage



             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   17 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign         Future




                              Outgoing Connection States




             Martin Schütte           syslogd with IETF protocols      EuroBSDCon 2008   18 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign         Future




                              Incoming Connection States




             Martin Schütte           syslogd with IETF protocols      EuroBSDCon 2008   19 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign         Future




                              Draft: The Syslog Protocol
                                    New Message Format

    • keeps plain text format
    • full ISO timestamps and FQDNs
    • message IDs (like Windows Eventlog)
    • structured data fields with namespaces
      (derived from SNMP Private Enterprise Codes)
    • allows UTF-8 for data fields and messages
    • message length:
      MUST accept 480 octets, SHOULD accept 2048 octets, MAY
      receive larger messages (if larger: SHOULD truncate the
      payload, MAY discard the message)

             Martin Schütte           syslogd with IETF protocols      EuroBSDCon 2008   20 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                        Syslog-protocol message format
 <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47←
  [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]←
  BOM Une entré du journal des événements . . .
    • Header
        • Priority
        • Version (new)
        • Timestamp (extended)
        • Hostname
        • Application Name
        • Process ID
        • Message ID (new)
    • Structured Data (new)
    • Message text (UTF-8)

             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   21 / 40
BSD Syslog                IETF       TLS             Protocol & API   Syslog-Sign         Future




                              Format Conversion in syslogd

    • on input detect and parse
        • message only (from kernel),
        • BSD Syslog (RFC3164), or
        • Syslog-Protocol
    • work with struct buf_msg
    • on output format as
        • BSD Syslog (-o rfc3164) or
        • Syslog-Protocol (-o syslog, default)




             Martin Schütte            syslogd with IETF protocols      EuroBSDCon 2008   22 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign         Future




                                 Changes to syslog(3)



    • API unchanged
    • Syslog-Protocol from library to syslogd:
        • ISO timestamp
        • FQDN
        • new fields (MSGID and SD) remain empty




             Martin Schütte           syslogd with IETF protocols      EuroBSDCon 2008   23 / 40
BSD Syslog                IETF        TLS             Protocol & API   Syslog-Sign         Future




                                 new function: syslogp(3)

    • minimal extension to include MSGID and SD
   ≈ syslog(3) with three format strings
 void syslogp ( int priority , const char * msgid , ←
     const char * sdfmt , const char * message , ...);
 void vsyslogp ( int priority , const char * msgid , ←
     const char * sdfmt , const char * message , va_list args );

 syslog ( LOG_INFO , " foobar error : % m ");
 syslogp ( LOG_INFO , NULL , NULL , " foobar error : % m ");

 syslogp ( LOG_INFO , " ID % d " , "[ meta language =" en - US "]" , ←
     " event : % s " , 42 , E v e n t D e s c r i p t i o n );




             Martin Schütte             syslogd with IETF protocols      EuroBSDCon 2008   24 / 40
BSD Syslog                IETF      TLS             Protocol & API   Syslog-Sign         Future




                          Draft: Signed syslog Messages
                                            Overview


    • adds detached, in-band signatures
    • end-to-end authentication, integrity, sequencing, and
      lost message detection
    • design elements:
               • allow several ”streams“ with Signature Groups
               • send public key first
               • translate sequence of messages into enumerated sequence
                   of hash values
               • sign all control messages with keys and hashes



             Martin Schütte           syslogd with IETF protocols      EuroBSDCon 2008   25 / 40
BSD Syslog                IETF           TLS               Protocol & API           Syslog-Sign         Future




                                      Signature Groups
                                                   Problem




 2008-10-03T03:16:06.453358+02:00   host.example.org   /netbsd - - - wd1e: error reading
 2008-10-03T03:16:07.006246+02:00   host.example.org   /netbsd - - - wd1: soft error (corrected)
 2008-10-03T03:30:00.719082+02:00   host.example.org   cron 24634 - - (root) CMD START (atrun)
 2008-10-03T03:30:01.033121+02:00   host.example.org   cron 2613 - - (root) CMD FINISH (atrun)
 2008-10-03T03:32:15.035432+02:00   host.example.org   postfix/pickup 3251 - - EBE21FE99: . . .
 2008-10-03T03:32:15.228748+02:00   host.example.org   postfix/local 23858 - - EBE21FE99: . . .
 2008-10-03T03:32:15.234989+02:00   host.example.org   postfix/qmgr 666 - - EBE21FE99: removed
 2008-10-03T03:40:00.977562+02:00   host.example.org   cron 2289 - - (root) CMD START (atrun)




             Martin Schütte                 syslogd with IETF protocols               EuroBSDCon 2008   26 / 40
BSD Syslog                IETF           TLS               Protocol & API           Syslog-Sign         Future




                                      Signature Groups
                                                   Problem




 2008-10-03T03:16:06.453358+02:00   host.example.org   /netbsd - - - wd1e: error reading
 2008-10-03T03:16:07.006246+02:00   host.example.org   /netbsd - - - wd1: soft error (corrected)
 2008-10-03T03:30:00.719082+02:00   host.example.org   cron 24634 - - (root) CMD START (atrun)
 2008-10-03T03:30:01.033121+02:00   host.example.org   cron 2613 - - (root) CMD FINISH (atrun)
 2008-10-03T03:32:15.035432+02:00   host.example.org   postfix/pickup 3251 - - EBE21FE99: . . .
 2008-10-03T03:32:15.228748+02:00   host.example.org   postfix/local 23858 - - EBE21FE99: . . .
 2008-10-03T03:32:15.234989+02:00   host.example.org   postfix/qmgr 666 - - EBE21FE99: removed
 2008-10-03T03:40:00.977562+02:00   host.example.org   cron 2289 - - (root) CMD START (atrun)



 Problem: Different message destinations




             Martin Schütte                 syslogd with IETF protocols               EuroBSDCon 2008   26 / 40
BSD Syslog                IETF           TLS               Protocol & API           Syslog-Sign         Future




                                      Signature Groups
                                                   Problem




 2008-10-03T03:16:06.453358+02:00   host.example.org   /netbsd - - - wd1e: error reading
 2008-10-03T03:16:07.006246+02:00   host.example.org   /netbsd - - - wd1: soft error (corrected)
 2008-10-03T03:30:00.719082+02:00   host.example.org   cron 24634 - - (root) CMD START (atrun)
 2008-10-03T03:30:01.033121+02:00   host.example.org   cron 2613 - - (root) CMD FINISH (atrun)
 2008-10-03T03:32:15.035432+02:00   host.example.org   postfix/pickup 3251 - - EBE21FE99: . . .
 2008-10-03T03:32:15.228748+02:00   host.example.org   postfix/local 23858 - - EBE21FE99: . . .
 2008-10-03T03:32:15.234989+02:00   host.example.org   postfix/qmgr 666 - - EBE21FE99: removed
 2008-10-03T03:40:00.977562+02:00   host.example.org   cron 2289 - - (root) CMD START (atrun)



 Problem: Different message destinations
 ⇒ Signature Groups to partition messages




             Martin Schütte                 syslogd with IETF protocols               EuroBSDCon 2008   26 / 40
BSD Syslog                IETF    TLS             Protocol & API   Syslog-Sign         Future




                                 Signature Groups
                                          Concepts




 Signature Groups distinguished by message attributes.
 Basic concepts and relations:
 Originator      := (HOSTNAME, APP-NAME, PROCID)
 Reboot Session := (Originator, VER, RSID)
 Signature Group := (Reboot Session, SG, SPRI)




             Martin Schütte         syslogd with IETF protocols      EuroBSDCon 2008   27 / 40
BSD Syslog                IETF    TLS             Protocol & API   Syslog-Sign         Future




                                 Signature Groups
                                  SG/SPRI and Schemata


 three predefined schemata/SG values:
   • one global Signature Group (SG="0" SPRI="0")
   • 192 Signature Groups, one per PRI value
      (SG="1" SPRI="PRI ")
   • Signature Groups for ranges of sequential PRI values
      (SG="2" SPRI="X")
 and one implementation-defined value:
   • in syslogd: one Signature Group per destination
      (SG="3" SPRI="fd ")


             Martin Schütte         syslogd with IETF protocols      EuroBSDCon 2008   28 / 40
BSD Syslog                IETF   TLS               Protocol & API   Syslog-Sign         Future




                                 Payload Blocks
                                       Send Public Key

 <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ←
  [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"←
  INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C←
  MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="]


 sent on startup, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • fragmentation info (TBPL, INDEX, FLEN)
   • Payload Block (FRAG) with
               • timestamp
               • key type
               • key blob (base64)
    • DSA Signature (SIGN)
             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   29 / 40
BSD Syslog                IETF   TLS               Protocol & API   Syslog-Sign         Future




                                 Payload Blocks
                                       Send Public Key

 <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ←
  [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"←
  INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C←
  MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="]


 sent on startup, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • fragmentation info (TBPL, INDEX, FLEN)
   • Payload Block (FRAG) with
               • timestamp
               • key type
               • key blob (base64)
    • DSA Signature (SIGN)
             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   29 / 40
BSD Syslog                IETF   TLS               Protocol & API   Syslog-Sign         Future




                                 Payload Blocks
                                       Send Public Key

 <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ←
  [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"←
  INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C←
  MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="]


 sent on startup, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • fragmentation info (TBPL, INDEX, FLEN)
   • Payload Block (FRAG) with
               • timestamp
               • key type
               • key blob (base64)
    • DSA Signature (SIGN)
             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   29 / 40
BSD Syslog                IETF   TLS               Protocol & API   Syslog-Sign         Future




                                 Payload Blocks
                                       Send Public Key

 <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ←
  [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"←
  INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C←
  MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="]


 sent on startup, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • fragmentation info (TBPL, INDEX, FLEN)
   • Payload Block (FRAG) with
               • timestamp
               • key type
               • key blob (base64)
    • DSA Signature (SIGN)
             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   29 / 40
BSD Syslog                IETF   TLS               Protocol & API   Syslog-Sign         Future




                                 Payload Blocks
                                       Send Public Key

 <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ←
  [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"←
  INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C←
  MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="]


 sent on startup, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • fragmentation info (TBPL, INDEX, FLEN)
   • Payload Block (FRAG) with
               • timestamp
               • key type
               • key blob (base64)
    • DSA Signature (SIGN)
             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   29 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5


 siUJM358eYFHOS2K0MTlveWeH/U=




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5


 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA=




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5


 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA=
  j9dubU1GNVp7qWShwph/w32nD08=




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5


 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA=
  j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5


 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA=
  j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=
  RNDFNCo7hiCsK/EKumsPBbFHNZA=




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF    TLS             Protocol & API                Syslog-Sign         Future




                                 Signature Blocks
                                  Collect SHA-1 Hashes

 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg0
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg1
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg2
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg3
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg4
 <15>1   2008-08-02T02:09:27+02:00      host.example.org      test   6255   -    -   msg5
 ...


 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA=
  j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4=
 ...




             Martin Schütte         syslogd with IETF protocols                   EuroBSDCon 2008   30 / 40
BSD Syslog                IETF             TLS                 Protocol & API         Syslog-Sign         Future




                                        Signature Blocks
                                           Collect SHA-1 Hashes
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg0
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg1
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg2
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg3
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg4
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg5
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg6
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg7
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg8
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg9
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg10
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg11
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg12
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg13
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg14
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg15
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg16
 <15>1   2008-08-02T02:09:27+02:00   host.example.org   test   6255   -   -   msg17

 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08=
  XQDLZ/NuwirmLdMORtm84r9kIW4= RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4=
  e2M/OqjHDfxLVUSPt1CsNJHm9wU= Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0=
  pd+N5kmlnyQ0BoItELd/KWQrcMg= dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY=
  qgTqV4EgfUFd3uZXNPvJ25erzBI= XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus=
  PIvLm0mh+he5+PDihG1p7sQlx8k= lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY=

             Martin Schütte                   syslogd with IETF protocols               EuroBSDCon 2008   30 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF        TLS              Protocol & API           Syslog-Sign         Future




                                    Signature Blocks
                                 Send Signature Block Message

 <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"←
  RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=←
  zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=←
  RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=←
  Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=←
  dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=←
  XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=←
  lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=←
  HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="]

 sent as syslog message, contains:
   • Signature Group (VER, RSID, SG, SPRI)
   • Global Block Counter (GBC, counts syslog-sign messages)
   • First Message Number (FMN, counts normal messages)
   • CNT Hash Blocks (HB)
   • DSA Signature (SIGN)
             Martin Schütte              syslogd with IETF protocols              EuroBSDCon 2008   31 / 40
BSD Syslog                IETF             TLS             Protocol & API              Syslog-Sign         Future




                                            Redundancy
                                      Implementation-dependent



 Syslog-Sign messages might be lost (with UDP), thus
   • Certificate Blocks are repeated several times
   • Hashes are sent using a sliding window:
 ssign:        FMN="12"          HB="#12    #13   #14    #15    #16        #17   #18   #19   #20"
 ssign:        FMN="15"          HB="#15    #16   #17    #18    #19        #20   #21   #22   #23"
 ssign:        FMN="18"          HB="#18    #19   #20    #21    #22        #23   #24   #25   #26"
 ssign:        FMN="21"          HB="#21    #22   #23    #24    #25        #26   #27   #28   #29"
 ssign:        FMN="24"          HB="#24    #25   #26    #27    #28        #29   #30   #31   #32"




             Martin Schütte                  syslogd with IETF protocols                 EuroBSDCon 2008   32 / 40
BSD Syslog                IETF             TLS             Protocol & API              Syslog-Sign         Future




                                            Redundancy
                                      Implementation-dependent



 Syslog-Sign messages might be lost (with UDP), thus
   • Certificate Blocks are repeated several times
   • Hashes are sent using a sliding window:
 ssign:        FMN="12"          HB="#12    #13   #14    #15    #16        #17   #18   #19   #20"
 ssign:        FMN="15"          HB="#15    #16   #17    #18    #19        #20   #21   #22   #23"
 ssign:        FMN="18"          HB="#18    #19   #20    #21    #22        #23   #24   #25   #26"
 ssign:        FMN="21"          HB="#21    #22   #23    #24    #25        #26   #27   #28   #29"
 ssign:        FMN="24"          HB="#24    #25   #26    #27    #28        #29   #30   #31   #32"




             Martin Schütte                  syslogd with IETF protocols                 EuroBSDCon 2008   32 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                 Configuration
                                        not variable



    • not configurable: hash and key type
         • always VER="0111" (currently only SHA-1)
         • PKIX if TLS key is of type DSA,
           otherwise public key (sent in DER encoding)
    • at compile time: redundancy and message length
         • #define SIGN_RESENDCOUNT_CERTBLOCK 2
         • #define SIGN_RESENDCOUNT_HASHES             3
         • #define SIGN_MAX_LENGTH                 2048



             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   33 / 40
BSD Syslog                IETF           TLS              Protocol & API   Syslog-Sign         Future




                                          Configuration
                                                 syslog.conf




    • configurable: Signature Groups
        • sign_sg=2
        • sign_delim_sg2=15 31
    • configurable: write priority and version
        *.*                   +/ var / log / signed . log
        mail .*               + -/ var / log / signed - mail . log
        *. alert              +|/ usr / local / sbin / monitor




             Martin Schütte                 syslogd with IETF protocols      EuroBSDCon 2008   34 / 40
BSD Syslog                IETF     TLS             Protocol & API   Syslog-Sign         Future




                                 Offline Verification
   1. split input into
      Certificate Blocks, Signature Blocks, normal messsages
   2. index normal messsages by hash value
   3. sort Certificate Blocks and Signature Blocks
   4. reassemble and verify Certificate Blocks
      ⇒ yields public keys for all Signature Groups
   5. verify Signature Blocks
   6. build enumerated sequence of hashes (with FMN)
   7. match received messages against hashes
      ⇒ yields verified message sequence, including gaps

             Martin Schütte          syslogd with IETF protocols      EuroBSDCon 2008   35 / 40
BSD Syslog                IETF     TLS              Protocol & API       Syslog-Sign         Future




                                          verify.pl
 $ perl verify . pl -i test . log
 reading input ...
 processing CBs ...
 decoding SGs ...
 got PKIX DSA key
 verifying CBs ...
 verified CB and got key for SG : ( host . example . org ,1217632162 ,0111 ,3 ,0) , ←
      start : 2008 -08 -02 T01 : 0 9 : 2 7 . 7 7 3 4 6 4 + 0 2 : 0 0
 now process SBs
 signed messages :
 ...
 host . example . org ,1217632162 ,0111 ,3 ,0 ,11 <15 >1 ... test 6255 - - msg10
 host . example . org ,1217632162 ,0111 ,3 ,0 ,12 <15 >1 ... test 6255 - - msg11
 host . example . org ,1217632162 ,0111 ,3 ,0 ,13 **** msg lost
 host . example . org ,1217632162 ,0111 ,3 ,0 ,14 <15 >1 ... test 6255 - - msg13
 host . example . org ,1217632162 ,0111 ,3 ,0 ,15 <15 >1 ... test 6255 - - msg14
 host . example . org ,1217632162 ,0111 ,3 ,0 ,16 <15 >1 ... test 6255 - - msg15
 ...

 messages without signature :
 <15 >1 2008 -08 -02 T02 :09:27+02:00 host . example . org test 6255 - - modified msg12




             Martin Schütte           syslogd with IETF protocols          EuroBSDCon 2008   36 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                       ToDo List

    • implement missing parts of transport-tls-14
    • implement online signature verification
    • implement alternative configuration file format

    • port to other systems
    • agree on syslogp(3) (or similar)
    • upgrade log infrastructure
    • use structured data
    • wait for RFCs


             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   37 / 40
BSD Syslog                IETF             TLS             Protocol & API   Syslog-Sign         Future




                     possible alternative syslog.conf
    •   too many new settings for old syslog.conf
    •   especially for per-destination settings
    •   new format wanted
    •   proposed:
        *. info               / var / log / messages

        mail .* { tls
                  host " server . example . net "
                  port 1234
                  fingerprint " SHA1 : e4e1 : a61c : d431 : d7d4 :9 bb8 : dcdf :..."
        }

        { *. debug
          app - id postfix
        } { udp
             host " host . example . net "
             port 1514
        }
             Martin Schütte                  syslogd with IETF protocols      EuroBSDCon 2008   38 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                       Portability


    • uses OpenSSL
    • uses libevent to hide kqueue(2)
    • wallmsg() is system-dependend
    • differences in libc/syslog(3)
    • small differences in stdlibs




             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   39 / 40
BSD Syslog                IETF   TLS             Protocol & API   Syslog-Sign         Future




                                       Conclusion


    • working implementation of transport-tls
    • receive/send syslog-protocol in syslogd(8)
    • send syslog-protocol from syslog(3)
    • add extended function syslogp(3)
    • implement syslog-sign to sign in syslogd(8)
    • “Proof of Concept” implementation to verify syslog-sign




             Martin Schütte        syslogd with IETF protocols      EuroBSDCon 2008   40 / 40

Contenu connexe

Tendances

Access over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEAccess over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEamiable_indian
 
IPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP ExplainedIPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP ExplainedAndriy Berestovskyy
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingMichelle Holley
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesJim St. Leger
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaJim St. Leger
 
introduction of iptables in linux
introduction of iptables in linuxintroduction of iptables in linux
introduction of iptables in linuxNouman Baloch
 
Swiss IPv6 Council: Konfusion um die Router Flags
Swiss IPv6 Council: Konfusion um die Router FlagsSwiss IPv6 Council: Konfusion um die Router Flags
Swiss IPv6 Council: Konfusion um die Router FlagsDigicomp Academy AG
 
Introduction to Snort Rule Writing
Introduction to Snort Rule WritingIntroduction to Snort Rule Writing
Introduction to Snort Rule WritingCisco DevNet
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTUMumbai University
 
DPDK Summit 2015 - Intro - Tim O'Driscoll
DPDK Summit 2015 - Intro - Tim O'DriscollDPDK Summit 2015 - Intro - Tim O'Driscoll
DPDK Summit 2015 - Intro - Tim O'DriscollJim St. Leger
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guideSopon Tumchota
 

Tendances (20)

IPV6 Under the Hood
IPV6 Under the HoodIPV6 Under the Hood
IPV6 Under the Hood
 
Access over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEAccess over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoE
 
IPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP ExplainedIPsec Basics: AH and ESP Explained
IPsec Basics: AH and ESP Explained
 
Ip tables
Ip tablesIp tables
Ip tables
 
Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
 
Tech f42
Tech f42Tech f42
Tech f42
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith Wiles
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
Wireshark
WiresharkWireshark
Wireshark
 
introduction of iptables in linux
introduction of iptables in linuxintroduction of iptables in linux
introduction of iptables in linux
 
Tunnel & vpn1
Tunnel & vpn1Tunnel & vpn1
Tunnel & vpn1
 
Swiss IPv6 Council: Konfusion um die Router Flags
Swiss IPv6 Council: Konfusion um die Router FlagsSwiss IPv6 Council: Konfusion um die Router Flags
Swiss IPv6 Council: Konfusion um die Router Flags
 
Introduction to Snort Rule Writing
Introduction to Snort Rule WritingIntroduction to Snort Rule Writing
Introduction to Snort Rule Writing
 
AF-23- IPv6 Security_Final
AF-23- IPv6 Security_FinalAF-23- IPv6 Security_Final
AF-23- IPv6 Security_Final
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
Creating a firewall in UBUNTU
Creating a firewall in UBUNTUCreating a firewall in UBUNTU
Creating a firewall in UBUNTU
 
IPSec and VPN
IPSec and VPNIPSec and VPN
IPSec and VPN
 
DPDK Summit 2015 - Intro - Tim O'Driscoll
DPDK Summit 2015 - Intro - Tim O'DriscollDPDK Summit 2015 - Intro - Tim O'Driscoll
DPDK Summit 2015 - Intro - Tim O'Driscoll
 
pfSense firewall workshop guide
pfSense firewall workshop guidepfSense firewall workshop guide
pfSense firewall workshop guide
 

Similaire à NetBSD syslogd updated with IETF TLS and digital signature protocols

Securing Syslog On FreeBSD
Securing Syslog On FreeBSDSecuring Syslog On FreeBSD
Securing Syslog On FreeBSDAlbert Mietus
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSDwebuploader
 
Fedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkFedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkRainer Gerhards
 
Internet protocol
Internet protocolInternet protocol
Internet protocolOnline
 
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Jakub Botwicz
 
Telco junho cost-effective approach for telco network analysis in 5_g_final
Telco junho cost-effective approach for telco network analysis in 5_g_finalTelco junho cost-effective approach for telco network analysis in 5_g_final
Telco junho cost-effective approach for telco network analysis in 5_g_finalJunho Suh
 
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-basedDesigning an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-basedDr. Mohieddin Moradi
 
Analise NetFlow in Real Time
Analise NetFlow in Real TimeAnalise NetFlow in Real Time
Analise NetFlow in Real TimePiotr Perzyna
 
MQTT – protocol for yours IoT
MQTT – protocol for yours IoTMQTT – protocol for yours IoT
MQTT – protocol for yours IoTMiroslav Resetar
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...Alexandre Moneger
 
Deploy ipv6 multicast_v0_1
Deploy ipv6 multicast_v0_1Deploy ipv6 multicast_v0_1
Deploy ipv6 multicast_v0_1Nguyen Thanh
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesSamsung Open Source Group
 
Lecture Notes- Network Services - Copy.pptx
Lecture Notes- Network Services - Copy.pptxLecture Notes- Network Services - Copy.pptx
Lecture Notes- Network Services - Copy.pptxSaqibAhmedKhan4
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN FrameworkAPNIC
 
Osi model slides
Osi model slidesOsi model slides
Osi model slidesSaba Aslam
 
Scaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NGScaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NGAll Things Open
 

Similaire à NetBSD syslogd updated with IETF TLS and digital signature protocols (20)

Syslog Protocols
Syslog ProtocolsSyslog Protocols
Syslog Protocols
 
Securing Syslog On FreeBSD
Securing Syslog On FreeBSDSecuring Syslog On FreeBSD
Securing Syslog On FreeBSD
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSD
 
Fedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 TalkFedora Developer's Conference 2014 Talk
Fedora Developer's Conference 2014 Talk
 
177732477-Voice-101.pdf
177732477-Voice-101.pdf177732477-Voice-101.pdf
177732477-Voice-101.pdf
 
Internet protocol
Internet protocolInternet protocol
Internet protocol
 
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
 
Telco junho cost-effective approach for telco network analysis in 5_g_final
Telco junho cost-effective approach for telco network analysis in 5_g_finalTelco junho cost-effective approach for telco network analysis in 5_g_final
Telco junho cost-effective approach for telco network analysis in 5_g_final
 
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-basedDesigning an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
Designing an 4K/UHD1 HDR OB Truck as 12G-SDI or IP-based
 
Analise NetFlow in Real Time
Analise NetFlow in Real TimeAnalise NetFlow in Real Time
Analise NetFlow in Real Time
 
SIP info
SIP infoSIP info
SIP info
 
MQTT – protocol for yours IoT
MQTT – protocol for yours IoTMQTT – protocol for yours IoT
MQTT – protocol for yours IoT
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
 
Deploy ipv6 multicast_v0_1
Deploy ipv6 multicast_v0_1Deploy ipv6 multicast_v0_1
Deploy ipv6 multicast_v0_1
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
 
Lecture Notes- Network Services - Copy.pptx
Lecture Notes- Network Services - Copy.pptxLecture Notes- Network Services - Copy.pptx
Lecture Notes- Network Services - Copy.pptx
 
Ip
IpIp
Ip
 
Ryu SDN Framework
Ryu SDN FrameworkRyu SDN Framework
Ryu SDN Framework
 
Osi model slides
Osi model slidesOsi model slides
Osi model slides
 
Scaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NGScaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NG
 

Plus de Martin Schütte

Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)Martin Schütte
 
Writing Ansible Modules (CLT'19)
Writing Ansible Modules (CLT'19)Writing Ansible Modules (CLT'19)
Writing Ansible Modules (CLT'19)Martin Schütte
 
Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)Martin Schütte
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeMartin Schütte
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Martin Schütte
 
Terraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud ServicesTerraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud ServicesMartin Schütte
 
Software Testing on the Web
Software Testing on the WebSoftware Testing on the Web
Software Testing on the WebMartin Schütte
 
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...Martin Schütte
 

Plus de Martin Schütte (9)

Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)Writing Ansible Modules (DENOG11)
Writing Ansible Modules (DENOG11)
 
Writing Ansible Modules (CLT'19)
Writing Ansible Modules (CLT'19)Writing Ansible Modules (CLT'19)
Writing Ansible Modules (CLT'19)
 
Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)Terraform – Infrastructure as Code (Kielux'18)
Terraform – Infrastructure as Code (Kielux'18)
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
 
Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)Terraform: Cloud Configuration Management (WTC/IPC'16)
Terraform: Cloud Configuration Management (WTC/IPC'16)
 
Terraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud ServicesTerraform: Configuration Management for Cloud Services
Terraform: Configuration Management for Cloud Services
 
Software Testing on the Web
Software Testing on the WebSoftware Testing on the Web
Software Testing on the Web
 
PGP/GPG Einführung
PGP/GPG EinführungPGP/GPG Einführung
PGP/GPG Einführung
 
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...
Design and Implementation of an IPv6 Plugin for the Snort Intrusion Detection...
 

Dernier

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Dernier (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

NetBSD syslogd updated with IETF TLS and digital signature protocols

  • 1. NetBSD syslogd/IETF Syslog Protocols – Final Report Martin Schütte 18 October 2008
  • 2. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Project Overview Google Summer of Code project: Improve NetBSD’s syslogd Deliverables: • TLS network transport • New message format • Digital Signatures Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 2 / 40
  • 3. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 3 / 40
  • 4. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Using Log Data • Debugging • Statistics/Planning • Accountability for user actions • Detect ongoing attacks • Examine security incidents Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 4 / 40
  • 5. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future BSD Syslog • primarily designed for programming/debugging • simple, uniform, easy to use and configure • easy remote logging using UDP • de facto standard for logging on Unix Combination of: • API • message format • daemon • IPC protocol Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 5 / 40
  • 6. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future API SYSLOG(3) NetBSD Library Functions Manual SYSLOG(3) NAME syslog, vsyslog, openlog, closelog, setlogmask -- control system log LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <syslog.h> void syslog(int priority, const char *message, ...); void openlog(const char *ident, int logopt, int facility); void closelog(void); int setlogmask(int maskpri); Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 6 / 40
  • 7. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog Message Format <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out • Priority • Header By convention: • Timestamp • Priority not written to logfile • Hostname • only printable ASCII • Message • up to 1024 characters • Tag • Content Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 7 / 40
  • 8. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog Message Format <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out • Priority • Header By convention: • Timestamp • Priority not written to logfile • Hostname • only printable ASCII • Message • up to 1024 characters • Tag • Content Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 7 / 40
  • 9. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog Message Format <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out • Priority • Header By convention: • Timestamp • Priority not written to logfile • Hostname • only printable ASCII • Message • up to 1024 characters • Tag • Content Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 7 / 40
  • 10. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog Message Format <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out • Priority • Header By convention: • Timestamp • Priority not written to logfile • Hostname • only printable ASCII • Message • up to 1024 characters • Tag • Content Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 7 / 40
  • 11. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog Message Format <38>Mar 17 21:57:57 frodo sshd[701]: Connection from 211.74.5.81 port 5991 <52>Mar 17 13:54:30 192.168.0.42 printer: paper out • Priority • Header By convention: • Timestamp • Priority not written to logfile • Hostname • only printable ASCII • Message • up to 1024 characters • Tag • Content Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 7 / 40
  • 12. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future daemon: syslogd • collects messages from kernel, applications, and network • filters by priority • writes to files, programs, terminals, or network (UDP) • newer implementations/versions with additional features: • filter by host/program/regexp • different message and timestamp formats • memory buffers, TCP, or SQL servers as destinations Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 8 / 40
  • 13. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future “Transport Protocol“ Input from • local applications: socket(AF_UNIX, SOCK_DGRAM, 0); • network: socket(AF_INET, SOCK_DGRAM, 0); • kernel: open("/dev/klog", O_RDONLY, 0); (file interface to ring buffer) ⇒ One message per recvfrom()/read(). Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 9 / 40
  • 14. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Problems with UDP Advantage: • simple and efficient (usable for embedded devices) Problems: • possible packet loss • no sender authentication from man syslogd: The ability to log messages received in UDP packets is equivalent to an unauthenticated remote disk-filling service. . . ⇒ move to TCP transport, optionally tunneled over SSL/TLS Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 10 / 40
  • 15. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future IETF Working Group “Security Issues in Network Event Logging” • RFC 3164: The BSD Syslog Protocol (informational) • RFC 3195: Reliable Delivery for Syslog • current Drafts: • The Syslog Protocol • UDP transport mapping for Syslog • TLS transport mapping for Syslog • Signed Syslog Messages • Syslog Management Information Base Current status: syslog-protocol, transport-udp, transport-tls in RFC-Editor’s Queue, syslog-sign in IESG/AD evaluation, next draft in preparation Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 11 / 40
  • 16. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future TLS Overview Internet Draft • point-to-point encryption, integrity, and authentication • requires server and client certificates • authenticate by CA or certificate/subject/fingerprint • datagram encapsulation with length prefix, is transparent but not self-synchronizing: APPLICATION - DATA = 1* SYSLOG - FRAME SYSLOG - FRAME = MSG - LEN SP SYSLOG - MSG MSG - LEN = NONZERO - DIGIT * DIGIT • message length: 2048 octets MUST, 8192 octets SHOULD be supported, no upper limit Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 12 / 40
  • 17. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future TLS Overview Implementation • uses OpenSSL library • accepts arbitrary message sizes • buffers messages on connection loss • implements draft-ietf-syslog-transport-tls-13 • still misses draft-14 requirements: internationalized hostnames and wildcard matching in subjectAltName/dNSName Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 13 / 40
  • 18. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Problems introduced with TLS • many new settings in syslog.conf ⇒ keyword=value configuration • a send can fail ⇒ message buffers • concurrency from non-blocking sockets, events, timeouts ⇒ connection states Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 14 / 40
  • 19. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future syslog.conf: extended options for TLS tls_ca ="/ etc / my . cacert " tls_cadir ="/ etc / openssl / CA " tls_cert ="/ etc / localhost . crt " tls_key ="/ etc / localhost . key " tls_gen_cert = on tls_verify = off tls_server = on tls_bindhost ="192.168.1.2" tls_bindport =" syslog - tls " t l s_ a l lo w_f in ge rp r i n t s = sha -1: E4 : E1 : A6 :1 C :... t l s _a ll o w_c lien tce r t s ="/ etc / somehost . crt " Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 15 / 40
  • 20. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future syslog.conf: TLS destinations mark ,*.* @ [ somehost ]( ← cert ="/ etc / somehost . crt ") mail .* @ [ logserver ]:1514( ← fingerprint =" MD5 :00: A2 :...:27") user .* @ [ fe80 ::211:9 ff : fe41 : be53 ]:1234( ← verify =" off ") *. alert @ [10.1.2.3]: syslog - tls ( ← subject =" logserver . example . org ") Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 16 / 40
  • 21. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Buffer Queue • every message is passed as a struct buf_msg • every destination has a STAILQ of unsent buffers • only one instance for every message, counts references • unreliable transports: send a buffer and forget it • reliable transports: append, send, then remove from STAILQ • count number and size of messages per queue to control memory usage Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 17 / 40
  • 22. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Outgoing Connection States Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 18 / 40
  • 23. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Incoming Connection States Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 19 / 40
  • 24. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Draft: The Syslog Protocol New Message Format • keeps plain text format • full ISO timestamps and FQDNs • message IDs (like Windows Eventlog) • structured data fields with namespaces (derived from SNMP Private Enterprise Codes) • allows UTF-8 for data fields and messages • message length: MUST accept 480 octets, SHOULD accept 2048 octets, MAY receive larger messages (if larger: SHOULD truncate the payload, MAY discard the message) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 20 / 40
  • 25. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 26. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 27. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 28. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 29. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 30. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 31. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Syslog-protocol message format <165>1 2003-10-11T22:14:15.003Z frodo.example.com prog - ID47← [exampleSDID@17660 iut="3" eventID="1011" eventSource="Application"]← BOM Une entré du journal des événements . . . • Header • Priority • Version (new) • Timestamp (extended) • Hostname • Application Name • Process ID • Message ID (new) • Structured Data (new) • Message text (UTF-8) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 21 / 40
  • 32. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Format Conversion in syslogd • on input detect and parse • message only (from kernel), • BSD Syslog (RFC3164), or • Syslog-Protocol • work with struct buf_msg • on output format as • BSD Syslog (-o rfc3164) or • Syslog-Protocol (-o syslog, default) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 22 / 40
  • 33. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Changes to syslog(3) • API unchanged • Syslog-Protocol from library to syslogd: • ISO timestamp • FQDN • new fields (MSGID and SD) remain empty Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 23 / 40
  • 34. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future new function: syslogp(3) • minimal extension to include MSGID and SD ≈ syslog(3) with three format strings void syslogp ( int priority , const char * msgid , ← const char * sdfmt , const char * message , ...); void vsyslogp ( int priority , const char * msgid , ← const char * sdfmt , const char * message , va_list args ); syslog ( LOG_INFO , " foobar error : % m "); syslogp ( LOG_INFO , NULL , NULL , " foobar error : % m "); syslogp ( LOG_INFO , " ID % d " , "[ meta language =" en - US "]" , ← " event : % s " , 42 , E v e n t D e s c r i p t i o n ); Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 24 / 40
  • 35. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Draft: Signed syslog Messages Overview • adds detached, in-band signatures • end-to-end authentication, integrity, sequencing, and lost message detection • design elements: • allow several ”streams“ with Signature Groups • send public key first • translate sequence of messages into enumerated sequence of hash values • sign all control messages with keys and hashes Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 25 / 40
  • 36. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Groups Problem 2008-10-03T03:16:06.453358+02:00 host.example.org /netbsd - - - wd1e: error reading 2008-10-03T03:16:07.006246+02:00 host.example.org /netbsd - - - wd1: soft error (corrected) 2008-10-03T03:30:00.719082+02:00 host.example.org cron 24634 - - (root) CMD START (atrun) 2008-10-03T03:30:01.033121+02:00 host.example.org cron 2613 - - (root) CMD FINISH (atrun) 2008-10-03T03:32:15.035432+02:00 host.example.org postfix/pickup 3251 - - EBE21FE99: . . . 2008-10-03T03:32:15.228748+02:00 host.example.org postfix/local 23858 - - EBE21FE99: . . . 2008-10-03T03:32:15.234989+02:00 host.example.org postfix/qmgr 666 - - EBE21FE99: removed 2008-10-03T03:40:00.977562+02:00 host.example.org cron 2289 - - (root) CMD START (atrun) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 26 / 40
  • 37. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Groups Problem 2008-10-03T03:16:06.453358+02:00 host.example.org /netbsd - - - wd1e: error reading 2008-10-03T03:16:07.006246+02:00 host.example.org /netbsd - - - wd1: soft error (corrected) 2008-10-03T03:30:00.719082+02:00 host.example.org cron 24634 - - (root) CMD START (atrun) 2008-10-03T03:30:01.033121+02:00 host.example.org cron 2613 - - (root) CMD FINISH (atrun) 2008-10-03T03:32:15.035432+02:00 host.example.org postfix/pickup 3251 - - EBE21FE99: . . . 2008-10-03T03:32:15.228748+02:00 host.example.org postfix/local 23858 - - EBE21FE99: . . . 2008-10-03T03:32:15.234989+02:00 host.example.org postfix/qmgr 666 - - EBE21FE99: removed 2008-10-03T03:40:00.977562+02:00 host.example.org cron 2289 - - (root) CMD START (atrun) Problem: Different message destinations Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 26 / 40
  • 38. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Groups Problem 2008-10-03T03:16:06.453358+02:00 host.example.org /netbsd - - - wd1e: error reading 2008-10-03T03:16:07.006246+02:00 host.example.org /netbsd - - - wd1: soft error (corrected) 2008-10-03T03:30:00.719082+02:00 host.example.org cron 24634 - - (root) CMD START (atrun) 2008-10-03T03:30:01.033121+02:00 host.example.org cron 2613 - - (root) CMD FINISH (atrun) 2008-10-03T03:32:15.035432+02:00 host.example.org postfix/pickup 3251 - - EBE21FE99: . . . 2008-10-03T03:32:15.228748+02:00 host.example.org postfix/local 23858 - - EBE21FE99: . . . 2008-10-03T03:32:15.234989+02:00 host.example.org postfix/qmgr 666 - - EBE21FE99: removed 2008-10-03T03:40:00.977562+02:00 host.example.org cron 2289 - - (root) CMD START (atrun) Problem: Different message destinations ⇒ Signature Groups to partition messages Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 26 / 40
  • 39. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Groups Concepts Signature Groups distinguished by message attributes. Basic concepts and relations: Originator := (HOSTNAME, APP-NAME, PROCID) Reboot Session := (Originator, VER, RSID) Signature Group := (Reboot Session, SG, SPRI) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 27 / 40
  • 40. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Groups SG/SPRI and Schemata three predefined schemata/SG values: • one global Signature Group (SG="0" SPRI="0") • 192 Signature Groups, one per PRI value (SG="1" SPRI="PRI ") • Signature Groups for ranges of sequential PRI values (SG="2" SPRI="X") and one implementation-defined value: • in syslogd: one Signature Group per destination (SG="3" SPRI="fd ") Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 28 / 40
  • 41. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Payload Blocks Send Public Key <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ← [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"← INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C← MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="] sent on startup, contains: • Signature Group (VER, RSID, SG, SPRI) • fragmentation info (TBPL, INDEX, FLEN) • Payload Block (FRAG) with • timestamp • key type • key blob (base64) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 29 / 40
  • 42. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Payload Blocks Send Public Key <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ← [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"← INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C← MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="] sent on startup, contains: • Signature Group (VER, RSID, SG, SPRI) • fragmentation info (TBPL, INDEX, FLEN) • Payload Block (FRAG) with • timestamp • key type • key blob (base64) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 29 / 40
  • 43. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Payload Blocks Send Public Key <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ← [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"← INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C← MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="] sent on startup, contains: • Signature Group (VER, RSID, SG, SPRI) • fragmentation info (TBPL, INDEX, FLEN) • Payload Block (FRAG) with • timestamp • key type • key blob (base64) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 29 / 40
  • 44. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Payload Blocks Send Public Key <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ← [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"← INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C← MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="] sent on startup, contains: • Signature Group (VER, RSID, SG, SPRI) • fragmentation info (TBPL, INDEX, FLEN) • Payload Block (FRAG) with • timestamp • key type • key blob (base64) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 29 / 40
  • 45. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Payload Blocks Send Public Key <110>1 2008-08-02T01:09:27.773505+02:00 host.example.org syslogd - - ← [ssign-cert VER="0111" RSID="1217632162" SG="3" SPRI="0" TBPL="1059"← INDEX="1" FLEN="1059" FRAG="2008-08-02T01:09:27.773464+02:00 C← MIIC+jCCArmgAwIBAwIBA. . . YA==" SIGN="MC0CFFEHx8UX32vEW. . . k+o="] sent on startup, contains: • Signature Group (VER, RSID, SG, SPRI) • fragmentation info (TBPL, INDEX, FLEN) • Payload Block (FRAG) with • timestamp • key type • key blob (base64) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 29 / 40
  • 46. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 47. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 siUJM358eYFHOS2K0MTlveWeH/U= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 48. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 49. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 50. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 51. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4= RNDFNCo7hiCsK/EKumsPBbFHNZA= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 52. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 ... siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4= RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= ... Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 53. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Collect SHA-1 Hashes <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg0 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg1 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg2 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg3 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg4 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg5 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg6 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg7 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg8 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg9 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg10 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg11 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg12 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg13 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg14 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg15 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg16 <15>1 2008-08-02T02:09:27+02:00 host.example.org test 6255 - - msg17 siUJM358eYFHOS2K0MTlveWeH/U= zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4= RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU= Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg= dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI= XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k= lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 30 / 40
  • 54. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 55. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 56. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 57. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 58. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 59. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Signature Blocks Send Signature Block Message <110>1 2008-08-02T01:09:32.399406+02:00 host.example.org syslogd - - [ssign VER="0111"← RSID="1217632162" SG="3" SPRI="0" GBC="4" FMN="1" CNT="20" HB="siUJM358eYFHOS2K0MTlveWeH/U=← zTxfthW8WqmtFhOG4k/+ZxkirTA= j9dubU1GNVp7qWShwph/w32nD08= XQDLZ/NuwirmLdMORtm84r9kIW4=← RNDFNCo7hiCsK/EKumsPBbFHNZA= ANiE3KbY948J6cEB640fAtWXuO4= e2M/OqjHDfxLVUSPt1CsNJHm9wU=← Y+racQst7F1gR8eEUh8O7o+M53s= JAMULRxjMPbOO5EhhKbsUkAwbl0= pd+N5kmlnyQ0BoItELd/KWQrcMg=← dsMQSzPHIS6S3Vaa23/t7U8JAJ4= i4rE3x7N4qyQGTkmaWHsWDFP9SY= qgTqV4EgfUFd3uZXNPvJ25erzBI=← XW0YrME5kQEh+fxhg1fetnWxfIc= 7YPcRHsDwXWnQuGRWaJtFWw9hus= PIvLm0mh+he5+PDihG1p7sQlx8k=← lPzUvx0I1VwSGWV7yKF9W//Yb2U= X+PWYcx5AXnsDVSNAHLZUGk5ioY= okXY88MGG4QybrYMf8HJN23WO1Y=← HcaPyHfQ2s1SuSciTKw4woYWuMg=" SIGN="MCwCFFr0i6taT1vWowR7yc5bEQxFfY7/Ah. . . IQ=="] sent as syslog message, contains: • Signature Group (VER, RSID, SG, SPRI) • Global Block Counter (GBC, counts syslog-sign messages) • First Message Number (FMN, counts normal messages) • CNT Hash Blocks (HB) • DSA Signature (SIGN) Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 31 / 40
  • 60. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Redundancy Implementation-dependent Syslog-Sign messages might be lost (with UDP), thus • Certificate Blocks are repeated several times • Hashes are sent using a sliding window: ssign: FMN="12" HB="#12 #13 #14 #15 #16 #17 #18 #19 #20" ssign: FMN="15" HB="#15 #16 #17 #18 #19 #20 #21 #22 #23" ssign: FMN="18" HB="#18 #19 #20 #21 #22 #23 #24 #25 #26" ssign: FMN="21" HB="#21 #22 #23 #24 #25 #26 #27 #28 #29" ssign: FMN="24" HB="#24 #25 #26 #27 #28 #29 #30 #31 #32" Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 32 / 40
  • 61. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Redundancy Implementation-dependent Syslog-Sign messages might be lost (with UDP), thus • Certificate Blocks are repeated several times • Hashes are sent using a sliding window: ssign: FMN="12" HB="#12 #13 #14 #15 #16 #17 #18 #19 #20" ssign: FMN="15" HB="#15 #16 #17 #18 #19 #20 #21 #22 #23" ssign: FMN="18" HB="#18 #19 #20 #21 #22 #23 #24 #25 #26" ssign: FMN="21" HB="#21 #22 #23 #24 #25 #26 #27 #28 #29" ssign: FMN="24" HB="#24 #25 #26 #27 #28 #29 #30 #31 #32" Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 32 / 40
  • 62. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Configuration not variable • not configurable: hash and key type • always VER="0111" (currently only SHA-1) • PKIX if TLS key is of type DSA, otherwise public key (sent in DER encoding) • at compile time: redundancy and message length • #define SIGN_RESENDCOUNT_CERTBLOCK 2 • #define SIGN_RESENDCOUNT_HASHES 3 • #define SIGN_MAX_LENGTH 2048 Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 33 / 40
  • 63. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Configuration syslog.conf • configurable: Signature Groups • sign_sg=2 • sign_delim_sg2=15 31 • configurable: write priority and version *.* +/ var / log / signed . log mail .* + -/ var / log / signed - mail . log *. alert +|/ usr / local / sbin / monitor Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 34 / 40
  • 64. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Offline Verification 1. split input into Certificate Blocks, Signature Blocks, normal messsages 2. index normal messsages by hash value 3. sort Certificate Blocks and Signature Blocks 4. reassemble and verify Certificate Blocks ⇒ yields public keys for all Signature Groups 5. verify Signature Blocks 6. build enumerated sequence of hashes (with FMN) 7. match received messages against hashes ⇒ yields verified message sequence, including gaps Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 35 / 40
  • 65. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future verify.pl $ perl verify . pl -i test . log reading input ... processing CBs ... decoding SGs ... got PKIX DSA key verifying CBs ... verified CB and got key for SG : ( host . example . org ,1217632162 ,0111 ,3 ,0) , ← start : 2008 -08 -02 T01 : 0 9 : 2 7 . 7 7 3 4 6 4 + 0 2 : 0 0 now process SBs signed messages : ... host . example . org ,1217632162 ,0111 ,3 ,0 ,11 <15 >1 ... test 6255 - - msg10 host . example . org ,1217632162 ,0111 ,3 ,0 ,12 <15 >1 ... test 6255 - - msg11 host . example . org ,1217632162 ,0111 ,3 ,0 ,13 **** msg lost host . example . org ,1217632162 ,0111 ,3 ,0 ,14 <15 >1 ... test 6255 - - msg13 host . example . org ,1217632162 ,0111 ,3 ,0 ,15 <15 >1 ... test 6255 - - msg14 host . example . org ,1217632162 ,0111 ,3 ,0 ,16 <15 >1 ... test 6255 - - msg15 ... messages without signature : <15 >1 2008 -08 -02 T02 :09:27+02:00 host . example . org test 6255 - - modified msg12 Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 36 / 40
  • 66. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future ToDo List • implement missing parts of transport-tls-14 • implement online signature verification • implement alternative configuration file format • port to other systems • agree on syslogp(3) (or similar) • upgrade log infrastructure • use structured data • wait for RFCs Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 37 / 40
  • 67. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future possible alternative syslog.conf • too many new settings for old syslog.conf • especially for per-destination settings • new format wanted • proposed: *. info / var / log / messages mail .* { tls host " server . example . net " port 1234 fingerprint " SHA1 : e4e1 : a61c : d431 : d7d4 :9 bb8 : dcdf :..." } { *. debug app - id postfix } { udp host " host . example . net " port 1514 } Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 38 / 40
  • 68. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Portability • uses OpenSSL • uses libevent to hide kqueue(2) • wallmsg() is system-dependend • differences in libc/syslog(3) • small differences in stdlibs Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 39 / 40
  • 69. BSD Syslog IETF TLS Protocol & API Syslog-Sign Future Conclusion • working implementation of transport-tls • receive/send syslog-protocol in syslogd(8) • send syslog-protocol from syslog(3) • add extended function syslogp(3) • implement syslog-sign to sign in syslogd(8) • “Proof of Concept” implementation to verify syslog-sign Martin Schütte syslogd with IETF protocols EuroBSDCon 2008 40 / 40