@@ -34,9 +34,9 @@ stored traffic. We use the :program:`jq` utility to review the contents.
3434
3535 ::
3636
37- {"ts":1591367999.305988,"uid":"CMdzit1AMNsmfAIiQc","id.orig_h":"192.168.4.76","id.orig_p":36844,"id.resp_h":"192.168.4.1","id.resp_p":53,"proto":"udp","service":"dns","duration":0.06685185432434082,"orig_bytes":62,"resp_bytes":141,"conn_state":"SF","missed_bytes":0,"history":"Dd","orig_pkts":2,"orig_ip_bytes":118,"resp_pkts":2,"resp_ip_bytes":197}
37+ {"ts":1591367999.305988,"uid":"CMdzit1AMNsmfAIiQc","id.orig_h":"192.168.4.76","id.orig_p":36844,"id.resp_h":"192.168.4.1","id.resp_p":53,"proto":"udp","service":"dns","duration":0.06685185432434082,"orig_bytes":62,"resp_bytes":141,"conn_state":"SF","missed_bytes":0,"history":"Dd","orig_pkts":2,"orig_ip_bytes":118,"resp_pkts":2,"resp_ip_bytes":197,"ip_proto":17 }
3838
39- {"ts":1591367999.430166,"uid":"C5bLoe2Mvxqhawzqqd","id.orig_h":"192.168.4.76","id.orig_p":46378,"id.resp_h":"31.3.245.133","id.resp_p":80,"proto":"tcp","service":"http","duration":0.25411510467529297,"orig_bytes":77,"resp_bytes":295,"conn_state":"SF","missed_bytes":0,"history":"ShADadFf","orig_pkts":6,"orig_ip_bytes":397,"resp_pkts":4,"resp_ip_bytes":511}
39+ {"ts":1591367999.430166,"uid":"C5bLoe2Mvxqhawzqqd","id.orig_h":"192.168.4.76","id.orig_p":46378,"id.resp_h":"31.3.245.133","id.resp_p":80,"proto":"tcp","service":"http","duration":0.25411510467529297,"orig_bytes":77,"resp_bytes":295,"conn_state":"SF","missed_bytes":0,"history":"ShADadFf","orig_pkts":6,"orig_ip_bytes":397,"resp_pkts":4,"resp_ip_bytes":511,"ip_proto":6 }
4040
4141Alternatively, we could see each field printed on its own line:
4242
@@ -64,7 +64,8 @@ Alternatively, we could see each field printed on its own line:
6464 "orig_pkts": 2,
6565 "orig_ip_bytes": 118,
6666 "resp_pkts": 2,
67- "resp_ip_bytes": 197
67+ "resp_ip_bytes": 197,
68+ "ip_proto": 17
6869 }
6970 {
7071 "ts": 1591367999.430166,
@@ -84,7 +85,8 @@ Alternatively, we could see each field printed on its own line:
8485 "orig_pkts": 6,
8586 "orig_ip_bytes": 397,
8687 "resp_pkts": 4,
87- "resp_ip_bytes": 511
88+ "resp_ip_bytes": 511,
89+ "ip_proto": 6
8890 }
8991
9092What an analyst derives from any log is a function of the questions that he or
@@ -119,7 +121,8 @@ the following:
119121 "orig_pkts": 6,
120122 "orig_ip_bytes": 397,
121123 "resp_pkts": 4,
122- "resp_ip_bytes": 511
124+ "resp_ip_bytes": 511,
125+ "ip_proto": 6
123126 }
124127
125128For the second log, ``192.168.4.76 `` talked to ``31.3.245.133 ``.
@@ -264,6 +267,10 @@ In the highlighted output, we see that :program:`tshark` notes 77 bytes of data
264267carried by TCP from ``192.168.4.76 ``. I highlighted what that data was,
265268beginning with a GET request.
266269
270+ The ``orig_pkts `` and ``resp_pkts `` fields report the number of IP packets
271+ transferred in the respective directions. The ``orig_ip_bytes `` and
272+ ``resp_ip_bytes `` indicate the total IP packet-level byte counts, respectively.
273+
267274Another way to look at this TCP segment is to dump the hex contents using a
268275different :program: `tshark ` option, as shown below.
269276
@@ -339,7 +346,8 @@ reference.
339346 "orig_pkts": 2,
340347 "orig_ip_bytes": 118,
341348 "resp_pkts": 2,
342- "resp_ip_bytes": 197
349+ "resp_ip_bytes": 197,
350+ "ip_proto": 17
343351 }
344352
345353For the first entry, ``192.168.4.76 `` talked to ``192.168.4.1 ``.
@@ -370,6 +378,52 @@ the conversations as “normal establishment and termination” of the
370378Similarly, the ``history `` field is simply ``Dd ``, indicating that each party
371379to the conversation sent data to the other.
372380
381+ The ``ip_proto `` Field
382+ ======================
383+
384+ .. versionadded :: 7.1
385+
386+ The numeric ``ip_proto `` field reports the `IP protocol number
387+ <https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml> `_ of
388+ the connection. It relates to the ``proto `` field, but while the former
389+ represents a :zeek:type: `transport_proto ` value that exclusively covers
390+ *transport * protocols Zeek knows how to parse (and ties into Zeek's
391+ :zeek:type: `port ` type), the ``ip_proto `` field is always present, including for
392+ non-transport IP packet flows such as IGMP or OSPF. For example, an OSPF flow
393+ might look as follows:
394+
395+ ::
396+
397+ {
398+ "ts": 1098361214.420459,
399+ "uid": "C9EV8R4fN8bfSj08f",
400+ "id.orig_h": "192.168.170.2",
401+ "id.orig_p": 0,
402+ "id.resp_h": "224.0.0.6",
403+ "id.resp_p": 0,
404+ "proto": "unknown_transport",
405+ "duration": 6.437546968460083,
406+ "orig_bytes": 0,
407+ "resp_bytes": 0,
408+ "conn_state": "OTH",
409+ "local_orig": true,
410+ "local_resp": false,
411+ "missed_bytes": 0,
412+ "orig_pkts": 4,
413+ "orig_ip_bytes": 768,
414+ "resp_pkts": 0,
415+ "resp_ip_bytes": 0,
416+ "ip_proto": 89
417+ }
418+
419+ You can adapt this feature in several ways. Load the
420+ :doc: `/scripts/policy/protocols/conn/ip-proto-name-logging.zeek ` policy script
421+ to add an ``ip_proto_name `` column with a string version of the ``ip_proto ``
422+ value. Also, you may disable the whole feature by loading the
423+ :doc: `/scripts/policy/protocols/conn/disable-unknown-ip-proto-support.zeek `
424+ script, returning conn.log to its pre-7.1 state. Zeek's :ref: `logging framework
425+ <framework-logging>` supports additional customizations.
426+
373427The ``uid `` and Other Fields
374428============================
375429
0 commit comments