idnits 2.17.1 draft-ietf-syslog-sign-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 5 instances of too long lines in the document, the longest one being 2 characters in excess of 72. == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 491 has weird spacing: '...h Block vari...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 21, 2003) is 7526 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: 'ABNF' on line 276 == Unused Reference: '4' is defined on line 1346, but no explicit reference was found in the text == Unused Reference: '8' is defined on line 1358, but no explicit reference was found in the text == Unused Reference: '11' is defined on line 1367, but no explicit reference was found in the text == Unused Reference: '12' is defined on line 1370, but no explicit reference was found in the text == Unused Reference: '19' is defined on line 1392, but no explicit reference was found in the text == Unused Reference: '21' is defined on line 1398, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. '1' -- Possible downref: Non-RFC (?) normative reference: ref. '2' -- Possible downref: Non-RFC (?) normative reference: ref. '3' -- Possible downref: Non-RFC (?) normative reference: ref. '4' ** Obsolete normative reference: RFC 1750 (ref. '7') (Obsoleted by RFC 4086) ** Downref: Normative reference to an Informational RFC: RFC 1983 (ref. '8') ** Downref: Normative reference to an Informational RFC: RFC 2104 (ref. '11') ** Obsolete normative reference: RFC 2234 (ref. '13') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2373 (ref. '14') (Obsoleted by RFC 3513) ** Obsolete normative reference: RFC 2434 (ref. '15') (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2440 (ref. '16') (Obsoleted by RFC 4880) ** Obsolete normative reference: RFC 2574 (ref. '17') (Obsoleted by RFC 3414) ** Obsolete normative reference: RFC 3164 (ref. '18') (Obsoleted by RFC 5424) -- Possible downref: Non-RFC (?) normative reference: ref. '21' Summary: 12 errors (**), 0 flaws (~~), 11 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 syslog Working Group J. Kelsey 3 Internet-Draft NIST 4 Expires: February 19, 2004 J. Callas 5 PGP Corporation 6 August 21, 2003 8 Syslog-Sign Protocol 9 draft-ietf-syslog-sign-12.txt 11 Status of this Memo 13 This document is an Internet-Draft and is in full conformance with 14 all provisions of Section 10 of RFC2026. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that other 18 groups may also distribute working documents as Internet-Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six months 21 and may be updated, replaced, or obsoleted by other documents at any 22 time. It is inappropriate to use Internet-Drafts as reference 23 material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at http:// 26 www.ietf.org/ietf/1id-abstracts.txt. 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 This Internet-Draft will expire on February 19, 2004. 33 Copyright Notice 35 Copyright (C) The Internet Society (2003). All Rights Reserved. 37 Abstract 39 This document describes syslog-sign, a mechanism adding origin 40 authentication, message integrity, replay-resistance, message 41 sequencing, and detection of missing messages to syslog. Syslog-sign 42 provides these security features in a way that has minimal 43 requirements and minimal impact on existing syslog implementations. 44 It is possible to support syslog-sign and gain some of its security 45 attributes by only changing the behavior of the devices generating 46 syslog messages. Some additional processing of the received syslog 47 messages and the syslog-sign messages on the relays and collectors 48 may realize additional security benefits. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 53 2. Required syslog Format . . . . . . . . . . . . . . . . . . . 6 54 2.1 PRI Part . . . . . . . . . . . . . . . . . . . . . . . . . . 6 55 2.2 HEADER Part . . . . . . . . . . . . . . . . . . . . . . . . 7 56 2.3 MSG Part . . . . . . . . . . . . . . . . . . . . . . . . . . 10 57 2.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11 58 3. Signature Block Format and Fields . . . . . . . . . . . . . 12 59 3.1 syslog Packets Containing a Signature Block . . . . . . . . 12 60 3.2 Cookie . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 61 3.3 Version . . . . . . . . . . . . . . . . . . . . . . . . . . 13 62 3.4 Reboot Session ID . . . . . . . . . . . . . . . . . . . . . 14 63 3.5 Signature Group and Signature Priority . . . . . . . . . . . 14 64 3.6 Global Block Counter . . . . . . . . . . . . . . . . . . . . 16 65 3.7 First Message Number . . . . . . . . . . . . . . . . . . . . 16 66 3.8 Count . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 67 3.9 Hash Block . . . . . . . . . . . . . . . . . . . . . . . . . 16 68 3.10 Signature . . . . . . . . . . . . . . . . . . . . . . . . . 17 69 4. Payload and Certificate Blocks . . . . . . . . . . . . . . . 18 70 4.1 Preliminaries: Key Management and Distribution Issues . . . 18 71 4.2 Building the Payload Block . . . . . . . . . . . . . . . . . 18 72 4.3 Building the Certificate Block . . . . . . . . . . . . . . . 19 73 4.3.1 Cookie . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 74 4.3.2 Version . . . . . . . . . . . . . . . . . . . . . . . . . . 20 75 4.3.3 Reboot Session ID . . . . . . . . . . . . . . . . . . . . . 20 76 4.3.4 Signature Group and Signature Priority . . . . . . . . . . . 21 77 4.3.5 Total Payload Block Length . . . . . . . . . . . . . . . . . 21 78 4.3.6 Index into Payload Block . . . . . . . . . . . . . . . . . . 21 79 4.3.7 Fragment Length . . . . . . . . . . . . . . . . . . . . . . 21 80 4.3.8 Signature . . . . . . . . . . . . . . . . . . . . . . . . . 21 81 5. Redundancy and Flexibility . . . . . . . . . . . . . . . . . 22 82 5.1 Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . 22 83 5.1.1 Certificate Blocks . . . . . . . . . . . . . . . . . . . . . 22 84 5.1.2 Signature Blocks . . . . . . . . . . . . . . . . . . . . . . 22 85 5.2 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . 23 86 6. Efficient Verification of Logs . . . . . . . . . . . . . . . 24 87 6.1 Offline Review of Logs . . . . . . . . . . . . . . . . . . . 24 88 6.2 Online Review of Logs . . . . . . . . . . . . . . . . . . . 25 89 7. Security Considerations . . . . . . . . . . . . . . . . . . 27 90 7.1 Cryptography Constraints . . . . . . . . . . . . . . . . . . 27 91 7.2 Packet Parameters . . . . . . . . . . . . . . . . . . . . . 27 92 7.3 Message Authenticity . . . . . . . . . . . . . . . . . . . . 27 93 7.4 Sequenced Delivery . . . . . . . . . . . . . . . . . . . . . 28 94 7.5 Replaying . . . . . . . . . . . . . . . . . . . . . . . . . 28 95 7.6 Reliable Delivery . . . . . . . . . . . . . . . . . . . . . 28 96 7.7 Sequenced Delivery . . . . . . . . . . . . . . . . . . . . . 28 97 7.8 Message Integrity . . . . . . . . . . . . . . . . . . . . . 28 98 7.9 Message Observation . . . . . . . . . . . . . . . . . . . . 29 99 7.10 Man In The Middle . . . . . . . . . . . . . . . . . . . . . 29 100 7.11 Denial of Service . . . . . . . . . . . . . . . . . . . . . 29 101 7.12 Covert Channels . . . . . . . . . . . . . . . . . . . . . . 29 102 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . 30 103 8.1 Version Field . . . . . . . . . . . . . . . . . . . . . . . 30 104 8.2 SIG Field . . . . . . . . . . . . . . . . . . . . . . . . . 31 105 8.3 Key Blob Type . . . . . . . . . . . . . . . . . . . . . . . 32 106 9. Authors and Working Group Chair . . . . . . . . . . . . . . 33 107 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 34 108 References . . . . . . . . . . . . . . . . . . . . . . . . . 35 109 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 36 110 Intellectual Property and Copyright Statements . . . . . . . 37 112 1. Introduction 114 Syslog-sign is an enhancement to syslog as described in RFC 3164 [18] 115 that adds origin authentication, message integrity, replay 116 resistance, message sequencing, and detection of missing messages to 117 syslog. The adherence of syslog messages to the mechanisms defined 118 in this document may present problems to older syslog receivers even 119 though efforts were made to keep the message format similar to the 120 format described in RFC 3164 [18]. People deploying devices that 121 generate messages described here should verify that they don't 122 present problems. This mechanism makes no changes to the syslog 123 packet format but does require strict adherence to that format. A 124 syslog-sign message contains a Signature Block within the MSG part of 125 a syslog message. This Signature Block contains a separate digital 126 signature for each of a group of previously sent syslog messages. The 127 overall message is also signed as the last value in this message. 129 Each Signature Block contains, in effect, a detached signature on 130 some number of previously sent messages. While most implementations 131 of syslog involve only a single device as the generator of each 132 message and a single receiver as the collector of each message, 133 provisions need to be made to cover messages being sent to multiple 134 receivers. This is generally performed based upon the Priority value 135 of the individual messages. For example, messages from any Facility 136 with a Severity value of 3, 2, 1 or 0 may be sent to one collector 137 while all messages of Facilities 4, 10, 13, and 14 may be sent to 138 another collector. Appropriate syslog-sign messages must be kept with 139 their proper syslog messages. To address this, syslog-sign uses a 140 signature-group. A signature group identifies a group of messages 141 that are all kept together for signing purposes by the device. A 142 Signature Block always belongs to exactly one signature group and it 143 always signs messages belonging only to that signature group. 145 Additionally, a device will send a Certificate Block to provide key 146 management information between the sender and the receiver. This 147 Certificate Block has a field to denote the type of key material 148 which may be such things as a PKIX certificate, an OpenPGP 149 certificate, or even an indication that a key had been 150 predistributed. In all cases, these messages still use the syslog 151 packet format described in this document. In the cases of 152 certificates being sent, the certificates may have to be split across 153 multiple packets. 155 The receiver of the previous messages may verify that the digital 156 signature of each received message matches the signature contained in 157 the Signature Block. A collector may process these Signature Blocks 158 as they arrive, building an authenticated log file. Alternatively, it 159 may store all the log messages in the order they were received. This 160 allows a network operator to authenticate the log file at the time 161 the logs are reviewed. 163 2. Required syslog Format 165 The essential format of syslog messages is defined in RFC 3164. The 166 basis of that format is that anything delivered to UDP port 514 MUST 167 be accepted as a valid syslog message. However, there is a 168 RECOMMENDED format laid out in that work which this work REQUIRES. 169 Packets conforming to this specification REQUIRE this format. 171 The full format of a syslog sign message seen on the wire has three 172 discernable parts. The first part is called the PRI, the second part 173 is the HEADER, and the third part is the MSG. The total length of the 174 packet MUST be 1024 bytes or less. There is no minimum length of the 175 syslog message although sending a syslog packet with no contents is 176 worthless and SHOULD NOT be transmitted. 178 The definitions of the fields are slightly changed in this document 179 from RFC 3164. While the format described in RFC 3164 is correct for 180 packet formation, the Working Group evaluating this work determined 181 that it would be better if the TAG field were to become a part of the 182 HEADER part rather than the CONTENT part. While IETF documentation 183 does not allow the specification of an API, people developing code to 184 adhere to this specification have found it helpful to think about the 185 parts in this format. 187 syslog-sign messages from devices MUST conform to this format. Other 188 syslog messages from devices SHOULD also conform to this format. If 189 they do not conform to this format, they may be reformatted by a 190 relay as described in Section 4.3 of RFC 3164. That would change the 191 format of the original messages and any cryptographic signature of 192 the original message would not match the cryptographic signature of 193 the changed message. 195 2.1 PRI Part 197 The PRI part MUST have three, four, or five characters and will be 198 bound with angle brackets as the first and last characters. The PRI 199 part starts with a leading "<" ('less-than' character), followed by a 200 number, which is followed by a ">" ('greater-than' character). The 201 code set used in this part MUST be seven-bit ASCII in an eight- bit 202 field as described in RFC 2234 [13]. These are the ASCII codes as 203 defined in "USA Standard Code for Information Interchange" 204 ANSI.X3-4.1968 [3]. In this, the "<" character is defined as the 205 Augmented Backus-Naur Form (ABNF) %d60, and the ">" character has 206 ABNF value %d62. The number contained within these angle brackets is 207 known as the Priority value and represents both the Facility and 208 Severity as described below. The Priority value consists of one, two, 209 or three decimal integers (ABNF DIGITS) using values of %d48 (for 210 "0") through %d57 (for "9"). 212 The Facilities and Severities of the messages are defined in RFC 213 3164. The Priority value is calculated by first multiplying the 214 Facility number by 8 and then adding the numerical value of the 215 Severity. For example, a kernel message (Facility=0) with a Severity 216 of Emergency (Severity=0) would have a Priority value of 0. Also, a 217 "local use 4" message (Facility=20) with a Severity of Notice 218 (Severity=5) would have a Priority value of 165. In the PRI part of a 219 syslog message, these values would be placed between the angle 220 brackets as <0> and <165> respectively. The only time a value of "0" 221 follows the "<" is for the Priority value of "0". Otherwise, leading 222 "0"s MUST NOT be used. 224 2.2 HEADER Part 226 The HEADER part contains a time stamp, an indication of the hostname 227 or IP address of the device, and a string indicating the source of 228 the message. The HEADER part of the syslog packet MUST contain 229 visible (printing) characters. The code set used MUST also been 230 seven-bit ASCII in an eight-bit field like that used in the PRI part. 231 In this code set, the only allowable characters are the ABNF VCHAR 232 values (%d33-126) and spaces (SP value %d32). 234 The HEADER contains three fields called the TIMESTAMP, the HOSTNAME, 235 and the TAG fields. The TIMESTAMP immediately follows the trailing 236 ">" from the PRI part and single space characters MUST follow each of 237 the TIMESTAMP and HOSTNAME fields. HOSTNAME contains the hostname, as 238 it knows itself. If it does not have a hostname, then it contains its 239 own IP address. If a device has multiple IP addresses, it has usually 240 been seen to use the IP address from which the message is 241 transmitted. An alternative to this behavior has also been seen. In 242 that case, a device may be configured to send all messages using a 243 single source IP address regardless of the interface from which the 244 message is sent. This provides a single consistent HOSTNAME for all 245 messages sent from a device. 247 The TIMESTAMP field is either a timestamp as defined in RFC 3164 248 denoted as TIMESTAMP-3164, or as a formalized timestamp as taken from 249 RFC 3339 [20]. A sender SHOULD format the timestamp as a RFC 3339 250 timestamp described below as TIMESTAMP-3339. A receiver MUST accept 251 both formats. 253 A single space character MUST follow the TIMESTAMP field regardless 254 of the format used. 256 The TIMESTAMP-3164 is the local time and is in the format of "Mmm dd 257 hh:mm:ss" (without the quote marks) where: 259 Mmm is the English language abbreviation for the month of the year 260 with the first character in uppercase and the other two characters 261 in lowercase. The following are the only acceptable values: 263 Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec 265 dd is the day of the month. If the day of the month is less than 266 10, then it MUST be represented as a space and then the number. 267 For example, the 7th day of August would be represented as "Aug 268 7", with two spaces between the "g" and the "7". 270 hh:mm:ss is the local time. The hour (hh) is represented in a 271 24-hour format. Valid entries are between 00 and 23, inclusive. 272 The minute (mm) and second (ss) entries are between 00 and 59 273 inclusive. 275 The following syntax MUST be used when using a TIMESTAMP-3339. This 276 is specified using the syntax description notation defined in [ABNF]. 278 date-fullyear = 4DIGIT 279 date-month = 2DIGIT ; 01-12 280 date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on 281 ; month/year 282 time-hour = 2DIGIT ; 00-23 283 time-minute = 2DIGIT ; 00-59 284 time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap 285 ; second rules 286 time-secfrac = "." 1*DIGIT 287 time-numoffset = ("+" / "-") time-hour ":" time-minute 288 time-offset = "Z" / time-numoffset 290 partial-time = time-hour ":" time-minute ":" time-second 291 [time-secfrac] 292 full-date = date-fullyear "-" date-month "-" date-mday 293 full-time = partial-time time-offset 295 date-time = full-date "T" full-time 297 RFC 3339 makes allowances for multiple syntaxes for a timestamp to be 298 used in various cases. This document mandates a single syntax. The 299 primary characteristics of TIMESTAMP-3339 used in this document are 300 as follows. 302 o the "T" and "Z" characters in this syntax MUST be upper case. 304 o usage of the "T" character is mandatory. It MUST NOT be replaced 305 by any other character (like a space character). 307 o the sender SHOULD include time-secfrac (fractional seconds) if its 308 clock accuracy permits. 310 o the entire length of the TIMESTAMP-3339 field MUST NOT exceed 32 311 characters. 313 Two samples of this format are: 315 1985-04-12T23:20:50.52Z 317 1985-04-12T18:20:50.52-06:00 319 The first represents 20 minutes and 50.52 seconds after the 23rd hour 320 of April 12th, 1985 in UTC. The second represents the same time but 321 expressed in the Eastern US timezone (daylight savings time being 322 observed). 324 Messages containing Signature Blocks and Certificate Blocks as 325 described in this document SHOULD use the TIMESTAMP-3339 format in 326 the TIMESTAMP field. It is not mandated that they do so at this time 327 since most of the receivers in use today will not be able to 328 understand that format and may modify those packets in accordance 329 with Section 4.3 of RFC 3164. 331 A single space character MUST follow the TIMESTAMP field. 333 Receivers parsing the date format SHOULD check if the TIMESTAMP is a 334 TIMESTAMP-3339. The "T" character at position 11 of the string can be 335 used as a rough indication for this. However, the receiver MUST NOT 336 rely solely on the "T" character but also parse the other data for 337 validity. A receiver SHOULD check for TIMESTAMP-3339 format first 338 and, if unsuccessful, assume a TIMESTAMP-3164. If it is also not a 339 TIMESTAMP-3164 format, the receiver MUST NOT try any other timestamp 340 format but consider the TIMESTAMP to be invalid or missing from the 341 received syslog message. 343 If a relay receives a TIMESTAMP-3164, it SHOULD forward the message 344 with a TIMESTAMP-3164 but MAY reformat it to a TIMESTAMP-3339 if 345 configured to do so. Relays should be aware that the TIMESTAMP-3339 346 may be longer than the TIMESTAMP-3164 and a replacement of the 347 TIMESTAMP-3164 with a TIMESTAMP-3339 may increase the length of the 348 entire packet beyond 1024 bytes. If a relay receives a 349 TIMESTAMP-3339 it MUST forward the message with a TIMESTAMP-3339. It 350 MUST NOT reformat it to a TIMESTAMP-3164. 352 The HOSTNAME field contains an indication of the originator of the 353 message in one of four formats: only the hostname, the hostname and 354 domainname, the IPv4 address, or the IPv6 address. The preferred 355 value is the hostname and domainname in the format specified in STD 356 13 [5]. This format will be referred to in this document as 357 HOSTNAME-STD13. If only the hostname is used, the HOSTNAME field 358 MUST contain the hostname only of the device as specified in STD 13. 359 This format is discouraged but provides for legacy compatability with 360 the format described in RFC 3164. This format will be referred to in 361 this document as HOSTNAME-3164. In this format, the Domain Name MUST 362 NOT be included in the HOSTNAME field. If the IPv4 address is used, 363 it MUST be shown as the dotted decimal notation as used in STD 13 364 [6], and will be referred to as HOSTNAME-IPV4. If an IPv6 address is 365 used, any valid representation used in RFC 2373 [14] MAY be used and 366 will be referred to as HOSTNAME-IPV6. A single space character MUST 367 also follow the HOSTNAME field. 369 Messages containing Signature Blocks and Certificate Blocks as 370 described in this document MUST use the HOSTNAME-STD13 format in the 371 HOSTNAME field. 373 The TAG is a string of ABNF alphanumeric characters and other certain 374 special characters, that MUST NOT exceed 32 characters in length. 375 There are four special characters that are acceptable to use in this 376 field as well. 378 [ ABNF %d91 379 ] ABNF %d93 380 : ABNF %d58 381 . ABNF %d46 383 The first occurrence of a colon (":") character terminates the TAG 384 field. Generally, the TAG contains the name of the process that 385 generated the message. It may OPTIONALLY contain additional 386 information such as the numerical process ID of that process bound 387 within square brackets ("[" and "]"). A colon MUST be the last 388 character in this field. 390 To be consistent with the format described in RFC 3164, a space 391 character need not follow the colon in normal syslog packets. 392 However, a space character MUST follow the colon in Signature Block 393 and Payload Block messages as described below. 395 2.3 MSG Part 397 The MSG part contains the details of the message. This has 398 traditionally been a freeform message that gives some detailed 399 information of the event. The MSG part of the syslog packet MUST 400 contain visible (printing) characters. The code set used MUST also 401 been seven-bit ASCII in an eight-bit field like that used in the PRI 402 part. In this code set, the only allowable characters are the ABNF 403 VCHAR values (%d33-126) and spaces (SP value %d32). Two message types 404 are defined in this document. Each has unique fields within the MSG 405 part and they are described below. 407 Unless otherwise stated, binary data is base64 encoded, as defined in 408 RFC 2045 [9]. While it may be that some programs that calculate 409 base64 encoded strings place a newline at the end of the string, it 410 must be noted that base64 encoded strings in this protocol MUST NOT 411 contain a trailing newline character. 413 2.4 Examples 415 The following examples are given. 417 Example 1 419 <34>Oct 11 22:14:15 mymachine su: 'su root' failed for 420 lonvick on /dev/pts/8 422 In this example, as it was originally described in RFC 3164, the PRI 423 part is "<34>". In this work, however, the HEADER part consists of 424 the TIMESTAMP, the HOSTNAME, and the TAG fields. The TIMESTAMP is 425 "Oct 11 22:14:15 ", the HOSTNAME is "mymachine ", and the TAG value 426 is "su:". The CONTENT field is " 'su root' failed for lonvick...". 427 The CONTENT field starts with a leading space character in this case. 429 Example 2 431 <165>Aug 24 05:34:00 10.1.1.1 myproc[10]:%% It's time to 432 make the do-nuts. %% Ingredients: Mix=OK, Jelly=OK # 433 Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport: 434 Conveyer1=OK, Conveyer2=OK # %% 436 In this example, the PRI part is <165> denoting that it came from a 437 locally defined facility (local4) with a severity of Notice. The 438 HEADER part has a proper TIMESTAMP field in the message. A relay will 439 not modify this message before sending it. The HOSTNAME is an IPv4 440 address and the TAG field is "myproc[10]:". The MSG part starts with 441 "%% It's time to make the do-nuts. %% Ingredients: Mix=OK, ..." this 442 time without a leading space character. 444 3. Signature Block Format and Fields 446 Since the device generating the Signature Block message signs the 447 entire syslog message, it is imperative that the message MUST NOT be 448 changed in transit. In adherence with Section 4 of RFC 3164, a fully 449 formed syslog message containing a PRI part and a HEADER part 450 containing TIMESTAMP and HOSTNAME fields MUST NOT be changed or 451 modified by any relay. 453 3.1 syslog Packets Containing a Signature Block 455 Signature Block messages MUST be completely formed syslog messages. 456 Signature Block messages have PRI, HEADER, and MSG parts as described 457 in this document. The PRI part MUST have a valid Priority value 458 bounded by angled brackets. The HEADER part SHOULD have a valid 459 TIMESTAMP-3339 field as well as a HOSTNAME-STD13 field. As stated in 460 Section 2.2 above, it is not mandated that they use TIMESTAMP-3339 461 nor HOSTNAME-STD13 fields for backwards compatibility since current 462 receivers may not understand these fields. It SHOULD also contain a 463 valid TAG field. It is RECOMMENDED that the TAG field have the value 464 of "syslog " (without the double quotes) to signify that this message 465 was generated by the syslog process. The CONTENT field of the syslog 466 Signature Block messages MUST have the following fields. Each of 467 these fields are separated by a single space character. 469 The Signature Block is composed of the following fields. Each field 470 must be printable ASCII, and any binary values are base-64 encoded. 472 Field Designation Size in bytes 473 ----- ----------- ---- -- ----- 475 Cookie Cookie 8 477 Version Ver 4 479 Reboot Session ID RSID 1-10 481 Signature Group SIG 1 483 Signature Priority SPRI 1-3 485 Global Block Counter GBC 1-10 487 First Message Number FMN 1-10 489 Count Count 1-2 491 Hash Block Hash Block variable, size of hash 492 (base-64 encoded binary) 494 Signature Signature variable 495 (base-64 encoded binary) 497 These fields are described below. 499 3.2 Cookie 501 The cookie is a eight-byte sequence to signal that this is a 502 Signature Block. This sequence is "@#sigSIG" (without the double 503 quotes). As noted, a space character follows this, and all other 504 fields. 506 3.3 Version 508 The signature group version field is 4 characters in length and is 509 terminated with a space character. The value in this field specifies 510 the version of the syslog-sign protocol. This is extensible to allow 511 for different hash algorithms and signature schemes to be used in the 512 future. The value of this field is the grouping of the protocol 513 version (2 bytes), the hash algorithm (1 byte) and the signature 514 scheme (1 byte). 516 Protocol Version - 2 bytes with the first version as described in 517 this document being value of 01 to denote Version 1. 519 Hash Algorithm - 1 byte with the definition that 1 denotes SHA1 as 520 defined in FIPS-180-1.1995 [2]. 522 Signature Scheme - 1 byte with the definition that 1 denotes 523 OpenPGP DSA - RFC 2440 [16], FIPS.186-1.1998 [1]. 525 As such, the version, hash algorithm and signature scheme defined in 526 this document may be represented as "0111" (without the quote marks). 528 3.4 Reboot Session ID 530 The reboot session ID is a value between 1 and 10 bytes, which is 531 required to never repeat or decrease. The acceptable values for this 532 are between 0 and 9999999999. If the value latches at 9999999999, 533 then manual intervention may be required to reset it to 0. 534 Implementors MAY wish to consider using the snmpEngineBoots value as 535 a source for this counter as defined in RFC 2574 [17]. 537 3.5 Signature Group and Signature Priority 539 The SIG identifier as described above may take on any value from 0-3 540 inclusive. The SPRI may take any value from 0-191. Each of these 541 fields are followed by a space character. These fields taken 542 together allows network administrators to associate groupings of 543 syslog messages with appropriate Signature Blocks and Certificate 544 Blocks. For example, in some cases, network administrators may send 545 syslog messages of Facilities 0 through 15 to one destination while 546 sending messages with Facilities 16 through 23 to another. 547 Associated Signature Blocks should be sent to these different syslog 548 servers as well. 550 In some cases, an administrator may wish the Signature Blocks to go 551 to the same destination as the syslog messages themselves. This may 552 be to different syslog servers if the destinations of syslog messages 553 is being controlled by the Facilities or the Severities of the 554 messages. In other cases, administrators may wish to send the 555 Signature Blocks to an altogether different destination. 557 Syslog-sign provides four options for handling signature groups, 558 linking them with PRI values so they may be routed to the destination 559 commensurate with the appropriate syslog messages. In all cases, no 560 more than 192 signature groups (0-191) are permitted. 562 a. '0' -- There is only one signature group. All Signature Block 563 messages use a single PRI value which is the same SPRI value. In 564 this case, the administrators want all Signature Blocks to be 565 sent to a single destination. In all likelihood, all of the 566 syslog messages will also be going to that same destination. As 567 one example, if SIG=0, then PRI and SPRI may be 46 to indicate 568 that they are informational messages from the syslog daemon. If 569 the device is configured to send all messages with the local5 570 Facility (21), then the PRI and SPRI may be 174 to indicate that 571 they are also from the local5 Facility with a Severity of 6. 573 b. '1' -- Each PRI value has its own signature group. Signature 574 Blocks for a given signature group have SPRI = PRI for that 575 signature group. In this case, the administrator of a device may 576 not know where any of the syslog messages will ultimately go. 577 This use ensures that a Signature Block follows each of the 578 syslog messages to each destination. This may be seen to be 579 inefficient if groups of syslog messages are actually going to 580 the same syslog server. Examine an example of a device being 581 configured to have a SIG value of 1, which generates 16 syslog 582 messages with 584 4 from PRI=132 (Facility 16, Severity 4), 585 4 from PRI=148 (Facility 18, Severity 4), 586 4 from PRI=164, (Facility 20, Severity 4), and 587 4 from PRI=180 (Facility 22, Severity 4). 589 In actuality, the messages from Facilities local0 and local2 go 590 to one syslog server and messages from Facilities local4 and 591 local6 go to a different one. Then, the first syslog server 592 receives 2 Signature Blocks, the first with PRI=134 and the 593 second from PRI=150 - the PRI values matching the SPRI values. 594 The second syslog server would also receive two Signature Block 595 messages, the first from PRI=164 and the second from PRI=180. In 596 each of those Signature Blocks, the SPRI values matches their 597 respective PRI values. In each of these cases, the Signature 598 Blocks going to each respective syslog server could have been 599 combined. One way to do this more efficiently is explained using 600 SIG=2. 602 c. '2' -- Each signature group contains a range of PRI values. 603 Signature groups are assigned sequentially. A Signature Block for 604 a given signature group has its own SPRI value denoting the 605 highest PRI value in that signature group. For flexibility, the 606 PRI does not have to be that upper-boundary SPRI value. 607 Continuing the above example, the administrator of the device may 608 configure SIG=2 with upper-bound SPRIs of 151 and 191. The lower 609 group contains all PRIs between 0 and 151, and the second group 610 contains all PRIs between 152 and 191. The administrator may 611 then wish to configure the lower group to send all of the lower 612 group Signature Blocks using PRI=150 (Facility 18, Severity 6), 613 and the upper group using PRI=182 (Facility 22, Severity 6). The 614 receiving syslog servers then each receive a single Signature 615 Block describing the 8 syslog messages sent to it. 617 d. '3' -- Signature groups are not assigned with any simple 618 relationship to PRI values. This has to be some predefined 619 arrangement between the sender and the intended receivers. In 620 this case, the administrators of the devices and syslog servers 621 may, as an example, use SIG=3 with a SPRI of 1 to denote that all 622 Warning and above syslog messages from all Facilities are sent 623 using a PRI of 46 (Facility 5, Severity 6). 625 One reasonable way to configure some installations is to have only 626 one signature group with SIG=0. The devices send messages to many 627 collectors and also send a copy of each Signature Block to each 628 collector. This won't allow any collector to detect gaps in the 629 messages, but it allows all messages that arrive at each collector to 630 be put into the right order, and to be verified. It also allows each 631 collector to detect duplicates and any messages that are not 632 associated with a Signature Block. 634 3.6 Global Block Counter 636 The global block counter is a value representing the number of 637 Signature Blocks sent out by syslog-sign before this one, in this 638 reboot session. This takes at least 1 byte and at most 10 bytes 639 displayed as a decimal counter and the acceptable values for this are 640 between 0 and 9999999999. If the value latches at 9999999999, then 641 the reboot session counter must be incremented by 1 and the global 642 block counter resumes at 0. Note that this counter crosses signature 643 groups; it allows us to roughly synchronize when two messages were 644 sent, even though they went to different collectors. 646 3.7 First Message Number 648 This is a value between 1 and 10 bytes. It contains the unique 649 message number within this signature group of the first message whose 650 hash appears in this block. 652 For example, if this signature group has processed 1000 messages so 653 far and message number 1001 is the first message whose hash appears 654 in this Signature Block, then this field contains 1001. 656 3.8 Count 658 The count is a 1 or 2 byte field displaying the number of message 659 hashes to follow. The valid values for this field are between 1 and 660 99. 662 3.9 Hash Block 664 The hash block is a block of hashes, each separately encoded in 665 base-64. Each hash in the hash block is the hash of the entire syslog 666 message represented by the hash. The hashing algorithm used 667 effectively specified by the Version field determines the size of 668 each hash, but the size MUST NOT be shorter than 160 bits. It is 669 base-64 encoded as per RFC 2045. 671 3.10 Signature 673 This is a digital signature, encoded in base-64, as per RFC 2045. The 674 signature is calculated over all fields but excludes the space 675 characters between them. The Version field effectively specifies the 676 original encoding of the signature. The signature is a signature over 677 the entire data, including all of the PRI, HEADER, and hashes in the 678 hash block. To reiterate, the signature is calculated over the 679 completely formatted syslog-message, excluding spaces between fields, 680 and also excluding this signature field. 682 4. Payload and Certificate Blocks 684 Certificate Blocks and Payload Blocks provide key management in 685 syslog-sign. 687 4.1 Preliminaries: Key Management and Distribution Issues 689 The purpose of Certificate Blocks is to support key management using 690 public key cryptosystems. All devices send at least one Certificate 691 Block at the beginning of a new reboot session, carrying useful 692 information about the reboot session. 694 There are three key points to understand about Certificate Blocks: 696 a. They handle a variable-sized payload, fragmenting it if necessary 697 and transmitting the fragments as legal syslog messages. This 698 payload is built (as described below) at the beginning of a 699 reboot session and is transmitted in pieces with each Certificate 700 Block carrying a piece. Note that there is exactly one Payload 701 Block per reboot session. 703 b. The Certificate Blocks are digitally signed. The device does not 704 sign the Payload Block, but the signatures on the Certificate 705 Blocks ensure its authenticity. Note that it may not even be 706 possible to verify the signature on the Certificate Blocks 707 without the information in the Payload Block; in this case the 708 Payload Block is reconstructed, the key is extracted, and then 709 the Certificate Blocks are verified. (This is necessary even when 710 the Payload Block carries a certificate, since some other fields 711 of the Payload Block aren't otherwise verified.) In practice, 712 most installations keep the same public key over long periods of 713 time, so that most of the time, it's easy to verify the 714 signatures on the Certificate Blocks, and use the Payload Block 715 to provide other useful per-session information. 717 c. The kind of Payload Block that is expected is determined by what 718 kind of key material is on the collector that receives it. The 719 device and collector (or offline log viewer) has both some key 720 material (such as a root public key, or predistributed public 721 key), and an acceptable value for the Key Blob Type in the 722 Payload Block, below. The collector or offline log viewer MUST 723 NOT accept a Payload Block of the wrong type. 725 4.2 Building the Payload Block 727 The Payload Block is built when a new reboot session is started. 728 There is a one-to-one correspondence of reboot sessions to Payload 729 Blocks. That is, each reboot session has only one Payload Block, 730 regardless of how many signature groups it may support. Like syslog 731 packets containing the Signature Block, Payload Block messages MUST 732 be completely formed syslog messages. Payload Block messages have 733 PRI, HEADER, and MSG parts as described in this document. The PRI 734 part MUST have a valid Priority value bounded by angled brackets. The 735 HEADER part MUST have a valid TIMESTAMP-3339 field as well as a 736 HOSTNAME-STD13 field. It SHOULD also contain a valid TAG field. It is 737 RECOMMENDED that the TAG field have the value of "syslog " (without 738 the double quotes) to signify that this message was generated by the 739 syslog process. The CONTENT field of the syslog Payload Block 740 messages MUST have the following fields. Each of these fields are 741 separated by a single space character. 743 a. Unique identifier of sender; by default, the sender's IP address 744 in dotted-decimal (IPv4) or colon-separated (IPv6) notation. 746 b. Full local time stamp for the device at the time the reboot 747 session started. This must be in TIMESTAMP-3339 format. 749 c. Key Blob Type, a one-byte field which holds one of five values: 751 1. 'C' -- a PKIX certificate. 753 2. 'P' -- an OpenPGP certificate. 755 3. 'K' -- the public key whose corresponding private key is 756 being used to sign these messages. 758 4. 'N' -- no key information sent; key is predistributed. 760 5. 'U' -- installation-specific key exchange information 762 d. The key blob, consisting of the raw key data, if any, base-64 763 encoded. 765 4.3 Building the Certificate Block 767 The Certificate Block must get the Payload Block to the collector. 768 Since certificates can legitimately be much longer than 1024 bytes, 769 each Certificate Block carries a piece of the Payload Block. Note 770 that the device MAY make the Certificate Blocks of any legal length 771 (that is, any length less than 1024 bytes) which holds all the 772 required fields. Software that processes Certificate Blocks MUST deal 773 correctly with blocks of any legal length. 775 The Certificate Block is composed of the following fields. Each field 776 must be printable ASCII, and any binary values are base-64 encoded. 778 Field Designation Size in bytes 779 ----- ----------- ---- -- ----- 781 Cookie Cookie 8 783 Version Ver 4 785 Reboot Session ID RSID 1-10 787 Signature Group SIG 1 789 Signature Priority SPRI 1-3 791 Total Payload Block Length TPBL 8 793 Index into Payload Block Index 1-8 795 Fragment Length FragLen 1-4 797 Payload Block Fragment Fragment variable 798 (base-64 encoded binary) 800 Signature Signature variable 801 (base-64 encoded binary) 803 4.3.1 Cookie 805 The cookie is a eight-byte sequence to signal that this is a 806 Signature Block. This sequence is "@#sigCER" (without the double 807 quotes). As noted, a space character follows this, and all other 808 fields. 810 4.3.2 Version 812 The signature group version field is 4 characters in length and is 813 terminated with a space character. This field is identical to the 814 Version field described in Section 3. As such, the version, hash 815 algorithm and signature scheme defined in this document may be 816 represented as "0111" (without the quote marks). 818 4.3.3 Reboot Session ID 820 The Reboot Session ID is identical to the RSID field described in 821 Section 3. 823 4.3.4 Signature Group and Signature Priority 825 The SIG field is identical to the SIG field described in Section 3. 826 Also, the SPRI field is identical to the SPRI field described there. 828 4.3.5 Total Payload Block Length 830 The Total Payload Block Length is a value representing the total 831 length of the Payload Block in bytes in decimal. 833 4.3.6 Index into Payload Block 835 This is a value between 1 and 8 bytes. It contains the number of 836 bytes into the Payload Block where this fragment starts. 838 4.3.7 Fragment Length 840 The total length of this fragment expressed as a decimal integer. 841 This will be one to four bytes. 843 4.3.8 Signature 845 This is a digital signature, encoded in base-64, as per RFC 2045. The 846 signature is calculated over all fields but excludes the space 847 characters between them. The Version field effectively specifies the 848 original encoding of the signature. The signature is a signature over 849 the entire data, including all of the PRI, HEADER, and hashes in the 850 hash block. This is consistent with the method of calculating the 851 signature as specified in Section 3.10. To reiterate, the signature 852 is calculated over the completely formatted syslog-message, excluding 853 spaces between fields, and also excluding this signature field. 855 5. Redundancy and Flexibility 857 There is a general rule that determines how redundancy works and what 858 level of flexibility the device and collector have in message 859 formats: in general, the device is allowed to send Signature and 860 Certificate Blocks multiple times, to send Signature and Certificate 861 Blocks of any legal length, to include fewer hashes in hash blocks, 862 etc. 864 5.1 Redundancy 866 Syslog messages are sent over unreliable transport, which means that 867 they can be lost in transit. However, the collector must receive 868 Signature and Certificate Blocks or many messages may not be able to 869 be verified. Sending Signature and Certificate Blocks multiple times 870 provides redundancy; since the collector MUST ignore Signature/ 871 Certificate Blocks it has already received and authenticated, the 872 device can in principle change its redundancy level for any reason, 873 without communicating this fact to the collector. 875 Although the device isn't constrained in how it decides to send 876 redundant Signature and Certificate Blocks, or even in whether it 877 decides to send along multiple copies of normal syslog messages, here 878 we define some redundancy parameters below which may be useful in 879 controlling redundant transmission from the device to the collector. 881 5.1.1 Certificate Blocks 883 certInitialRepeat = number of times each Certificate Block should be 884 sent before the first message is sent. 886 certResendDelay = maximum time delay in seconds to delay before next 887 redundant sending. 889 certResendCount = maximum number of sent messages to delay before 890 next redundant sending. 892 5.1.2 Signature Blocks 894 sigNumberResends = number of times a Signature Block is resent. 896 sigResendDelay = maximum time delay in seconds from original 897 sending to next redundant sending. 899 sigResendCount = maximum number of sent messages to delay before 900 next redundant sending. 902 5.2 Flexibility 904 The device may change many things about the makeup of Signature and 905 Certificate Blocks in a given reboot session. The things it cannot 906 change are: 908 * The version 910 * The number or arrangements of signature groups 912 It is legitimate for a device to send out short Signature Blocks, in 913 order to keep the collector able to verify messages quickly. In 914 general, unless something verified by the Payload Block or 915 Certificate Blocks is changed within the reboot session ID, any 916 change is allowed to the Signature or Certificate Blocks during the 917 session. 919 6. Efficient Verification of Logs 921 The logs secured with syslog-sign may either be reviewed online or 922 offline. Online review is somewhat more complicated and 923 computationally expensive, but not prohibitively so. 925 6.1 Offline Review of Logs 927 When the collector stores logs and reviewed later, they can be 928 authenticated offline just before they are reviewed. Reviewing these 929 logs offline is simple and relatively cheap in terms of resources 930 used, so long as there is enough space available on the reviewing 931 machine. Here, we consider that the stored log files have already 932 been separated by sender, reboot session ID, and signature group. 933 This can be done very easily with a script file. We then do the 934 following: 936 a. First, we go through the raw log file, and split its contents 937 into three files. Each message in the raw log file is classified 938 as a normal message, a Signature Block, or a Certificate Block. 939 Certificate Blocks and Signature Blocks are stored in their own 940 files. Normal messages are stored in a keyed file, indexed on 941 their hash values. 943 b. We sort the Certificate Block file by index value, and check to 944 see if we have a set of Certificate Blocks that can reconstruct 945 the Payload Block. If so, we reconstruct the Payload Block, 946 verify any key-identifying information, and then use this to 947 verify the signatures on the Certificate Blocks we've received. 948 When this is done, we have verified the reboot session and key 949 used for the rest of the process. 951 c. We sort the Signature Block file by firstMessageNumber. We now 952 create an authenticated log file, which consists of some header 953 information, and then a sequence of message number, message text 954 pairs. We next go through the Signature Block file. For each 955 Signature Block in the file, we do the following: 957 1. Verify the signature on the Block. 959 2. For each hashed message in the Block: 961 a. Look up the hash value in the keyed message file. 963 b. If the message is found, write (message number, message 964 text) to the authenticated log file. 966 3. Skip all other Signature Blocks with the same 967 firstMessageNumber. 969 d. The resulting authenticated log file contains all messages that 970 have been authenticated, and implicitly indicates (by missing 971 message numbers) all gaps in the authenticated messages. 973 It's pretty easy to see that, assuming sufficient space for building 974 the keyed file, this whole process is linear in the number of 975 messages (generally two seeks, one to write and the other to read, 976 per normal message received), and O(N lg N) in the number of 977 Signature Blocks. This estimate comes with two caveats: first, the 978 Signature Blocks arrive very nearly in sorted order, and so can 979 probably be sorted more cheaply on average than O(N lg N) steps. 980 Second, the signature verification on each Signature Block almost 981 certainly is more expensive than the sorting step in practice. We 982 haven't discussed error-recovery, which may be necessary for the 983 Certificate Blocks. In practice, a very simple error-recovery 984 strategy is probably good enough -- if the Payload Block doesn't come 985 out as valid, then we can just try an alternate instance of each 986 Certificate Block, if such are available, until we get the Payload 987 Block right. 989 It's easy for an attacker to flood us with plausible-looking 990 messages, Signature Blocks, and Certificate Blocks. 992 6.2 Online Review of Logs 994 Some processes on the collector machine may need to monitor log 995 messages in something very close to real-time. This can be done with 996 syslog-sign, though it is somewhat more complex than the offline 997 analysis. This is done as follows: 999 a. We have an output queue, into which we write (message number, 1000 message text) pairs which have been authenticated. Again, we'll 1001 assume we're handling only one signature group, and only one 1002 reboot session ID, at any given time. 1004 b. We have three data structures: A queue into which (message 1005 number, hash of message) pairs is kept in sorted order, a queue 1006 into which (arrival sequence, hash of message) is kept in sorted 1007 order, and a hash table which stores (message text, count) 1008 indexed by hash value. In this file, count may be any number 1009 greater than zero; when count is zero, the entry in the hash 1010 table is cleared. 1012 c. We must receive all the Certificate Blocks before any other 1013 processing can really be done. (This is why they're sent first.) 1014 Once that's done, any Certificate Block that arrives is 1015 discarded. 1017 d. Whenever a normal message arrives, we add (arrival sequence, hash 1018 of message) to our message queue. If our hash table has an entry 1019 for the message's hash value, we increment its count by one; 1020 otherwise, we create a new entry with count = 1. When the message 1021 queue is full, we roll the oldest messages off the queue by 1022 taking the last entry in the queue, and using it to index the 1023 hash table. If that entry has count is 1, we delete the entry in 1024 the hash table; otherwise, we decrement its count. We then delete 1025 the last entry in the queue. 1027 e. Whenever a Signature Block arrives, we first check to see if the 1028 firstMessageNumber value is too old, or if another Signature 1029 Block with that firstMessageNumber has already been received. If 1030 so, we discard the Signature Block unread. Otherwise, we check 1031 its signature, and discard it if the signature isn't valid. A 1032 Signature Block contains a sequence of (message number, message 1033 hash) pairs. For each pair, we first check to see if the message 1034 hash is in the hash table. If so, we write out the (message 1035 number, message text) in the authenticated message queue. 1036 Otherwise, we write the (message number, message hash) to the 1037 message number queue. This generally involves rolling the oldest 1038 entry out of this queue: before this is done, that entry's hash 1039 value is again searched for in the hash table. If a matching 1040 entry is found, the (message number, message text) pair is 1041 written out to the authenticated message queue. In either case, 1042 the oldest entry is then discarded. 1044 f. The result of this is a sequence of messages in the authenticated 1045 message queue, each of which has been authenticated, and which 1046 are combined with numbers showing their order of original 1047 transmission. 1049 It's not too hard to see that this whole process is roughly linear in 1050 the number of messages, and also in the number of Signature Blocks 1051 received. The process is susceptible to flooding attacks; an attacker 1052 can send enough normal messages that the messages roll off their 1053 queue before their Signature Blocks can be processed. 1055 7. Security Considerations 1057 Normal syslog event messages are unsigned and have most of the 1058 security attributes described in Section 6 of RFC 3164. This 1059 document also describes Certificate Blocks and Signature Blocks which 1060 are signed syslog messages. The Signature Blocks contains signature 1061 information of previously sent syslog event messages. All of this 1062 information may be used to authenticate syslog messages and to 1063 minimize or obviate many of the security concerns described in RFC 1064 3164. 1066 7.1 Cryptography Constraints 1068 As with any technology involving cryptography, you should check the 1069 current literature to determine if any algorithms used here have been 1070 found to be vulnerable to attack. 1072 This specification uses Public Key Cryptography technologies. The 1073 proper party or parties must control the private key portion of a 1074 public-private key pair. Any party that controls a private key may 1075 sign anything they please. 1077 Certain operations in this specification involve the use of random 1078 numbers. An appropriate entropy source should be used to generate 1079 these numbers. See RFC 1750 [7]. 1081 7.2 Packet Parameters 1083 The message length must not exceed 1024 bytes. Various problems may 1084 result if a device sends out messages with a length greater than 1024 1085 bytes. In this case, as with all others, it is best to be 1086 conservative with what you send but liberal in what you receive, and 1087 accept more than 1024 bytes. 1089 Similarly, senders must rigidly enforce the correctness of the 1090 message body. It is hoped that all devices adopt the newly defined 1091 HOSTNAME-STD13 and TIMESTAMP-3339 formats. However, until that 1092 happens, receivers may become upset at the receipt of messages with 1093 these fields. Knowledgeable humans should review the senders and 1094 receivers to ensure that no problems arise from this. 1096 Finally, receivers must not malfunction if they receive syslog 1097 messages containing characters other than those specified in this 1098 document. 1100 7.3 Message Authenticity 1102 Event messages being sent through syslog do not strongly associate 1103 the message with the message sender. That fact is established by the 1104 receiver upon verification of the Signature Block as described above. 1105 Before a Signature Block is used to ascertain the authenticity of an 1106 event message, it may be received, stored and reviewed by a person or 1107 automated parser. Both of these should maintain doubt about the 1108 authenticity of the message until after it has been validated by 1109 checking the contents of the Signature Block. 1111 With the Signature Block checking, an attacker may only forge 1112 messages if they can compromise the private key of the true sender. 1114 7.4 Sequenced Delivery 1116 Event messages may be recorded and replayed by an attacker. However 1117 the information contained in the Signature Blocks allows a reviewer 1118 to determine if the received messages are the ones originally sent by 1119 a device. This process also alerts the reviewer to replayed 1120 messages. 1122 7.5 Replaying 1124 7.6 Reliable Delivery 1126 RFC 3195 may be used for the reliable delivery of all syslog 1127 messages. This document acknowledges that event messages sent over 1128 UDP may be lost in transit. A proper review of the Signature Block 1129 information may pinpoint any messages sent by the sender but not 1130 received by the receiver. The overlap of information in subsequent 1131 Signature Block information allows a reviewer to determine if any 1132 Signature Block messages were also lost in transit. 1134 7.7 Sequenced Delivery 1136 Related to the above, syslog messages delivered over UDP not only may 1137 be lost, but they may arrive out of sequence. The information 1138 contained in the Signature Block allows a receiver to correctly order 1139 the event messages. Beyond that, the extended timestamp information 1140 contained in the TIMESTAMP-3339 format should help the reviewer to 1141 visually order received messages even if they are received out of 1142 order. 1144 7.8 Message Integrity 1146 syslog messages may be damaged in transit. A review of the 1147 information in the Signature Block determines if the received message 1148 was the intended message sent by the sender. A damaged Signature 1149 Block or Certificate Block will be evident since the receiver will 1150 not be able to validate that it was signed by the sender. 1152 7.9 Message Observation 1154 Event messages, Certificate Blocks and Signature Blocks are all sent 1155 in plaintext. Generally this has had the benefit of allowing network 1156 administrators to read the message when sniffing the wire. However, 1157 this also allows an attacker to see the contents of event messages 1158 and perhaps to use that information for malicious purposes. 1160 7.10 Man In The Middle 1162 It is conceivable that an attacker may intercept Certificate Blocks 1163 and insert their own Certificate information. In that case, the 1164 attacker would be able to receive event messages from the actual 1165 sender and then relay modified messages, insert new messages, or 1166 deleted messages. They would then be able to construct a Signature 1167 Block and sign it with their own private key. The network 1168 administrators should verify that the key contained in the 1169 Certificate Block is indeed the key being used on the actual device. 1170 If that is indeed the case, then this MITM attack will not succeed. 1172 7.11 Denial of Service 1174 An attacker may be able to overwhelm a receiver by sending it invalid 1175 Signature Block messages. If the receiver is attempting to process 1176 these messages online, it may consume all available resources. For 1177 this reason, it may be appropriate to just receive the Signature 1178 Block messages and process them as time permits. 1180 As with any system, an attacker may also just overwhelm a receiver by 1181 sending more messages to it than can be handled by the infrastructure 1182 or the device itself. Implementors should attempt to provide features 1183 that minimize this threat. Such as only receiving syslog messages 1184 from known IP addresses. 1186 7.12 Covert Channels 1188 Nothing in this protocol attempts to eliminate covert channels. 1189 Indeed, the unformatted message syntax in the packets could be very 1190 amenable to sending embedded secret messages. In fact, just about 1191 every aspect of syslog messages lends itself to the conveyance of 1192 covert signals. For example, a collusionist could send odd and even 1193 PRI values to indicate Morse Code dashes and dots. 1195 8. IANA Considerations 1197 Two syslog packet types are specified in this document; the Signature 1198 Block and the Certificate Block. Each of these has several fields 1199 specified that should be controlled by the IANA. Essentially these 1200 packet types may be differentiated based upon the value in the Cookie 1201 field. The Signature Block packet may be identified by a value of 1202 "@#sigSIG" in the Cookie field. The Certificate Block packet may be 1203 identified by a value of "@#sigCER" in the Cookie field. Each of 1204 these packet types share fields that should be consistent; 1205 specifically, the Certificate Block packet types may be considered to 1206 be an announcement of capabilities and the Signature Block packets 1207 SHOULD have the same values in the fields described in this section. 1208 This document allows that there may be some really fine reason for 1209 the values to be different between the two packet types but the 1210 authors and contributors can't see any valid reason for that at this 1211 time. 1213 The following fields are to be controlled by the IANA in both the 1214 Signature Block packets and the Certificate Block packets. 1216 8.1 Version Field 1218 The Version field (Ver) is a 4 byte field. The first two bytes of 1219 this field define the version of the Signature Block packets and the 1220 Certificate Block Packets. This allows for future efforts to 1221 redefine the subsequent fields in the Signature Block packets and 1222 Certificate Block packets. A value of "00" is reserved and not used. 1223 This document describes the fields for the version value of "01". It 1224 is expected that this value be incremented monotonically with decimal 1225 values up through "50" for IANA assigned values. Values "02" through 1226 "50" will be assigned by the IANA using the "IETF Consensus" policy 1227 defined in RFC 2434 [15]. It is not anticipated that these values 1228 will be reused. Values of "51" through "99" will be vendor-specific, 1229 and values in this range are not to be assigned by the IANA. 1231 In the case of vendor-specific assigned Version numbers, all 1232 subsequent values defined in the packet will then have 1233 vendor-specific meaning. They may, or may not, align with the values 1234 assigned by the IANA for these fields. For example, a vendor may 1235 choose to define their own Version of "51" still containing values of 1236 "1" for the Hash Algorithm and Signature Scheme which aligns with the 1237 IANA assigned values as defined in this document. However, they may 1238 then choose to define a value of "5" for the Signature Group for 1239 their own reasons. 1241 The third byte of the Ver field defines the Hash Algorithm. It is 1242 envisioned that this will also be a monotonically increasing value 1243 with a maximum value of "9". The value of "1" is defined in this 1244 document as the first assigned value and is SHA1 FIPS-180-1.1995 [2]. 1245 Subsequent values will be assigned by the IANA using the "IETF 1246 Consensus" policy defined in RFC 2434 [15]. 1248 The forth and final byte of the Ver field defines the Signature 1249 Scheme. It is envisioned that this too will be a monotonically 1250 increasing value with a maximum value of "9". The value of "1" is 1251 defined in this document as OpenPGP DSA - RFC 2440 [16], 1252 FIPS.186-1.1998 [1]. Subsequent values will be assigned by the IANA 1253 using the "IETF Consensus" policy defined in RFC 2434 [15]. The 1254 fields, values assigned in this document and ranges are illustrated 1255 in the following table. 1257 Field Value Defined IANA Assigned Vendor Specific 1258 in this Document Range Range 1259 ----- ---------------- ------------- --------------- 1260 Ver 1261 ver 01 01-50 50-99 1262 hash 1 0-9 -none- 1263 sig 1 0-9 -none- 1265 If either the Hash Algorithm field or the Signature Scheme field is 1266 needed to go beyond "9" within the current version (first two bytes), 1267 the IANA should increment the first two bytes of this 4 byte field to 1268 be the next value with the definition that all of the subsequent 1269 values of fields described in this section are reset to "0" while 1270 retaining the latest definitions given by the IANA. For example, 1271 consider the case that the first two characters are "23" and the 1272 latest Signature Algorithm is 4. Let's say that the latest Hash 1273 Algorithm value is "9" but a better Hash Algorithm is defined. In 1274 that case, the IANA will increment the first two bytes to become 1275 "24", retain the current Hash Algorithm to be "0", define the new 1276 Hash Algorithm to be "1" in this scheme, and define the current 1277 Signature Scheme to also be "0". This example is illustrated in the 1278 following table. 1280 Current New - Equivalent New with Later 1281 to "Current" Algorithms 1282 ------- -------------- --------------- 1283 ver = 23 ver = 24 ver = 24 1284 hash = 9 hash = 0 hash = 1 1285 sig = 4 sig = 0 sig = 0 1287 8.2 SIG Field 1289 The SIG field values are numbers as defined in section Section 3.5. 1291 Values "0" through "3" are assigned in this document. The IANA shall 1292 assign values "4" through "7" using the "IETF Consensus" policy 1293 defined in RFC 2434 [15]. Values "8" and "9" shall be left as vendor 1294 specific and shall not be assigned by the IANA. 1296 8.3 Key Blob Type 1298 Section Section 4.2 defines five, one character identifiers for the 1299 key blob type. These are the uppercase letters, "C", "P", "K", "N", 1300 and "U". All other uppercase letters shall be assigned by the IANA 1301 using the "IETF Consensus" policy defined in RFC 2434 [15]. 1302 Lowercase letters are left as vendor specific and shall not be 1303 assigned by the IANA. 1305 9. Authors and Working Group Chair 1307 The working group can be contacted via the mailing list: 1309 syslog-sec@employees.org 1311 The current Chair of the Working Group may be contacted at: 1313 Chris Lonvick 1314 Cisco Systems 1315 Email: clonvick@cisco.com 1317 The authors of this draft are: 1319 John Kelsey 1320 Email: kelsey.j@ix.netcom.com 1322 Jon Callas 1323 Email: jon@callas.org 1325 10. Acknowledgements 1327 The authors wish to thank Alex Brown, Chris Calabrese, Carson Gaspar, 1328 Drew Gross, Chris Lonvick, Darrin New, Marshall Rose, Holt Sorenson, 1329 Rodney Thayer, Andrew Ross, Rainer Gerhards, Albert Mietus, and the 1330 many Counterpane Internet Security engineering and operations people 1331 who commented on various versions of this proposal. 1333 References 1335 [1] National Institute of Standards and Technology, "Digital 1336 Signature Standard", FIPS PUB 186-1, December 1998, . 1339 [2] National Institute of Standards and Technology, "Secure Hash 1340 Standard", FIPS PUB 180-1, April 1995, . 1343 [3] American National Standards Institute, "USA Code for 1344 Information Interchange", ANSI X3.4, 1968. 1346 [4] Menezes, A., van Oorschot, P. and S. Vanstone, ""Handbook of 1347 Applied Cryptography", CRC Press", 1996. 1349 [5] Mockapetris, P., "Domain names - concepts and facilities", STD 1350 13, RFC 1034, November 1987. 1352 [6] Mockapetris, P., "Domain names - implementation and 1353 specification", STD 13, RFC 1035, November 1987. 1355 [7] Eastlake, D., Crocker, S. and J. Schiller, "Randomness 1356 Recommendations for Security", RFC 1750, December 1994. 1358 [8] Malkin, G., "Internet Users' Glossary", RFC 1983, August 1996. 1360 [9] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1361 Extensions (MIME) Part One: Format of Internet Message Bodies", 1362 RFC 2045, November 1996. 1364 [10] Oehler, M. and R. Glenn, "HMAC-MD5 IP Authentication with 1365 Replay Prevention", RFC 2085, February 1997. 1367 [11] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-Hashing 1368 for Message Authentication", RFC 2104, February 1997. 1370 [12] Bradner, S., "Key words for use in RFCs to Indicate Requirement 1371 Levels", BCP 14, RFC 2119, March 1997. 1373 [13] Crocker, D. and P. Overell, "Augmented BNF for Syntax 1374 Specifications: ABNF", RFC 2234, November 1997. 1376 [14] Hinden, R. and S. Deering, "IP Version 6 Addressing 1377 Architecture", RFC 2373, July 1998. 1379 [15] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 1380 Considerations Section in RFCs", BCP 26, RFC 2434, October 1381 1998. 1383 [16] Callas, J., Donnerhacke, L., Finney, H. and R. Thayer, "OpenPGP 1384 Message Format", RFC 2440, November 1998. 1386 [17] Blumenthal, U. and B. Wijnen, "User-based Security Model (USM) 1387 for version 3 of the Simple Network Management Protocol 1388 (SNMPv3)", RFC 2574, April 1999. 1390 [18] Lonvick, C., "The BSD Syslog Protocol", RFC 3164, August 2001. 1392 [19] New, D. and M. Rose, "Reliable Delivery for syslog", RFC 3195, 1393 November 2001. 1395 [20] Klyne, G. and C. Newman, "Date and Time on the Internet: 1396 Timestamps", RFC 3339, July 2002. 1398 [21] Schneier, B., "Applied Cryptography Second Edition: protocols, 1399 algorithms, and source code in C", 1996. 1401 Authors' Addresses 1403 John Kelsey 1405 EMail: kelsey.j@ix.netcom.com 1407 Jon Callas 1408 PGP Corporation 1410 EMail: jon@callas.org 1412 Intellectual Property Statement 1414 The IETF takes no position regarding the validity or scope of any 1415 intellectual property or other rights that might be claimed to 1416 pertain to the implementation or use of the technology described in 1417 this document or the extent to which any license under such rights 1418 might or might not be available; neither does it represent that it 1419 has made any effort to identify any such rights. Information on the 1420 IETF's procedures with respect to rights in standards-track and 1421 standards-related documentation can be found in BCP-11. Copies of 1422 claims of rights made available for publication and any assurances of 1423 licenses to be made available, or the result of an attempt made to 1424 obtain a general license or permission for the use of such 1425 proprietary rights by implementors or users of this specification can 1426 be obtained from the IETF Secretariat. 1428 The IETF invites any interested party to bring to its attention any 1429 copyrights, patents or patent applications, or other proprietary 1430 rights which may cover technology that may be required to practice 1431 this standard. Please address the information to the IETF Executive 1432 Director. 1434 Full Copyright Statement 1436 Copyright (C) The Internet Society (2003). All Rights Reserved. 1438 This document and translations of it may be copied and furnished to 1439 others, and derivative works that comment on or otherwise explain it 1440 or assist in its implementation may be prepared, copied, published 1441 and distributed, in whole or in part, without restriction of any 1442 kind, provided that the above copyright notice and this paragraph are 1443 included on all such copies and derivative works. However, this 1444 document itself may not be modified in any way, such as by removing 1445 the copyright notice or references to the Internet Society or other 1446 Internet organizations, except as needed for the purpose of 1447 developing Internet standards in which case the procedures for 1448 copyrights defined in the Internet Standards process must be 1449 followed, or as required to translate it into languages other than 1450 English. 1452 The limited permissions granted above are perpetual and will not be 1453 revoked by the Internet Society or its successors or assignees. 1455 This document and the information contained herein is provided on an 1456 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1457 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1458 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1459 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1460 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1462 Acknowledgement 1464 Funding for the RFC Editor function is currently provided by the 1465 Internet Society.