Finding Opcodes by length or something else

2019-09-21 10:02发布

问题:

Is it possibile, given a sequence of bytes x86 instructions into a stream of random bytes, to decode their instructions?

Are opcodes of a fixed length or is there any way to detect those instructions?

回答1:

Is it possibile, given a sequence of bytes x86 instructions into a stream of random bytes, to decode their instructions?

Yes. Many kinds of processors do it. It is one of the easiest task they have.

Are opcodes of a fixed length

No.

or is there any way to detect those instructions?

The first byte(s) of the instruction allow to infer its length. You will find tables easily on the Internet.