Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The information of the base address/offset of debug registers on a real device #2

Open
ak7346f23 opened this issue Apr 10, 2020 · 2 comments

Comments

@ak7346f23
Copy link

Hi Zhenyu, I have a question about the nailgun attack on real devices (e.g. Raspberry PI 3 Model B+). I read your paper and POC code (e.g. nailgun.c) and curious about how do you get the information of the base address/offset of debug registers/cross trigger interface registers on Core 0. Do there exist any open-source technique reference manuals of attack target (e.g. BCM2837 of Raspberry PI 3 Model B+) that provide the info of debug infrastructures (Registers name & address)? Or the code just builds a virtual debug infrastructures and simulate it on the real device?

@ningzhenyu
Copy link
Owner

Hello,

Basically, we suggest 4 ways to get the address of the debug interface.

  1. Access the MDRAR register to get the base address of debug ROM table, which might contain further information of the debug components.
  2. Read the hardware manuals, if available.
  3. Try to find the corresponding source code of linux kernel for your device. The device tree files might contain some information about the debug components.
  4. Brute force. The CoreSight components are 4k-aligned. So you may try each 4k block and check the magic numbers at offset 0xfc8 and 0xfcc.

@ak7346f23
Copy link
Author

Hello,

Basically, we suggest 4 ways to get the address of the debug interface.

  1. Access the MDRAR register to get the base address of debug ROM table, which might contain further information of the debug components.
  2. Read the hardware manuals, if available.
  3. Try to find the corresponding source code of linux kernel for your device. The device tree files might contain some information about the debug components.
  4. Brute force. The CoreSight components are 4k-aligned. So you may try each 4k block and check the magic numbers at offset 0xfc8 and 0xfcc.

Thanks for your kind response! I hope you have a good day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants