<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Charlie L on Medium]]></title>
        <description><![CDATA[Stories by Charlie L on Medium]]></description>
        <link>https://medium.com/@cglewis?source=rss-510584e0dfc4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Charlie L on Medium</title>
            <link>https://medium.com/@cglewis?source=rss-510584e0dfc4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:27:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cglewis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Packet Café]]></title>
            <link>https://medium.com/@cglewis/introducing-packet-caf%C3%A9-ea0f439fe1da?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea0f439fe1da</guid>
            <category><![CDATA[network-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pcap]]></category>
            <category><![CDATA[network-traffic]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Fri, 01 May 2020 12:57:33 GMT</pubDate>
            <atom:updated>2020-08-13T06:20:31.149Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lhg9U9ufkYKFfppF8BUxsg.jpeg" /></figure><p>IQT Labs is excited to open source a new Cyber Reboot project called Packet Café, an easy-to-use, automated network traffic analysis platform. This post provides the background, motivation, and description of the project.</p><p>Already know about the project and want to take Packet Café for a spin already? Go here: <a href="https://iqtlabs.gitbook.io/packet-cafe/deployment/prerequisites">https://iqtlabs.gitbook.io/packet-cafe/deployment/prerequisites</a></p><p>In case you need more convincing, read on . . .</p><p>The strength of any machine learning model depends on the quality and diversity of the training data on which the model is trained. <a href="https://github.com/cyberreboot/poseidon">Poseidon</a> and <a href="https://github.com/cyberreboot/networkml">NetworkML</a> — projects Cyber Reboot has been working on the last couple years — require network traffic data to enable machine learning to predict what types of devices are communicating on a network.</p><p>Cybersecurity research using computer network traffic relies on relatively few, often outdated public datasets. Not only does this inhibit cybersecurity-related network traffic research, but it also impedes Cyber Reboot’s own machine learning and network traffic research.</p><p>The network traffic dataset most often used for computer security research (<a href="http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html">KDD99</a>) was created over 20 years ago and has been the subject of sustained criticism. While other research groups have created newer network traffic datasets, these efforts often use simulated rather than real computer networks. The result of this: stifled network traffic and machine learning research.</p><p>The increasing complexity of global computer networks over the last many years brings about numerous sorts of network vulnerabilities as well. In both the private and public sectors, new techniques for observing network traffic behavior are vital to safeguarding their assets. Machine learning can provide deeper understanding of behavior in network traffic data but requires modern datasets upon which to train.</p><p>Packet Café initially set forth to build a new, public dataset of high-quality, modern computer network traffic to drive cybersecurity research and innovation for our collective benefit. This effort quickly evolved into an exploration of the legal and policy challenges and risks associated with creating and making publicly available network traffic datasets created from real-world network traffic. Most significant issues among those include:</p><ul><li>Lack of clarity as to whether, when, and where an IP address may be “personal data” subject to various data protection laws.</li><li>Lack of protections for much more tangible personal identifiers found in MAC addresses.</li><li>Broadly written laws that may include IP addresses as personal data, even when they do not reveal anything about an individual.</li><li>Broadly written laws that do not adequately distinguish between data that could conceivably identify a person and network traffic data that could not.</li><li>Lack of specificity, caselaw, or regulations around these laws to better anticipate how regulators or the public would view our efforts.</li></ul><p>Collectively, these issues posed insurmountable hurdles for our research and innovation efforts — even though our efforts were solely for the public good, as well as making our efforts to assess the risk of such efforts nearly impossible.</p><p>Given the challenges and risks surrounding the creation and publication of a modern, high-quality, diverse, and real-world network traffic dataset, the Cyber Reboot team pivoted. Instead we built (and now open sourced!) Packet Café as a platform for running network traffic captures through a pipeline of analysis tools. The purpose of these tools is to increase the transparency of what is actually contained in network traffic captures. Furthermore, most of these tools provide analysis without using any <a href="https://en.wikipedia.org/wiki/Payload_(computing)#Networking">payload data</a>.</p><p>All of this provides teams with limited resources and time to get automated analysis of their own network traffic captures without having to be an expert in the tooling.</p><p>Packet Café is built for easy-to-use automated network traffic analysis. It is configured to be modular and allow for a pipeline of tools that are triggered by different inputs and outputs.</p><p>This service accepts PCAP files and then processes them against the pipeline of tools providing automated analysis that gets returned in JSON format. These objects can then be consumed via API directly and put into other systems such as SIEMs, searched and filtered through the included JSON viewer, or viewed through the included visualizations provided in the Packet Café frontend.</p><p>Packet Café is built as a series of components, each with their own purpose while still being flexible to add or remove components as needed. There are seven major components and any number of analytic processes, or tools, that can be included. By default, there are <a href="https://iqtlabs.gitbook.io/packet-cafe/design/tools">nine analytic processes</a> included.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XI6vzIaO_IP-Y2gBjfS3yw.png" /><figcaption>Packet Café Component Design</figcaption></figure><p>An end user interacts with the ui component for uploading PCAP files and interacting with the results of the analytic processes. The ui component was built with ReactJS and can be scaled out to n instances behind the load balancer.</p><p>The lb component is the load balancer which processes requests to both instances of the ui component as well as instances of the web component. It allows both of those components to scale out to n instances as needed.</p><p>The web component serves up a RESTful API for retrieving results from the analytic processes and passing them on to the ui component.</p><p>Optionally, there is an admin component that serves up a RESTful API for making requests about the service at a global level to identify sessions, IDs, and files.</p><p>The messenger component is a RabbitMQ server which brokers messages between the web components, the worker components, and the analytic processes.</p><p>The worker component is responsible for taking requests from the web component of files to process and spinning up analytic processes to process those files. These processes can be run in parallel as well as in a pipeline that feeds inputs and outputs in a chain of analytic processes. The worker component can be scaled out to n number of workers and maintains the state and status of jobs in the redis component.</p><p>Finally, the redis component is a Redis server which stores state and status of jobs across the entire system.</p><p>All of these components are built to be run in containers and controlled through docker-compose for ease of deployment.</p><p>Packet Café aims to lower the barrier to understanding what is actually in a network traffic capture file (PCAP) and provide insight without being a networking expert.</p><p>Continuing efforts include collaborating with our <a href="https://medium.com/high-stakes-design">Viz team</a> to visualize packet data and analysis more effectively.</p><p>Head on over to our <a href="https://github.com/CyberReboot/packet_cafe">GitHub page</a> and give it a spin if you’re interested, it can run locally on a single machine, or be deployed into cloud environments. Feedback and contributions welcome!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea0f439fe1da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install Poseidon and get it working with Faucet SDN]]></title>
            <link>https://medium.com/@cglewis/how-to-install-poseidon-and-get-it-working-with-faucet-sdn-c3cdeed1901f?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3cdeed1901f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 14:01:01 GMT</pubDate>
            <atom:updated>2019-12-20T14:01:01.443Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7B7Mec_dhozhB5WXeQGsA.jpeg" /></figure><p><em>In collaboration with </em><a href="https://medium.com/u/38b8b2507007"><em>Vishal S.</em></a></p><p>Over the last few years Cyber Reboot has been working on the <a href="https://github.com/CyberReboot/poseidon">Poseidon project</a> to answer two important questions:</p><p>1. What is on my network?</p><p>2. What is it doing?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eV4he6LPvusTwDTR360NlA.jpeg" /><figcaption>Full mobile Poseidon and Faucet setup using an Allied Telesis switch</figcaption></figure><p>We put together a quick 20 minute video embedded below to illustrate how to get Poseidon up and running in conjunction with <a href="https://faucet.nz/">Faucet</a>, an open source SDN controller, and some of the more recent features and capabilities that it provides. The video walks through installing Poseidon as well as Faucet from scratch and explains how to configure them both to work together. A couple devices will be attached to the network, in this case two Raspberry Pi boards, to simulate network traffic and demonstrate how Faucet learns new devices and how Poseidon uses that knowledge to learn more about the network. After a brief walk through of Poseidon’s CLI, we illustrate how one of the newest capabilities in Poseidon — automated ACLs — works, and how we can now start to consider more actions besides just <a href="https://blog.cyberreboot.org/sdn-and-the-need-for-more-security-verbs-a6315935fca4">“block”</a> in the context of automation, SDN, and machine learning on enterprise networks. An additional feature in Faucet — <a href="https://www.vandervecken.com/faucet/index.php/2019/10/31/injecting-services-into-the-dataplane-with-coprocessing/">a coprocessor port </a>— will allow for even more interesting experimentation and possibilities, so stay tuned as we integrate that ability into Poseidon in the near future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZ2LBGab1N4jjroh6FE6HA.jpeg" /><figcaption>Raspberry Pi boards to simulate devices on a network</figcaption></figure><h3><strong>Check out the video:</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQst5oNs5uY0%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQst5oNs5uY0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQst5oNs5uY0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1ce2169c72373d7528ce27fdbf2a158/href">https://medium.com/media/e1ce2169c72373d7528ce27fdbf2a158/href</a></iframe><h3>Learn more at <a href="http://www.cyberreboot.org/">http://www.cyberreboot.org/</a> and follow us on Twitter: @_cyberreboot</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3cdeed1901f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Poseidon on a 100G Network]]></title>
            <link>https://medium.com/@cglewis/running-poseidon-on-a-100g-network-8def4dc8eecd?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8def4dc8eecd</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 14:48:41 GMT</pubDate>
            <atom:updated>2019-03-12T14:48:41.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qievo19aWVMWjlcnOAt3cA.png" /></figure><p>Late last year the Cyber Reboot team got the opportunity to run a deployment of our Poseidon project on the high-performance network, <a href="https://en.wikipedia.org/wiki/SCinet">SCinet</a>. SCinet connected a large number of exhibitors and attendees at the SuperComputing 2018 (SC18) conference in Dallas, Texas. The big takeaways from the conference deployment were:</p><ul><li>Poseidon worked on a 100Gbps network; previously it hadn’t been tested above 10Gbps.</li><li>We improved the install process of Poseidon: we created a Debian package and made it a service with <a href="https://wiki.debian.org/systemd">systemd</a></li><li>The experience led us to creating a CLI for sending Poseidon ad hoc queries, which made using it more straightforward for operators.</li></ul><p>The following is a run through of our setup, results, and lessons learned from the conference deployment of Poseidon. If you’re not already familiar with Poseidon, please have a look at <a href="https://blog.cyberreboot.org/deep-session-learning-for-cyber-security-e7c0f6804b81">this</a> for some background. Three years in, we largely have the same goals for Poseidon, but we have learned a lot and made a number of changes including:</p><ul><li><a href="https://github.com/CyberReboot/poseidon/releases/tag/v0.1.0">expanding support to more than one SDN controller</a>;</li><li><a href="https://github.com/CyberReboot/poseidon/releases/tag/v0.1.6">integrating Poseidon results with CRviz</a>;</li><li><a href="https://github.com/CyberReboot/poseidon/releases/tag/v0.4.0">a more sophisticated internal state machine</a>;</li><li><a href="https://github.com/CyberReboot/poseidon/releases/tag/v0.5.0">the ability to store the state of a network over time in a more resilient manner</a>; and most recently</li><li><a href="https://github.com/CyberReboot/poseidon/releases/tag/v0.5.2">support for a query engine</a>.</li></ul><p><strong>Our (new) Requirements</strong></p><p>Currently, running a deployment of Poseidon only requires three things:</p><p>1) a Linux box that can run Docker containers;</p><p>2) an SDN controller Poseidon can connect to (currently <a href="https://www.bigswitch.com/products/big-cloud-fabric">Big Cloud Fabric</a> and <a href="https://faucet.nz/">Faucet</a> are supported); and</p><p>3) a port on a switch (physical and virtual options are available) controlled by the SDN controller for mirroring traffic to.</p><p>Fortunately for us, the Faucet team was also deploying at SC18, which meant we had a compatible SDN controller where Poseidon could be hooked up. However, deploying at SC18 came with two big catches that would require some engineering. First, up until this point Poseidon has been aimed at enterprise environments where l<a href="https://blog.cyberreboot.org/the-case-for-detecting-lateral-movement-2018ae631b04">ateral movement</a> typically occurs. This meant that Poseidon had been tested primarily on 1G ports with max traffic bandwidth closer to 100Mbps, since that’s typically sufficient for an end user’s desktop.</p><p>The core switch we’d have access to at SC18 only had 100G ports, and a number of the experiments running at the booths would intentionally be trying to fill that pipe. This meant that we would have to prepare and test for an environment that was several orders of magnitude in scale above what we’d previously done in deployments, and we’d have to do it without having our own 100G switch beforehand.</p><p>This leads us to the second big catch, which was that the Faucet deployment at SC18 was considered a production deployment, and Poseidon would not be able to directly make changes to the Faucet controller. Using a physical switch connected to the production Faucet controller, we would need to find a way to mirror traffic to a virtual switch controlled by another Faucet instance that could take automated configuration changes from Poseidon.</p><p><strong>Our Goals</strong></p><p>With those two requirements in mind we set out with the following goals:</p><ul><li>Classify devices on a network that it wasn’t trained for and see how it performs</li><li>Be able to scale to hundreds of devices and 100Gbps traffic without adversely affecting the network</li><li>See how different tools providing insight about devices (beyond just machine learning) can be combined to give a more informed picture of the network</li><li>Leverage our visualization tool, <a href="https://github.com/cyberreboot/crviz">CRviz</a>, to navigate the results easily</li></ul><p><strong>How We Executed</strong></p><p>The two big unknown factors pre-deployment were running Poseidon on a 100G network and connecting to an SDN network that Poseidon couldn’t control. If Poseidon didn’t work with those two parameters, then there would be no point in trying to push further with our own goals.</p><p>First things first, how to test 100G without a 100G switch?</p><p>Since we would need the server running Poseidon to connect to the 100G switch, we started by tracking down a Network Interface Card that could be plugged into an existing server that we had. We started with an older Dell PowerEdge 410 we had and installed the Mellanox MCX516A-CCAT ConnectX-5 EN Network Interface Card that had dual QSFP28 100GbE ports. The Mellanox card was PCIe3.0 x16, which fit perfectly in the R410.</p><p>We installed the Mellanox drivers on the server and quickly realized that the PCI bus was too slow for the card to be able to handle 100G. We did some digging and found out that the R420 is pretty much the same as the R410 except that the PCI Bus is fast enough to support 100G. Fortunately, we had some spare R420s, too. We ended up getting two of the Mellanox cards so we’d have a backup at the event if we needed it. Since we had an extra card and an extra server, we decided that we should be able to simulate 100G (or at least that the optics and software were all compatible and working) by connecting two servers up to each other over the Mellanox cards with two QSFP28 1310nm 10km transceiver modules (Mellanox MMA1L10-CR) and a fiber optic cable.</p><p>With this setup we were able to simulate, using <a href="https://tcpreplay.appneta.com/">tcpreplay</a> and <a href="https://github.com/esnet/iperf">iperf3</a>, about 50Gbps with synthetic traffic between the two servers over the Mellanox cards directly. Given how much of the traffic would have to be buffered both in RAM and the CPU without a real switch, this seemed like a reasonable result to move forward with.</p><p>Now that we had the hardware functioning, we needed a way to hook it up to Poseidon. Poseidon currently requires an SDN controller to talk to, and for this deployment we would be talking to Faucet. Before we could connect Poseidon to our setup, we needed to get Faucet working with the NIC but without a switch.</p><p>One of the beautiful things about Faucet is that it doesn’t have specific hardware requirements, it just requires a switch that is fully compliant with OpenFlow 1.3. As it happens, this means Faucet also can work with any software (virtual) switch that is compliant with OpenFlow 1.3, such as <a href="https://www.openvswitch.org/">Open vSwitch</a> (OVS).</p><p>OVS has the ability to create a virtual switch and then attach real physical ports to that virtual switch. In fact, it’s dead simple to add physical ports with OVS.</p><p><strong>Configuration Details</strong></p><p>First, OVS needed to be installed, and the easiest way is from <a href="http://docs.openvswitch.org/en/latest/intro/install/distributions/#debian">packages</a>. Once it was installed, <a href="http://docs.openvswitch.org/en/latest/intro/install/general/#starting">the service needed to be started</a>:</p><pre>ovs-ctl start</pre><p>We then used <a href="http://mininet.org/">mininet</a> to create the Open vSwitch virtual switch, <a href="http://mininet.org/download/#option-3-installation-from-packages">so we made sure that was also installed</a>, on Debian it’s as easy as:</p><pre>apt-get install mininet</pre><p>Before adding a physical port, we needed to create a switch that expects an OpenFlow controller. Mininet made that pretty straightforward:</p><pre>mn --topo single,3 --mac --switch ovsk --controller=remote,ip=127.0.0.1:6653</pre><p>There are a number of flags here which are tangential to this post, but essentially it creates a single OVS switch with 3 virtual ports and connects it to an OpenFlow controller running on the localhost over port 6653. At this point the switch was created and ready for a controller to tell it what to do, but it was not attached to any hardware yet. To add our Mellanox NIC to the switch we needed the name of the virtual switch we’ve created. In order to get the switch name (default is <strong>s1 </strong>if not specified) we used the ovs-vsctl command:</p><pre>$ ovs-vsctl show<br>3a6b1710–157e-4ee7–9afe-2d4b71f96561<br>    Bridge “s1”<br>        Controller “ptcp:6634”<br>        Controller “tcp:127.0.0.1:6653”<br>            is_connected: true<br>        fail_mode: secure<br>        Port “s1-eth3”<br>            Interface “s1-eth3”<br>        Port “s1”<br>            Interface “s1”<br>                type: internal<br>        Port “s1-eth2”<br>            Interface “s1-eth2”<br>        Port “s1-eth1”<br>            Interface “s1-eth1”<br>    ovs_version: “2.9.90”</pre><p>We can see the bridge (switch) name was <strong>s1</strong>, it was connected to our controller, and it had 3 virtual ports. To add the physical port we simply did the following:</p><pre>ovs-vsctl add-port s1 enx94103eb9033d</pre><p>Where <strong>s1</strong> was our switch and <strong>enx94103eb9033d</strong> was the interface name of the physical NIC. We then checked that it had been added correctly:</p><pre>$ ovs-vsctl show<br>3a6b1710–157e-4ee7–9afe-2d4b71f96561<br>    Bridge “s1”<br>        Controller “ptcp:6634”<br>        Controller “tcp:127.0.0.1:6653”<br>            is_connected: true<br>        fail_mode: secure<br>        Port “s1-eth3”<br>            Interface “s1-eth3”<br>        Port “enx94103eb9033d”<br>            Interface “enx94103eb9033d”<br>        Port “s1”<br>            Interface “s1”<br>                type: internal<br>        Port “s1-eth2”<br>            Interface “s1-eth2”<br>        Port “s1-eth1”<br>            Interface “s1-eth1”<br>    ovs_version: “2.9.90”</pre><p>Once it had been added, we needed to verify the port number so that we could configure Faucet correctly. To do that we used ovs-ofctl:</p><pre>$ ovs-ofctl show s1<br>OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001<br>n_tables:254, n_buffers:0<br>capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP<br>actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst<br>1(s1-eth1): addr:e2:3e:6e:99:2a:85<br>    config: 0<br>    state: 0<br>    current: 10GB-FD COPPER<br>    speed: 10000 Mbps now, 0 Mbps max<br>2(s1-eth2): addr:16:cd:69:15:d8:83<br>    config: 0<br>    state: 0<br>    current: 10GB-FD COPPER<br>    speed: 10000 Mbps now, 0 Mbps max<br>3(s1-eth3): addr:a2:b7:ed:3c:74:e5<br>    config: 0<br>    state: 0<br>    current: 10GB-FD COPPER<br>    speed: 10000 Mbps now, 0 Mbps max<br>4(enx94103eb9033d): addr:94:10:3e:b9:03:3d<br>    config: 0<br>    state: 0<br>    current: 100MB-FD AUTO_NEG<br>    advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM<br>    supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-HD 1GB-FD COPPER AUTO_NEG<br>    speed: 100 Mbps now, 1000 Mbps max<br>LOCAL(s1): addr:94:10:3e:b9:03:3d<br>    config: PORT_DOWN<br>    state: LINK_DOWN<br>    speed: 0 Mbps now, 0 Mbps max<br>OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0</pre><p>Our physical NIC was now on port 4 of our virtual switch. With that knowledge we could make our faucet.yml file to tell Faucet about this switch and port. Here’s an example:</p><pre>$ cat /etc/faucet/faucet.yaml<br>dps:<br>  switch-1:<br>    dp_id: 1<br>    hardware: Open vSwitch<br>    interfaces:<br>      1:<br>        native_vlan: 8<br>      2:<br>        native_vlan: 8<br>      3:<br>        description: mirror<br>        output_only: true<br>      4:<br>        native_vlan: 8<br>vlans:<br>  8:</pre><p>Now that we had Faucet connected to our 100G Mellanox card through our virtual switch using OVS as well as other virtual ports, we could easily connect Poseidon and be on our way. This enabled us to overcome the two major issues we had to figure out. We could test the setup without a physical 100G switch and we also have our own instance of Faucet that Poseidon talks to and controls just the physical port on the server. This means the upstream Faucet is now completely separated from anything that Poseidon would be doing, but Poseidon would still benefit from anything coming into that port. We just needed the upstream Faucet to mirror traffic from the switches it was controlling over to the port that was attached to the Poseidon server.</p><p>There are two other important features of Poseidon that helped the deployment scale under high traffic situations. First, we now allow for a way to limit the number of things that Poseidon is investigating at once, so it can be tuned to the amount of resources the server running Poseidon can handle at one time, rather than trying to investigate everything that is happening on the network all at once (max_concurrent_reinvestigations can be set in /etc/poseidon/default.conf). Secondly, what Poseidon analyzes data captured off of the network using our fork of <strong>tcpdump</strong> (upstream PR can be found here: <a href="https://github.com/the-tcpdump-group/tcpdump/pull/615">https://github.com/the-tcpdump-group/tcpdump/pull/615</a>) which allows for payloads to be stripped off without ever writing them to disk. This dramatically improves performance and reduces disk requirements, while also providing the end users of the network with better privacy. Poseidon can learn devices without the payloads anyway, which avoids the pitfalls of dealing with encrypted traffic.</p><p><strong>Reproducibility Was Key</strong></p><p>With a plan in place, we wanted to make sure the setup was going to work the same way during the event so we decided to build a Debian package for the install. We also ensured that everything was running in Docker containers built from known images and began to prepare for as many scenarios as possible, since we only had one shot at making this work at the event.</p><p>Along with the package, we also added Poseidon as a service with systemd; allowing us to easily start/stop/restart Poseidon as needed without worrying about it working again when restarting, and providing a way to determine if Poseidon was healthy or not.</p><p>All of this made debugging much easier and we could worry less about forgetting some special hand-crafted command during the actual event.</p><p>This was the entire SCinet architecture for the event (Poseidon is only one small piece of the bigger picture):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JrjWTRVPkJjs9oRGPYViGw.png" /></figure><p>Here is a thread that shows our piece of the final architecture, as well some stats around the event: <a href="https://twitter.com/faucetsdn/status/1062440680608407552">https://twitter.com/faucetsdn/status/1062440680608407552</a></p><p><strong>Lessons Learned</strong></p><p>Finally, we were able to learn a number of things that applied to our system when it was deployed on a real environment of this magnitude. We are pleased to report that Poseidon didn’t cause any outages, and furthermore it didn’t crash or fall over during the event. There were a few intentional restarts during the event to prove it would recover and not impact anything.</p><p>At that level of scale we started to run out of file descriptors using the default Linux settings, which is <a href="https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/">easily remedied</a> once you know it’s going to be an issue. Furthermore, we noticed that we were jamming a large number of files into the same directory for logs and captures and this caused issues when trying to perform operations on a directory with tens of thousands of files. Restructuring these files into directories proved to be a straightforward improvement.</p><p>There were two other big things we discovered during the event. First, it’s extremely difficult to keep track of the state of what Poseidon knows about a network by just looking at the logs. Second, there can be a lot of devices that are only seen on the network once and then never again. Being able to clean up those inactive devices makes the picture of your network cleaner, more accurate, and more discernible.</p><p>This led us to creating a CLI that lets you query the system as well as take action on given devices, such as removing inactive devices. In a follow-up post we will be doing a deeper dive into the CLI and the features it provides.</p><p>Here are a few high-level take-aways of the deployment and how they aligned with the original goals we outlined:</p><ul><li>Poseidon ran on a production multi-vendor SDN 100G network for a week seeing more than 119TB of network traffic without adversely affecting or slowing down the production traffic.</li><li>Within the first 30 minutes of the network going live, Poseidon had already captured and analyzed 40Gb worth of PCAPs with some nice bursts of bandwidth up to 50Gbps.</li><li>Poseidon ran over 40,000 Docker containers and made nearly 5,000 automated configuration changes on the switch while learning about 141 unique devices.</li><li>There are always more bugs to fix. We did encounter a few in Poseidon during the deployment that we can now address and improve for future deployments.</li><li>Poseidon ran on a single Dell R420 in the NOC and was directly connected to an SDN 100G NoviFlow switch with a Tofino chipset running P4:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*Wdeff0e9Ye6cbwxhpab98g.png" /></figure><p>The below screenshot from the CRviz tool shows what the network looked like for the duration of the event, showing the operating systems that were passively fingerprinted, the role classifications, as well as the expected behavior of those devices for that given classification, all on a network our models weren’t trained on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*igsqB-_b4pDNjMaGYFYemA.png" /></figure><p>Finally, we want to give a huge shout out to the Faucet team for making this deployment possible and for their support in helping us improve Poseidon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8def4dc8eecd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyberReboot Kicks Off Hacktoberfest]]></title>
            <link>https://medium.com/@cglewis/cyberreboot-kicks-off-hacktoberfest-564382de3983?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/564382de3983</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Mon, 01 Oct 2018 14:29:01 GMT</pubDate>
            <atom:updated>2019-02-06T14:04:51.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*n2URXUlAsDqY17OZlvK_Uw.jpeg" /></figure><p>Hacktoberfest — which takes place throughout the month of October — has become an exciting time of the year for open source software. For those unfamiliar, Hacktoberfest is a month long celebration of open source software sponsored by GitHub, Digital Ocean, and (now) Twilio <a href="https://blog.github.com/2018-09-24-hacktoberfest-is-back-and-celebrating-its-fifth-year/">(Twilio joined this year</a>). For the last five years Hacktoberfest has raised awareness and lowered the barrier for participation and collaboration on open source projects. This is the third year the Cyber Reboot team is participating in Hacktoberfest.</p><p><a href="https://blog.cyberreboot.org/hacktoberfest-so-long-and-thanks-for-all-the-pull-requests-68f9ad994d59">Last year</a> we were happy to report a very successful Hacktoberfest turnout where we contributed to 85 different projects and attracted 33 new contributors to our projects. This year we hope to continue that trend. While we have several projects we’d love to have you collaborate with us on (<a href="https://github.com/cyberreboot">https://github.com/cyberreboot</a>), we’d like to highlight two projects specifically for this event.</p><p>The first project, <a href="https://github.com/CyberReboot/CRviz">CRviz</a>, is a browser-based visualization tool for visualizing assets on a network at scale. You can learn more about what the project is currently capable of in this <a href="https://blog.cyberreboot.org/a-better-way-to-visualize-whats-on-our-networks-4f87fd42da6">three-part blog series</a>, or simply try it out yourself on our demonstration site: <a href="https://cyberreboot.github.io/CRviz">https://cyberreboot.github.io/CRviz</a></p><p>If that piques your interest, feel free to peruse the <a href="https://github.com/CyberReboot/crviz/issues">issues</a> and tackle one that looks interesting to you, or file a new issue with a great idea you have that we haven’t thought of yet.</p><p>The second project, <a href="https://github.com/CyberReboot/poseidon">Poseidon</a> — which was also highlighted last year — has come a long way. Poseidon can now be easily installed on Ubuntu systems, and it can also be run and tested completely in open source software; it no longer requires a hardware switch (thanks to <a href="https://faucet.nz/">Faucet</a> and <a href="https://www.openvswitch.org/">Open vSwitch</a>), making it accessible to everyone. Poseidon demonstrates our approach to making software defined networks (SDN) actionable using machine learning techniques to guide decisions. Poseidon has a counterpart repository specifically for the machine learning aspects of Poseidon called <a href="https://github.com/CyberReboot/PoseidonML">PoseidonML</a>, which you can learn more about <a href="https://blog.cyberreboot.org/using-machine-learning-to-classify-devices-on-your-network-e9bb98cbfdb6">here</a>.</p><p>There is plenty of work to be done to help improve visibility, insight, manageability, and security of computer networks. We’re excited to be doing our small part to help in this ambitious effort, and we encourage and welcome collaboration.</p><p>You can search across our entire organization for issues specifically for Hacktoberfest <a href="https://github.com/search?q=is%3Aissue+is%3Aopen+label%3Ahacktoberfest+org%3ACyberReboot&amp;type=Issues">here</a> that might interest you as well.</p><p>Happy Hacktoberfest and happy hacking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=564382de3983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Alternative Approach to Visualizing Network Packet Captures: PCAPPlot]]></title>
            <link>https://medium.com/@cglewis/an-alternative-approach-to-visualizing-network-packet-captures-pcapplot-148d8fc53bbb?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/148d8fc53bbb</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[network-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[how-to]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Fri, 16 Mar 2018 13:01:01 GMT</pubDate>
            <atom:updated>2018-03-16T13:01:01.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUt-XE5VECI1dfB8SOdKkQ.png" /></figure><blockquote>TL;DR here’s the code to the <a href="https://github.com/cyberreboot/pcapplot">tool</a>. Here’s a <a href="https://cyberreboot.github.io/pcapplot/">live demo</a> of results from the tool.</blockquote><p>Network packet captures can be daunting to analyze. There are a number of tools (<a href="https://www.wireshark.org/">Wireshark</a>, <a href="https://www.wireshark.org/docs/man-pages/tshark.html">tshark</a>, <a href="http://www.tcpdump.org/">tcpdump</a>, <a href="https://github.com/caesar0301/awesome-pcaptools">etc</a>.) to help with the job of combing through packets using filters and inspection, but any capture with a reasonable number of packets becomes a time-consuming task for an analyst to determine even its basic characteristics.</p><p>This write-up will briefly walk through a new tool called <a href="https://github.com/cyberreboot/pcapplot">PCAPPlot</a> that CyberReboot has open-sourced that provides a quick visual snapshot, or thumbnail, of a network packet capture (<a href="https://en.wikipedia.org/wiki/Pcap">PCAP</a> file) from the perspective of a single host/device in four distinct areas:</p><ol><li>who it is talking to externally,</li><li>who it is talking to internally,</li><li>the source ports it is communicating on, and</li><li>the destination ports it is communicating to.</li></ol><p>These four attributes are processed for every packet in the capture and laid out onto a grid to make a single image of each attribute for the entire capture.</p><p>Getting going is as easy as running a <a href="https://www.docker.com/">Docker</a> container and having a PCAP (in this example: /directory/of/my/local/pcap/my-labeled-yy-mm-dd.pcap) you wish to create and view thumbnails for:</p><pre>docker run -it -p 8000:8000 \<br>           -v /directory/of/my/local/pcap:/pcaps \<br>           cyberreboot/pcapplot my-labeled-yy-mm-dd.pcap</pre><p>This will generate the thumbnails and serve them up so you can view them from your browser like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_megYHD95fVsv7X_ux5Qw.png" /></figure><p>Before we get too carried away, let’s take a step back and think about what we actually want our thumbnail to be a fingerprint of. We don’t actually want to fingerprint an entire packet capture with multiple hosts all jumbled together. Instead, it would be more valuable to create a thumbnail for each host in the capture, and distinctly be able to keep track of those hosts in case we have multiple captures that we want to compare them against. So for that we need to a bit of data massaging before creating those thumbnails.</p><p>To get started we’ll use an openly available PCAP dataset of IoT devices (http://149.171.189.1/ cited <a href="http://www2.ee.unsw.edu.au/~vijay/pubs/conf/17infocom.pdf">here</a>).</p><p>Let’s download 2016-Oct-11 (~1Gb):</p><pre>curl <a href="http://149.171.189.1/iotFiles/16-10-11.pcap">http://149.171.189.1/iotFiles/16-10-11.pcap</a> -O</pre><p>Now that we have the PCAP, we need to cut it up into the sessions per device in the capture. To do that we’ll use tshark along with the list of devices provided here: <a href="http://149.171.189.1/resources/List_Of_Devices.txt">http://149.171.189.1/resources/List_Of_Devices.txt</a></p><p>Let’s go ahead and pick the first device and carve out a PCAP that has only sessions related to that device:</p><pre>tshark -r “16–10–11.pcap” -w smart-things-16–10–11.pcap -Y “eth.addr == d0:52:a8:00:67:5e”</pre><p>Feel free to repeat this with as many devices from the list as you would like.</p><p>Now that we have labeled PCAP files that have been carved to the sessions of each specific device in the capture, we can create thumbnails of them like so:</p><pre>docker run -it -p 8000:8000 \<br>           -v /directory/of/my/local/pcaps:/pcaps \<br>           cyberreboot/pcapplot</pre><p>If we want to save just the thumbnails, we can mount a volume the images are written to and optionally set a -s flag at the end which will not serve up the images, but simply save them to disk:</p><pre>docker run -it -p 8000:8000 \<br>           -v $(pwd)/maps:/pcapplot/www/static/img/maps \<br>           -v /directory/of/my/local/pcaps:/pcaps \<br>           cyberreboot/pcapplot -s</pre><p>Additionally, if you want to retain the thumbnails and the web site that serves it up between iterations, you first will need to clone the project to get the base www directory:</p><pre>git clone <a href="https://github.com/cyberreboot/pcapplot">https://github.com/cyberreboot/pcapplot</a><br>cd pcapplot<br>docker run -it -p 8000:8000 \<br>           -v $(pwd)/www:/pcapplot/www \<br>           -v /directory/of/my/local/pcaps:/pcaps \<br>           cyberreboot/pcapplot</pre><p>Furthermore, if you have retained the thumbnails and the web site using the above command, you can always serve it up again without processing any new PCAPs like so:</p><pre>docker run -it -p 8000:8000 \<br>           -v $(pwd)/www:/pcapplot/www \<br>           cyberreboot/pcapplot []</pre><p>Now that we’ve played around with some of the options, let’s see how using this tool can offer insights that were previously tedious to gather manually.</p><p>Here are four different device types that can be clearly identified as having different behaviors based on the four attributes these thumbnails are generated from:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1WRqCe2mfbyvPa5vKTo0gw.png" /><figcaption>Samsung Tablet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p8f0Iei9dlXK6WRzDWUCmQ.png" /><figcaption>Amazon Echo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yz5xuUtDtGuv0O9D3q_t7A.png" /><figcaption>Nest Smoke Detector</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ItAzsYhZWomVtvokIMtUAg.png" /><figcaption>Android Device</figcaption></figure><p>Additionally, here are four different samples of the same device, showing relative consistency of a given behavior of a device over time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qfp89cxl2iuxoknXxU5-YQ.png" /><figcaption>Samsung Tablet sampled on four different days</figcaption></figure><p>Finally, here’s an example where two samples of the same device differ dramatically, and this is where we can visually see something is wrong or unexpected in our dataset that otherwise would have been difficult to determine without this tool:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5nvp_1hncjn3KQAj9A9Fg.png" /><figcaption>Macbook sampled on two different days <em>(the blue being source ports, and red being destination ports — both of which have more in use on the first day than the second day)</em></figcaption></figure><p>Here’s a live site to play around with the results of this tool: <a href="https://cyberreboot.github.io/pcapplot">https://cyberreboot.github.io/pcapplot</a></p><p>PCAPPlot ignores a lot of information in a network packet capture, but by specifically focusing on only four important attributes it brings out a lot of signal from the noise. This offers an analyst an at-a-glance view of how a device is behaving on a network, for the given parameters, without having to wade through thousands of individual packets by hand.</p><h3>Cyber Reboot, an IQT lab, challenges the traditional approach to cybersecurity with the goal of rebalancing the equation to increase the cost and complexity for our adversaries while reducing cost and complexity for our defenders.</h3><h4>Learn more at <a href="http://www.cyberreboot.org/">http://www.cyberreboot.org/</a> and follow us on Twitter: @_cyberreboot</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=148d8fc53bbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Software-Defined Network with Raspberry Pis and a Zodiac FX switch]]></title>
            <link>https://medium.com/@cglewis/building-a-software-defined-network-with-raspberry-pis-and-a-zodiac-fx-switch-97184032cdc1?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/97184032cdc1</guid>
            <category><![CDATA[opensource-hardware]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Mon, 11 Dec 2017 17:26:01 GMT</pubDate>
            <atom:updated>2017-12-27T22:35:52.927Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDGUNKOJAAWH_8FlTxf8kg.jpeg" /><figcaption>Portable Software-Defined Network</figcaption></figure><p>In our <a href="https://blog.cyberreboot.org/thanks-to-faucet-poseidon-now-supports-switches-running-openflow-1-3-e5489f2bc1f5">last post</a> we walked through the recent improvements to both <a href="http://faucet.nz/">FAUCET</a> and <a href="https://github.com/cyberreboot/poseidon">Poseidon</a> to enable them to work with each other. This blog post is a run through of the setup of getting Poseidon and FAUCET working and talking to each other using Raspberry Pis (RPis) and a Zodiac FX switch.</p><p><strong>Here’s the list of materials we’ll be using:</strong></p><ul><li>1 RaspberryPi 3 (serves as Controller1)</li><li>2 RaspberryPi 2s (Client1, Client2)</li><li>1 Northbound Network Zodiac FX (<a href="https://northboundnetworks.com/collections/zodiac-fx">https://northboundnetworks.com/collections/zodiac-fx</a>)</li><li>1 Battery pack</li><li>1 Laptop running OS X or Linux (Server1)</li><li>4 USB A to Micro B cables</li><li>Handful of USB Ethernet dongles</li><li>Handful of Ethernet cables</li></ul><p>First let’s configure the switch so that FAUCET can connect to it once FAUCET is set up. On the Zodiac you’ll want to do a <a href="http://forums.northboundnetworks.com/index.php?topic=52.0">firmware upgrade</a> if you haven’t already, to make sure you’re running at least version 0.82. Once that’s been upgraded, you can pop into the console of the switch on the machine you plugged the USB cable into by looking for the new device in /dev. On OS X it shows up as /dev/tty.usbmodem1421 for me. Now that you know the device, you can run:</p><pre>screen /dev/tty.usbmodem1421 9600</pre><p>You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*vAzIVVtRt08qacKedB5PmQ.png" /><figcaption>Zodiac FX Console</figcaption></figure><p>From here, just set the configuration to match the following (use the help command to set the IP Addresses and ports):</p><pre>Zodiac_FX# config<br>Zodiac_FX(config)# show config</pre><pre>— — — — — — — — —— — — — — — — -</pre><pre>Configuration<br>Name: Zodiac_FX<br>MAC Address: 70:B3:D5:6C:D3:2E<br>IP Address: 192.168.1.99<br>Netmask: 255.255.255.0<br>Gateway: 192.168.1.1<br>OpenFlow Controller: 192.168.1.10<br>OpenFlow Port: 6653<br>Openflow Status: Enabled<br>Failstate: Secure<br>Force OpenFlow version: Disabled<br>EtherType Filtering: Disabled</pre><pre>— — — —— — — — — — — — — — — — -</pre><pre>Zodiac_FX(config)# save<br>Zodiac_FX(config)# restart</pre><p>Now that the switch is ready to go, boot up your RPi 3 (we’ll refer to this as Controller1). It needs <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian</a> loaded up with <a href="https://docs.docker.com/engine/installation/linux/docker-ce/debian/">Docker CE</a> and <a href="https://docs.docker.com/engine/installation/linux/docker-ce/debian/#install-docker-compose-for-raspbian">Compose</a> installed on it. Now you want to pull down the FAUCET repository since this RPi will be your controller.</p><pre>git clone <a href="https://github.com/faucetsdn/faucet">https://github.com/faucetsdn/faucet</a></pre><p>FAUCET requires two YAML files to be configured. The first is /etc/ryu/faucet/faucet.yaml, which you’ll need to create and populate with a simple configuration of the network switch topology and rules that should be applied. Here’s an example that we’ll use for our setup; note the dp_id needs to match the MAC address of the switch (printed on the bottom of the switch) you’re connecting to:</p><pre>dps:<br>  zodiac-fx-1:<br>    dp_id: 0x70b3d56cd32e<br>    hardware: ZodiacFX<br>    proactive_learn: true<br>    interfaces:<br>      1:<br>        native_vlan: demo<br>      2:<br>        native_vlan: demo<br>      3:<br>        native_vlan: mirror<br>vlans:<br>  demo:<br>    vid: 300<br>  mirror:<br>    vid: 101<br>    max_hosts: 0</pre><p>This configuration basically says that ports 1 and 2 are on the VLAN and are allowed to talk to each other, and port 3 is on a different VLAN since we’re going to use that as a mirror port for Poseidon. Port 4 is not specified since on the Zodiac FX, port 4 is a dedicated controller only port. Now that we have that set, we also need to populate /etc/ryu/faucet/gauge.yaml. We’ll use these settings to start:</p><pre>faucet_configs:<br>  - ‘/etc/ryu/faucet/faucet.yaml’<br>watchers:<br>  port_status_poller:<br>    type: ‘port_state’<br>    dps: [‘zodiac-fx-1’]<br>    db: ‘influx’<br>  port_stats_poller:<br>    type: ‘port_stats’<br>    dps: [‘zodiac-fx-1’]<br>    interval: 10<br>    db: ‘prometheus’<br>  flow_table_poller:<br>    type: ‘flow_table’<br>    interval: 60<br>    dps: [‘zodiac-fx-1’]<br>    db: ‘influx’<br>dbs:<br>  ft_file:<br>    type: ‘text’<br>    compress: True<br>    file: ‘flow_table.yaml.gz’<br>  prometheus:<br>    type: ‘prometheus’<br>    prometheus_addr: ‘0.0.0.0’<br>    prometheus_port: 9303<br>  influx:<br>    type: ‘influx’<br>    influx_db: ‘faucet’<br>    influx_host: ‘influxdb’<br>    influx_port: 8086<br>    influx_user: ‘faucet’<br>    influx_pwd: ‘faucet’<br>    influx_timeout: 10</pre><p>At this point, FAUCET is ready to run, so first let’s wire everything and set our interfaces up. Controller1 will need to have 2 network interfaces, one to talk to the switch, and a second one to talk to the laptop (we’ll refer to it as Server1) which will be running Poseidon. To get our second network interface, we’ll use a USB dongle. The one that will be plugged into the switch (Port 4) needs to match the OpenFlow Controller IP Address we set on the Zodiac, 192.168.1.10; the other can be whatever we like. In this setup we’re going to use a crossover cable to Server1 so they can communicate without needing another switch in between them. So we end up with something like this in /etc/network/interfaces on Controller1 that will be running FAUCET:</p><pre>auto eth0<br>iface eth0 inet static<br>    address 172.16.1.109<br>    gateway 172.16.1.1</pre><pre>auto eth1<br>iface eth1 inet static<br>    address 192.168.1.10<br>    netmask 255.255.255.0</pre><p>Since we want to be able to reach FAUCET running on Controller1 from Server1 that will be running Poseidon, we’re going to want to make sure that <a href="https://www.raspberrypi.org/documentation/remote-access/ssh/">SSH is enabled</a> on Controller1.</p><p>The first time FAUCET runs it needs to pull down Docker images from the Docker Hub, so you’ll need internet connectivity the first time. This is where having the wireless LAN that comes on the RPi becomes very useful.</p><p>Let’s start up FAUCET on Controller1 and make sure it can talk to the switch (one could add this to /etc/rc.local to have this run on boot):</p><pre>cd /home/pi/faucet &amp;&amp; FAUCET_CONFIG_STAT_RELOAD=1 docker-compose -f docker-compose-pi.yaml up --build -d</pre><p>If everything is working we’ll see FAUCET connected to the switch in the controller’s log file /var/log/ryu/faucet/faucet.log like so:</p><pre>Nov 27 22:30:51 faucet INFO will automatically reload new config on changes<br>Nov 27 22:30:51 faucet INFO Add new datapath DPID 123917682135854 (0x70b3d56cd32e)<br>Nov 27 22:30:51 faucet INFO DPID 123917682135854 (0x70b3d56cd32e) connected<br>Nov 27 22:30:51 faucet.valve INFO DPID 123917682135854 (0x70b3d56cd32e) Cold start configuring DP<br>Nov 27 22:30:51 faucet.valve INFO DPID 123917682135854 (0x70b3d56cd32e) Configuring VLAN demo vid:300 ports:Port 1,Port 2<br>Nov 27 22:30:51 faucet.valve INFO DPID 123917682135854 (0x70b3d56cd32e) Configuring VLAN mirror vid:101 ports:Port 3</pre><p>Ok great, now we have Controller1 up and running and talking to the switch. Now we can setup Server1, which can run either Linux or OS X. For this example we’ll be using Ubuntu 16.04. We’re going to need two network interfaces on Server1 as well, and since my laptop doesn’t have any ethernet ports, we’re going to use two USB dongles, and again the wireless LAN for internet. Server1 will also need <a href="https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/">Docker CE</a> installed. The first USB dongle, we’ll call eth1, should be plugged into the crossover cable that goes to Controller1, the second USB dongle, we’ll call eth2, should be plugged into Port 3 on the switch (this will be our mirror port). The interface settings in /etc/network/interfaces should look something like this:</p><pre>auto eth1<br>iface eth0 inet static<br>    address 172.16.1.110<br>    gateway 172.16.1.1</pre><pre>allow-hotplug eth2<br>iface eth2 inet manual<br>pre-up ifconfig $IFACE up<br>post-down ifconfig $IFACE down</pre><p>At this point, you should be able to connect to Controller1 from Server1 using ssh credentials:</p><pre>ssh pi@172.16.1.109</pre><p>If that is successful, then your SSH configuration is correct and your crossover cable and network interfaces are good.</p><h3>Adding Poseidon into the mix</h3><p>At this point, we can now proceed and get Poseidon up and running on Server1. We’ll first want to pull down the repository from GitHub, set a couple of configuration options for our setup, and then start Vent which will orchestrate all of the things Poseidon needs.</p><pre>git clone <a href="https://github.com/cyberreboot/poseidon">https://github.com/cyberreboot/poseidon</a><br>cd poseidon</pre><pre>export controller_uri=172.16.1.109<br>export controller_user=pi<br>export controller_pass=myPassword<br>export controller_type=faucet<br>export collector_nic=eth2<br>export controller_mirror_ports=’{“zodiac-fx-1”:3}’<br>export max_concurrent_reinvestigations=1</pre><pre>./helpers/run</pre><p>We note a couple of things about the environment variables that are being exported. By default, Poseidon is set to connect to BCF, which makes its connection through REST calls to the BCF API. That means it only requires three variables to be assigned:</p><ol><li>the URI of the controller to connect to,</li><li>a username,</li><li>and a password to login with.</li></ol><p>Since we’re connecting to a FAUCET controller in this setup, we need to specify a hostname or IP Address for the URI that Poseidon will SSH to using the username and password (keys are supported with passphrases, but for this example we’re just going to use simple passwords). Additionally we need to tell Poseidon that controller type is no longer BCF, but instead FAUCET. Next, we specify what the network interface on Server1 is that traffic will be mirrored to, so that Vent can capture that data and send it on to be classified and analyzed for behavior. Additionally, for FAUCET, we provide which ports on which switches connected to the controller are mirror ports. In this case, the name of the switch is zodiac-fx-1, which we specified in the faucet.yaml file above, and the port we’re mirroring to is 3. Lastly, for FAUCET we set the max number of concurrent re-investigations to 1 because mirroring with FAUCET currently is at the port level only for combined inbound and outbound traffic.</p><p>Now we have Poseidon up and running and taking to the FAUCET controller which is connected to our switch. With the two remaining free ports on the switch we can hook up our two remaining RPis (Client1 and Client2) and put them on the same netmask. With the controller up, they should be able to freely communicate because they’re on the same VLAN and no ACLs are set. Once they start communicating on the switch, the controller will learn that there are new devices, and Poseidon will grab that information from the controller and start mirroring traffic of unknown devices. That mirrored traffic will then be sent on to the classifier and run through behavioral analysis to see if the device type that was detected is behaving abnormally or not (our machine learning models for this are still a work in progress). At this point a message is then sent back to Poseidon with the results and confidences, and Poseidon can make a decision about what to do upstream to the controller and subsequently switch such as shutdown, degrade, monitor, etc.</p><p>Thanks to some risers, I was able to stack everything and take it out the of initial cardboard box (pictured below) and turn it into a small portable unit that ended up taking much less space, and it is easier to interact with the ports on the RPis.</p><p>While there is still a lot more work to be done, so far early results have been promising as we move forward supporting both BCF and FAUCET as viable SDN controllers that Poseidon can connect to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8PuO_i-xKL6SeAEFVW2IGQ.jpeg" /><figcaption>Initial prototype</figcaption></figure><p>Some additional photos of the final setup:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S74ouy4fHWTB272U-SZvJw.jpeg" /></figure><h3>Cyber Reboot, an IQT lab, challenges the traditional approach to cybersecurity with the goal of rebalancing the equation to increase the cost and complexity for our adversaries while reducing cost and complexity for our defenders.</h3><h4>Learn more at <a href="http://www.cyberreboot.org/">http://www.cyberreboot.org/</a> and follow us on Twitter: @_cyberreboot</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97184032cdc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thanks to FAUCET, Poseidon Now Supports Switches Running OpenFlow 1.3]]></title>
            <link>https://medium.com/@cglewis/thanks-to-faucet-poseidon-now-supports-switches-running-openflow-1-3-e5489f2bc1f5?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5489f2bc1f5</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[software-defined-networks]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Thu, 07 Dec 2017 18:36:58 GMT</pubDate>
            <atom:updated>2017-12-11T19:33:00.504Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*1-pTlekaY2GfoTygXk9slQ.png" /><figcaption>Poseidon</figcaption></figure><p>As a refresher, check out our <a href="https://blog.cyberreboot.org/deep-session-learning-for-cyber-security-e7c0f6804b81">earlier post</a> outlining Poseidon’s three major objectives. To sum it up, <a href="https://github.com/cyberreboot/poseidon">Poseidon</a> is all about performing deep learning on network packet data, setting up an SDN environment, and scheduling a microservice to connect the two.</p><p>A while back <a href="https://blog.cyberreboot.org/hacktoberfest-so-long-and-thanks-for-all-the-pull-requests-68f9ad994d59">we wrote</a> about how Hacktoberfest helped us accomplish some important things, and one of things was leveraging an open source SDN controller to work as an alternative SDN controller for <a href="https://github.com/cyberreboot/poseidon">Poseidon</a>. In this post we will walk through the background of why we did this, the changes we made to improve Poseidon to be able to use more than one SDN controller implementation, and the improvements recently made to the second SDN controller implementation we chose to go with -<a href="https://github.com/faucetsdn/faucet">FAUCET</a>.</p><h3><strong>Adding OpenFlow 1.3 support to Poseidon via FAUCET</strong></h3><p>When we first started the Poseidon project over a year ago, we did a preliminary evaluation of a number of SDN controllers to see which would best fit our needs based on our goals. We also obtained a variety of SDN switches from Dell, Accton Edgecore, Facebook Wedge, Quanta, and Northbound Networks. At the time, we narrowed down the controller options to four: <a href="https://github.com/opennetworkinglab/onos">Onos</a>, <a href="https://osrg.github.io/ryu/">Ryu</a>, <a href="https://www.opendaylight.org/">OpenDayLight</a>, and <a href="http://www.projectfloodlight.org/floodlight/">Floodlight</a>. After ultimately picking Onos and running into a number of issues, we discovered through conversations with BigSwitch that the Big Cloud Fabric™ (BCF) Community Edition (forked from Floodlight) would suit our needs and be compatible with our Dell and Accton switches. This simplified the controller part of Poseidon and allowed us to focus on the other aspects of the project.</p><p>Tying Poseidon so strongly to BCF meant that Poseidon could only be run with very specific hardware, which made it difficult to demonstrate and trial in environments that didn’t already have an SDN network that was using BCF. Since we still had a couple of the Zodiac FX 4 port OpenFlow switches lying around from Northbound Networks, we decided to see if controller options had gotten any better in the last year. We wanted to see what we could get working with them, since they are cheap ($85) and portable. While searching, we came across <a href="https://faucet-sdn.blogspot.com/2016/06/raucet-raspberry-pi-faucet-controlling.html">this tutorial</a> about FAUCET (not sure how we missed it last time around, but glad we ran into it this time).</p><p>FAUCET differs from BCF in a few ways. First, it is quite light-weight, meaning we can run it on something as small as a Raspberry Pi (RPi) without issue. Second, and more importantly, FAUCET’s philosophy for hardware support is essentially to require that the switch be running OpenFlow 1.3. This greatly increases the number of switches (including virtual ones!) that can now be used with Poseidon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*U5p9F1ACXP3fgsswzzkYGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pCHo6b_yrDCdbl603mwZQ.png" /><figcaption>Big Cloud Fabric and FAUCET now supported in Poseidon</figcaption></figure><p>We had FAUCET up and running in no time. While you can build FAUCET yourself if you want to, they conveniently provide Dockerfiles so you can run FAUCET and all of its components in Docker containers. When we first started trying to get FAUCET running locally on a Mac, we ran into volume mount errors, which was easily remedied with <a href="https://github.com/faucetsdn/faucet/pull/1124">this pull request</a> (PR).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXbAgbJ1r7Hwk2h4h9-ccg.png" /><figcaption>FAUCET: Pull Request #1124</figcaption></figure><p>Once we saw how quick and easy it was to get it up and running, we started working on getting it running on an RPi. We noticed that they had a docker-compose file for x86_64 machines, but not for ARM, so we opened another <a href="https://github.com/faucetsdn/faucet/pull/1148">PR</a> to include one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZQFM4gQ8DForXWy0cbjs2g.png" /><figcaption>FAUCET: Pull Request #1148</figcaption></figure><p>This made our FAUCET setup a single command to build and run. The FAUCET community was very welcoming and quick to receive and approve our small contributions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOxlTzkMyv25ect1OaeNeA.jpeg" /><figcaption>Initial prototype of a FAUCET network with 3 RPis</figcaption></figure><p>Now that we had the basics up and running for our miniature SDN environment, we needed to see how much work needed to be done to make it work with Poseidon; as it turns out, not much. We abstracted away most of controller code from Poseidon, so this <a href="https://github.com/CyberReboot/poseidon/pull/402">PR</a> cleanly stubbed in an additional controller class for FAUCET.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7UQpW3PQY7MV4Q5oQlFig.png" /><figcaption>Poseidon: Pull Request #402</figcaption></figure><p>Effectively, Poseidon needs to be able to query an SDN controller to do the following operations:</p><ol><li>Detect new devices at <a href="https://www.wideband.net.au/blog/difference-layer-3-layer-2-networks/">Layer 2 and Layer 3</a>.</li><li>Start and stop mirroring traffic from said new devices to another port that Poseidon specifies.</li><li>Update posture on the switch by <a href="https://blog.cyberreboot.org/sdn-and-the-need-for-more-security-verbs-a6315935fca4">performing a (security) action</a> against that new device if necessary.</li></ol><p>One of the recent improvements to FAUCET is its ability to learn not only at Layer 2, but now also Layer 3 if it exists, thanks to this <a href="https://github.com/faucetsdn/faucet/pull/1220">PR</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ttaoZr_onvANu0MD3A7_iA.png" /><figcaption>FAUCET: Pull Request #1220</figcaption></figure><p>FAUCET now has all of the necessary requirements needed to integrate with Poseidon.</p><p>In our <a href="https://blog.cyberreboot.org/building-a-software-defined-network-with-raspberry-pis-and-a-zodiac-fx-switch-97184032cdc1">next post</a> we will walk through the materials needed and steps required to go from zero to a fully working SDN environment with FAUCET and Poseidon using the RPis and the Zodiac FX switch. Stay tuned!</p><h3>Cyber Reboot, an IQT lab, challenges the traditional approach to cybersecurity with the goal of rebalancing the equation to increase the cost and complexity for our adversaries while reducing cost and complexity for our defenders.</h3><h4>Learn more at <a href="http://www.cyberreboot.org/">http://www.cyberreboot.org/</a> and follow us on Twitter: @_cyberreboot</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5489f2bc1f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacktoberfest is upon us!]]></title>
            <link>https://medium.com/@cglewis/hacktoberfest-is-upon-us-a8ff56a9d724?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8ff56a9d724</guid>
            <category><![CDATA[hacktoberfest]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[hackathons]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Tue, 19 Sep 2017 17:14:54 GMT</pubDate>
            <atom:updated>2017-09-21T17:08:50.938Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*tfa6oUSNH3oXWMJremtRAw.png" /></figure><p>Once again, in anticipation of the launch of <a href="https://hacktoberfest.digitalocean.com/">Hacktoberfest</a>, the <a href="http://www.cyberreboot.org/">CyberReboot</a> team is gearing up to contribute to open source projects. If you have not heard about it before, Hacktoberfest is a month-long celebration of open source software, and it begins Sunday, October 1.</p><p>Hacktoberfest encourages project maintainers and contributors alike to take a step back and focus on the open source software community more broadly. Here at CyberReboot we strongly believe in the importance of open source software, and we are thrilled to dedicate our time to contribute to the community.</p><p>We would like to highlight two of our own projects during Hacktoberfest 2017:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*1-pTlekaY2GfoTygXk9slQ.png" /><figcaption>Poseidon — Without situational awareness and context, defending a network remains a difficult proposition.</figcaption></figure><ul><li>The first project, <a href="https://github.com/CyberReboot/poseidon">Poseidon</a> is focused on gaining <a href="https://blog.cyberreboot.org/deep-session-learning-for-cyber-security-e7c0f6804b81">situational awareness of a network</a> through the use of software-defined networks (SDN) and machine learning. Poseidon aims to answer two seemingly simple questions: “what devices are on my network, and what are they doing?”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*pWjcL7euExHdK4Bgt2RMBw.png" /><figcaption>Vent — a light-weight library that provides a platform to collect and analyze data across a flexible set of tools.</figcaption></figure><ul><li>The second project, <a href="https://github.com/CyberReboot/vent">Vent</a> is a platform built to automate collection and analysis pipelines using a flexible set of tools and technologies via <a href="https://github.com/CyberReboot/vent-plugins">plugins</a>.</li></ul><p>We will be using <a href="https://twitter.com/search?q=%23Hacktoberfest&amp;src=tyah">#Hacktoberfest</a> tagged issues in each repository to make it easy to get involved with our projects. Our team is available to help anyone interested in learning more about these projects or how best to contribute to them during October and beyond. Simply engage with us through our <a href="https://github.com/CyberReboot">GitHub repositories</a>.</p><p>Follow us on twitter (<a href="https://twitter.com/_cyberreboot">@_cyberreboot</a>) to keep updated on how we’re participating in Hacktoberfest, and share with us interesting projects we should be checking out. Anyone who opens a pull request during the month of October to any of our projects will receive a project specific sticker from us as well. Once the pull request is opened just send us your contact information here: info@cyberreboot.org</p><p>Happy hacking!</p><h4>Cyber Reboot, an IQT lab, challenges the traditional approach to cybersecurity with the goal of rebalancing the equation to increase the cost and complexity for our adversaries while reducing cost and complexity for our defenders.</h4><h4>Learn more at <a href="http://www.cyberreboot.org/">http://www.cyberreboot.org/</a> and follow us on Twitter: @_cyberreboot</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8ff56a9d724" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vent: Pulling Back the Curtain]]></title>
            <link>https://medium.com/@cglewis/vent-pulling-back-the-curtain-40151ccc22a4?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/40151ccc22a4</guid>
            <category><![CDATA[boot2docker]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[vent]]></category>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Mon, 17 Oct 2016 21:28:55 GMT</pubDate>
            <atom:updated>2016-10-17T21:28:55.182Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating a self-contained virtual appliance based on boot2docker that provides a platform to collect and analyze data across a flexible set of tools and technologies.</h4><h3>Simple Beginnings</h3><p>When <a href="https://github.com/CyberReboot/vent">Vent</a> was first conceived about a year ago, the idea behind it was to create a simple drop-in network probe on virtually any network and have it be able to learn about the assets or endpoints that are on that network. It originally had the following five design goals:</p><p><strong>easy to deploy anywhere</strong></p><ul><li>for example, a self-contained <a href="https://en.wikipedia.org/wiki/ISO_image">ISO image</a> that can run virtually on typical stacks (VMWare, OpenStack, Virtualbox, etc.) or straight on bare-metal.</li></ul><p><strong>lightweight</strong></p><ul><li>if the intent is to deploy it anywhere, then it should have a small resource footprint so that it doesn’t require extra infrastructure.</li></ul><p><strong>easy to use</strong></p><ul><li>it should have an intuitive interface so that any operator can easily use and configure to their needs.</li></ul><p><strong>modular and customizable</strong></p><ul><li>it needs to support various different tools for probing the network, both actively and passively, and they need to be easily swappable.</li></ul><p><strong>distributed and aggregated</strong></p><ul><li>if several vent probes are deployed on the same network, but perhaps different egress points, then the results should be able to show an aggregated view of the network as seen from the individual probes.</li></ul><p>In order to start scratching at this itch, we need an operating system that is super lightweight and runs a Docker engine. Those two pieces would allow for a solid foundation for an easy-to-drop-in-anywhere and run-any-tools-on-top-of platform.</p><h3>To Boot Or Not To Boot — Docker</h3><p>Immediately, we decided to check out <a href="https://github.com/boot2docker/boot2docker">boot2docker</a> and see how customizable it was. Fortunately, the source and build process are both open. In fact, not only is it open, but they even have a helper build process, specifically for making a custom build, sweet!</p><p>Here’s how it works:</p><pre>$ sudo docker pull boot2docker/boot2docker<br>$ echo &quot;FROM boot2docker/boot2docker&quot; &gt; Dockerfile<br>$ echo &quot;ADD . $ROOTFS/data/&quot; &gt;&gt; Dockerfile<br>$ echo &quot;RUN somescript.sh&quot; &gt;&gt; Dockerfile<br>$ echo &quot;RUN /make_iso.sh&quot; &gt;&gt; Dockerfile<br>$ echo &#39;CMD [&quot;cat&quot;, &quot;boot2docker.iso&quot;]&#39; &gt;&gt; Dockerfile<br> <br>$ sudo docker build -t my-boot2docker-img .<br>$ sudo docker run --rm my-boot2docker-img &gt; boot2docker.iso</pre><p>To elaborate a bit on what is going on there, it’s really doing five distinct things:</p><p>1. pulling down the boot2docker/boot2docker Docker image.</p><p>2. echoing out commands into a Dockerfile.</p><p>3. among those commands being echoed are an ADD operation followed by a RUNcommand of somescript.sh.</p><ul><li>the ADD command is adding any and all files in the current working directory (.) into the Docker image that is going to be built from this Dockerfile.</li><li>the RUN command is executing somescript.sh that was added in the previous command.</li></ul><p>4. the Docker image is then built from that Dockerfile and the image is named my-boot2docker-img.</p><p>5. finally the image is run as a Docker container and the output is streamed into an ISO image that can be later used to boot and install the operating system on a server.</p><h3>Customizing boot2docker</h3><p>Building a virtual appliance specifically intended to run as a dedicated Docker host like boot2docker meant that everything else was stripped down and removed. The core of boot2docker is running on top of Tiny Core Linux. While this is great for keeping the operating system minimal, it also makes it a bit limited for running other applications outside of Docker on it. Since we want to have a simple control interface to make it feel more like an appliance to the end user, we needed a way to run our own application that could be used to drive what tools get run, when, and how. In order to get a quick, simple application that we knew would work, we decided to write it in Python. Unfortunately Python does not come with boot2docker.</p><p>You may have noticed in the build process above, that the first line of the Dockerfile is making pulls from the public boot2docker/boot2docker image. While the boot2docker ISO image is a Tiny Core Linux operating system, the actual container that builds boot2docker is running in Debian. This poses a bit of a challenge when trying to add in binaries, as we want to ensure they were compiled in a compatible way for the environment they are running on. This means that we need a separate container that is actually running Tiny Core Linux that we can use to build Python from scratch. Once Python is built we can then use those binaries and inject them into the boot2docker ISO image inside the Debian container.</p><p>Lucky for us, someone already did the hard work of <a href="https://github.com/tatsushid/docker-tinycore-python/blob/master/2.7/Dockerfile">building Python from scratch on Tiny Core Linux inside of a Docker container</a>. Now all we need to do, instead of running Python at the end, is copy out the necessary binaries into a tarball. That tarball can then be picked up later by the Debian container that will inject them into the Tiny Core Linux boot2docker ISO image. This is all done to ensure that the binaries were compiled in the same environment that they will be running in, to avoid any weirdness that might occur from trying to run Python binaries compiled on Debian but run on Tiny Core Linux.</p><p>Now that we have Python available on our custom boot2docker operating system, we can easily drop in our Python application, and using a bit of tweaking to the SSH config, we are able to leverage the same docker-machine ssh command one would normally use with boot2docker, but override the functionality to fit our needs. Now when you SSH into the machine, instead of having a shell, you get dropped into our application where you can configure how Vent operates.</p><p>Here’s a quick demo showing the application running and how it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*Ng4xHosVub7tkFsiQ9PX_g.gif" /><figcaption>vent v0.1.3</figcaption></figure><p>By default, boot2docker has a directory that it uses for user data and customizing the host dynamically. Leveraging that, making templates of tools, including their build processes and dependencies, can then be added or removed on the fly by the end user without having to know all of the details of how our application is interacting with them and also without having to rebuild everything. Those tools are then run as Docker containers on top of the host and the output or collection of those tools are then passed as messages to the core of Vent which automatically indexes those messages and makes then accessible for querying for further analytics.</p><h3>Conclusion</h3><p>All of that results in a mere 56MB ISO image! Not only is the ISO image incredibly lightweight and easy to deploy on various environments including bare-metal, it has the Docker engine and Python running on it, allowing users to customize Vent and run their own tools and technologies on top of Vent. If you’d like to give Vent a whirl, check it out on our <a href="https://github.com/CyberReboot/vent">GitHub page</a>. Stay tuned as we’ll be posting more in-depth tutorials on the internals of Vent of when and how to use it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40151ccc22a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Vent]]></title>
            <link>https://medium.com/@cglewis/introducing-vent-1d883727b624?source=rss-510584e0dfc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d883727b624</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Charlie L]]></dc:creator>
            <pubDate>Tue, 11 Oct 2016 13:01:41 GMT</pubDate>
            <atom:updated>2018-02-26T15:09:20.364Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*i5kU9ZTK2mfLHHmr1GF95w.png" /></figure><p>Here at the lab one of our focus areas is in <a href="http://www.cyberreboot.org/our-work/#sdn">security enhanced software-defined networks</a> (SDNs) as described in our previous <a href="https://blog.cyberreboot.org/sdn-and-the-need-for-more-security-verbs-a6315935fca4#.vtu581v5z">post</a>. <a href="https://gab41.lab41.org/machine-learning-for-network-security-theres-an-app-for-that-e9bc01139f19#.943y14q0v">Poseidon</a>, one of our current projects, is putting a spotlight on being able to improve network security through situational awareness and context by answering two seemingly simple questions: What digital assets are on a network and what are those assets doing.</p><p>Before we even get into the approach we’re taking to try and answer those questions, it is worthwhile to mention why this is even a problem. Network topologies are dynamic and ephemeral in nature, and this has only become more strongly prevalent with the rise of on-demand compute (popularized with Amazon Web Services), virtual machines, and containers. These technologies have enabled digital assets to no longer cleanly “map” to a physical asset, making automating the detection of new or unknown nodes on your network that much more difficult.</p><p>As a result keeping a near real-time view of what is on a given network has gotten much more complex. Certainly there are a number of tools (i.e. <a href="http://www.tcpdump.org/">tcpdump</a>, <a href="https://nmap.org/">nmap</a>, <a href="http://lcamtuf.coredump.cx/p0f3/">p0f</a>, etc.) out there to help along the way, but that in itself creates another barrier. Choosing the right set of tools, configuring them, doing something useful with the output or alerts from those tools in a reasonable time window to be actionable becomes even more cumbersome.</p><p>With those barriers in mind, we as a lab started to develop a virtual appliance to help address the issues as well as use the appliance as a building block towards achieving the bigger picture for near real-time situational awareness of SDN networks. Aiming to leverage existing solutions as much as we could, we created <a href="https://github.com/CyberReboot/vent">vent</a> to help us do that, specifically in the network security world.</p><p>While <a href="https://github.com/CyberReboot/vent">vent</a> does not remove the speed bumps of choosing the right set of network tools, it aspires to lower the bar to entry. <a href="https://github.com/CyberReboot/vent">Vent</a> makes it possible to build up a tool library that can all be configured in a standard way by using <a href="https://github.com/docker/docker">Docker</a>, the open source application container engine, regardless of the technology. Instead of worrying about how to install and configure a specific tool before even deciding if it is something useful and worthwhile, <a href="https://github.com/CyberReboot/vent">vent</a> allows you to simply install any number of tools that already have recipes for installation, configuration, and runtime via GitHub repositories. An example exists <a href="https://github.com/CyberReboot/vent-plugins">here</a>.</p><p><a href="https://github.com/CyberReboot/vent">Vent</a> is a self-contained virtual appliance based on <a href="https://github.com/boot2docker/boot2docker">boot2docker</a> that provides a platform to collect and analyze data across a flexible set of tools and technologies. With the rise of container technology, it is now easy to make tool deployment configurable, isolated, and repeatable. With <a href="https://github.com/CyberReboot/vent">vent</a> you can quickly deploy any combination of tools configured in whatever manner makes sense for the environment it is being deployed to and have it all be version controlled by default. Tools can be run adhoc or continuously. With <a href="https://github.com/CyberReboot/vent">vent</a>, tools can be given slices of the data in isolation or given all of the data being sent to a <a href="https://github.com/CyberReboot/vent">vent</a> instance. Out of the box <a href="https://github.com/CyberReboot/vent">vent</a> comes with a number of preconfigured technologies to make handling the data output of these tools and technologies easier such as logging and indexing for searchability.</p><p>While <a href="https://github.com/CyberReboot/vent">vent</a> is still early in its development, we think it is ready for the tires to be kicked, and as such, we have open sourced it <a href="https://github.com/CyberReboot/vent">here</a>. This is just one step of many that hopefully gets us closer to automating the collection and analysis of networks to be able to be smarter and quicker about answering what digital assets are on a network and what are those assets doing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d883727b624" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>