qian-feng / gencoding Goto Github PK
View Code? Open in Web Editor NEWThe scalable bug search for binaries
The scalable bug search for binaries
We find it difficult to reproduce this work since currently released code is not complete.
Methods such as getSequences()
and graph_analysis()
is not defined in currently released code.
Hope you can fill in the missing code ;)
In file graph_analysis_ida.py
, function def calTransferIns(bl):
def calTransferIns(bl):
x86_TI = {'jmp':1, 'jz':1, 'jnz':1, 'js':1, 'je':1, 'jne':1, 'jg':1, 'jle':1, 'jge':1, 'ja':1, 'jnc':1, 'call':1}
mips_TI = {'beq':1, 'bne':1, 'bgtz':1, "bltz":1, "bgez":1, "blez":1, 'j':1, 'jal':1, 'jr':1, 'jalr':1}
arm_TI = {'MVN':1, "MOV":1}
calls = {}
calls.update(x86_TI)
calls.update(mips_TI)
start = bl[0]
end = bl[1]
invoke_num = 0
inst_addr = start
while inst_addr < end:
opcode = GetMnem(inst_addr)
re = [v for v in calls if opcode in v]
if len(re) > 0:
invoke_num += 1
inst_addr = NextHead(inst_addr)
return invoke_num
Here:
re = [v for v in calls if opcode in v]
Itβs supposed to use opcode == v
instead of opcode in v
.
The current code implementation here will make all the substrings of the strings in the above instructions in the assembly instructions counted.
The content of the .ida file generated by ./raw-feature-extractor/preprocessing_ida.py
is quite hard to understand, would you please provide more information about it?
This code implementation has a lot of dead code that is not used for experiments, but it's not important.
I have an important finding that there is a serious error in the code implementation of this article, which will lead to serious problems in the topology of the ACFG extracted by the ACFG feature extraction code.
This problem is caused by the wrong code implemented in the function def getCfg(func, externs_eas, ea_externs):
of cfg_constructor.py
.
if ref in control_blocks:
dst_node = control_blocks[ref]
if dst_node not in visited:
visited[dst_node] = len(cfg)
dst_id = visited[dst_node]
cfg.add_edge(dst_id, src_id)
cfg.node[dst_id]['label'] = dst_node
When there are several dst_nodes that is not visited before more than once, this part of the code will label these dst_nodes to the same label. This will have a serious impact on the topology of ACFG.
As the title, I want to know the version of the IDA pro that you used to extract the ACFG. Thank you!
Hi,
Do you have any plans about releasing the codebook generation and feature encoding component?
Thank you.
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.