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

Support all analysis info required for Diaphora and create a script to extract #2742

Closed
11 of 12 tasks
radare opened this issue Jun 11, 2015 · 24 comments
Closed
11 of 12 tasks
Labels
enhancement hardcore Extremely hard issues to fix, or features to implement radiff2 RAnal refactor
Milestone

Comments

@radare
Copy link
Collaborator

radare commented Jun 11, 2015

What is required:

  • Name of the function
  • Number of nodes & edges of the function
  • In and out-degree of the function
  • Size in bytes
  • Number of assembly instructions
  • The mnemonics (not the instruction)
  • The names referenced (strings and other constants)
  • The function's prototype
  • The comment of the function if any
  • The pseudo-code (decompiled code) of the function if any
  • The assembly dump and the relative virtual address.
  • Script easy to use to extract those information
@joxeankoret
Copy link

Oh! And some structure or whatever representing the control flow graph of each function.

@radare
Copy link
Collaborator Author

radare commented Jun 11, 2015

Can you specify the type of each field? array of strings, graph, etc? Except the the decompilation, r2 can provide the all this information. and the decompilation can be extracted by using the retdec plugin or pdc/radeco in the future if needed. Also, mark which of those fields are optional

@radare
Copy link
Collaborator Author

radare commented Jun 11, 2015

@XVilka XVilka added enhancement refactor RAnal hardcore Extremely hard issues to fix, or features to implement labels Jun 15, 2015
@XVilka XVilka added this to the 0.10.0 milestone Jun 15, 2015
@radare
Copy link
Collaborator Author

radare commented Jul 6, 2015

Waiting for @joxeankoret to provide an interface class to fill it with r2pipe magic

@jvoisin
Copy link
Contributor

jvoisin commented Oct 8, 2015

Any updates about this?
Shall we defer it to 1.0, or write the interface ourselves ?

@radare
Copy link
Collaborator Author

radare commented Oct 11, 2015

I guess we should do everything. But its ok for 1.0

On 08 Oct 2015, at 19:38, jvoisin notifications@github.com wrote:

Any updates about this?
Shall we defer it to 1.0, or write the interface ourselves ?


Reply to this email directly or view it on GitHub.

@jvoisin jvoisin modified the milestones: 1.0.0, 0.10.0 Oct 11, 2015
@XVilka
Copy link
Contributor

XVilka commented May 12, 2016

@sushant94 @oddcoder would be useful also for 'radare2 <-> radeco' interaction.

@radare
Copy link
Collaborator Author

radare commented Oct 30, 2016

see ?O to get the list of all the instructions.

@radare
Copy link
Collaborator Author

radare commented Oct 30, 2016

the inout degree is the number of xrefs and the number of refs? I think you can already have all the info you want from current r2. just need to chat a bit with you to confirm that

@joxeankoret
Copy link

joxeankoret commented Nov 1, 2016

One of the problems I'm facing: I have no idea how to, simply, get the number of edges in a function. That's it, for a function graph G = (V,E), where V = {A, B, C} and E = {(A,B), (A,C)}, I just want to know that there are 2 edges. What command should I use for that? The help of the appropriate command (I think) afi is none.

@radare
Copy link
Collaborator Author

radare commented Nov 1, 2016

https://twitter.com/trufae/status/793504061152690178

On 01 Nov 2016, at 16:56, Joxean notifications@github.com wrote:

One of the problems I'm facing: I have no idea how to, simply, get the number of edges in a function. That's it, for a function graph G = (V,E), where V = {A, B, C} and E = {(A,B), (A,C)}, I just want to know that there 2 edges. What command should I use for that? The help of the appropriate command (I think) afi is none.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #2742 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lgKp1SUT_p5fZNGX0Pv99U1Kb_jiks5q52E9gaJpZM4E_eoC.

@lowlyw
Copy link
Collaborator

lowlyw commented Nov 1, 2016

