3 ms·
The same thing on Windows can be done by essentially creating a process based on any file and then rewriting its contents in memory: https://stackoverflow.com/q
by userbinator 4y ago
The same thing on Windows can be done by essentially creating a process based on any file and then rewriting its contents in memory: https://stackoverflow.com/questions/305203/createprocess-from-memory-buffer https://stackoverflow.com/questions/305203/createprocess-fro...
As for the side-question of switching between 64 and 32 bit mode in the same process, this is classically known on Windows as "heaven's gate" and a similar technique on Linux seems possible too: https://gist.github.com/rqou/1a1834b784283add7955af4300973118 https://gist.github.com/rqou/1a1834b784283add7955af430097311...
- tedunangst 4y agoOne could also exec any available 64 bit program and then overwrite all its memory with ptrace on Linux.
- ohwutwathere 4y agoCorrect but in lots of scenarios (containers etc) you cannot execute ptrace() but you can execute mmap(), mprotect(), read(), write() which is all you really need. Edit: and fork(). See something I published just a month ago: https://github.com/anvilsecure/ulexecve/ https://github.com/anvilsecure/ulexecve/
- mobilio 4y agoDecades ago i was make similar technique but also involving CreateRemoteThread or CreateRemoteThreadEx.