BinaryAnalysisPlatform/bap

the glibc-runtime heuristic is not precise enough

Closed this issue · 3 comments

ivg commented

We have it triggered on .o and .so files, as well as on custom-made executables. We need to collect more information to establish a set of good indicators.

Note, when glibc-runtime is triggered it will rename the target of the first jump of the entry point to __libc_start_main (and insert a synthetic subroutine is the destination is unresolved).

Some of our examples seem to trigger the __libc_start_main renaming. This occurs only on some systems. It is evident that this is occurring when one runs bap on the binaries with -dbir. It does occur on my system which is using bap 2.1.0+5a98402, ocaml 4.09.0, cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, Ubuntu 18.04.4.
It seems to be triggered on our files that are compiled from assembly.
As per your suggestion, adding --no-glibc-runtime to our Makefile and run scripts seems to avoid the issue.

I recommend two more things to test on:

ivg commented

@gitoleg, can you provide in ogre more information about the file type, e.g., I want to know whether it is an object file or shared library? Right now ogre says elf for executables, .o, and .so