TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Synthetic Memory Protections: An update on ROP mitigations [pdf]

96 pointsby notaplumber1about 2 years ago

8 comments

notaplumber1about 2 years ago
Dragos Ruiu (@dragosr) also provided the video recording on his Twitter account.<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;dragosr&#x2F;status&#x2F;1639015014177841153" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;dragosr&#x2F;status&#x2F;1639015014177841153</a>
hvsabout 2 years ago
It&#x27;s amazed me that the first 50 years of computers were &quot;this is how to structure memory for operating systems&quot; and the next 30 have been &quot;hackers take advantage of all of that so we need to do a bunch of convoluted stuff just to try to thwart them.&quot; Kind of unfortunate that so much energy has to be spent on this work, but I appreciate that it is.
评论 #35303258 未加载
mikewarotabout 2 years ago
The fact that you <i>must</i> trust programs to do the right thing is the root cause of the problem. There exist operating systems and security models that stop this type of attack dead in its tracts.<p>This is fallout from the failure of Multics, and the rise of Unix.
评论 #35306878 未加载
评论 #35306941 未加载
IAmLiterallyABabout 2 years ago
Was lucky enough to watch this in person. One of the best talks of the conference.<p>The immutable bit together with the syscall bit is going to be a real pain for shell code
评论 #35309275 未加载
saagarjhaabout 2 years ago
&gt; iOS is execute-only; Android tried a few years ago (abandoned)<p>Wonder if the author is aware of the reasons why this was disabled (it&#x27;s functionally gone on both platforms). On iOS newer processors have PAC which provides much stronger guarantees against ROP and Linux disabled it because execute-only mappings bypass PAN: <a href="https:&#x2F;&#x2F;blog.siguza.net&#x2F;PAN&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.siguza.net&#x2F;PAN&#x2F;</a>.<p>&gt; Dumb applications that invent their own ABI (very few)<p>I mean I know this is meant to be bait but I&#x27;ll take it, applications that use their own internal ABI are valid programs.<p>&gt; On every kernel entry, if the RPKU register has been changed kill the process<p>&gt; When a process does a system call, the SP register MUST point to stack memory!<p>Has <a href="https:&#x2F;&#x2F;xerub.github.io&#x2F;ios&#x2F;kpp&#x2F;2017&#x2F;04&#x2F;13&#x2F;tick-tock.html" rel="nofollow">https:&#x2F;&#x2F;xerub.github.io&#x2F;ios&#x2F;kpp&#x2F;2017&#x2F;04&#x2F;13&#x2F;tick-tock.html</a> vibes<p>&gt; Stack and Syscall Protection detect a variety of easier exploit patterns, pushing the ROP programmer to explore more challenging schemes, which may not be viable<p>&gt; Increasing exploitation difficulty is a valid strategy<p>Ok so this is the actual interesting part of the paper, because it seems like they are trying to shore up their syscall-origin protections which are not very strong in the presence on ROP, except trying to do so on hardware that doesn&#x27;t really have CFI protections.<p>As far as I can tell, this Xonly protection only attempts to disrupt blind ROP (&quot;you can&#x27;t read the code anymore&quot;), rather than construction of a full ROP chain. There are some attempts to validate things on entry to the kernel (pc, sp) but they are under control of userspace so what probably will happen here is that they get switched back to sane values prior to kernel entry and then adjusted to attacker-controlled values again. I expect this to require some cleverness on the side of attackers but this is typically how such checks are bypassed, assuming that there is not some other overlooked way to get around it.<p>This brings us to OpenBSD&#x27;s strategy for exploit mitigation, which is in my eyes has far too much tunnel vision: it tries to match on individual exploit strategies, rather than trying to protect against more general problems. The policy of &quot;let&#x27;s make exploitation harder&quot; is actually very close to something I&#x27;m working on right now and it has a number of important caveats that I don&#x27;t see addressed here.<p>These things are true:<p>* Reducing the reliability of an exploit makes it far less attractive.<p>* Adding non-perfect mitigations against common exploitation strategies makes it so that people can&#x27;t just throw a proof-of-concept against another platform against your system.<p>However, these are also true:<p>* Attackers are very, very good at turning &quot;we made this 99% secure!&quot; into &quot;this will basically never work&quot;.<p>* Attackers will construct new strategies that you didn&#x27;t think of to attack the same underlying problem if you don&#x27;t fix it, if given adequate time.<p>I am not an exploit author, so take this with a grain of salt, but I would guess that an experienced team could probably come up with a way to do either of the above in maybe a year. And at that point, once it&#x27;s broken, the cost from the OpenBSD side to improve upon this protection is high, because they will break the entire design of this thing, which requires a human to revisit this and create a new clever design to keep attackers at bay. In that way it will become just a routine step in an exploit to evade the protection, as opposed to say NX, which completely killed the ability to ever do shellcode execution from the stack, necessitating the development of ROP over multiple years. Good mitigations are highly asymmetric in terms of effort required to design them versus how long an attacker needs to take to fully bypass them. Usually this means that if you&#x27;re spending significant time designing something it will probably want to be sound rather than reducing the window of opportunity for an exploit.
评论 #35304756 未加载
评论 #35308529 未加载
评论 #35326156 未加载
评论 #35317672 未加载
Alifatiskabout 2 years ago
This is a fascinating topic, are there any practical real life implementations of this?
评论 #35305138 未加载
评论 #35304403 未加载
itsokimbatmanabout 2 years ago
Honestly the only thing that really needs to be said:<p><a href="https:&#x2F;&#x2F;nso.group&#x2F;@qwertyoruiop&#x2F;110086216898968720" rel="nofollow">https:&#x2F;&#x2F;nso.group&#x2F;@qwertyoruiop&#x2F;110086216898968720</a>
评论 #35317603 未加载
评论 #35309480 未加载
评论 #35313939 未加载
Zurrrrrabout 2 years ago
This looks really nice, I&#x27;ll have to dig into it more later.<p>Always nice to see the OBSD team actually implementing protections and controls instead of relying on audits.