SlideShare a Scribd company logo
Hacking and Forensics on the Go


        Philip A. Polstra, Sr.

              @ppolstra
          DrPhil@polstra.org
     http://ppolstra.blogspot.com
What is this talk about?
●   Hacking and/or forensics with small, low-
    power devices
●   ARM-based Beagleboard & Beaglebone
    running full suite of security/forensics tools
●   Porting tools to a new platform
●   USB forensics (now at high speed!!)
Why You Should Care
●   A full set of tools that can fit in a child's lunch
    box
●   A full-featured Linux install for flexibility
●   Low-power devices can run for days or weeks
    on battery power
●   Small devices can be planted for later retrieval
●   Did I mention high-speed USB?
Who is this handsome man anyway?
●   Professor and Hacker in Residence at a medium
    size (1800 student) private university in
    Dubuque, Iowa
        –   Programming from age 8
        –   Hacking hardware from age 12
        –   Also known to fly and build airplanes
Roadmap
●   Choosing a platform
●   Selecting a base OS
●   Building a base system
●   The easy part – leveraging repositories
●   The slightly harder part – building tools
●   Building your own accessories
●   Demonstrations
●   Future directions
Choosing a Platform
●   Small
●   Low-power
●   Affordable
●   Mature
●   Networking built in
●   Good USB support
●   Convenient input and output
And the Winning Platform is...
●   Beagleboard
       –   3.25” square
       –   <10 Watts
       –   $149
       –   Based on Cortex A8
       –   100 Mbs Ethernet built in
       –   4 high-speed USB plus USB-on-the-go
       –   DVI-D, S-video, and LCD output
       –   RS-232, webcam, audio, and microSD
Beagleboard
Selecting a Base OS
●   Angstrom comes in the box
        –   Optimized for hardware
        –   Nice package management
        –   Poor repository support for our purposes
●   Ubuntu is available
        –   Backtrack is based on Ubuntu
        –   Ubuntu is very popular
        –   Good repository and community support
Building a Base Device
●   Upgrade to 16GB or 32GB microSD (8GB
    would work, but go big)
●   Download an image for microSD card
        –   Canonical image or
        –   Robert C. Nelson demo images
        –   I used Nelson's because they are tweaked for
              Beagleboard and updated frequently
●   Good instructions available at
    http://elinux.org/BeagleBoardUbuntu
The Easy Part – Using Repositories
●   Many of the tools we want are available in the
    standard Ubuntu repositories
●   Some are also available as .deb files
        –   Packages written in interpreted languages
              (Java, Python, PERL, Ruby) usually work out
              of the box
        –   C-based packages depend on libraries that may
             or may not be available/installed
The Harder Part – Building Your
              Own Tools
●   Native or cross-compile?
●   Native
        –   Straightforward
        –   Can be slow on 1GHz ARM with 512 MB
             RAM
●   Cross-compile
        –   A bit more complicated
        –   Take advantage of multi-core desktop with
             plenty of RAM
Native Compilation
●   “Sudo apt-get install build-essential” is about
    all you need to be on your way
●   Something to keep in mind if you SSH in and
    use DHCP: Ethernet is via USB chipset and
    MAC address varies from one boot to next
    which leads to different address being assigned
Cross-Compile Method 1
●   Download a toolchain “wget http://angstrom-
    distribution.org/toolchains/angstrom-<ver>-armv7a...”
●   Untar toolchain “tar -xf angstrom-<ver>-armv7a-linux-gnueabi-
    toolchain.tar.bz2 -C”
●   Setup build environment “. /usr/local/angstrom/arm/environment-setup”
●   Download source
●   Configure with “./configure --host=arm-angstrom-linux-gnueabi –
    prefix=/home/...”
●   Build with “make && sudo make install”
●   Copy binaries to BB-xM
●   Could have problems if there is a kernel mismatch between setup and what
    is installed to BB-xM
Cross-Compile Method 2
●   Install a toolchain as in Method 1
●   Install Eclipse
●   Install C/C++ Development Tools in Eclipse
●   Download software
●   Use makefile to create Eclipse project
●   Create a Build Configuration in Eclipse
●   Compile
●   Move binaries to BB-xM
Create a Project from the Makefile
●   Can have a makefile based project
        –   Simple
        –   Requires slight modification of makefile
