Skip to main content
deleted 3 characters in body
Source Link
OneAndOnly
  • 518
  • 4
  • 15

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves?

Basically i want to have a call graph that i can tell which nodes are library calls and which are locals, and not including functions that are called by libraries ( so i dont go deep into nested library functions calling each other)

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode""ShellExecuteW", pencolor = black ];

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves?

Basically i want to have a call graph that i can tell which nodes are library calls and which are locals, and not including functions that are called by libraries ( so i dont go deep into nested library functions calling each other)

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves?

Basically i want to have a call graph that i can tell which nodes are library calls and which are locals, and not including functions that are called by libraries ( so i dont go deep into nested library functions calling each other)

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "ShellExecuteW", pencolor = black ];
added 29 characters in body
Source Link
OneAndOnly
  • 518
  • 4
  • 15

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves? considering that IDA does has a nice way of generating call graph itself, the problem is

Basically i dont know howwant to interact with it using iDApython, for example saving it ashave a networkxcall graph or checkingthat i can tell which nodes are library calls and which are local and such.

i remember IDA had a method to extract the call graph in a weird formatlocals, and not including functions that are called by libraries ( so i couldn't convert it to networkx. its important for me to get a networkx graph because many python packages use this format.dont go deep into nested library functions calling each other)

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves? considering that IDA does has a nice way of generating call graph itself, the problem is i dont know how to interact with it using iDApython, for example saving it as a networkx graph or checking which nodes are library calls and which are local and such.

i remember IDA had a method to extract the call graph in a weird format and i couldn't convert it to networkx. its important for me to get a networkx graph because many python packages use this format.

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves?

Basically i want to have a call graph that i can tell which nodes are library calls and which are locals, and not including functions that are called by libraries ( so i dont go deep into nested library functions calling each other)

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];
added 307 characters in body
Source Link
OneAndOnly
  • 518
  • 4
  • 15

Get a networkx graph from the the function call-graph of the file using IDApython?

Is there any easy way to get a call graphfunction call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves? considering that IDA does has a nice way of generating call graph itself, the problem is i dont know how to interact with it using iDApython, for example saving it as a networkx graph or checking which nodes are library calls and which are local and such.

i remember IDA had a method to extract the call graph in a weird format and i couldn't convert it to networkx. its important for me to get a networkx graph because many python packages use this format.

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];

Get a networkx graph from the the call-graph of the file using IDApython?

Is there any easy way to get a call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves? considering that IDA does has a nice way of generating call graph itself, the problem is i dont know how to interact with it using iDApython, for example saving it as a networkx graph or checking which nodes are library calls and which are local and such.

i remember IDA had a method to extract the call graph in a weird format and i couldn't convert it to networkx. its important for me to get a networkx graph because many python packages use this format.

Get a networkx graph from the the function call-graph of the file using IDApython?

Is there any easy way to get a function call graph of a binary program using IDApython then convert it to a networkx graph other than going through every function and constructing the call-graph ourselves? considering that IDA does has a nice way of generating call graph itself, the problem is i dont know how to interact with it using iDApython, for example saving it as a networkx graph or checking which nodes are library calls and which are local and such.

i remember IDA had a method to extract the call graph in a weird format and i couldn't convert it to networkx. its important for me to get a networkx graph because many python packages use this format.

i tried gen_simple_call_chart() but there are two big problems :

  1. there is no difference between library nodes and local nodes in the generated DOT file (no color or anything)

  2. CHART_IGNORE_LIB_FROM doesnt work, i dont want to include nodes that are called by library calls :(

For example all the nodes are black no matter library or local :

"205" [ label = "sub_40AF20", pencolor = black ];
"206" [ label = "__set_error_mode", pencolor = black ];
added 90 characters in body
Source Link
OneAndOnly
  • 518
  • 4
  • 15
Loading
Source Link
OneAndOnly
  • 518
  • 4
  • 15
Loading