Reader small image

You're reading from  BeagleBone for Secret Agents

Product typeBook
Published inSep 2014
PublisherPackt
ISBN-139781783986040
Edition1st Edition
Right arrow
Author (1)
Joshua Datko
Joshua Datko
author image
Joshua Datko

Josh Datko is the founder of Cryptotronix, LLC, an open source hardware company that specializes in embedded, cryptographic electronics. He graduated with distinction from the US Naval Academy with a Bachelor's of Science in Computer Science and then served 10 years in the Navy, both actively and as a reserve submarine officer. He has been deployed to locations worldwide including Afghanistan in support of Operation Enduring Freedom. In 2014, Josh presented at both the HOPE and DEF CON conferences. He completed his Master's of Science in Computer Science, with a focus on security and networking, from Drexel University.
Read more about Joshua Datko

Right arrow

Chapter 5. Chatting Off-the-Record

In this final chapter, we will use the BeagleBone Black (BBB) to protect the last bastion of your online life: real-time chats. With your e-mail protected by GPG and your browsing protected by Tor, we'll use the software called Off-the-Record (OTR) to protect instant messaging chats. OTR addresses a weakness in the PGP threat model and we will give an overview of the OTR design objectives before building the project. We'll also consolidate all of your chat networks to be managed over an Internet Relay Chat interface, which will run on your BBB. While this project doesn't require any additional hardware other than the BBB, the cryptographic concepts and networking interactions are slightly more challenging than the previous chapters. At the end of this chapter and the book, you will have had exposure to and become familiar with the three most effective tools to protect your privacy online.

In this chapter, you will do the following:

  • Learn the difference between...

Communicating Off-the-Record – a background


Before we investigate OTR, let's consider how we could encrypt our chat sessions. We could use GPG for chat. We'd have to know the public key of our correspondent, and each time we'd enter a message, it would encrypt and/or sign the message and send it along. Some chat networks don't have an equivalent e-mail address, so it could be awkward finding and verifying public keys. However, you can certainly imagine a chat system that worked this way; it's a slightly more synchronous version of GPG with e-mail.

Even if those technical problems are addressed there is a bigger issue lurking in PGP's design. Let's return to our friends Alice and Bob. Alice and Bob have been communicating with GPG for quite some time now. They use GPG flawlessly and religiously practice the best security hygiene. Until one day, when somebody gets a hold of Bob's private key. Now, there are several ways this could happen. Despite Bob's willpower, perhaps he just couldn't resist...

Installing BitlBee on the BeagleBone


BitlBee is an IRC to-other-chat-networks gateway. This means that if you use an existing chat program, such as Google Talk, Jabber, Twitter, AIM, or Facebook, you can use BitlBee to chat over those protocols via IRC. The first question when a non-IRC user hears about BitlBee is, why would you want to do this? while IRC users respond with excitement. The major benefit is that by using IRC, you can effectively chat with buddies over Google Talk using the same client software as you use to chat on IRC. This reduces the number of programs you have to learn. While this may not seem impressive at first, consider that each program typically has its own keyboard shortcuts and distinct interface. Also, each vendor frequently changes the appearance of their application, requiring you to re-learn how to use the tool. On the other hand, IRC clients are fairly simple in their user interface and IRC interactions are fairly standardized.

The other reason BitlBee is useful...

Adding OTR to your BitlBee server


We installed the OTR plugin for BitlBee already, so it's ready to support OTR. Prior to an encrypted conversation, we must first generate a key pair. For each account you have registered with BitlBee, you can have unique key pairs. View your account list and then generate an OTR key with:

otr keygen 0

After a few seconds, root will inform you that OTR key generation is complete. At any point, you can view information on your OTR keys with:

otr info

This will provide the key fingerprints for each account. You are now ready to have an encrypted chat.

Managing contacts in BitlBee

Your contacts, or buddy list, should have been available when BitlBee authenticated your account. You can view your buddy list in the &bitlbee window with the blist command. This table will show the nick, the handle at the specific account, and the status of each contact. BitlBee converts the handle into IRC-friendly names, which are the "nicks" in the first column. It can become...

Marshalling your IRC connections with a Bouncer


Now that BitlBee is running on the BeagleBone, you can enjoy OTR-protected instant messaging, but we can improve the setup. Currently, we are connecting to BitlBee directly from your IRC client. This is fine if you have one client. But, if you are chatting with your laptop and then get up and go, you may want to continue a conversation on your phone. For this, we will need a more persistent proxy connection. The problem can be stated in a more general way: how can we maintain a persistent connection to all of our IRC networks, including BitlBee. For this, we'll need an IRC bouncer.

IRC bouncers act as a proxy server and maintain your connection to an IRC server. This may be useful on servers that don't support nick registration and you want to maintain your nick. As mentioned in the previous use case, bouncers generally support multiple clients which will allow you to have a near seamless IRC conversation as you switch devices. Since we are...

Extending the project


Currently, your BeagleBone is only serving your local network. You can enable port forwarding, like you did with your Tor server to open it up to the Internet to allow access to ZNC while you are on-the-go. If you do this, be sure that you are using SSL and consider using a Dynamic DNS service so you don't have to remember your IP address.

The ZNC and BitlBee packages are quite extensible. Moreover, since they are IRC servers, you can run an IRC bot in your ZNC server. There are several popular IRC bot packages and perhaps the most well known is Eggdrop (http://www.eggheads.org/). A custom bot on your BBB IRC server can interact with you from IRC to hardware. For example, if you add a temperature sensor on your BBB, you can query the bot to find out the temperature in the room. If you add a ZigBee radio to your BBB and attach the same temperature sensor to a corresponding ZigBee radio outside, powered by a battery, the bot can tell you the temperature outside. If you...

Summary


In this chapter, you learned how to use another privacy tool, OTR. We used OTR with two different applications and examined how OTR authentication works. We also have our BBB set up to act as an IRC gateway to our chat networks and to manage all of our IRC communication.

In this book, we've taken three of the most popular and well-respected privacy and security applications and used them on the BeagleBone Black. The small form factor, low power consumption, and extendibility of the BBB makes it an ideal privacy aid. The software and hardware used in this book makes heavy use of cryptography, which is inherently a social and often controversial technology. We've also learned some of modern cryptography's social-political struggles along the way. Finally, you don't need to be a secret agent to communicate privately and securely; the best tools are freely available. You can improve these tools by using them and providing your feedback to the developers.

Happy hacking!

lock icon
The rest of the chapter is locked
You have been reading a chapter from
BeagleBone for Secret Agents
Published in: Sep 2014Publisher: PacktISBN-13: 9781783986040
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Joshua Datko

Josh Datko is the founder of Cryptotronix, LLC, an open source hardware company that specializes in embedded, cryptographic electronics. He graduated with distinction from the US Naval Academy with a Bachelor's of Science in Computer Science and then served 10 years in the Navy, both actively and as a reserve submarine officer. He has been deployed to locations worldwide including Afghanistan in support of Operation Enduring Freedom. In 2014, Josh presented at both the HOPE and DEF CON conferences. He completed his Master's of Science in Computer Science, with a focus on security and networking, from Drexel University.
Read more about Joshua Datko