2 ms·
>"Wouldn't this and other instruction-level polymorphism tricks ..." What is "instruction level polymorphism"? I have heard of instruction level parallelism bu
by bogomipz 10y ago
>"Wouldn't this and other instruction-level polymorphism tricks ..."
What is "instruction level polymorphism"? I have heard of instruction level parallelism but I am not familiar with polymorphism at the opcode/machine instruction level. Could you elaborate?
- mikeash 10y agoI believe it means any situation where a given sequence of bytes can be usefully interpreted as multiple different sequences of instructions, usually based on where you start reading. This can't be done on an architecture like, say, MIPS, where instructions are always the same length and always aligned. There's only one way to interpret any given sequence of bytes. But on an architecture like x86, a byte sequence can mean different things if you start reading it at different offsets. For an interesting example of putting this to use, check out JIT spraying: https://en.wikipedia.org/wiki/JIT_spraying https://en.wikipedia.org/wiki/JIT_spraying The idea is that you get a JIT compiler to generate malicious native code for you by making it generate innocent code that can also be interpreted as malicious code if you can find a bug that causes the CPU to jump into the middle of one of the innocent instructions.
- bogomipz 10y agoThat's interesting, thanks and thanks for the link. I do remember reading about JIT spraying when a while back when the term was coined. I had forgotten about it. Cheers.