Re:Actually Portable Executables
by reikonomusha on Sunday February 28, 2021 @01:53PM
(#26295964)
The author seems to be an excellent writer. They just may not have taken the enormous amount of time to answer tons of questions or write tons of documentation people are seeking. One person did all this!
You really think so? Here's their description of how it works:
> Here's how it works:
>
> MZqFpD='
> BIOS BOOT SECTOR'
> exec 7<> $(command -v $0)
> printf '\177ELF...LINKER-ENCODED-FREEBSD-HEADER' >&7
> exec "$0" "$@"
> exec qemu-x86_64 "$0" "$@"
> exit 1
> REAL MODE...
> ELF SEGMENTS...
> OPENBSD NOTE...
> NETBSD NOTE...
> MACHO HEADERS...
> CODE AND DATA...
> ZIP DIRECTORY...
Ok well that clears it up. MZqFpD='. Of course!
Re:Actually Portable Executables
by matheusmoreira on Sunday February 28, 2021 @10:24PM
(#26299385)
Actually I'm not 100% sure. I can barely make sense of it. All I know is it somehow works as if it was a valid ELF. Some dark magic going on here...
You might be right though. The author might be very good at executable hacks but they're a terrible writer. Their explanation explains nothing.