1

So i have written a python tool using capstone that disassembles the code section of a ELF binary using capstone.

now i want to also create and show the call-graph of this binary in a dot format, I tried googling but couldn't find how to do this with capstone or if its possible with it or not, i also heard about some other frameworks like radare2 and such but I'm still not sure which framework is good for this purpose

so what do you guys suggest? how can i make the call-graph by using some framework in my own code? ( i don't want a tool for this, i already know there are tools/programs for this out there, and i dont want to copy their code for this i want to write my own)

is it even possible with static analysis, meaning just by reading the file? considering some function calls might be indirect? ( i only need to do this using call and ret instructions)

1 Answer 1

2

My suggestion is that you generate a graphviz (https://graphviz.org/) file with all the nodes and all the information that you want and then with the command dot you paint the graph. However, if you want to make it on realtime or on a fancy UI I will suggest you use networkx (https://networkx.github.io/)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.