cutter-plugins icon indicating copy to clipboard operation
cutter-plugins copied to clipboard

CyberCutter - contents vizualization

Open XVilka opened this issue 6 years ago • 10 comments

Something in the spirit of https://github.com/patois/IDACyber

image

image

image

image image

XVilka avatar Apr 24 '18 07:04 XVilka

Seems this code can be adopted (license is MIT) https://github.com/kentavv/binary_viewer

XVilka avatar Aug 08 '18 09:08 XVilka

Or Veles (license is Apache 2) https://github.com/codilime/veles

XVilka avatar Aug 08 '18 09:08 XVilka

Very nice! Would be implemented in a plug-in. Maybe as part of Veles integration

ITAYC0HEN avatar Feb 16 '19 18:02 ITAYC0HEN

Is there any documentation on the C++ plugin interface? I'd be willing to look into https://github.com/Mahlet-Inc/hobbits/issues/9 if I had some place to start. Seems like it could be pretty easy, but I'd rather not trudge through the code to find the relevant files/concepts.

hello-adam avatar May 05 '20 19:05 hello-adam

@hello-adam Take a look at sample-cpp plugin it demonstrates the most important parts you need to know:

  • how to create a loadable plugin
  • how to create a dockable widget
  • how to access information from r2 through cutter

You can also take a look at https://cutter.re/docs/plugins.html#creating-plugins . The example shows how to create a python plugin but API is generated from C++ so doing the same in C++ would be very similar. It can serve you as explanation for C++ example. Cutter coding advices in developer docs are equally relevent for plugins. For more information about querying state read https://cutter.re/docs/api/core/classCutterCore.html . The rest is just is writing code with Qt widgets.

karliss avatar May 06 '20 05:05 karliss

Thanks, @karliss , I'll take a look.

hello-adam avatar May 06 '20 18:05 hello-adam

I have a plugin compiling and loading (the examples did not work without some nudging in fedora 30), but I'm a little uncertain about how and when to load the data from CutterCore::ioRead into a hobbits BitContainer for the displays. It seems like I should either:

  1. Load the whole file whenever it changes (responding to some of the CutterCore::*Changed signals?) into a BitContainer and update the offset whenever I get a CutterCore::seekChanged. This would be similar to how Hobbits works, but I'm not sure exacly how to load the "whole thing" or even what exactly that would mean in a radare2 context.

  2. Load the "active segment" into a BitContainer in response to every CutterCore::seekChanged. Again, not really sure how to get the full size of whatever is currently "active" (that is to say: what is the length parameter for the CutterCore::ioRead call?)

  3. EDIT: I guess a third option would be like option 1 except instead of aligning to the current CutterCore::seekChanged, one could scroll freely through the file in the hobbits plugin and maybe call CutterCore::seek from there

This looks like it will be easy once I have a better understanding of the user story and answers to my API questions above.

hello-adam avatar May 06 '20 22:05 hello-adam

here's a functioning version of option 2 https://github.com/Mahlet-Inc/hobbits-cutter-plugin

hello-adam avatar May 08 '20 00:05 hello-adam

I recommend moving further discussion of hobbits plugin to https://github.com/Mahlet-Inc/hobbits/issues/9 or separate issue in cutter-plugins.

karliss avatar May 08 '20 05:05 karliss

See also:

  • https://inside.battelle.org/blog-details/battelle-publishes-open-source-binary-visualization-tool
  • https://github.com/Battelle/cantordust

XVilka avatar Jul 24 '20 09:07 XVilka