Build-your-own sniffer. Michael Ossmann Great Scott Gadgets Mike Kershaw Kismet Wireless



Similar documents
Prototyping Printed Circuit Boards

Using Stencils to Simplify the Printed Circuit Board Assembly Process

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Introducing the Adafruit Bluefruit LE Sniffer

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

Microchip Technology. February 2008 Valerio Moretto Slide 1

Questions from The New SensorTag - IoT Made Easy Webinar

ZigBee Technology Overview

Maximizing Range and Battery Life in Low-Cost Wireless Networks

How to make a Quick Turn PCB that modern RF parts will actually fit on!

Surveillance System Using Wireless Sensor Networks

What s on the Wire? Physical Layer Tapping with Project Daisho

What marketing won t tell you about the Internet of Things

Ways to Use USB in Embedded Systems

FLYPORT Wi-Fi G

! Making your own Open Source Hardware Arduino Shield with Fritzing. Justin Mclean

RN-41/RN-41-N Class 1 Bluetooth Module

Figure 1.Block diagram of inventory management system using Proximity sensors.

Smart Home System Using Android Application

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

PCB Board Design. PCB boards. What is a PCB board

The Internet of Things: Opportunities & Challenges

The Bus (PCI and PCI-Express)

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Lab Experiment 1: The LPC 2148 Education Board

Chapter 1 Hardware and Software Introductions of pcduino

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

What is a System on a Chip?

Bluetooth Smart, But Not Smart Enough

What's on the Wire? Physical Layer Tapping with Daisho. Dominic Spill Mike Kershaw / Dragorn Michael Ossmann

Testing Overview [Document subtitle]

7a. System-on-chip design and prototyping platforms

A DIY Hardware Packet Sniffer

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure

QUASAR ELECTRONICS KIT No ELECTRONIC MOSQUITO REPELLER

USB 3.0* Radio Frequency Interference Impact on 2.4 GHz Wireless Devices

WISE-4000 Series. WISE IoT Wireless I/O Modules

RC2200DK Demonstration Kit User Manual

This first tutorial goes over how to install the software, and tailor-fit its interface and support files.

Network Enabled Battery Health Monitoring System

Synapse s SNAP Network Operating System

Data Transfer between Two USB Flash SCSI Disks using a Touch Screen

A universal forensic solution to read memory chips developed by the Netherlands Forensic Institute. The NFI Memory Toolkit II

POCKET SCOPE 2. The idea 2. Design criteria 3

Soldering is easy. here's how to do it. Andie Nordgren (Comics adaptation) Jeff Keyzer. by: Mitch Altman (soldering wisdom) (Layout and editing)

POWER FORUM, BOLOGNA

DS1307 Real Time Clock Breakout Board Kit

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

SG Miniature Wi-Fi Radio

Network connectivity controllers

Kernel Testing: Tool and Techniques. Matt Porter Texas Instruments 21 February 2013

RS232/DB9 An RS232 to TTL Level Converter

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Adding WiFi to Your Embedded System. WPG Americas & Gainspan Titus Wandinger (WPG) & Su Li (Gainspan) April 23, 2013

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

VTech R&D Design Support Capability

Pen Drive to Pen Drive and Mobile Data Transfer Using ARM

Project Number: P13037 NTID NOTIFICATION ALERT SYSTEM PHASE IV. Jared Lytle Electrical Engineering

Sponsored by: Speaker: Brian Madden, Independent Industry Analyst and Blogger

MeshBee Open Source ZigBee RF Module CookBook

Universal EXTension connector (UEXT)

Sensors and Cellphones

How to avoid Layout and Assembly got chas with advanced packages

DVD-111C Advanced Hand Soldering Techniques

PCB Design. Gabe A. Cohn. May Using Altium Designer/DXP/Protel. Electrical Engineering University of Washington

The design and implementation of the environment monitoring system of smart home based on EnOcean technology

UGLYDATV 0.1 by F5OEO Evariste

Credit Card Fraud The Contactless Generation Kristin Paget

Barcodes and the Small Business Manufacturer

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Application Note: PCB Design By: Wei-Lung Ho

Wireless In-Ear Audio Monitor

Complete technology for mesh networks Smarter Wireless. Simply. Technical Guide.

