OpenOrbis / mira-project-archive

The Homebrew Platform
GNU General Public License v3.0
221 stars 50 forks source link

Implement reusable ELF loader for proper loading #85

Closed kiwidoggie closed 5 years ago

kiwidoggie commented 5 years ago

This is just one major pain in the ass to the next pain in the ass getting protobuf implemented. This includes the changes for the elfloader itself, allocating RWX memory, copying the ELF from a temporary userland buffer to kernel, fixing the relocations and executing the proper entry point. Currently it's hardcoded to launch kernel elfs.

Update on this status, currently finished the MiraLoader payload. This can be used as a replacement for the built in loader "waiting for payload" in the exploit files. This supports launching userland elf payloads, or if the payload contains a ELF header will launch directly as a kernel ELF. This will be modified in the future once the lld linker is complete and we will have a .miraconf section in order to hold mira configuration if the launching elf is a kernel elf, userland utility, homebrew, trainer, or kernel/user plugins.