A
A
ASTREL2014-02-01 12:41:45
linux
ASTREL, 2014-02-01 12:41:45

Inserting your code into a Linux ELF file (or how to add a new section or extend an existing one)?

There is an already compiled program under Linux ELF format, it is necessary to make a transition to my assembler code in some place, execute it and return back (inject). The problem is that there are no unused places in the file where it could be overwritten with my code. The question is, how do I extend an existing section or create a new one to make room for my code?
On Windows for PE files, I did it in a couple of clicks with LordPE, just select "Sections -> Add", select the size and parameters, and voila, the new place for my code is ready. But I didn't find it for ELF.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question