Page 1 of 1

Creating r2 signatures for the whole libc

Posted: Mon Apr 23, 2018 2:39 pm
by newclem
Good afternoon,

I have a project in which I would like to know with which libraries a binary has been compiled with (espacially for stripped statically linked binaries).
My first idea was to create a small binary wich does nothing and then compile it with gcc and the following agurments: --static (and maybe -lm for math etc) then loop over all the functions/symbols with radare2 to create the signatures.
The problem is, when you compile with those argument, the binary doesn't embed all the functions associated to the different libraries.

My question is the following; is there a way to embed all the functions of a library ? or should I implement all the functions in a program (which would be painful, regarding the length of the libc or other linux libraries) ? (eg:writing ceil(x) in order to have the ceil function)

Thank you

Re: Creating r2 signatures for the whole libc

Posted: Wed Apr 25, 2018 8:03 am
by newclem
(I didn't find the "edit" function, sorry for the inconvenience)
So I found a solution: compiling the glibc for multiple architectures et different optimizations, then make the signatures thanks to the .a libraries.