Here's the companion video for the paper: <a href="https://www.youtube.com/watch?v=LA_DrBwkiJA" rel="nofollow">https://www.youtube.com/watch?v=LA_DrBwkiJA</a>
Reminds me a PDF which is also bootable x86 image from PoC||GTFO [1], specifically the second issue (0x02) on section 8 “This OS is also a PDF”<p>[1] <a href="https://pocorgtfo.hacke.rs/" rel="nofollow">https://pocorgtfo.hacke.rs/</a>
Not only that, but it is an executable x86 program <i>written in a printable subset of x86 instructions</i> (so no self-modifying code), as noted in the section 3 with a comparison to the similarly printable EICAR anti-virus test file.
Many years ago, I wrote up a post on doing this kind of thing in plain DOS .com files: <a href="https://imrannazar.com/articles/x86-printable-opcodes" rel="nofollow">https://imrannazar.com/articles/x86-printable-opcodes</a><p>It's good to see the principle can be expanded to EXEs, I'll have to dig into this some more.
When he talked about the inability to jump to certain places it reminded me of a powerpoint I read a decade or two back that discussed the disassembly of Skype. They used any and every trick in the book to make disassembly impossible, like calculating an int, feeding it to a cosine instruction and the result would be the jump distance. I tried finding the powerpoint but alas Google is garbage these days, maybe the author can find some hints in there to reduce the amount of code coming out of the compiler.<p>Wish I had come up with this compiler, great stuff.
One of my employees once wrote a specification for his vignette correction algorithm in Postscript.<p>The illustrations and charts were actual examples of his algorithm, being executed at render time.
Lazy question, sorry briefly skimmed the PDF and this doesn’t do this, but hypothetically could one design a PDF file generator technique the produces a spec compliant file that uses this technique to chain load another arbitrary base64 encoded binary stored inside the PDF. Maybe someone has already done that.
Contrary to what's in the paper, I'm pretty sure IMUL-by-constant is in fact useful, since you can use subtraction:<p><pre><code> x * (a - b) === x * a - x * b
</code></pre>
and this applies even when losing the top half.