Creating RaspberryPi Dashboards with Billb0ard

Dec 1, 2015 Project

Introduction

Being in security, everything that I have done for the past 7 years has been providing visibility into security events. Whether it was firewall status, session counts, identified XSS and SQLI’s in nginx, users currently SSH’d into the infrastructure, or other awesome thing’s I can’t talk about, these were all really important to help people understand what our security was like. There is no pass/fail with security, and saying “Well, we didn’t hacked, great job!” isn’t a real metric.

No matter how awesome the dashboard was, there was always a problem: how do you spread security visibility? Security is not just a job function of some over-worked Developer-minded SysAdmin, and everyone in the company really needs to be able to see what’s going on to help make an impact where they can. Let’s put it up in the office where everyone can see!

“But it’s too expensive,” some people said.

Not anymore. You can spend less than $100 on a collective of parts needed for a RaspberryPi and make your office manager or IT group happy! I’ve included a list of these parts for people at the end of the doc.

Enter Billb0ard

We solved the problem of cost around displaying a dashboard, yay! But, how do we display these dashboard on the tv? Do we need to load up Raspbian (which is a linux flavor), launch a desktop, navigate to the browser, access the webpage, but then realize WiFi needs to be connected, etc.

Well, that’s why I came up with Billb0ard. It’s a way that we can create an image with all the details you would need preconfigured on build. This means, you can build the image from source, flash it, and on first boot, have your Pi connect to wifi (or ethernet), set it’s hostname correctly, setup a minimalist window-manager, launch chromium, and display your dashboard webpage.

Getting Started

The billb0ard project is essentially a fork of the Raspbian project, but with a bunch of Bash bootstrap scripts to handle all the confusing tasks of chroots and image creation.

To get started, checkout the code from Github:

git clone https://github.com/mikemackintosh/billb0ard
cd billb0ard

In order to customize the built image, we need to create a new file: Config.inc. This file will be referenced as config. If you do not use a config file, all the defaults will be used.

Setting Username and Password

The next step would be to configure your build. By default, the username and password are bill and b0ard, but they can be modified by adding the following to your config:

export BILLBOARD_USERNAME=myusername
export BILLBOARD_PASSWORD=mypassword

Setting WiFi Credentials

Whoa, isn’t that awesome? We can take this a step further and provide the username and password for the WiFi network (preferably guest as long as it has access rights to your dashboard, but that’s up to you):

export WIFI_AP=Guest Wifi
export WIFI_PASSWORD=This Is Our guest w1f1 Password

Awesome!

Setting Other Details

We can do some other things too like provide the dashboard you want displayed and set the hostname of your dashboard pi.

export DNS_SERVER=8.8.8.8
export PI_HOSTNAME=corp-billb0ard01

If you need to change your base packages as well, you can use export PACKAGES.

But How Do I Point It To A Dashboard?

Yep, we can configure that too!

export DASHBOARD=https://dashboard.url/page

Building Billb0ard

Once you completed your configuration, it’s time to build it! We’ve provided a way to do it with Docker (which is all the hotness), and Vagrant (old-school devops way).

Docker

In the billb0ard/ directory, after you created your configuration, type:

make

You will see a file named dashboard.img when it’s done.

Vagrant

In the billb0ard/ directory, after you created your configuration, type:

vagrant up

You will see a file named dashboard.img when it’s done.

Flashing Your Image

This is the hardest part really. It really depends on what OS you are on and what type of media you are installing it to (usb, SDcard, etc). As a result, I’m going to make another post later to get into the details of doing this on OS X.

Summary

Billb0ard is a framework which allows you to generate a custom RapsberryPi image for mass-distribution across your dashboard fleet. It provides a way to simplify time-to-first-display of your super cheap RaspberryPi driven dashboards.

Part List

It may be confusing as to which parts you need. So out of good faith, I’ve compiled the following list from Amazon to help you get a jump on purchasing your parts used in this post - you can get all these for under $100:

Prices were all collected at the time of this writing


comments powered by Disqus