from Hacker News

Research paper is also an executable x86 program [pdf]

by notmysql_ on 1/9/24, 6:17 AM with 28 comments

  • by Hogarth01 on 1/11/24, 6:23 AM

    Here's the companion video for the paper: https://www.youtube.com/watch?v=LA_DrBwkiJA
  • by tak2hu on 1/11/24, 6:24 AM

    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”

    [1] https://pocorgtfo.hacke.rs/

  • by lifthrasiir on 1/11/24, 8:44 AM

    Not only that, but it is an executable x86 program written in a printable subset of x86 instructions (so no self-modifying code), as noted in the section 3 with a comparison to the similarly printable EICAR anti-virus test file.
  • by Two9A on 1/11/24, 9:24 AM

    Many years ago, I wrote up a post on doing this kind of thing in plain DOS .com files: https://imrannazar.com/articles/x86-printable-opcodes

    It's good to see the principle can be expanded to EXEs, I'll have to dig into this some more.

  • by tomcam on 1/11/24, 9:55 AM

    Justine is probably adding both targets to the αcτµαlly pδrταblε εxεcµταblε toolchain
  • by huppeldepup on 1/11/24, 2:46 PM

    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.

    Wish I had come up with this compiler, great stuff.

  • by ChrisMarshallNY on 1/11/24, 11:44 AM

    One of my employees once wrote a specification for his vignette correction algorithm in Postscript.

    The illustrations and charts were actual examples of his algorithm, being executed at render time.

  • by alchemist1e9 on 1/11/24, 2:10 PM

    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.
  • by CatchSwitch on 1/11/24, 5:06 PM

    I love this guy's content so much. Easily one of my favorite programming content creators around
  • by uptheroots on 1/11/24, 6:39 AM

    Tom7 the goat
  • by o11c on 1/11/24, 9:28 PM

    Contrary to what's in the paper, I'm pretty sure IMUL-by-constant is in fact useful, since you can use subtraction:

      x * (a - b) === x * a - x * b
    
    and this applies even when losing the top half.
  • by mizzao on 1/11/24, 6:01 AM

    Is it executable by renaming the .txt file to an .exe or what?
  • by codyd51 on 1/11/24, 7:47 AM

    This is a very impressive and fun piece of work!
  • by urbandw311er on 1/11/24, 10:08 AM

    What does it do when executed?
  • by sim7c00 on 1/11/24, 11:52 AM

    reminds me of PoC || GTFO e-zine stuff :D fun things! cool piece!
  • by dpflan on 1/11/24, 1:54 PM

    Knuth would approve of this literate programming?
  • by tw1984 on 1/11/24, 2:57 PM

    hard core science!