|
| 1 | +[](https://www.sei.cmu.edu/) |
| 2 | + |
| 3 | +[](https://insights.sei.cmu.edu/blog/ "blog posts from our experts in Software Engineering.") |
| 4 | +[](https://www.youtube.com/@TheSEICMU/ "vidoes from our experts in Software Engineering.") |
| 5 | +[](https://insights.sei.cmu.edu/podcasts/ "podcasts from our experts in Software Engineering.") |
| 6 | +[](https://github.com/cmu-sei "view the source for all of our repositories.") |
| 7 | +[](https://tools.netsa.cert.org/ "documentation and source for all our flow collection and analysis tools.") |
| 8 | + |
| 9 | + |
| 10 | +At the [SEI](https://www.sei.cmu.edu/), we research software engineering, cybersecurity, and AI engineering problems; create innovative technologies; and put solutions into practice. |
| 11 | + |
| 12 | +Find us at: |
| 13 | + |
| 14 | +* [Blog](https://insights.sei.cmu.edu/blog/) - blog posts from our experts in Software Engineering. |
| 15 | +* [Youtube](https://www.youtube.com/@TheSEICMU/) - vidoes from our experts in Software Engineering. |
| 16 | +* [Podcasts](https://insights.sei.cmu.edu/podcasts/) - podcasts from our experts in Software Engineering. |
| 17 | +* [GitHub](https://github.com/cmu-sei) - view the source for all of our repositories. |
| 18 | +* [Flow Tools](https://tools.netsa.cert.org/) - documentation and source for all our flow collection and analysis tools. |
| 19 | + |
| 20 | +# [certcc/fixbuf](https://tools.netsa.cert.org/fixbuf2/index.html) |
| 21 | + |
| 22 | +[libfixbuf](https://tools.netsa.cert.org/fixbuf2/index.html) is a compliant implementation of the IPFIX Protocol, as defined in the "Specification of the IPFIX Protocol for the Exchange of Flow Information" (RFC 7011). It supports the information model defined in "Information Model for IP Flow Information Export" (RFC 7012), extended as proposed by "Bidirectional Flow Export using IPFIX" (RFC 5103) to support information elements for representing biflows. libfixbuf supports structured data elements as described in "Export of Structured Data in IPFIX" (RFC 6313), which adds the ability to export basicLists, subTemplateLists, and subTemplateMultiLists. libfixbuf can export type information for IPFIX elements as described in "Exporting Type Information for IPFIX Information Elements" (RFC 5610), and it supports reading this information. |
| 23 | + |
| 24 | +## Documentation |
| 25 | + |
| 26 | +More information [here](https://tools.netsa.cert.org/fixbuf2/libfixbuf/index.html). |
| 27 | + |
| 28 | +## Usage |
| 29 | + |
| 30 | +The intention of this container is to be used as a base for building other [NetSA tool](https://tools.netsa.cert.org/index.html) container images. |
| 31 | + |
| 32 | +However, [ipfixDump](https://tools.netsa.cert.org/fixbuf2/ipfixDump.html) is included as part of the fixbuf install and can be used to print contents of an IPFIX file as human-readable text. For example, the below command mounts the `$PWD/test` folder from the host to `/tmp` in the `fixbuf` container. It contains a yaf produced ipfix file named `flows.yaf-20231026175944-00000.yaf`, that we use ipfixDump to produce stats for: |
| 33 | + |
| 34 | +```bash |
| 35 | +docker run --rm -it -v $PWD/test:/tmp \ |
| 36 | + cmusei/fixbuf:latest \ |
| 37 | + ipfixDump \ |
| 38 | + --in /tmp/flows.yaf-20231026175944-00000.yaf \ |
| 39 | + --stats \ |
| 40 | + --yaf |
| 41 | +``` |
| 42 | +``` |
| 43 | +*** File Stats: 2 Messages, 9 Data Records, 43 Template Records *** |
| 44 | + Template ID | Records |
| 45 | +45873 (0xb331)| 9 |
| 46 | +49155 (0xc003)| 0 |
| 47 | +49156 (0xc004)| 0 |
| 48 | +49157 (0xc005)| 0 |
| 49 | +49160 (0xc008)| 0 |
| 50 | +49161 (0xc009)| 0 |
| 51 | +49171 (0xc013)| 0 |
| 52 | +49173 (0xc015)| 0 |
| 53 | +49176 (0xc018)| 0 |
| 54 | +49664 (0xc200)| 0 |
| 55 | +49670 (0xc206)| 0 |
| 56 | +49920 (0xc300)| 0 |
| 57 | +50176 (0xc400)| 0 |
| 58 | +50432 (0xc500)| 0 |
| 59 | +50688 (0xc600)| 0 |
| 60 | +50944 (0xc700)| 0 |
| 61 | +51200 (0xc800)| 0 |
| 62 | +51456 (0xc900)| 0 |
| 63 | +51712 (0xca00)| 0 |
| 64 | +51722 (0xca0a)| 4 |
| 65 | +51723 (0xca0b)| 4 |
| 66 | +51969 (0xcb01)| 0 |
| 67 | +51970 (0xcb02)| 0 |
| 68 | +51971 (0xcb03)| 0 |
| 69 | +52224 (0xcc00)| 1 |
| 70 | +52480 (0xcd00)| 0 |
| 71 | +52736 (0xce00)| 0 |
| 72 | +52737 (0xce01)| 0 |
| 73 | +52738 (0xce02)| 0 |
| 74 | +52739 (0xce03)| 0 |
| 75 | +52740 (0xce04)| 0 |
| 76 | +52741 (0xce05)| 0 |
| 77 | +52742 (0xce06)| 0 |
| 78 | +52743 (0xce07)| 0 |
| 79 | +52744 (0xce08)| 0 |
| 80 | +52745 (0xce09)| 0 |
| 81 | +52748 (0xce0c)| 0 |
| 82 | +52749 (0xce0d)| 0 |
| 83 | +52756 (0xce14)| 0 |
| 84 | +52992 (0xcf00)| 0 |
| 85 | +53251 (0xd003)| 0 |
| 86 | +53252 (0xd004)| 0 |
| 87 | +53253 (0xd005)| 0 |
| 88 | +``` |
| 89 | + |
| 90 | +Version 3+ of the fixbuf container contains the [ipfix2json](https://tools.netsa.cert.org/fixbuf/ipfix2json.html) tool, which can be used to print contents of an IPFIX file as json text. For example, using the same IPFIX input file from above `flows.yaf-20231026175944-00000.yaf`: |
| 91 | + |
| 92 | +```bash |
| 93 | +docker run --rm -it -v $PWD/test:/tmp \ |
| 94 | + cmusei/fixbuf:3 \ |
| 95 | + ipfix2json \ |
| 96 | + --in /tmp/flows.yaf-20231026175944-00000.yaf \ |
| 97 | + --out - |
| 98 | +``` |
| 99 | +``` |
| 100 | +{"template_record:0xd005()":["certToolId","observationTimeSeconds"]} |
| 101 | +{"template_record:0xc003()":["tcpSequenceNumber","initialTCPFlags","unionTCPFlags"]} |
| 102 | +{"template_record:0xce07()":["dnsTXTData"]} |
| 103 | +{"template_record:0xc009()":["mptcpInitialDataSequenceNumber","mptcpReceiverToken","mptcpMaximumSegmentSize","mptcpAddressId","mptcpFlags"]} |
| 104 | +{"template_record:0xca00()":["basicList","basicList","basicList","basicList","basicList","basicList","basicList"]} |
| 105 | +{"template_record:0xc400()":["tftpFilename","tftpMode"]} |
| 106 | +{"template_record:0xce02()":["sourceIPv6Address"]} |
| 107 | +{"template_record:0xce0d()":["mysqlCommandText","mysqlCommandCode","paddingOctets"]} |
| 108 | +{"template_record:0xc004()":["sourceMacAddress","destinationMacAddress"]} |
| 109 | +{"template_record:0xce08()":["dnsSRVTarget","dnsSRVPriority","dnsSRVWeight","dnsSRVPort","paddingOctets"]} |
| 110 | +{"template_record:0xc015()":["dataByteCount","averageInterarrivalTime","standardDeviationInterarrivalTime","tcpUrgTotalCount","smallPacketCount","nonEmptyPacketCount","largePacketCount","firstNonEmptyPacketSize","maxPacketSize","standardDeviationPayloadLength","firstEightNonEmptyPacketDirections","paddingOctets","reverseDataByteCount","reverseAverageInterarrivalTime","reverseStandardDeviationInterarrivalTime","reverseTcpUrgTotalCount","reverseSmallPacketCount","reverseNonEmptyPacketCount","reverseLargePacketCount","reverseFirstNonEmptyPacketSize","reverseMaxPacketSize","reverseStandardDeviationPayloadLength","paddingOctets"]} |
| 111 | +snip... |
| 112 | +``` |
0 commit comments