Successfully reported this slideshow.
Your SlideShare is downloading. ×

On-chip debugging with OpenOCD #hardwareHacking

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 16 Ad

On-chip debugging with OpenOCD #hardwareHacking

Download to read offline

Slides of the presentation I made at Bsides Manchester pre-event, Beersides, the 15th of August 2018. Hope you'll enjoy it, don't hesitate to send any comments or questions via Twitter @ko97551819 or linkedin.

Slides of the presentation I made at Bsides Manchester pre-event, Beersides, the 15th of August 2018. Hope you'll enjoy it, don't hesitate to send any comments or questions via Twitter @ko97551819 or linkedin.

Advertisement
Advertisement

More Related Content

Advertisement

On-chip debugging with OpenOCD #hardwareHacking

  1. 1.     On-chip debugging with OpenOCD -for N00bs- C00kie @ko97551819
  2. 2.     $ whoami ● Teacher for 10 years ● Climber ● 42born to code ● Threat intel analyst ● I bake gluten free cookies
  3. 3.     OpenOCD ● Open On-Chip Debugger ● Open source and free ● Interfaces with the JTAG port, using a transfer protocol (Telnet, GDB) ● A lot of targets/interfaces .cfg files directly included ● Regularly maintained
  4. 4.     JTAG ? Joint Test Action Group
  5. 5.     GDB + GEF https://www.gnu.org/software/gdb/ GNU project debugger GEF Ehanced features for GDB https://github.com/hugsy/gef Python API for using dynamic analysis
  6. 6.     GDB/GEF
  7. 7.     GDB ● Run code ● Disassemble ● Set breakpoints ● Inspect memory content ● Inspect registers content ● Set variables...
  8. 8.     Getting started: OpenOCD requires ● A debug adapter (ST-LINK USB dongle) ● A debug host (your machine) =-) ● A target (SMT32 microchip)
  9. 9.     ST-Link v2/STM32F103
  10. 10.     How to plug it to debug interface ? https://www.aliexpress.com/store/pr oduct/Free-Shipping- STM32F103C8T6-ARM-STM32- Minimum-System-Development- Board-Module-Forarduino/...
  11. 11.     Pins ?
  12. 12.     Ok !
  13. 13.     Configuration files *.cfg ● In the main folder run sudo ./openocd ● Basic commands – $ sudo openocd -h – $ sudo openocd -s – $ sudo openocd -f [interface] -f[target]
  14. 14.     Running ● sudo openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg ● remote target localhost:3333 ● c (continue) ● ^c (ctrl + c to break) ● i r (display about information registers) ● i f (display about information functions) ● s 4 (step 4 instructions)
  15. 15.     demo
  16. 16.     contact ● Cookie @ko97551819 ● pokiji42@gmail.com Thanks!

×