arget13 / DDexec

A technique to run binaries filelessly and stealthily on Linux by "overwriting" the shell's process with another.
GNU General Public License v3.0
791 stars 83 forks source link

Possibility to make the stack executable #2

Closed jfma7 closed 2 years ago

jfma7 commented 2 years ago

Hello:

Sometimes we would like to run code on the stack. For example, a msfvenom reverse shell in C that is written and executed from the stack.

Right now the code does not support stack execution but it could be an option for the future.

Greetings.

arget13 commented 2 years ago

Yes, this I think should be easy to implement. When iterating over the program header entries we would need to check if there is any entry of type GNU_STACK and check if its permissions include execution, if so then add another piece of shellcode to call mprotect().

Since this is a feature request I may take my time to do this.