●   Can use makefile to create Eclipse project
        –   Slightly more involved
        –   Dependencies and special compile flags can be
             divined from makefile
        –   More flexible if you want to make
             modifications
Create a Build Configuration
●   Right-click project in Project Explorer select
    Build Configurations-Manage
●   Click New to create new configuration
●   Set the paths to point to cross-compilation tools
    for installed toolchain
        –   Set compiler, linker, and assembler commands
        –   Set include and library paths
        –   Good tutorial on http://lvr.com
Cross-Compile Method 3
●   Same as Method 2, but with the addition of
    remote debugging
●   Has advantage of easy transfer of binaries
●   In Eclipse under Mobile Development add
        –   C/C++ DSF GDB Debugger Integration
        –   C/C++ Remote Launch
        –   Remote System Explorer End-User Runtime
        –   Remote System Explorer User Actions
Cross-Compile Method 3 (contd.)
●   Create /etc/hosts entry for BB-xM IP
●   On BB-xM install SSH & GDBServer
        –   “sudo apt-get install ssh”
        –   “sudo apt-get install gdbserver”
●   Manually SSH to BB-xM to make sure it works
    and to set up key cache
●   In Eclipse create a connection
●   Create .gdbinit file
●   Create debug configuration
Create a Connection
●   Open Remote System Explorer view
●   Select Connection->New->Linux
●   Use BB-xM IP with options ssh.files,
    processes.shell.Linux, ssh.shells, and
    ssh.terminals
●   After creating connection enter IP, user, and
    password under properties
Create .gdbinit
●   Change to the directory with your source code
●   “touch .gdbinit”
●   Go forth and have fun
Create Debug Configuration
●   Run->Debug Configurations->C/C++ Remote
    Configurations
●   Main tab – set configuration
●   Set remove absolute path
●   Commands to execute before “chmod 777”
●   Set path to GDB debugger
●   Set the GDB port to an appropriate value
Building Your Own Hardware
         Accessories
This is What I call Portable
Yes, it all fits in the lunchbox!
Two Complete Systems
Demo 1 - Hardware
Demo 1 - Hardware
Demo 1 – Warmup
Demo 1 (contd.)
Demo 1 (contd.)
Demo 2 – Wifi Cracking
Demo 2 (contd.)
Demo 2 (contd.)
Demo 3 – Password Cracking
Demo 4 – WPS Cracking
Demo 4 (contd.)
Demo 5 – Pwn Win7 Like Its a Mac
Demo 5 (contd.)
tm
Demo 6 – Clickiddies
WTF – I thought you said there would be
          forensics in this talk!
USB Forensics – Now at High
              Speed!!
●   Use a magical USB hub
        –   Everything connected to magic hub
             automatically mounted read only
        –   Everything not connected to the magic hub is
             mounted normally (probably with a prompt,
             etc.)
●   Initially wanted to dive in and hack USB
    drivers
        –   But there is a better way! ...
Enter Udev Rules
●   Udev rules allow you to handle what happens
    when devices are connected, disconnected, etc.
●   Every block device connected downstream of
    magic hub (parent with appropriate VID/PID)
    is automatically mounted read only
●   Suitable for hard disks and ANYTHING that
    can be mounted via USB
Udev Rules Realized
●   In /etc/udev/rules.d/10-protectedmt.rules
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd?[1-9]",
ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101",
ENV{PHIL_MOUNT}="1", ENV{PHIL_DEV}="%k",
RUN+="/etc/udev/scripts/test.sh %k"
ACTION=="remove", SUBSYSTEM=="block", KERNEL=="sd?[1-9]",
ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101",
ENV{PHIL_UNMOUNT}="1", RUN+="/etc/udev/scripts/test3.sh %k"