IRON-HID: Create your own bad USB. Seunghun Han

Design of a Wireless Medical Monitoring System * Chavabathina Lavanya 1 G.Manikumar 2

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Designing VM2 Application Boards

Selection Criteria for ZigBee Development Kits

Using a Tablet with the AIM and VNA

Demystifying Wireless for Real-World Measurement Applications

1.Introduction. Introduction. Most of slides come from Semiconductor Manufacturing Technology by Michael Quirk and Julian Serda.

Hacking US Traffic Control Systems. Cesar CTO at IOActive Labs

APx4 Wireless System-on-Module 5/8/2013 1

Microcontrollers and Sensors. Scott Gilliland - zeroping@gmail

User Guide Reflow Toaster Oven Controller

Embedded Component Based Programming with DAVE 3

Data Transfer between Two USB Devices without using PC

Final Design Report 19 April Project Name: utouch

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

CYPRESS SEMICONDUCTOR CORPORATION Internal Correspondence. Frequently Asked Questions. Contents. TITLE: Cypress s WUSB-NX Solutions for HID NPI

ESP 8266: A BREAKTHROUGH IN WIRELESS SENSOR NETWORKS AND INTERNET OF THINGS

The Android Breathalyzer is not a professional Breathalyzer and should be used for Amusement Purposes Only. Drive Safely!

Wireless Technologies for Automation

SBC8600B Single Board Computer

ALL-AIO-2321P ZERO CLIENT

Transcription:

Build-your-own sniffer Michael Ossmann Great Scott Gadgets Mike Kershaw Kismet Wireless

Us Mike Kershaw Kismet & Kisbee creator

Us Michael Ossmann Creator of Ubertooth One Founder of Great Scott Gadgets

Why make your own? It's easy to sniff Ethernet It's easy to sniff Wi-Fi But what else is out there? Bluetooth... zigbee... nrf... DECT.. and dozens or hundreds of others Might contain useful data Might be a security risk for your company Might need to interface to devices Pure spite ("No-one can sniff this...")

Golden Age of HW Hacking This truly is the magic era Want to do 4-layer PCB prototypes using QFN radio chips? $50 or so for boards + stencil This is amazing Insanely cheap to prototype Tools are cheap too

Initial design checklist Can you get a radio that already does what you need? How technical is your target audience Will you be making more than a couple for yourself? What firmware do you need? What host code do you need? How will you integrate with existing tools? How will you fab and assemble them?

Can you get a radio? Some protocols (wifi, zigbee) have easyto-use transceiver Integrated Circuits (ICs) or modules. Some protocols do not have easy ways to monitor them (ie, Bluetooth) and you can't use an off-the-shelf radio module Some protocols have no commodity hardware at all and you have to decode everything!

SDR vs Dedicated radio Instead of an IC for a particular protocol, you could turn to Software Defined Radio (SDR). SDR is like using the sound card in a computer but with the speaker and microphone replaced by antennas (and about 1000 times faster). Digital Signal Processing (DSP) is used on raw radio waveforms in the digital domain.

SDR Receiver

SDR gets complicated

HackRF Design Goals Transceiver Operating frequencies from 100 MHz to 6 GHz 20 Million samples per second 8 bit resolution High Speed USB interface Bus powered Portable Open source hardware and software Low cost

SDR is great! For development For reverse engineering radio protocols For building radio systems without having to break out the soldering iron For implementing multiple protocols but there are drawbacks...

SDR is not so great The hardware is more expensive than a dedicated solution. DSP is complicated (both in development time and CPU utilization). It draws more power, making portable solutions difficult. In general, we recommend SDR for research and development but recommend dedicated hardware for deployment.

How technical is your audience Audience dictates complexity of device The more work you can do on your tools to make the device easy to use, the more people you'll be able to reach Decide what platforms you will give primary support to (Linux, OSX, Windows?) Each has challenges Don't sacrifice functionality for simplicity, however

How many are you making? Making 2 or 3? Use whatever you want! Just make sure you can solder it. Making 10-50? Make sure you can get what you need (check stocks), try to optimize for price. Realize you will soon hate building them. Making 100+? Time to start seriously looking at bulk price breaks, and designing with machine fab in mind

