I am targeting the embedded bootROM code of a Renesas MCU. The code is executed by connecting the bootstrap pins in a certain way, and issuing a reset. The bootROM exposes some interesting functions, like ReadMemory, and can also be protected with certain flags - readout protection and write protection, for instance. My aim is to bypass the check code readout protection check, and I have a few general questions:
- How to determine target clock from oscilloscope capture? The bootROM expects a command with clock configuration, which probably means it starts with an internal clock.
The purple line is the UART, the yellow is processor power, and blue is reset. There’s a big spike just after sending the clock set command.
Below is a zoomed-in capture processor consumption. Is measuring the time between the spikes on the trace a good method for determining the clock?
- I want to find where the readout protection flag is checked, and I will do that on another device, which is not locked, by comparing traces with security flag = 1 and flag = 0. Is it a common practice for the bootROMs to check the security flag only once upon startup, or it could be checked in each function call (for example on ReadMemory handler)?
- Is using a
scope.glitch.output = 'enable_only', with repeat of 1 and same frequency as the target, a viable strategy for targeting a certain instruction? I assume the code checking the protection flag will boil down to a compare instruction, but of course that may be wrong.