ENV{PHIL_MOUNT}=="1", ENV{UDISKS_PRESENTATION_HIDE}="1",
ENV{UDISKS_AUTOMOUNT_HINT}="never",
RUN+="/etc/udev/scripts/test2.sh"
ENV{PHIL_MOUNT}!="1", ENV{UDISKS_PRESENTATION_HIDE}="0",
ENV{UDISKS_AUTOMOUNT_HINT}="always"

ENV{PHIL_UNMOUNT}=="1", RUN+="/etc/udev/scripts/test4.sh"
Udev Rules Scripts
●   /etc/udev/scripts/test.sh
#!/bin/bash
echo "#!/bin/bash" > /etc/udev/scripts/test2.sh
echo "mkdir /media/$1" >> /etc/udev/scripts/test2.sh
echo "chmod 777 /media/$1" >> /etc/udev/scripts/test2.sh
echo "/bin/mount /dev/$1 -o ro,noatime /media/$1" >> /etc/udev/scripts/test2.sh
chmod +x /etc/udev/scripts/test2.sh
Udev Rules Scripts (contd.)
●   /etc/udev/scripts/test3.sh
    #!/bin/bash
    echo "#!/bin/bash" > /etc/udev/scripts/test4.sh
    echo "/bin/umount /dev/$1" >> /etc/udev/scripts/test4.sh
    echo "rmdir /media/$1" >> /etc/udev/scripts/test4.sh
    chmod +x /etc/udev/scripts/test4.sh
Future Directions
●   Continue to add useful packages as need arises
●   Optimize some packages for BB-xM
●   Other output devices
●   Custom printed case now available
●   Associate with a standard pentest distro
●   Port to another platform
●   Full on weaponization (aviation twist?)
Speaking of Custom Cases
Questions?

https://specialcomp.com/beagleboard/thedeck.htm
                    See me after
             E-mail DrPhil@polstra.org
            http://ppolstra.blogspot.com
    (couple preloaded microSD cards available)

More Related Content

PDF
Cyberhijacking Airplanes Truth or Fiction
Philip Polstra
 
ODP
Thotcon2013
Philip Polstra
 
ODP
Philip polstra
Philip Polstra
 
PDF
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Raul Chong
 
PDF
Polstra 44con2012
Philip Polstra
 
PDF
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Anne Nicolas
 
PPTX
Beagle bone black by Boddukuri venkata saiteja
Sai Charan
 
PPT
Linux Audio Drivers. ALSA
GlobalLogic Ukraine
 
Cyberhijacking Airplanes Truth or Fiction
Philip Polstra
 
Thotcon2013
Philip Polstra
 
Philip polstra
Philip Polstra
 
Rapidly developing IoT (Internet of Things) applications - Part 2: Arduino, B...
Raul Chong
 
Polstra 44con2012
Philip Polstra
 
Kernel Recipes 2017 - HDMI CEC: Status Report - Hans Verkuil
Anne Nicolas
 
Beagle bone black by Boddukuri venkata saiteja
Sai Charan
 
Linux Audio Drivers. ALSA
GlobalLogic Ukraine
 

What's hot (20)

PDF
Emx Dev Boards - EmxARM9A03 - Overview
Emertxe Information Technologies Pvt Ltd
 
PDF
BAD USB 2.0
Pradhap M
 
ODP
Debian & the BeagleBone Black
Raju Vindane
 
PDF
Getting started with BeagleBone Black - Embedded Linux
Emertxe Information Technologies Pvt Ltd
 
PDF
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
Ian Kluft
 
PDF
Linux Conference Australia 2018 : Device Tree, past, present, future
Neil Armstrong
 
PDF
Internet of things - with routers
Tavish Naruka
 
PDF
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Anne Nicolas
 
PDF
BeagleBone Black Using Python
Sai Viswanath
 
PDF
BadUSB, and what you should do about it
robertfisk
 
KEY
Internet of Things
Andy Gelme
 
PDF
BeagleBone Workshop
Chirag Nagpal
 
PPTX
Introduction To The Beagleboard
NeHal VeRma
 
PDF
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
linuxlab_conf
 
ODP
Raspberry Pi and Amateur Radio
Kevin Hooke
 
PDF
Uboot startup sequence
Houcheng Lin
 
PPTX
Redteaming HID attacks
Juan Espin
 
