News for hackers. Stuff that matters.
Re:The Linux Security Circus: On GUI Isolation (2011) by gizmo on Saturday March 05, 2016 @10:30AM (#11229714)
Another huge issue is that user-level programs can access all everything in the user's home directory which is where all valuable data resides. There is no reason why a tetris game should get access to all your financial documents, but that's how it works today. A single malicious user-level program can destroy everything of value on your computer and no elevated permissions are required. In contrast to iOS where all app data is siloed off, exactly as it should be.
Re:The Linux Security Circus: On GUI Isolation (2011) by ris on Saturday March 05, 2016 @10:50AM (#11229789)
"In contrast to iOS where all app data is siloed off, exactly as it should be."

Which is also why trying to do anything productive on a smartphone is such an uphill battle. Arbitrary programs not being able to exchange arbitrary files is totally crippling for any use-cases that go off the rails of what one single app wants to let you do.

Re:The Linux Security Circus: On GUI Isolation (2011) by gizmo on Saturday March 05, 2016 @11:07AM (#11229852)
Sharing data and interopability between applications is a hard problem, but Apple is on the right track. In any case, starting out with something with sound fundamentals and then improving usability is a much better approach than starting with something that is fundamentally broken and adding kludges to make it more secure.
Re:The Linux Security Circus: On GUI Isolation (2011) by b1340276 on Saturday March 05, 2016 @11:26AM (#11229902)
That may be a roadblock but the primary reason why smartphones are relatively unproductive is because a touch only interface has the disadvantage that you can only interact with things that are visible on the screen. When your screen is less than 7" big and 30% of that space is wasted by a virtual keyboard then the only way to design a UI for a smartphone is to have as few interactions as possible, otherwise we end up having to constantly scroll up and down. The end result is that a lot of apps are hiding core functionality behind the hamburger icon.
Re:The Linux Security Circus: On GUI Isolation (2011) by LoSboccacc on Saturday March 05, 2016 @11:48AM (#11229981)
copy paste already works wonder to share pictures and the like between multiple programs on iOS at least, one can easily extend the pattern in a desktop environment and even add more entry point as long as they are user initiated, kind of like you can access the clipboard in browser only if it's on the stack of a user initiated event.
Re:The Linux Security Circus: On GUI Isolation (2011) by pdkl95 on Saturday March 05, 2016 @03:26PM (#11230919)
How do I type

    for src in $(find . -type '*.png')
    do
        sdir="$(echo "${src}" | dirname)"
        name="$(echo "${src}" | basename)"
        dstdir="/mnt/www/images/${sdir}"

        optipng -out "${dstdir}/${name}" "${src}"
        convert -scale 120x120\> "${src}" "${dstdir}/small_${name}"
    done
into a GUI's "copy paste" feature?
Re:The Linux Security Circus: On GUI Isolation (2011) by LoSboccacc on Sunday March 06, 2016 @02:53AM (#11232879)
You don't there are plenty better ways to list and filter files check out how beos did it.

You could do literally the same and you didn't even need to drop to the console.

Re:The Linux Security Circus: On GUI Isolation (2011) by Sanddancer on Saturday March 05, 2016 @05:35PM (#11231407)
you long press the f for the terminal window to start hilighting text, and drag it to the e in done, and then choose copy.
Re:The Linux Security Circus: On GUI Isolation (2011) by JustSomeNobody on Saturday March 05, 2016 @11:08AM (#11229855)
This is my biggest pet peeve with iOS. That and the way background services act. Why can't I have an app that syncs my photos to my server run at night without the location hack? Ugh.
Re:The Linux Security Circus: On GUI Isolation (2011) by marcosdumay on Saturday March 05, 2016 @11:41AM (#11229954)
There ought to be a system level API that a program may call to get to read or write a user supplied file.

Opening any random file should be reserved to just a few core applications.

Re:The Linux Security Circus: On GUI Isolation (2011) by zanny on Saturday March 05, 2016 @01:35PM (#11230389)
Its called Mandatory Access Control. It has existed for over a decade in the mainline kernel. Ubutnu, Fedora, Suse - everyone but Arch, pretty much - supports one of its implementations.

The problem is more that I do not believe any distro is shipping a default-deny policy. Unknown programs are simply given the kitchen sink rather than having, say, user friendly prompts saying "this program has no access control and wants to open X or use Y, allow?"

But we definitely have the technology, and it does not take any heavy overhead isolation to do it.

Re:The Linux Security Circus: On GUI Isolation (2011) by noinsight on Saturday March 05, 2016 @03:01PM (#11230790)
> everyone but Arch

Arch has a grsec kernel in the repos if you want one...

Re:The Linux Security Circus: On GUI Isolation (2011) by zanny on Saturday March 05, 2016 @05:18PM (#11231344)
And nobody maintains prebaked PaX profiles for Arch, which makes the MAC part much less effective as a security feature.

There are two ways to do MAC - applications (or the distro) provides the profiles, that restrict execution to just what the program will use, and if it ever asks for anything else it should be suspect for exploitation. The other one is where you put your programs in learning mode, and that only hardens you against future exploits, not current ones, and you also lose the protection against untrusted software because by default everything is untrusted and you must trust everything on a case by case basis.

Re:The Linux Security Circus: On GUI Isolation (2011) by drdaeman on Saturday March 05, 2016 @12:12PM (#11230050)
It's not that simple, and it's easy to misdesign such API.

Say, VLC team had argued that a video player may need to open a supplementary subtitle file. If application can be only granted access to a single video file - that's impossible. I think there were other examples, but I don't remember those off-hand.

Re:The Linux Security Circus: On GUI Isolation (2011) by nine_k on Saturday March 05, 2016 @01:15PM (#11230280)
Filesystems are trees. VOX could have read access to a particular tree (~/Videos) and no access to everything else, including but not limited to ~/Documents/Finance
Re:The Linux Security Circus: On GUI Isolation (2011) by drdaeman on Saturday March 05, 2016 @08:19PM (#11232013)
But what if I want to watch ~/Downloads/big_buck_bunny.mkv?
Re:The Linux Security Circus: On GUI Isolation (2011) by nine_k on Sunday March 06, 2016 @01:51PM (#11234933)
Explicitly mark it as available by moving / hardlinking it to ~/Videos.
Re:The Linux Security Circus: On GUI Isolation (2011) by marcosdumay on Saturday March 05, 2016 @04:24PM (#11231157)
It's certainly not simple. This is a big UX problem, but one worth solving.
Re:The Linux Security Circus: On GUI Isolation (2011) by misterdata on Saturday March 05, 2016 @04:20PM (#11231138)
This is actually how it is implemented in OSX. If a sandboxed app shows a 'file open' panel then it automatically obtains the rights to read and write to any file selected (the open panel, or 'powerbox' as it is called, is implemented in a separate process so cannot be manipulated by the app). An app can also request a secure 'bookmark' to this file so it can persist file references.
Re:The Linux Security Circus: On GUI Isolation (2011) by chris_st on Saturday March 05, 2016 @10:47AM (#11229775)
You might be interested in the SubUser[1] project, which does exactly this application siloing for Linux.

[1] http://subuser.org

Re:The Linux Security Circus: On GUI Isolation (2011) by gizmo on Saturday March 05, 2016 @11:13AM (#11229871)
I like what they're doing, but applications have to be written from the ground up knowing that they live in a sandbox, so they can ask for the appropriate permissions in the appropriate places explaining why the extra permissions are needed. Otherwise the user experience is going to be pretty bad. Security doesn't work as an add-on.
Re:The Linux Security Circus: On GUI Isolation (2011) by heavenlyhash on Saturday March 05, 2016 @12:56PM (#11230191)
Nah, there's a lot of room for easy adoption.

For example, for a text editor like vim, here's a completely reasonable lockdown:

- see none of my filesystem... except `cwd` I launched you in

- you get a homedir that's persistent for this application

- (incidentally, whatever libraries you need are there; network namespaces dropped, clean env vars, clean pid space, etc etc etc.)

The things on this list involve essentially Nothing Special and no changes to the program, and at the same time manages to radically reduce the surface area a malicious program can mess with on my computer. Even if, say, a malicious version of vim somehow made it in $distro's package tree and was signed: this still makes me... well, pretty safe. The scope of damage is confined to... exactly what I just laid out on those two bullet points.

And subuser's configuration does an excellent job of exposing exactly those kinds of behaviors to you with very minimum amounts of fuss.

(A json file with `{"access-working-directory": true, "stateful-home": true}` is all you have to say to subuser to set up an application to get... well, hey, if these aren't self-documenting names, I don't know what is.)

Re:The Linux Security Circus: On GUI Isolation (2011) by benwaffle on Saturday March 05, 2016 @10:58AM (#11229821)
xdg-app is currently being developed by gnome and it does sandboxing like not giving Tetris access to your file system

https://wiki.gnome.org/Projects/SandboxedApps

Re:The Linux Security Circus: On GUI Isolation (2011) by zanny on Saturday March 05, 2016 @01:38PM (#11230401)
This has existed for over a decade in the form of mandatory access control (MAC). Any distro worth talking about has been shipping a MAC solution (Apparmor or SELinux mainly, even though I'd argue grsec / pax is way better) for years, the problem is more that I do not believe any of them use default-deny policies, because there is no mechanism to ask the user for permission for unknown programs or programs trying to act outside their allocated access controls.

But for anything you install from the main repos, it will almost always have an apparmor / selinux profile installed along with it to prevent this kind of arbitrary filesystem access.

Re:The Linux Security Circus: On GUI Isolation (2011) by mtgx on Saturday March 05, 2016 @11:43AM (#11229959)
I think Subgraph has some application-level sandboxing, and of course there's Qubes (from the author of this article), which can be used for "risky" apps, too.