To add the plugin to your copy of IDA Pro (not provided), follow these steps.
$IDA
is the path to the top of your IDA Pro installation.
- Copy RISC-V.py (64-bit) and RISC-V32.py (32-bit) into $IDA/procs/.
- Start Ida Pro, and select NEW, select the path to the RISC-V binary you wish to analyze.
- Within the new context window, note ELF64 for unknown CPU, [243]. 243 is RISC-V's identification number in ELF binaries.
- Select RISCV as processor type, don't change other options and then select OK.
- You will receive two error messages. The first warns about an unknown processor number (to the best of our knowledge, this is a benign popup), and the second is an "Are you sure?" confirmation. Acknowledge both.
- The binary is now loaded, disassembled and ready for analysis.
- When closing IDA Pro, check the Don’t Save the Database checkbox before clicking the OK button. If you fail to do this, next time you open the same file IDA Pro will not re-do the disassembly, and you will have to manually tell it to reload.