PDF
Jagan Teki - U-boot from scratch
linuxlab_conf
 
PDF
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Anne Nicolas
 
PDF
ELC North America 2021 Introduction to pin muxing and gpio control under linux
Neil Armstrong
 
Emx Dev Boards - EmxARM9A03 - Overview
Emertxe Information Technologies Pvt Ltd
 
BAD USB 2.0
Pradhap M
 
Debian & the BeagleBone Black
Raju Vindane
 
Getting started with BeagleBone Black - Embedded Linux
Emertxe Information Technologies Pvt Ltd
 
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
Ian Kluft
 
Linux Conference Australia 2018 : Device Tree, past, present, future
Neil Armstrong
 
Internet of things - with routers
Tavish Naruka
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Anne Nicolas
 
BeagleBone Black Using Python
Sai Viswanath
 
BadUSB, and what you should do about it
robertfisk
 
Internet of Things
Andy Gelme
 
BeagleBone Workshop
Chirag Nagpal
 
Introduction To The Beagleboard
NeHal VeRma
 
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
linuxlab_conf
 
Raspberry Pi and Amateur Radio
Kevin Hooke
 
Uboot startup sequence
Houcheng Lin
 
Redteaming HID attacks
Juan Espin
 
Jagan Teki - U-boot from scratch
linuxlab_conf
 
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Anne Nicolas
 
ELC North America 2021 Introduction to pin muxing and gpio control under linux
Neil Armstrong
 
Ad

Viewers also liked (20)