Picking a Microcontroller For low-bandwidth applications you have a lot of choices, power not a concern For SDR and high bandwidth, you need high speed processor, communication, USB2 or gbit ethernet support Look at support - libraries, existing code, toolchains, licensing Look at peripherals - what's built in to the chip already?

Microcontroller peripherals Peripherals = Features Pick chips based on what you need ADC - Analog to Digital PWM - Pulse Width Modulation, digital control of output GPIO - General Purpose IO. "Set pin 10 to 1, set pin 9 to 0" UART - Serial SPI, I2C - Inter-chip comms protocols

Pre-made tools Arduino - can talk to a lot of things and is useful to prototype, but expensive for production. Be careful of 3v/5v! Bus Pirate - lots of chip comms protocols GoodFET - lots of comms, easy to make A lot of radio components are surfacemount only Some require custom ($$) programmers Sometimes you can hack a programmer

$400 programmer, $0.50 wire

Firmware Look for communities around the chips you're considering Look for libraries which take care of a lot of the low level stuff Most firmware is in C now, with occasional assembler Some chips don't have open licensing on demo code, beware! Lots of common cores (like Arm)

Device to host Make sure your communications channel has enough bandwidth! Make sure your communications doesn't directly interfere with the spectrum you're monitoring USB2 is relatively easy to do at high rates of speed Another option is gbit ethernet with raw frames

Host code Needs to get data from device somehow Libusb allows raw usb xfer without having to write a driver, and relatively crossplatform Usb-Serial is handy, if you can use it. Bandwidth is definitely an issue for very high rate devices Tcpdump or similar to get packets from raw ethernet devices

Integrating with existing code Lots of existing code - lets leverage it! Wireshark (obviously) Tcpdump? Kismet? Scapy? Almost all tools expect to get packets, you just need to get your data to them

Wireshark There needs to be, or you need to get, a DLT linktype definition, to tell what kind of packets If it shows up as a netdev, Wireshark can read it. On Linux, we can fake this with tuntap If it writes a pcap file, Wireshark can read it. Writing pcap is easy! I've been thinking about ways to plug in non-netdev capture to Wireshark

Kismet Major rewrite almost complete to make Kismet handle any Phy type on equal footing Usable in SVN now! Plugins to make Kismet "anything wireless" not just Wi-Fi Inspired by Ubertooth, expanding to as many wireless protocols as possible Please, consider talking to me if you want to make a wireless sniffer!

Kismet Phy-N Plugging into Kismet gets you "free": GPS logging Signal logging XML logging Pcap Virtual netdev export to Wireshark Basic UI Minimal code needed to add new UI elements Just need a packet with a device identifier

Kismet Phy-Neutral UI

Portable devices Android 2.2+ can talk Bluetooth RFCOMM SPP, serial over Bluetooth. Minimal permissions Android Dev Kit, Arduino-like device acts as USB host. Low bandwidth. IOIO, like ADK, needs USB debug mode Android 3.1+ can talk USB as a host device! Control and bulk standard and interrupt IO

Problem devices we can't use iphone is a locked platform Want to talk serial? Requires licensed auth chip hardware Want to talk bluetooth? Requires... licensed auth chip hardware Rooted i-device could do it, but I don't have one. Anyone want to write an iphone zigbee sniffer?

Sniffer projects Kisbee Ubertooth

Kisbee Talks 802.15.4 SCADA, sensor grids, smart grid, etc Portable sniffer Talks USB & Bluetooth Able to use highpower antennas

802.15.4/Zigbee Low-bandwidth (max packet size 127 bytes, including framing) Multiple topologies for sensor networks (star, mesh, etc) Used in home automation, industrial monitoring, smartgrid, etc Shares spectrum with Wi-Fi, Bluetooth, etc, but not otherwise detectable

Kisbee Goals Different design goals lead to different decisions Kisbee designed to be: Low power consumption (battery powered) Low host device CPU power (works with phones) Hand-assemble-able (original designs entirely for manual assembly) Consistent platform for Kismet/Zigbee/etc dev

