News for hackers. Stuff that matters.
Re:L4 microkernels: The lessons from 20 years of research an... by tptacek on Tuesday September 20, 2016 @11:10AM (#12540096)
What's your sense of the number of IoT vulnerabilities that are due to misconstrued OS semantics? Mine --- and I've done a bit of work here, but not that much --- is that there aren't that many.

Really I think it depends on what you're doing. If the work you're doing is fundamentally kernel work --- if it's all about interacting with the security boundaries of the hardware (not just "interacting with hardware", like getting the bits from an RF codec, but manipulating hardware shared by attackers, like the iPhone SEP) then L4 is a pretty huge security win.

Otherwise: the problem you have isn't your OS, but the programming language you're using to build with.

Re:L4 microkernels: The lessons from 20 years of research an... by nickpsecurity on Tuesday September 20, 2016 @12:57PM (#12541006)
IoT isn't really target for these things. Language or spec-level security is more important. I agree with you there. Isolation mechanisms are still important for many embedded devices, though, if security is a concern. Here's a few I've seen in various products or academic programs:

1. Device driver isolation. Wacky drivers can take down the system. Better to take down and restart the driver. QNX was first I know of that did this with excellent reliability benefits. Many of them do now in RTOS space. MINIX 3 takes it to desktops and servers.

2. Monitors like in Copilot system or for recovery-oriented computing that expects input to crash or subvert main process. So, outside process is necessary for detection of anomalous behavior and recovery. Periodic restarts are another trick used in that field to clear out subtle errors that build up over time or persistent malware. Best to be in different address spaces.

3. Dedicated process, as in Nizza and Turaya, for containing application secrets where external processes can call to have random numbers generated, signatures performed, etc but not actually access the internals.

4. Same thing for logging purposes where interface between main app and logging component is write-only. Prevents accidental or malicious elimination of audit trail. I did that myself many times. Shapiro et al did it for repo security.

5. Finally, separation kernels like INTEGRITY-178B can ensure predictability of certain operations and statically enforce a scheduling policy. That's important in real-time systems where a number of tasks are running where one can screw with the other. So, they use things like ARINC schedulers with fixed-sized partitions operating in fixed intervals. Watchdog timers are also popular here. Also is a strategy for eliminating covert, timing channels at partition level for select few that need that.

Re:L4 microkernels: The lessons from 20 years of research an... by pslam on Tuesday September 20, 2016 @03:26PM (#12542515)
The problem is it takes more than just implementing the "kernel" (as in low-level access aka HAL) work under L4. You need to apply that compartmentalization all the way through the stack, and even subdivide applications into smaller chunks of responsibility.

What you typically get is a neat subdivision of all the HAL bits, but everyone stops once they're plugging in applications. This is partly because there's normally a large amount of shared/legacy code which needs importing, and partly because people don't recognize the benefits of partitioning an app.

It's not all bad - at least you can be reasonably confident that one compromised app, or part of the HAL, can't be trivially used to compromise the rest of the system. But, as you say elsewhere here, if there's just one thing you're doing, then all that effort didn't really improve things.

Re:L4 microkernels: The lessons from 20 years of research an... by hinkley on Tuesday September 20, 2016 @07:36PM (#12544273)
I wonder if anyone will manage to create a tool for Rust that can map out code partitions, or near partitions, based on access patterns of object ownership. At some tipping point a little bit of data sharing could be refactored into message passing and finish the job right.
Re:L4 microkernels: The lessons from 20 years of research an... by nanolith on Tuesday September 20, 2016 @11:56AM (#12540479)
If done well, formal verification of kernel level services and how these use runtime protection built in hardware can absolutely reduce the attack surface of application level code. The key is to move critical services that attackers would wish to exploit into a formally verified sandbox. That is the real power of systems like seL4, even though seL4 isn't itself really geared toward the sort of chipsets commonly used in consumer grade IoT products. However, a system _like_ seL4 can absolutely improve application level security, as long as the application is constrained by the architecture of the OS.
Re:L4 microkernels: The lessons from 20 years of research an... by tptacek on Tuesday September 20, 2016 @12:31PM (#12540788)
Can you describe this with an example of a realistic use of L4-enabled sandboxing for a single-function IoT device?

(I've done some L4 work so you don't need to spend a lot of time explaining.)

General purpose OSs like iOS? No question: L4 is a major win. But that's not what the discussion here is really about.

Re:L4 microkernels: The lessons from 20 years of research an... by nanolith on Tuesday September 20, 2016 @06:24PM (#12543911)
Case in point: cryptography, authentication, and authorization are each very sensitive operations which are prone to both gadget attacks and sidechannel attacks. Sandboxing these operations by creating well-defined boundaries between application code and these algorithms and protocols can ensure that application level bugs cannot creep into these critical services.

Consider, for instance, that it is possible to separate TCP/IP or wireless protocol stacks from authentication code so that, for instance, a packet fragmentation bug can't be exploited to influence authentication level decisions. This is classical defense in depth strategy, but enforced through both runtime and formal methods.

Re:L4 microkernels: The lessons from 20 years of research an... by indolering on Tuesday September 20, 2016 @07:20PM (#12544194)
You wouldn't, SEL4 isn't designed for embedded systems. That's what NICTA's eChronos [1] is for : )

1: http://ts.data61.csiro.au/projects/TS/echronos/

Re:L4 microkernels: The lessons from 20 years of research an... by nickpsecurity on Tuesday September 20, 2016 @10:31PM (#12544997)
seL4 is designed for embeddee systems. That's why it mainly targeted ARM. Gernot Heiser even said so. I believe eChronos is just targeted for embedded devices with more constrained hardware.
Re:L4 microkernels: The lessons from 20 years of research an... by indolering on Wednesday September 21, 2016 @03:56PM (#12551662)
> I believe eChronos is just targeted for embedded devices with more constrained hardware.

I guess it all depends on which meaning of IoT and embedded you are using.

Re:L4 microkernels: The lessons from 20 years of research an... by nickpsecurity on Wednesday September 21, 2016 @04:48PM (#12552080)
No MMU is usually the differentiating constraint when there's two RTOS's. I dont use IoT because it's a BS buzzword.
Re:L4 microkernels: The lessons from 20 years of research an... by mafribe on Tuesday September 20, 2016 @11:16AM (#12540145)
I'm happy to believe that almost all IoT vulnerabilities are application level problems.

The beginning availability of verified kernels and compilers makes it much more worthwhile to invest in formal approaches for application level vulnerabilities.

Re:L4 microkernels: The lessons from 20 years of research an... by nickpsecurity on Tuesday September 20, 2016 @12:48PM (#12540925)
See my comment. It has top approaches to that which already delivered implementations.
Re:L4 microkernels: The lessons from 20 years of research an... by tloble on Tuesday September 20, 2016 @11:21AM (#12540198)
'Not that many' is not really acceptable for many applications, and I'm not talking only about IoT, but self-driving cars, surgery robots, rockets, etc.