MWR HackLab - Root/Beer Fridge

 on 25 April, 2013

25 April, 2013

About a year ago the idea of the office “beer fridge” was first floated.

Although it got immediate support from every one of its potential frequenters it failed to come to fruition. A number of other ideas had always been about including a r00t alarm that would go off whenever a tester got root (or did something else deserving of some attention and applause). We decided to combine the two ideas together.
Got root? Have a beer.

The idea was fairly simple, if you could complete a hacking challenge, the fridge would unlock and award the l33t hacker with a beer. We often like to compete and create challenges (You always learn best with your fingers on the keyboard), and so We wanted to build the fridge to be a template that people could put their challenges on.

We looked at different hardware (Arduino can run its own web server you know!), and locking mechanisms. We eventually settled on a Raspberry Pi that would drive an Arduino that in turn would control all the electronics. The locks would be made by using solenoids. The idea was to have 3 locks with corresponding red and green lights. As each challenge was completed, one of the locks would click open for 30 seconds. This would allow for some (hopefully) creative challenges.

Components bought and delivered, it was time to begin Hacklab!

Hindered by time and IQ (one of us was travelling up from a wedding reception the night before), we set to work in the morning. The Pi required setting up with a LAMP server, the Arduino needed to be coded to receive commands via serial and control LEDs and solenoids and the fridge itself needed the locks carefully positioned and mounted. We were using mini sprung loaded solenoids to cut down on power required but this meant their range of movement from locked to unlocked was around 10mm. The team decided that without good measuring gear, cardboard templates were the way to go.

Conclusion

By the end of the day the Arduino was programmed and one lock was mounted and working, but the Pi still needed working on. It’s surprising how much time things take to measure, check and model. We learnt a lot about Arduino and this proved that there was still much to be learnt. Serial comms between PHP and the Arduino is the next challenge, but the result will be worth it. An awesome little blue box harbouring tasty r00t beer for anyone l33t enough to conquer it.

We’re sure this isn’t the end of the story, if you’ve got any ideas about how we could pimp this fridge up some more tweet us at @mwrlabs and maybe you’ll get a chance to come drink our r00t beer at a future event.