Not revolutionary, but useful Kisbee isn't a giant revolution in zigbee devices... Travis Goodspeed doing portable zigbee stuff (but non-reproducible) Multiple USB zigbee interfaces, but often with wacky firmware (Raven + KillerBee) But.. Kisbee designed as a portable, robust platform, open hardware, open software

Version 0

Version 0 Started in Feb 2012 CC2420 zigbee radio CC2591 2.4ghz amplifier MSP430 microcontroller FTDI TTL to USB serial adapter Hard to hand assemble (0402 and QFN) Expensive components - MSP is $15, FTDI is $5

Version 1

Version 1 Started in March Much simpler to assemble radio module Board is 2 layers instead of 4 Still uses expensive MSP and FTDI Radio module is expensive Didn't work - dramatically. Issues in power circuit caused lots of problems. Physical layout wasn't very good.

Version 2

Version 2 Final design in April Switch from MSP430 to LPC1343 ARM Integrates flashing, USB, etc in one chip, which costs $4.50! Revised layout Everything works! Some quirks here and there in design but generally pleased, making 50, & more to come!

Dedicated radio Kisbee uses a discrete 802.15.4 radio Acts similar to a Wi-Fi card in monitor mode Signal decoding in hardware on the radio chip Provides decoded packets, NOT raw waveform samples

Talking to the radio The MRF radio talks SPI, a common protocol The commands are well-documented by Microchip, fortunately! It includes a monitor/promiscuous mode Packets reported via SPI The vast majority of things you'll encounter making boards will talk SPI

