Creating r2 signatures for the whole libc

Discussion on reverse-engineering and debugging.
Post Reply
newclem
Posts: 2
Joined: Mon Apr 23, 2018 2:28 pm

Creating r2 signatures for the whole libc

Post by newclem » Mon Apr 23, 2018 2:39 pm

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

newclem
Posts: 2
Joined: Mon Apr 23, 2018 2:28 pm

Re: Creating r2 signatures for the whole libc

Post by newclem » Wed Apr 25, 2018 8:03 am

(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.

Post Reply