ARM 是更安全的指令集吗?
我读到“普通”ARM 指令是固定长度的 - 32 位。而且 ARM 指令不能跳转到另一条指令的中间 - 这对于 x86 指令来说很容易做到。
(对于 x86,Google 的 NaCl 尝试通过在 32 字节边界上对齐指令来“修复”此问题。)
这是否会使 ARM 程序更安全或更能抵抗某些攻击?
如果是这样,这是否扩展到 Thumb 和 Java 指令?
I have read that 'Normal' ARM instructions are fixed length - 32 bits. And that no ARM instruction can jump into the middle of another instruction - something that is easy to do with x86 instructions.
(For x86, Google's NaCl tries to 'fix' this by aligning instructions on 32 byte boundaries.)
Does this make ARM programs more secure or more resistant to certain attacks?
If so, does this extend to Thumb and Java instructions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更安全的地方是将操作码扫描到沙箱进程时。如果你想禁止或拦截某些指令,在固定长度的指令集上这样做会更容易。在 x86 架构上,指令集取决于上下文,并且指令具有可变长度,因此如果您从正确的偏移量解析一条指令,那么看似无害的指令实际上可以嵌入另一条指令。您可以有效地“跳转到指令中间”并且仍然拥有有效的指令。
ARM 更容易解析,拇指模式不会改变这一点。因此,ARM 指令集本身并不是特别安全,但更容易解析,并且正确的解析对于像沙箱这样的 NaCl 是必要的。
这是简短且可能不准确的答案。如需更明确的答案,请查看此 博客文章
在优秀的 matasano 博客上
The place where it can be safer is when scanning opcode to sandbox process. If you want to prohibit or intercept some instruction, doing so is easier on a fixed length instruction set. On x86 architecture, the instruction set depends of the context, and instruction have variable length, so an instruction that seems harmless can in fact embed another instruction, if you parse it from the correct offset. You can effectively "jump in the middle of an instruction" and still have a valid instruction.
ARM is easier to parse, and thumb mode does not change this. So ARM instruction set is not particularly safer per se, but is far easier to parse, and correct parsing is necessary for the NaCl like sandboxing
This is the short and probably inexact answer. For a more definitive answer, look at this blog post
on the excellent matasano blog
您正在考虑破坏堆栈返回地址或类似的攻击,以便它分支到有效负载中,对吗?我认为字对齐并不是一个很大的帮助或障碍 - 你只需要对齐有效负载 4 个字节。哦,x64 需要 16 字节指令对齐。
这是你的意思吗?
You're thinking about that attack of clobbering the stack return address or similar so it branches into a payload right? Word alignment isn't a big help or hindrance there I imagine - you just need to align the payload 4 bytes. Oh, and x64 requires 16-byte instruction alignment.
Is this what you meant?