SPI Clocked serial protocol (which means it's easy! No syncing!) Set data high (or low) Raise clock Read incoming data line Lower clock Most microcontrollers have SPI built in as a peripheral function, acts like writing to a serial port

LPC1343 Flashable over USB (presents as a mass storage disk!), no custom programmer! Built-in USB (no $5 FTDI serial chip) Can do bulk transfer USB as well Nice support libraries SPI, UART peripherals Very cheap! $4 in small quantities Plenty of GPIO pins

Talking to the PC (or phone) LPC1343 can communicate via USB directly CDC-ACM serial driver Implemented an extended version of the Serialdev protocol (simple serial protocol for talking to Zigbee devices) Bluetooth is done over RFCOMM SPP, bluetooth serial port

Firmware Microbuilder.de has a LPC1343 firmware library Makes most things VERY easy Core firmware to get packets took 2 days or so to create Custom firmware is only about 1000 lines of C, including full MRF radio interface

Kisbee Android app

Android mapping

More android mapping

Ubertooth One

Sniffing Bluetooth is hard Off-the-shelf Bluetooth adapters are not capable of monitor mode. The ICs aren't capable of monitor mode either. Commercial Bluetooth sniffer costs $30k. I developed some SDR solutions with Dominic Spill (ShmooCon 2009), but I wanted something lower cost that everyone can use.

Frequency Hopping Spread Spectrum

Whitening (scrambling)

Searching for packets

The middle road Dedicated ICs were not available. SDR solutions were complicated and expensive. However, some transceiver ICs support Bluetooth's modulation (1 Mbps GFSK) even though they don't support the Bluetooth packet format. And some of them provide a way to bypass the on-chip packet handling!

Ubertooth One design

Designing How do you actually start these things?

Making the design Create the schematic (logical connections between components) Route the PCB (physical connections between components, linked to the schematic) Generate Gerber files (standard CAD file format used to make PCBs) Send it off to get made!

CAD / EDA Dozens of CAD/EDA layout programs out there We use Kicad - GPL, 100% free, no license encumberances Eagle has free version, but size, layer limited, and cannot be used for sale Plenty of very fancy, but very expensive, commercial CAD (Orcad, Altium, etc)

10 seconds on Kicad Very capable OSS - with all the implications of that, good and bad Sometimes UI is... quirky. Tutorials are getting better LEARN THE KEYBOARD SHORTCUTS. There's a lot of things you can't do without them! Footprint library slowly growing

Types of components PTH - Plated through hole, big wires through holes. For radios, these won't be an option. Passive (resistor, capacitor, etc) Integrated Circuit (IC) Common sizes 0805, 0603, 0402 0.08 x 0.05 inches, 0.06x0.03, etc Vast rainbow of packaging types TSSOP, SOT, PFQ, QFN... May have no choice, may be able to pick what types you use

0603 passives

QFP Many different pin counts Common Not as hard to solder as you'd fear

QFN Many radio chips are QFN only No leads - solder attaches to bottom Simple ones can be done with hot air Usually have to be done with reflow

Quick design tips Look for app notes with example circuits Try to stay to 2-layer for prototypes Design in cut-outs to let you build and test in stages Avoid doing RF paths if you can Look for OSS projects using your MCU or radios Find someone to beg for help

PCB Fab You can make your own boards at home, sort of. Single layer is easy. Dual layer is a lot harder. 4 layer is right out. Precision is vital for many rf chips. Prototype quantity fabrication is cheap now! The trade off is time - all the inexpensive prototype has a several week turnaround

Prototype fabs Laen's OSH Park (formerly Dorkbot PDX) batch fab. This is our favorite - great price, quality, and customer service! And the fab is in the US! BatchPCB - Run by the Sparkfun folks, uses Gold Phoenix Others, but these are really good For larger prototype runs, talk to Laen, or send to Gold Phoenix

Soldering! Who has tried to solder something? How'd it go? End up with a big blob of solder that won't go where you want and everything bridged? Soldering is about 5% skill, 5% experience, and 90% equipment and supplies Fortunately, it's pretty cheap! $200 will get you everything you'll need

SMT Soldering PTH soldering applies flux and solder to the component SMT soldering, apply flux to the board and component, and bring solder to it Flux keeps the solder from balling up and sticking Lots of tutorial videos on Sparkfun and Youtube, better taught by video

The iron Did you buy it from Radioshack? Get rid of it. Unless you do wood burning. You NEED temp control! Hakko, Weller both good brands I like the Hakko FX-951 The Hakko FX-888 is $80 and fine too

The tips Conical tips are usable but not really want you want, the solder will rarely go where you need Chisel tip is the most useful general tip Bevel tip is fantastic for ICs

Flux Remember how the solder balled up and wouldn't flow onto pins? All the flux was burned off Flux makes solder runny and want to stick to metal Get no-clean and non-corrosive fluxes or you will be sorry! Chipquick paste flux (again from Amazon)

Solder I've had good luck with almost any solder, including generic radio shack solder Leaded is easier to work with but nonleaded is safer Don't use acid-core plumbing solder! Get as thin a solder as you can

Hot air Sooner or later you need to remove an IC Can't do it with an iron Hot air guns are cheap ($80!) Not vital, but definitely useful

Hot air for less Pick up an embossing tool for $20 at your local craft store

Reflow soldering Uses solder paste Applied through a stencil to the board Place components with tweezers or vacuum tool Heat entire board on a hotplate or in a toaster oven Only way to do some things like QFN Surface tension helps auto-align components!

Soldering tricks When in doubt, FLUX IT When trying to remove a component, add more solder - it'll come off easier Desoldering braid needs to be pulled apart a little to be more effective When you have flux on the board, you can stop worrying about the flux burning off on your iron Almost anything can be fixed w/ hot air, desoldering, etc

Reflow tricks Set your paste layer apertures to about 88% of the pad size Leaded paste melts quicker, lead-free is safer/better Apparently you can't do it when it's 100% humidity or the chips pop off the board like popcorn :( Skillet works as well as a toaster oven

Picture time! It's photo time!

Stencil - laser cut from kapton

Applying paste

Pasted - a little thick

Components placed

Reflowed (with problems)

Batch + Electric skillet

Batch reflowing

Smooth reflow

Corrosive flux

Hakko bevel tip

Simple boards are cheap too!

Hot air the middle of a board

"Dead-Bug"ing a chip

Fixing your design It's not going to go right the first time You can do a lot of fixes to make it work before you order the second design Sometimes, things just go a little wrong making the boards and you have to kluge a fix, too Fly-wires, drilling out traces, etc

Fly-wire

Cut trace & hack resistor

More fly-wires

More emergency wiring

Handymans helper: Power drill

Get your own! We have Kisbee units with us, come find us after Get an Ubertooth at Great Scott Gadgets Support your local hackers!

Great Scott Gadgets http://greatscottgadgets.com/

Build a Throwing Star LAN Tap Be sure to grab a business card!

Q&A Ask away