airbus-seclab / bincat

Binary code static analyser, with IDA integration. Performs value and taint analysis, type reconstruction, use-after-free and double-free detection
1.68k stars 162 forks source link

Unsupported relocation type reloc(ARM,0x14) #68

Closed fuying95 closed 2 years ago

fuying95 commented 6 years ago

Bincat can support armv7 / arm v8 / x86. But when I loaded my test program which was ARM 32(ARM v7), it showed error:"INFO:bincat.plugin:[ABORT] elf: Unsupported relocation type [reloc(ARM,0x14)]". And I have also encountered errors like "EXCEPTION: Exceptions.Error("Unsupported relocation type [reloc(AARCH64,0x113)]")".

trou commented 6 years ago

thanks for your report. While we check the problem, if you use IDA, you can use the "remap binary" checkbox, as it produces a binary as seen in IDA, with relocs applied.

fuying95 commented 6 years ago

Thank you very much!

trou commented 6 years ago

I'll leave the issue open to track the needed change

phil777 commented 6 years ago

As this is a test program, would you mind sharing it ?

fuying95 commented 6 years ago

openssl1.0.1u_i386_gcc4.9_o3.zip wget.zip Here are two of my test program.

And would you mind I ask another question? I am trying to use python wrapper mentioned in the paper, I think the python folder in the source code is python wrapper. But when I run the python/bin/bincat.py, it errors "ImportError: cannot import name mlbincat". Am I wrong with what python wrapper is? Or the bincat.py cannot run directly?

fuying95 commented 6 years ago

And I want to know is there an option that can let Bincat skip the function call, for example, instruction A call fun instruction B ... Can I just analyze instruction A->instruction B? Thank you very much!

trou commented 6 years ago

you can either:

szennou commented 6 years ago

Adding a skip on fun calls sounds a good idea and not difficult to implement. We will open an issue on it. Don't hesitate to watch the repository to be notified when we will push this new issue (by the end of the month ?)

phil777 commented 5 years ago

I'm not sure how to correctly manage these relocations. They do not seem to have an influence on the analysis, so I added an ignore_unknown_relocations option in [analyzer] section in 3addbdee72fe6bc01c2cc2410ee044340db57545.

[analyzer]
ignore_unknown_relocations = true

You can also use --ignore-unknown-relocations as command line argument since c57e46c68e69a989972c7579a46d08eece038cd8.

trou commented 2 years ago

Closing since the --ignore-unknown-relocations kind of solves it.