News for hackers. Stuff that matters.
Re:Ask HN: How do you trust that your personal machine is no... by mike_hearn on Monday January 16, 2023 @07:02AM (#34399779)
MSIX doesn't implement sandboxing. Apps can opt in to being sandboxed via that tech, but you can also write totally unsandboxed apps. There's also a very light weight app container mode called (internally) Helium which just redirects some filesystem and registry stuff, but the goal is to make uninstalls clean, not security.

The Windows kernel does offer an impressive number of options to lock down processes. Look at the Chrome sandbox code some time. The Windows API is huge but you can really lock it down a lot. The macOS sandbox architecture is, however, the best. The Linux approach is sadly in third place.

Re:Ask HN: How do you trust that your personal machine is no... by mwcampbell on Monday January 16, 2023 @08:19AM (#34400311)
Is Helium mandatory for MSIX-packaged apps?
Re:Ask HN: How do you trust that your personal machine is no... by mike_hearn on Monday January 16, 2023 @11:39AM (#34402395)
I think they recently added a way to opt out of it entirely. That said, it does very little and because it's not a sandbox it's easy to 'escape':

• Copy an EXE to %TEMP% and run it from there.

• Use a Win32 API flag to start a process (of any path) outside the app container.

There are only a few cases where Helium is an issue and they're all easy to work around. One example is writing a log file to your app private UserData directory and then opening Notepad on it. If you do it the 'naive' way then Notepad won't be able to find it, because you'll pass a redirected path which it can't see. The fix is simply to resolve the redirect before passing the argument to Notepad using a Win32 API call.

I know we talked about Conveyor a few days ago so I'll note here that if you package a JVM app with it then the %LOCALAPPDATA% and %APPDATA% environment variables are rewritten to their target locations automatically, so as long as you use them to decide where to write app private files then their paths will be visible to other apps, avoiding the Notepad issue. This doesn't apply to native or Electron apps though, at least not at this time.

Re:Ask HN: How do you trust that your personal machine is no... by actionfromafar on Tuesday January 17, 2023 @04:22AM (#34410603)
Thanks, that's very useful info for me.
Re:Ask HN: How do you trust that your personal machine is no... by helloooooooo on Tuesday January 17, 2023 @04:33PM (#34419583)
App silos are pretty neat, I also find it kind of shameful that server silos are locked down to server SKUs. I would figure there could be some significant benefit to using them in browser renderer processes.
Re:Ask HN: How do you trust that your personal machine is no... by mike_hearn on Wednesday January 18, 2023 @04:59PM (#34433730)
Chrome does use app containers for its kernel sandbox.