O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BeagleBone for Secret Agents

Book Description

Browse anonymously, communicate secretly, and create custom security solutions with open source software, the BeagleBone Black, and cryptographic hardware

In Detail

The BeagleBone Black is a small but powerful low-powered computer that can be used to protect personal secrets and enable privacy enhancing technologies. With increasing concerns over Internet surveillance, you can combine time-tested open source security software with the small form factor of the BeagleBone Black to create custom personal security applications.

Starting with an introduction to development with the BeagleBone Black, we'll show you how to use the BeagleBone to create custom hardware projects involving security and privacy. Each chapter provides the history and background of each technology with a self-contained and practical project. You'll explore devices such as a fingerprint scanner and the Trusted Platform Module on the CryptoCape while learning about authentication and encryption. Filled with projects that utilize security tools used by journalists, activists, and government agents, this book shows you how to apply these tools with a BeagleBone Black.

What You Will Learn

  • Build a complete BeagleBone development environment with Emacs and modern Emacs extensions
  • Understand how Tor protects Internet privacy and how to run a Tor bridge
  • Add custom hardware to the BeagleBone's I2C, serial, GPIO, and analog to digital interfaces
  • Gain insight into the BeagleBone cape ecosystem by exploring the design of the CryptoCape
  • Use a Trusted Platform Module to protect your GPG keys
  • Build an Off-the-Record chat gateway
  • Develop and analyze threat models for security-related projects

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. BeagleBone for Secret Agents
    1. Table of Contents
    2. BeagleBone for Secret Agents
    3. Credits
    4. Foreword
    5. About the Author
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Creating Your BeagleBone Black Development Environment
      1. Introducing the BBB
        1. Appreciating BBB's commitment to open source hardware
        2. Unboxing the BBB and providing power
      2. Creating an embedded development environment with Emacs
        1. Understanding the complications of embedded development
        2. Installing Emacs 24
        3. Installing the prelude
        4. Learning how to learn about Emacs
        5. Streamlining the SSH connections
          1. Discovering the IP address of your networked BBB
          2. Editing the SSH configuration file
          3. Configuring password-less login
          4. Running an SSH agent to control access to your SSH keys
        6. Connecting to BBB with TRAMP
          1. Running commands from Emacs
          2. Using Emacs dired to copy files to and from BBB
      3. Finding additional background information
        1. Finding additional cryptography resources
        2. Finding additional electronics resources
        3. Finding additional Debian resources
      4. Summary
    10. 2. Circumventing Censorship with a Tor Bridge
      1. Learning about Tor
        1. Appreciating the various users of Tor
        2. Understanding Tor relays
        3. Understanding Tor bridges
        4. Using obfuscated proxies and pluggable transports
        5. Realizing the limitations of Tor
        6. The impact and benefits of running a Tor bridge
      2. Installing Tor on BBB
        1. Installing Tor from the development repository
        2. Configuring Tor for BBB
          1. Adding contact details to the torrc file
          2. Tuning the bandwidth usage of your bridge
      3. Understanding Tor exit policies
      4. Setting bridge-specific settings
      5. Starting your new Tor bridge
      6. Enabling port forwarding
      7. Adding physical interfaces to the bridge
        1. Gathering the front panel components
        2. Using an LCD to display status information
        3. Controlling the bandwidth with a potentiometer
        4. Designing the BeagleBridge circuit
        5. Wiring the hardware with a proto cape
        6. Developing the software using Python libraries
        7. Controlling the hardware with pyBBIO
      8. Determining your bandwidth with speedtest-cli
      9. Controlling the bridge with the Stem library
      10. Connecting to your obfuscated bridge
      11. Continuing with Tor-related projects
      12. Summary
    11. 3. Adding Hardware Security with the CryptoCape
      1. Exploring the differences between hardware and software cryptography
        1. Understanding the advantages of hardware-based cryptography
          1. Offloading computation to a separate processor
          2. Protecting keys through physical isolation
        2. Understanding the disadvantages of hardware crypto devices
          1. Lacking cryptographic flexibility
          2. Exposing hardware-specific attack vectors
          3. Obfuscating implementation details
        3. Summarizing the hardware versus software debate
      2. Touring the CryptoCape
      3. Discovering the I2C protocol
      4. Understanding the benefit of cape EEPROMs
        1. Creating a cape EEPROM
        2. Creating the cape DTS file
      5. Creating an eLinux wiki site
      6. Keeping time with a real-time clock
      7. Trusting computing devices with a Trusted Platform Module
      8. Providing hardware authentication with ATSHA204 and ATECC108
      9. Encrypting EEPROM data with the ATAES132
      10. Combining the BBB with an ATmega328p
      11. Building a two-factor biometric system
        1. The fingerprint sensor overview
        2. Appreciating the limitations of fingerprint biometrics
        3. Preparing the CryptoCape
        4. Preparing the connections
        5. Connecting the Scanner to the CryptoCape
        6. Preparing the fingerprint sensor
        7. Uploading the biometric detection sketch
        8. Security analysis of the biometric system
      12. Summary
    12. 4. Protecting GPG Keys with a Trusted Platform Module
      1. History of PGP
        1. Reflecting on the Crypto Wars
      2. Developing a threat model
        1. Outlining the key protection system
        2. Identifying the assets we need to protect
        3. Threat identification
        4. Identifying the risks
        5. Mitigating the identified risks
        6. Summarizing our threat model
      3. Generating GPG keys
        1. Generating entropy
        2. Creating a good gpg.conf file
        3. Generating the key
        4. Postgeneration maintenance
        5. Using GPG
      4. Protecting your GPG key with a TPM
        1. Introducing trusted computing
        2. Encrypting data to a PCR state
      5. Adding the keypad
      6. Taking ownership of the TPM
      7. Extending a PCR
      8. Unlocking your key at startup
      9. Iterating on the threat model
      10. Summary
    13. 5. Chatting Off-the-Record
      1. Communicating Off-the-Record – a background
        1. Introducing Off-the-Record communication
        2. On the usability of OTR
        3. Using the BeagleBone to protect your online chats
      2. Installing BitlBee on the BeagleBone
        1. Creating a BitlBee account
        2. Adding a Google Talk account to BitlBee
        3. Adding a Jabber account to BitlBee
      3. Adding OTR to your BitlBee server
        1. Managing contacts in BitlBee
        2. Chatting with BitlBee
        3. Chatting with OTR in BitlBee
          1. Understanding the Socialist Millionaire Problem
      4. Marshalling your IRC connections with a Bouncer
        1. The modern uses of IRC
        2. Downloading and installing the IRC bouncer ZNC
        3. Configure ZNC to manage your IRC connections
        4. Adding OTR to your ZNC server
        5. Adding your networks to ZNC
          1. Connecting to ZNC from your IRC client
        6. Establishing OTR connections through ZNC
      5. Extending the project
      6. Summary
    14. A. Selected Bibliography
      1. Chapter 1
      2. Chapter 2
      3. Chapter 3
      4. Chapter 4
      5. Chapter 5
    15. Index