mxmssh / idametrics Goto Github PK
View Code? Open in Web Editor NEWIDA plugin for software complexity metrics assessment
License: BSD 2-Clause "Simplified" License
IDA plugin for software complexity metrics assessment
License: BSD 2-Clause "Simplified" License
Now boundaries and edges are making by using internal IDA functionality but it doesn't work for functions which have jumps beyond function boundaries (or jumps to "red" areas of code). Now we're generating warning in such situations but we need to manually parse all instructions.
Hi,
Again, we are appreciate your plugin file. It is very powerful and useful.
However, we want to use 64bit version for our research.
I know you are busy in the other project currently.
Can you give some tips for us to modify this plugin to 64 bit by ourselves? (e.g : Offset setting)
Thanks
Michael
c++ exception
ida_metrics_static script needs refactoring b/c we need to provide Metrics and Metrics_function class as a set of independent functions which is called by user. Now we're calling all metrics one by one which is very inefficiently.
Sometimes functions in binaries have more than one terminal node. We should handle such situations when the graph is creating.
We need the following pages:
It's possible to increase performance of the routine complexity calculation because we can do it in parallel threads.
The automatic tests required for the functions.
Sometimes IDA makes nodes in graph without incoming edges. We should handle such situations.
We need to add more instructions (MMX/SSEx/AVX/64bit) for GetInstructionType function.
We can implement additional evaluation for Henry & Cafura metric after dynamic code analysis.
Now we can't identify variables which is handled by registers. We can only identify stack local variables.
Harrison metric should be calculated by using the Halstead metric as initial complexity metric for the node.
Add feature that available user to choose which metric he want to calculate.
xref i#10
I use IDA pro 6.95, and python 2.7, I get the attributeError:"module" object has no attribute "get_func_name" in line 269 of start_analysis function_name = idc.get_func_name(function_ea)
Can you please help me and give me some suggestions, I am trying to fix it.
Thanks.
Hi
I am doing the research with This tool.
I install the plugin in IDApro 6.8 with Python 2.7 (is good )
I run the IDAmetrics_dynamic .py (Alt +F7) in IDA
And I choose the a.out which is build by GCC on Linux (just a hello world program)
I got the error log here
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\Lib\lib-tk\Tkinter.py", line 1470, in call
return self.func(*args)
File "E:/CSE_Lei/IDA/IDAmetrics-master\IDAMetrics_static.py", line 1103, in
command = lambda: self.GetUserChoice(callback)).pack(side=LEFT)
File "E:/CSE_Lei/IDA/IDAmetrics-master\IDAMetrics_static.py", line 1126, in GetUserChoice
callback(self.metrics_used)
File "E:/CSE_Lei/IDA/IDAmetrics-master/IDAMetrics_dynamic.py", line 284, in prepare
metrics_dynamic.get_dynamic_metrics(fname, metrics_used)
File "E:/CSE_Lei/IDA/IDAmetrics-master/IDAMetrics_dynamic.py", line 165, in get_dynamic_metrics
self.get_basic_dynamic_metrics(trace, metrics_static, metrics_used)
File "E:/CSE_Lei/IDA/IDAmetrics-master/IDAMetrics_dynamic.py", line 85, in get_basic_dynamic_metrics
instr_addr = int(instr_addr, 0) + self.image_base
ValueError: invalid literal for int() with base 0: '\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00>\x00\x01\x00\x00\x000\x04@\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\xe0\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x008\x00\t\x00@\x00\x1f\x00\x1c\x00\x06\x00\x00\x00\x05\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00@\x00\x00\x00\x00\x00@\x00@\x00\x00\x00\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x008\x02\x00\x00\x00\x00\x00\x008\x02@\x00\x00\x00\x00\x008\x02@\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\xf4\x06\x00\x00\x00\x00\x00\x00\xf4\x06\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x10\x0e
\x00\x00\x00\x00\x00(\x02\x00\x00\x00\x00\x00\x000\x02\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00(\x0e\x00\x00\x00\x00\x00\x00(\x0e\x00\x00\x00\x00\x00(\x0e
\x00\x00\x00\x00\x00\xd0\x01\x00\x00\x00\x00\x00\x00\xd0\x01\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00T\x02\x00\x00\x00\x00\x00\x00T\x02@\x00\x00\x00\x00\x00T\x02@\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00D\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00P\xe5td\x04\x00\x00\x00\xcc\x05\x00\x00\x00\x00\x00\x00\xcc\x05@\x00\x00\x00\x00\x00\xcc\x05@\x00\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x004\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00Q\xe5td\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00R\xe5td\x04\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x00\x10\x0e\x00\x00\x00\x00\x00\x10\x0e
\x00\x00\x00\x00\x00\xf0\x01\x00\x00\x00\x00\x00\x00\xf0\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00/lib64/ld-linux-x86-64.so.2\x00\x04\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00GNU\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00 \x00\x00\x00\x04\x00\x00\x00\x14\x00\x00\x00\x03\x00\x00\x00GNU\x00\x88\xd2"C\x02\xa7\xce2\xc6\xfa\x00\xeb\xfdR\xd9t\xf2\x13&\xa3\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00libc.so.6\x00printf\x00__libc_start_main\x00__gmon_start__\x00GLIBC_2.2.5\x00\x00\x00\x00\x02\x00\x02\x00\x00\x00\x01\x00\x01\x00\x01\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00u'
done
What's this mean? or should I set up any environment for building a.out?
If I got the wrong step, please tell me
Thanks
Michael
Now make_graph function has ugly additional functionality to make the graph correct for functions with chunks and to add terminal nodes. (xref i#7)
Now we can't identify fastcall functions, so we need this functionality.
For some reasone IDAMetrics-static sometimes may cause errors in IDA fo apps that larger than 20-25MB.
We need special algorithm instead of idc.GetFunctionName for "red" zones.
We need to support analysis of single routine. e.g user click on the routine and starts script that generates complexity.
I found that sometimes IDA skips a lot of functions (e.g 857/5207). Thus final results may cover not all functions. We need to determine why and how to fix that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.