PDF
Am I being spied on: Low-tech ways of detecting high-tech surveillance (DEFCO...
Philip Polstra
 
PPTX
The Watershed-based Social Events Detection Method with Support from External...
MediaEval2012
 
PPT
Violence Detection in Video by Large Scale Multi-Scale Local Binary Pattern D...
MediaEval2012
 
PPSX
QMUL @ MediaEval 2012: Social Event Detection in Collaborative Photo Collections
MediaEval2012
 
PDF
Simha_RP
Prithvi Simha
 
PPTX
Brave New Task: Musiclef Multimodal Music Tagging
MediaEval2012
 
PDF
How INRIA identifies Geographic Location of a Video
MediaEval2012
 
PDF
DCU Search Runs at MediaEval 2012: Search and Hyperlinking Task
MediaEval2012
 
PPTX
Mentor Strategy Session: Business Plan and Video
Grow America
 
PPT
Secrets of Storytelling by Candace Klein
Grow America
 
PDF
Simha_23_REFFIT_Biochar_ICT_Published Version
Prithvi Simha
 
PDF
John Richards: My Life Lessons As An Entrepreneur
Grow America
 
PDF
MediaEval 2012 Opening
MediaEval2012
 
PPTX
Idea or opportunity?
Grow America
 
PPT
The MediaEval 2012 Affect Task: Violent Scenes Detectio
MediaEval2012
 
PDF
Telefonica Research System for the Spoken Web Search task at Mediaeval 2012
MediaEval2012
 
PPTX
Event Detection via LDA for the MediaEval2012 SED Task
MediaEval2012
 
PPT
CERTH @ MediaEval 2012 Social Event Detection Task
MediaEval2012
 
PPTX
The JHU-HLTCOE Spoken Web Search System for MediaEval 2012
MediaEval2012
 
PDF
LIG at MediaEval 2012 affect task: use of a generic method
MediaEval2012
 
Am I being spied on: Low-tech ways of detecting high-tech surveillance (DEFCO...
Philip Polstra
 
The Watershed-based Social Events Detection Method with Support from External...
MediaEval2012
 
Violence Detection in Video by Large Scale Multi-Scale Local Binary Pattern D...
MediaEval2012
 
QMUL @ MediaEval 2012: Social Event Detection in Collaborative Photo Collections
MediaEval2012
 
Simha_RP
Prithvi Simha
 
Brave New Task: Musiclef Multimodal Music Tagging
MediaEval2012
 
How INRIA identifies Geographic Location of a Video
MediaEval2012
 
DCU Search Runs at MediaEval 2012: Search and Hyperlinking Task
MediaEval2012
 
Mentor Strategy Session: Business Plan and Video
Grow America
 
Secrets of Storytelling by Candace Klein
Grow America
 
Simha_23_REFFIT_Biochar_ICT_Published Version
Prithvi Simha
 
John Richards: My Life Lessons As An Entrepreneur
Grow America
 
MediaEval 2012 Opening
MediaEval2012
 
Idea or opportunity?
Grow America
 
The MediaEval 2012 Affect Task: Violent Scenes Detectio
MediaEval2012
 
Telefonica Research System for the Spoken Web Search task at Mediaeval 2012
MediaEval2012
 
Event Detection via LDA for the MediaEval2012 SED Task
MediaEval2012
 
CERTH @ MediaEval 2012 Social Event Detection Task
MediaEval2012
 
The JHU-HLTCOE Spoken Web Search System for MediaEval 2012
MediaEval2012
 
LIG at MediaEval 2012 affect task: use of a generic method
MediaEval2012
 
Ad

Similar to The Deck by Phil Polstra GrrCON2012 (20)

PDF
Hacking and Forensics on the Go - 44CON 2012
44CON
 
PDF
Android for Embedded Linux Developers
Opersys inc.
 
PDF
Strategies for developing and deploying your embedded applications and images
Mender.io
 
PDF
Embedded Linux Systems Basics
Max Henery
 
PDF
Self 2013
krispcbsd
 
PDF
Texas 2013
krispcbsd
 
PDF
BSDCan2013
krispcbsd
 
PDF
Ilf2013
krispcbsd
 
PDF
Scale2013
krispcbsd
 
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
PDF
Cobbler, Func and Puppet: Tools for Large Scale Environments
Michael Zhang
 
PDF
Cobbler, Func and Puppet: Tools for Large Scale Environments
ViSenze - Artificial Intelligence for the Visual Web
 
PDF
Asiabsdcon2013
krispcbsd
 
ODP
Grub and dracut ii
plarsen67
 
PDF
MIPS-X
Zoltan Balazs
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
PDF
eurobsd2013
krispcbsd
 
PDF
An Introduction To Linux
Ishan A B Ambanwela
 
Hacking and Forensics on the Go - 44CON 2012
44CON
 
Android for Embedded Linux Developers
Opersys inc.
 
Strategies for developing and deploying your embedded applications and images
Mender.io
 
Embedded Linux Systems Basics
Max Henery
 
Self 2013
krispcbsd
 
Texas 2013
krispcbsd
 
BSDCan2013
krispcbsd
 
Ilf2013
krispcbsd
 
Scale2013
krispcbsd
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
dotCloud
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Michael Zhang
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
ViSenze - Artificial Intelligence for the Visual Web
 
Asiabsdcon2013
krispcbsd
 
Grub and dracut ii
plarsen67
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
eurobsd2013
krispcbsd
 
An Introduction To Linux
Ishan A B Ambanwela
 

Recently uploaded (20)

PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Doc9.....................................
SofiaCollazos
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
The Future of Artificial Intelligence (AI)
Mukul
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 

The Deck by Phil Polstra GrrCON2012

  • 1. Hacking and Forensics on the Go Philip A. Polstra, Sr. @ppolstra [email protected] http://ppolstra.blogspot.com
  • 2. What is this talk about? ● Hacking and/or forensics with small, low- power devices ● ARM-based Beagleboard & Beaglebone running full suite of security/forensics tools ● Porting tools to a new platform ● USB forensics (now at high speed!!)
  • 3. Why You Should Care ● A full set of tools that can fit in a child's lunch box ● A full-featured Linux install for flexibility ● Low-power devices can run for days or weeks on battery power ● Small devices can be planted for later retrieval ● Did I mention high-speed USB?
  • 4. Who is this handsome man anyway? ● Professor and Hacker in Residence at a medium size (1800 student) private university in Dubuque, Iowa – Programming from age 8 – Hacking hardware from age 12 – Also known to fly and build airplanes
  • 5. Roadmap ● Choosing a platform ● Selecting a base OS ● Building a base system ● The easy part – leveraging repositories ● The slightly harder part – building tools ● Building your own accessories ● Demonstrations ● Future directions
  • 6. Choosing a Platform ● Small ● Low-power ● Affordable ● Mature ● Networking built in ● Good USB support ● Convenient input and output
  • 7. And the Winning Platform is... ● Beagleboard – 3.25” square – <10 Watts – $149 – Based on Cortex A8 – 100 Mbs Ethernet built in – 4 high-speed USB plus USB-on-the-go – DVI-D, S-video, and LCD output – RS-232, webcam, audio, and microSD
  • 9. Selecting a Base OS ● Angstrom comes in the box – Optimized for hardware – Nice package management – Poor repository support for our purposes ● Ubuntu is available – Backtrack is based on Ubuntu – Ubuntu is very popular – Good repository and community support
  • 10. Building a Base Device ● Upgrade to 16GB or 32GB microSD (8GB would work, but go big) ● Download an image for microSD card – Canonical image or – Robert C. Nelson demo images – I used Nelson's because they are tweaked for Beagleboard and updated frequently ● Good instructions available at http://elinux.org/BeagleBoardUbuntu
  • 11. The Easy Part – Using Repositories ● Many of the tools we want are available in the standard Ubuntu repositories ● Some are also available as .deb files – Packages written in interpreted languages (Java, Python, PERL, Ruby) usually work out of the box – C-based packages depend on libraries that may or may not be available/installed
  • 12. The Harder Part – Building Your Own Tools ● Native or cross-compile? ● Native – Straightforward – Can be slow on 1GHz ARM with 512 MB RAM ● Cross-compile – A bit more complicated – Take advantage of multi-core desktop with plenty of RAM
  • 13. Native Compilation ● “Sudo apt-get install build-essential” is about all you need to be on your way ● Something to keep in mind if you SSH in and use DHCP: Ethernet is via USB chipset and MAC address varies from one boot to next which leads to different address being assigned
  • 14. Cross-Compile Method 1 ● Download a toolchain “wget http://angstrom- distribution.org/toolchains/angstrom-<ver>-armv7a...” ● Untar toolchain “tar -xf angstrom-<ver>-armv7a-linux-gnueabi- toolchain.tar.bz2 -C” ● Setup build environment “. /usr/local/angstrom/arm/environment-setup” ● Download source ● Configure with “./configure --host=arm-angstrom-linux-gnueabi – prefix=/home/...” ● Build with “make && sudo make install” ● Copy binaries to BB-xM ● Could have problems if there is a kernel mismatch between setup and what is installed to BB-xM
  • 15. Cross-Compile Method 2 ● Install a toolchain as in Method 1 ● Install Eclipse ● Install C/C++ Development Tools in Eclipse ● Download software ● Use makefile to create Eclipse project ● Create a Build Configuration in Eclipse ● Compile ● Move binaries to BB-xM
  • 16. Create a Project from the Makefile ● Can have a makefile based project – Simple – Requires slight modification of makefile ● Can use makefile to create Eclipse project – Slightly more involved – Dependencies and special compile flags can be divined from makefile – More flexible if you want to make modifications
  • 17. Create a Build Configuration ● Right-click project in Project Explorer select Build Configurations-Manage ● Click New to create new configuration ● Set the paths to point to cross-compilation tools for installed toolchain – Set compiler, linker, and assembler commands – Set include and library paths – Good tutorial on http://lvr.com
  • 18. Cross-Compile Method 3 ● Same as Method 2, but with the addition of remote debugging ● Has advantage of easy transfer of binaries ● In Eclipse under Mobile Development add – C/C++ DSF GDB Debugger Integration – C/C++ Remote Launch – Remote System Explorer End-User Runtime – Remote System Explorer User Actions
  • 19. Cross-Compile Method 3 (contd.) ● Create /etc/hosts entry for BB-xM IP ● On BB-xM install SSH & GDBServer – “sudo apt-get install ssh” – “sudo apt-get install gdbserver” ● Manually SSH to BB-xM to make sure it works and to set up key cache ● In Eclipse create a connection ● Create .gdbinit file ● Create debug configuration
  • 20. Create a Connection ● Open Remote System Explorer view ● Select Connection->New->Linux ● Use BB-xM IP with options ssh.files, processes.shell.Linux, ssh.shells, and ssh.terminals ● After creating connection enter IP, user, and password under properties
  • 21. Create .gdbinit ● Change to the directory with your source code ● “touch .gdbinit” ● Go forth and have fun
  • 22. Create Debug Configuration ● Run->Debug Configurations->C/C++ Remote Configurations ● Main tab – set configuration ● Set remove absolute path ● Commands to execute before “chmod 777” ● Set path to GDB debugger ● Set the GDB port to an appropriate value
  • 23. Building Your Own Hardware Accessories
  • 24. This is What I call Portable
  • 25. Yes, it all fits in the lunchbox!
  • 27. Demo 1 - Hardware
  • 28. Demo 1 - Hardware
  • 29. Demo 1 – Warmup
  • 32. Demo 2 – Wifi Cracking
  • 35. Demo 3 – Password Cracking
  • 36. Demo 4 – WPS Cracking
  • 38. Demo 5 – Pwn Win7 Like Its a Mac
  • 40. tm Demo 6 – Clickiddies
  • 41. WTF – I thought you said there would be forensics in this talk!
  • 42. USB Forensics – Now at High Speed!! ● Use a magical USB hub – Everything connected to magic hub automatically mounted read only – Everything not connected to the magic hub is mounted normally (probably with a prompt, etc.) ● Initially wanted to dive in and hack USB drivers – But there is a better way! ...
  • 43. Enter Udev Rules ● Udev rules allow you to handle what happens when devices are connected, disconnected, etc. ● Every block device connected downstream of magic hub (parent with appropriate VID/PID) is automatically mounted read only ● Suitable for hard disks and ANYTHING that can be mounted via USB
  • 44. Udev Rules Realized ● In /etc/udev/rules.d/10-protectedmt.rules ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd?[1-9]", ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101", ENV{PHIL_MOUNT}="1", ENV{PHIL_DEV}="%k", RUN+="/etc/udev/scripts/test.sh %k" ACTION=="remove", SUBSYSTEM=="block", KERNEL=="sd?[1-9]", ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101", ENV{PHIL_UNMOUNT}="1", RUN+="/etc/udev/scripts/test3.sh %k" ENV{PHIL_MOUNT}=="1", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_AUTOMOUNT_HINT}="never", RUN+="/etc/udev/scripts/test2.sh" ENV{PHIL_MOUNT}!="1", ENV{UDISKS_PRESENTATION_HIDE}="0", ENV{UDISKS_AUTOMOUNT_HINT}="always" ENV{PHIL_UNMOUNT}=="1", RUN+="/etc/udev/scripts/test4.sh"
  • 45. Udev Rules Scripts ● /etc/udev/scripts/test.sh #!/bin/bash echo "#!/bin/bash" > /etc/udev/scripts/test2.sh echo "mkdir /media/$1" >> /etc/udev/scripts/test2.sh echo "chmod 777 /media/$1" >> /etc/udev/scripts/test2.sh echo "/bin/mount /dev/$1 -o ro,noatime /media/$1" >> /etc/udev/scripts/test2.sh chmod +x /etc/udev/scripts/test2.sh
  • 46. Udev Rules Scripts (contd.) ● /etc/udev/scripts/test3.sh #!/bin/bash echo "#!/bin/bash" > /etc/udev/scripts/test4.sh echo "/bin/umount /dev/$1" >> /etc/udev/scripts/test4.sh echo "rmdir /media/$1" >> /etc/udev/scripts/test4.sh chmod +x /etc/udev/scripts/test4.sh
  • 47. Future Directions ● Continue to add useful packages as need arises ● Optimize some packages for BB-xM ● Other output devices ● Custom printed case now available ● Associate with a standard pentest distro ● Port to another platform ● Full on weaponization (aviation twist?)
  • 49. Questions? https://specialcomp.com/beagleboard/thedeck.htm See me after E-mail [email protected] http://ppolstra.blogspot.com (couple preloaded microSD cards available)