Skip to content

Reverse engineering a dumpster dive threadmill

Notifications You must be signed in to change notification settings

brainstorm/treadmill-re

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Threadmill RE

This treadmill I found on the trash has two boards, let's call them: display and control. Both have STM8S ICs performing different functions.

The display board, other than displaying numbers on the display (via discrete SMD LEDs), has a proprietary 2.4GHz radio module which supposedly communicated with a remote control that was not present at the dumping site (street) :/ ... thus, we have a reason to reverse, fix and having this working again for desk workouts :)

treadmill

Dumping firmware

Dumping firmware is (luckily) very straightforward because there's no ROP (Read Out Protection), so there's no need to glitch the target. Current OpenOCD 0.12.x from Homebrew fails to connect to the target, perhaps it's just outdated:

openocd -f interface/stlink-dap.cfg -f target/stm8s105.cfg -c "init" -c "reset halt"

Fortunately, stm8flash does the job just fine out of the box.

Analysis with radare2

From the top level directory:

./r2/anal.sh [display|control]

Depending on which PCB's firmware you want to explore.

r2con 2024 presentation slides

If you want to browse the slides presented at the radare2 conference 2024, here's the command:

./bin/slides.sh

And if you want to generate a PDF out of them:

./bin/slides.sh pdf

Video of the talk

Running over STM8