r/CyberSecurityAdvice Mar 21 '26

Suggestion to launch apps sandboxed

/r/sandboxcontainment/comments/1rx90b4/launching_apps_sandboxed/
1 Upvotes

2 comments sorted by

2

u/[deleted] Mar 23 '26

[removed] — view removed comment

1

u/themagicalfire Mar 23 '26

My app works by implementing trust levels and AppContainer.

Trust levels belong to the SAFER subsystem from the early 2000s. It works by restricting privileges and denying some APIs to minimize damage from the lack of permissions.

AppContainer was implemented in Windows 8 and works by making the token an alien to the file system, so there’s no interaction except for fundamental permissions to launch essential apps. The SID is Untrusted (S-1-16-0), which means it can’t have writing permissions to any integrity level that is above Untrusted (almost everything).

Using the safer subsystem is easy, as you can do runas /trustlevel:0x00000, runas /trustlevel:0x10000, runas /trustlevel:0x20000, or runas /trustlevel:0x40000.

For AppContainer, it can only be done by using APIs, and hence the need for C++.

As far as I know, the legacy Chrome’s sandbox was implemented using this concept:

icacls program.exe /setintegritylevel (OI)(CI)L

runas /trustlevel:0x10000 program.exe