News for hackers. Stuff that matters.
Re:Writing Exploit-Resistant Code with OpenBSD by tptacek on Monday May 06, 2019 @12:29AM (#19836891)
Useful additional context/counterpoint:

https://twitter.com/halvarflake/status/1125169161125158913

Re:Writing Exploit-Resistant Code with OpenBSD by willvarfar on Monday May 06, 2019 @12:54AM (#19836962)
I haven't been following any back-and-forth, but I'm a fan of exploit mitigation so I'll chime in and say to anyone browsing here that https://www.openbsd.org/papers/ru13-deraadt/mgp00001.html is an excellent explanation of them.

(I was shocked when I just googled "exploit mitigation" and all I got back was infomercial articles by Symantec and Sophos etc. Scary. So for people browsing here and googling terms, dig deeper!)

I think we need exploit mitigation _and_ process isolation _and_ the principle of least privilege.

Fwiw, the twitter article mentions capabilities. Something I can pontificate about! I've been lucky enough to chew a _lot_ of cud with some GNOSIS/KeyKOS/caps luminaries etc. And we were still mega-fans of the Capability Object Model but _not_ believers in Capability-Based Addressing. When I did some design work with Norm Hardy on the Mill CPU I designed a temporal variant of the former that protected ... memory. OpenBSD is actually damn serious about the former. The twitter link is advocating the latter as a fix for something?

I would love to chat with anyone who wants to convince me that Capability-Based Addressing _works_ or is workable. I know that others from KeyKOS etc moved more towards the caps addressing. Anyone want to read up on some of this stuff, I warmly recommend the papers and talks for CHERI, even though I'm not a fan of caps addressing.

Re:Writing Exploit-Resistant Code with OpenBSD by grawlinson on Monday May 06, 2019 @03:27AM (#19837477)
> I haven't been following any back-and-forth, but I'm a fan of exploit mitigation so I'll chime in and say to anyone browsing here that https://www.openbsd.org/papers/ru13-deraadt/mgp00001.html is an excellent explanation of them.

Is it possible to get this resource on a single page? Having to click through each page just to read a sentence or two is quite cumbersome.

Re:Writing Exploit-Resistant Code with OpenBSD by notaplumber on Monday May 06, 2019 @08:15AM (#19838665)
There's a thumbnail index for MagicPoint slides: https://www.openbsd.org/papers/ru13-deraadt/index.html

I also highly recommend checking OpenBSD's events page for additional slides/papers and videos.

https://www.openbsd.org/events.html

Re:Writing Exploit-Resistant Code with OpenBSD by willvarfar on Monday May 06, 2019 @03:38AM (#19837513)
Its talk slides, but I personally find the slides easy to just read, even if you have to keep clicking for the next slide.

A quick googling finds this https://events.yandex.com/lib/talks/103/ which is, I think, Theo presenting the slides on part II.

Re:Writing Exploit-Resistant Code with OpenBSD by cpach on Monday May 06, 2019 @09:36AM (#19839245)
Would be neat with a keyboard shortcut in one’s browser that would go the the next page. (E.g. increase 00001 to 00002, etc.)
Re:Writing Exploit-Resistant Code with OpenBSD by anonymousDan on Monday May 06, 2019 @07:34AM (#19838428)
What exactly do you mean by capability based addressing Vs capability object model? Is it the use of capabilities to grant access to particular chunks of memory? What do you see as the pros and cons?
Re:Writing Exploit-Resistant Code with OpenBSD by sebcat on Monday May 06, 2019 @10:17AM (#19839598)
Reposting this from the other day: https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/

Paper: https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/201406...

"Motivated by contemporary security challenges, we reevaluate and refine capability-based addressing for the RISC era. We present CHERI, a hybrid capability model that extends the 64-bit MIPS ISA with byte-granularity memory protection."

Re:Writing Exploit-Resistant Code with OpenBSD by willvarfar on Monday May 06, 2019 @09:02AM (#19839001)
The Object Capability Model https://en.wikipedia.org/wiki/Object-capability_model is the general approach of tracking priviledges at a fine grain.

Capability-based addressing https://en.wikipedia.org/wiki/Capability-based_addressing is hardware that implements 'fat pointers' that point to ranges of memory so its not possible for a program to address memory it shouldn't. Basically, it forces programs to be 'memory safe' https://en.wikipedia.org/wiki/Memory_safety even if written in memory-unsafe languages such as C.

Re:Writing Exploit-Resistant Code with OpenBSD by nickpsecurity on Monday May 06, 2019 @09:02AM (#19838999)
This free book is probably best place to start:

http://www.cs.washington.edu/homes/levy/capabook/index.html

The surviving, capability architecture is System/38 -> AS/400 -> IBM i. A side effect of better architecture is that they are also incredibly reliable. One person here described them as the tanks of their company's servers.

Re:Writing Exploit-Resistant Code with OpenBSD by brynet on Monday May 06, 2019 @08:26AM (#19838746)
A counterpoint-counterpoint, see OpenBSD's recent work on compiler/toolchain-based ROP mitigations for clang to replace ROP-friendy instructions with safer alternatives, and RETGUARD, which completely replaced the traditional stack protector on amd64/arm64 in 6.5.

Despite what people might think, OpenBSD only enables mitigations that have an acceptable overhead. And because of this work, for example, OpenBSD/arm64 kernel has _zero_ ROP gadgets at runtime, and OpenBSD/amd64 common scripts like ROPGadget.py will often fail to find diverse enough gadgets to even exec a shell.

https://www.openbsd.org/papers/asiabsdcon2019-rop-paper.pdf

https://www.openbsd.org/papers/asiabsdcon2019-rop-slides.pdf

https://www.openbsd.org/innovations.html

Re:Writing Exploit-Resistant Code with OpenBSD by peterwwillis on Monday May 06, 2019 @09:31AM (#19839206)
I really wish people would stop publishing useful information as tweets. It's like publishing a research addendum on fortune cookie papers. Besides it being hard to read, it's easy to lose.
Re:Writing Exploit-Resistant Code with OpenBSD by dvfjsdhgfv on Monday May 06, 2019 @11:25AM (#19840257)
Unfortunately the majority dictates the medium. As for the second point, if I consider the information worthwile, I make a personal copy of the volatile medium (this means not just social media, but any web page - if it's not on your computer, you don't control it and it can disappear at any moment).
Re:Writing Exploit-Resistant Code with OpenBSD by tedunangst on Monday May 06, 2019 @11:30AM (#19840312)
Maybe you can expand on why slowing down exploit dev is written off as zero value? If you're writing a zero day, I can certainly concede that this week vs next week has no practical effect.

But most users' exposure to vulnerabilities comes in the window between patch released and patch applied. It takes some amount of time to reverse a patch and develop an exploit, and users are racing against that time. The difference between just 24h and 48h can matter, no?

Re:Writing Exploit-Resistant Code with OpenBSD by pjmlp on Monday May 06, 2019 @01:02AM (#19836993)
I agree with the memory tagging part.

Which nowadays is only available on Solaris on SPARC, iOS and eventually Android (given Google's collaboration with ARM).

And even it is still isn't 100% bullet proof, it is better than not having it at all.

Re:Writing Exploit-Resistant Code with OpenBSD by yjftsjthsd-h on Monday May 06, 2019 @07:42AM (#19838461)
But SPARC and Solaris are basically dead, iOS isn't a general-purpose computing platform, and Android doesn't fare much better. Is there any way to actually get this on a useful desktop or work station?
Re:Writing Exploit-Resistant Code with OpenBSD by mugwort13 on Monday May 06, 2019 @09:30AM (#19839199)
"But SPARC and Solaris are basically dead"

This is not an accurate statement. Oracle is still actively developing Solaris 11.4 and releasing regular updates. They plan to support Solaris and SPARC systems to at least 2034. This does not sound very dead to me.

Re:Writing Exploit-Resistant Code with OpenBSD by pjmlp on Monday May 06, 2019 @08:15AM (#19838664)
Currently no.

Intel has dropped MPX support from newer generations, given that their design was buggy and no one bothered to actually make use of it.

So they decided that improving the design wasn't worthwhile.

Re:Writing Exploit-Resistant Code with OpenBSD by tyingq on Monday May 06, 2019 @07:45AM (#19838472)
Looks like some of the RISCV projects are supporting tagged memory as well.