RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command...

19
RF Fun with ESP8266 Devices and Software Defined Radio… Is that a dongle in your pocket or are you just happy to….. Jeff Murri KK4ETK Independent Security Researcher [email protected] Twittertubes: @infosec208

Transcript of RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command...

Page 1: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

RF Fun with ESP8266 Devices

and Software Defined Radio…Is that a dongle in your pocket or are you just happy to…..

Jeff Murri KK4ETK

Independent Security Researcher

[email protected]

Twittertubes: @infosec208

Page 2: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Standard Disclaimer…

In no way, shape or form am I speaking for any

previous or current employer.

You’re on your own to make sure that you are

adhering to applicable laws when it comes to the

topics of our friendly chat today.

You can very easily make a WIFI Deauther, WIFI

Jammer and do evil with your ESP8266 board. If

you do then you’re on your own.

Don’t Forget to Be Awesome (DFTBA)!!

Page 3: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Let’s chat about some hardware…

• Software Defined Radio (SDR)

• ESP8266 and ESP32 chips

• If we have time - ESPXX chips

and CAN Bus for tweaking

your ride…

• Will have a SDR workshop this

afternoon if you want…

• Ask questions as they come up!

Let’s keep this interactive.

Page 4: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio - Hardware• RTL-SDR aka the $20.00 SDR

▫ www.rtl-sdr.com is definitive source for info.

▫ I recommend the NooElec RTL2832U dongle.

▫ Don’t forget to get the appropriate antenna adapter for whatever dongle you get!

▫ All the information you need as far as purchasing hardware is at:www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/

▫ Another source of RTL-SDR info is rtlsdr.org, and of course The Google.

Gateway Drug for SDR

Page 5: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio – Other HardwareCool thing is more and more have transmit capabilities….

• SDRPlay RSP2 $169.99 (this is my daily driver for SDR) 1 kHz to 2GHz with up to 10MHz viewable in the SDR app More information at hackrf.nooelec.com

• LimeSDR Mini $139.00 plus accessories (open source) 10 MHz to 3.5 GHz with some transmit capabilities! More information at https://myriadrf.org/projects/limesdr/

• HackRF One $299.00 plus accessories (open source) MHz to 6GHz with some transmit capabilities! More information at hackrf.nooelec.com

• USRP (Big Bucks) 70MHz to 6GHz with huge bandwidth More information at www.ettus.com

Page 6: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio - Applications• Windows

▫ SDR# at www.sdrsharp.com

Has a crap ton of plug-ins. Used to be open source. Now

closed source, but it has a great plug-in API.

▫ HDSDR at www.hdsdr.de

Some people prefer the HDSDR interface. It also has hooks to

some amateur radio transmission apps. Ability to record and

scheduling a recording makes some people happy.

▫ SDR-Radio at www.sdr-radio.com

Can be overwhelming at first, but has a ton of functionality.

Try HDSDR first then SDR# and see which one you prefer…

Page 7: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio – Demo on Windows

• When using the RTL-SDR Dongle in Windows you need to first run an app called Zadig to tell Windows that the dongle isn’t a TV Tuner (it’s intended function originally), but instead it’s a generic WinUSB device that can feed data to an SDR application.

• Note: Be careful here. If you aren’t paying attention you can replace the driver for your mouse and/or keyboard.

• With Linux I haven’t had a problem with the dongle being recognized as an SDR device but YMMV.

An excellent resource for software setup is:www.rtl-sdr.com/rtl-sdr-quick-start-guide/

Windows Demo

Page 8: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio - Applications

• Linux and Mac▫ GNU Radio

Is a beast, but gets you closest to the hardware.

More information at gnuradio.org

Supports pretty much everything, but has a steep learning curve.

Michael Ossmann’s superb SDR tutorials start with GNU Radio and are highly recommended at greatscottgadgets.com/sdr/

Balint has a great set of tutorials at files.ettus.com/tutorials/

Page 9: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Software Defined Radio - Applications

• Linux and Mac▫ The raw RTL-SDR software

Command line tools and the OSMOCOM guys are also behind all the great RTL-SDR stuff that we know and love today. HUGE props to them. More info can be found at: sdr.osmocom.org/trac/wiki/rtl-sdr Hak5 has a great set of vids at hak5.org/tag/rtl-sdr particularly Episode 1703 for RTL-SDR.

▫ GQRX Recommended software for Linux/Mac. Runs on top

of GNU-Radio. Info at gqrx.dk

Page 10: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Let’s Switch Gears and Talk About

Some ESP8266 Fun and That Dang Cool

Badge You have.

Page 11: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

• ESP8266 boards come in many variants.

• Everything from external antenna connectors to more onboard nvram, etc.

• Latest ESP8266 is ESP-12E

• Oh, we’ll talk about the ESP32 modules at the end...

Page 12: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

The Original ESP8266 Module

• This is the raw board – the

chip itself and 4MB of FLASH.

• Can crater the board by

plugging it directly to USB

(which is 5 volts).

• 3V tolerant

• Price: $1.00-$2.00

Page 13: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

ESP8266 Node MCU module

• We ARE using this today

• Can be programmed by itself

via USB!

• Chip is only 3.3 volt tolerant,

but the board has a 5 volt to

3.3 volt level converter.

• Board Price: $3.00-$11.00

Note you get what you pay for here....

Page 14: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

ESP8266 Specs

• 802.11 b/g/n protocol

• Wi-Fi Direct (P2P), soft-AP

• Integrated TCP/IP protocol stack

• Integrated TR switch, balun, LNA,

power amplifier and matching network

• Integrated PLL, regulators, and power

management units

• +19.5dBm output power in 802.11b

mode

• 512k up to 4MB of flash memory.

Page 15: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

ESP8266 GPIO/Pinouts

Page 16: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Programming....

• Lua

• Direct AT commands

• Visual Basic

• C++

• MQTT

• Micro Python

• Mongoose

• Grows every day….

Page 17: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

We’ll use C and Arduino

To begin, we’ll need to update the board manager with a custom URL.

Open up Arduino, then go to the Preferences (File> Preferences).

Towards the bottom of the window, type.copy this URL into the “Additional Board Manager URLs” text box:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

ht

Page 18: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol
Page 19: RF Fun with ESP8266 Devices and Software Defined · PDF fileThe raw RTL-SDR software Command line tools and the OSMOCOM guys are ... ESP8266 Node MCU module ... • 802.11 b/g/n protocol

Thank you Friends!

Questions?