Re:Never run ldd on unknown executables
by wyldfire on Sunday July 23, 2023 @06:18PM
(#36840467)
That's great, but unlike ldd, readelf won't walk the list of dependencies recursively.
[ Parent
| on HN ]
never fear, recursive and concat unix piping to the rescue
Re:Never run ldd on unknown executables
by stingraycharles on Monday July 24, 2023 @02:51AM
(#36843922)
At that point, why not just use ldd?
Because it executes the binary
* * *
Re:Never run ldd on unknown executables
by SomeRndName11 on Monday July 24, 2023 @06:47AM
(#36845729)
How exactly it would fool readelf, which works on entirely different principles?
Eg. by changing PT_INTERP to something else than usual (or dispensing with it, so the binary becomes a static one, still displaying DT_NEEDED), or exploiting bugs in ld.so, so the values shown by readelf become meaningless.
I'm also not entirely sure that readelf/binutils was reviewed from sec-perspective, it might not be out of the question that readelf might show things which are then interpreted differently by either kernel (loading a basic static bin or ld.so/interpreter) or by ld.so itself.