When you say V and E do you mean for the BBS in a function, or its in and
out connectivity to other functions? afi can give this info

On Nov 1, 2016 10:49 AM, "radare" notifications@github.com wrote:

https://twitter.com/trufae/status/793504061152690178

On 01 Nov 2016, at 16:56, Joxean notifications@github.com wrote:

One of the problems I'm facing: I have no idea how to, simply, get the
number of edges in a function. That's it, for a function graph G = (V,E),
where V = {A, B, C} and E = {(A,B), (A,C)}, I just want to know that there
2 edges. What command should I use for that? The help of the appropriate
command (I think) afi is none.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <
https://github.com/radare/radare2/issues/2742#issuecomment-257605524>, or
mute the thread <https://github.com/notifications/unsubscribe-
auth/AA3-lgKp1SUT_p5fZNGX0Pv99U1Kb_jiks5q52E9gaJpZM4E_eoC>.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2742 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATaD6K9JUaXh-ccwFf9PwRFP9FtCrbYxks5q53usgaJpZM4E_eoC
.

@radare radare modified the milestones: 1.1.0, 1.0.0 Nov 2, 2016
@joxeankoret
Copy link

joxeankoret commented Nov 2, 2016

With V I mean vertex (nodes, basic blocks) and with E I mean Edges (connections between basic blocks). Anyway, that part is already implemented, thanks to @radare.

@Maijin Maijin added the diaphora label Nov 2, 2016
@radare radare modified the milestones: 1.2.0, 1.1.0 Dec 19, 2016
@radare radare modified the milestones: 1.3.0, 1.2.0 Jan 14, 2017
@radare radare added this to the 1.4.0 milestone Mar 10, 2017
@radare radare removed this from the 1.3.0 milestone Mar 10, 2017
@Maijin Maijin added the radiff2 label Mar 10, 2017
@Maijin Maijin mentioned this issue Mar 10, 2017
17 tasks
@Maijin
Copy link
Contributor

Maijin commented Mar 11, 2017

All those requirements are fullfilled, what is remaining for this to happen @joxeankoret

@joxeankoret
Copy link

joxeankoret commented Mar 12, 2017

GUI support, mainly. Even supposing that I can port the internal export logic, there is no way I can display the results anywhere unless I create myself a new independent GUI.

@Maijin Maijin changed the title Support all analysis info required for Diaphora Support all analysis info required for Diaphora and create a script to extract Mar 12, 2017
@radare
Copy link
Collaborator Author

radare commented Mar 13, 2017 via email

@radare
Copy link
Collaborator Author

radare commented Mar 13, 2017 via email

@joxeankoret
Copy link

The Visual mode is cool, but non practical for diffing, I guess. Command line diffing? For example, I had a project where many functions had hundreds and even thousands of basic blocks. How am I supposed to analyse it with a command line version? No, you need a graph view with an overview or something similar.

That said, one Diaphora's side project is to create an independent GUI tool.

@radare
Copy link
Collaborator Author

radare commented Mar 13, 2017 via email

@Maijin
Copy link
Contributor

Maijin commented Mar 13, 2017

  • 1 for having the info available from CLI so we can test.

@joxeankoret
Copy link

Writing an exporter should be rather easy. I will start with this part.

@radare radare modified the milestones: 1.6.0, 1.4.0 Apr 7, 2017
@XVilka
Copy link
Contributor

XVilka commented Jun 1, 2017

Can this be closed? Since it's completely done.

@XVilka
Copy link
Contributor

XVilka commented Jun 26, 2017

@radare so what do you think? everything on radare2 side is ready/

@radare
Copy link
Collaborator Author

radare commented Jun 26, 2017

Yes i think we can close this issue and open another one to write the script that exposes all that info instead. Tired of waiting, this stupid python script is taking more than 2 years to be implemented.

@radare radare closed this as completed Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hardcore Extremely hard issues to fix, or features to implement radiff2 RAnal refactor
Projects
None yet
Development

No branches or pull requests

6 participants