Plugins

radare2 is implemented on top of a bunch of libraries, almost every of those libraries support plugins to extend the capabilities of the library or add support for different targets.

This section aims to explain what are the plugins, how to write them and use them

Types of plugins

  1. $ ls libr/*/p | grep : | awk -F / '{ print $2 }'
  2. anal # analysis plugins
  3. asm # assembler/disassembler plugins
  4. bin # binary format parsing plugins
  5. bp # breakpoint plugins
  6. core # core plugins (implement new commands)
  7. crypto # encrypt/decrypt/hash/...
  8. debug # debugger backends
  9. egg # shellcode encoders, etc
  10. fs # filesystems and partition tables
  11. io # io plugins
  12. lang # embedded scripting languages
  13. parse # disassembler parsing plugins
  14. reg # arch register logic

Listing plugins

Some r2 tools have the -L flag to list all the plugins associated to the functionality.

  1. rasm2 -L # list asm plugins
  2. r2 -L # list io plugins
  3. rabin2 -L # list bin plugins
  4. rahash2 -L # list hash/crypto/encoding plugins

There are more plugins in r2land, we can list them from inside r2, and this is done by using the L suffix.

Those are some of the commands:

  1. L # list core plugins
  2. iL # list bin plugins
  3. dL # list debug plugins
  4. mL # list fs plugins
  5. ph # print support hash algoriths

You can use the ? as value to get the possible values in the associated eval vars.

  1. e asm.arch=? # list assembler/disassembler plugins
  2. e anal.arch=? # list analysis plugins

Notes

Note there are some inconsistencies that most likely will be fixed in the future radare2 versions.