![]() |
|
#126
|
||||
|
||||
|
Native Client Helper
Quote:
Chrome Sandbox Quote:
Chrome Quote:
__________________
Last edited by Hungry Man : September 19th, 2012 at 05:00 PM. |
|
#127
|
||||
|
||||
|
Wow! Maybe mine's overly simple...
Code:
I guess a lot depends on what's included in the abstractions profiles. I threw in some abstractions that probably aren't needed, but I just wanted to simplify the process of building the profile. I confess there was some guesswork on my part as well Still, yours is obviously far more granular than mine. Are you using the stable release of Chrome? That's what I'm using. Initially I was using the Developer version, then I uninstalled it along with the profile, installed the stable, then re-built the profile.
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter |
|
#128
|
||||
|
||||
|
I would rewrite yours, seems pretty loose. All of those capabilities can be dangerous. Strict file access though and that's always important.
Mine isn't working right now. I might start over, I'm having some weird issues. I use Chrome Beta. I would suggest you sandbox the chrome-sandbox and then work from there.
__________________
|
|
#129
|
||||
|
||||
|
I see your profile includes the same capabilities, though, and then some??
I may just have another go at it, however, both for interest sake and to see if I can tighten it down a bit more. Maybe my use of wildcards is too liberal but I didn't want an overwhelmingly large profile. The executable masks confuse me the most as to what to set them at. When I use aa-genprof and scan after I put the program through its paces, it gives me options such as Child, Inherit and Profile. I usually just choose inherit because it seems to always work and then from what I understand it's more secure than Px or Ux. I still have some figuring out to do on Apparmor because as it stands now I don't yet have close to a thorough understanding of how to properly build profiles, other than just going off the aa-genprof scan suggestions.
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter |
|
#130
|
||||
|
||||
|
The sandbox profile contains those capabilities but the other profile doesn't.
So an exploit in the sandbox process could do those things but an exploit in the other processes would not be able to. Reducing file access is really important. Especially to areas of /proc/ and whatnot. Chrome obviously needs very little help to be secure on Linux what with the sandbox but it's nice to have something on top of it all. Quote:
Inherit means it runs with the same rights as your parent profile. If Chrome opens Deluge as Ix Deluge can only access what Chrome can access. If you separate Deluge into it's own profile (Px) it'll only have access to what it needs - this is ideal. For something like 'which' or 'wget' it's fine to use Ix because Chrome is using it to modify its own files. Ix is perfect for this. Cx is good for when you need to open another process that'll access files outside of the Chrome profile but that you don't want to profile separately. It takes some time to get used to it. I would suggest you have a look at PaX and Grsecurity too. I'd say it's like EMET on steroids but that doesn't even give it enough credit.
__________________
|
|
#131
|
|||
|
|||
|
Way over my head guys, it would nice if you could make a guide or a blog on terminal commands.
|
|
#132
|
||||
|
||||
|
Quote:
Well, there are a lot of sources for that. There are, e.g, the man pages on http://manpages.ubuntu.com/manpages/...pparmor.7.html and http://manpages.ubuntu.com/manpages/...armor.d.5.html. You'll get more infos on http://wiki.apparmor.net/index.php/Documentation. A very detailed documentation is http://wiki.apparmor.net/index.php/A...licy_Reference Another good source is http://doc.opensuse.org/documentatio....apparmor.html Last edited by tlu : September 19th, 2012 at 06:47 AM. |
|
#133
|
||||
|
||||
|
Quote:
More infos on http://doc.opensuse.org/documentatio....profiles.exec AND http://wiki.apparmor.net/index.php/A...#Execute_rules |
|
#134
|
||||
|
||||
|
Thanks tlu, i'll check those out
![]() @HM, I'll take aa for another spin profiling Chrome again, just to see if I can't restrict it some more without breaking its functionailty. Thanks!
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter Last edited by wat0114 : September 19th, 2012 at 12:23 PM. |
|
#135
|
||||
|
||||
|
Quote:
I wrote a quick guide a while ago.
__________________
|
|
#136
|
|||
|
|||
|
OK, I switched from Chromium to Chrome on 12.04. I created a profile from scratch for both Chrome and the sandbox. I was as restrictive as I could be. Yes, I did use some abstractions, but I checked each one to make sure there was nothing superfluous (also checked to make sure there were no Ux, etc.).
Here's the Chrome profile: Code:
Here's the sandbox profile (I made a separate profile for it). With this profile, I actually copied the original Chromium profile that comes with Ubuntu and added a line here and there. The default profile in Ubuntu was always pretty restrictive (for the sandbox at least): Code:
Also I made a profile for /usr/bin/xdg-settings. You will need this for the profile to work correctly. It is below: Code:
So, you will have three files in /etc/apparmor.d: 1) opt.google.chrome.chrome 2) opt.google.chrome.chrome-sandbox 3) usr.bin.xdg-settings Try it out and let me know how it goes. TO DO: I am going to try and make more sub-profiles for things like /bin/which, /bin/grep, /bin/sed, /bin/dash, /gnome-open, etc.. |
|
#137
|
||||
|
||||
|
For things like which and grep and sed and dash etc it makes more sense to do child profiles.
Becaues Chrome might just use grep to pull in a single file to a single location. But a full grep profile would likely need access to a lot more than that, so a child profile woudl be tighter. edit: Finished up the Chrome profile - no more abstractions. Removed access to a lot of libraries.
__________________
Last edited by Hungry Man : September 19th, 2012 at 04:34 PM. |
|
#138
|
|||
|
|||
|
Quote:
I tried /bin/dash, got this message: Quote:
So I guess that is a no-go. I will try others and see if the same warnings occur. |
|
#139
|
||||
|
||||
|
Here's a question for you apparmor experts: how do you know what type executable qualifier to use for a given executable path when you're generating rules? In a few cases I changed ix to Px but it ended up breaking the desired action, so of course I had to revert to ix. Do you just choose the most restrictive qualifier then "downgrade' to something more liberal if it doesn't break, or do you know what to choose? aa-genprof offers several choices but in most cases I'm completely guessing which one to choose. I always get a warning something to the effect of: some require "LD_PRELOAD" or "LD_LIBRARY_PATH" if I choose Px
Also, I can't help but notice "different folks =different strokes" when I compare Hungry Man's Chrome profile to chronomatic's. They are so completely different! Who's right and who's wrong?? Or do both of you have a solid profile with just a different approach?
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter Last edited by wat0114 : September 20th, 2012 at 08:42 PM. |
|
#140
|
||||
|
||||
|
Quote:
For example... I have Java run with a separate profile because I know that when Chrome launches Java Java will need to access files besides what Chrome uses. But I have an inherit (ix) flag for /bin/which because Chrome is going to use /bin/which on its own files - it needs no new rights. I use Child when I need to give the new process new rights but when I don't want that process to *always* run in a profile, only when launched by Chrome. Quote:
Quote:
I also removed all abstractions and I avoided variables wherever I could. I'd say mine is more secure but I wouldn't say his is insecure by any means, both profiles avoid any Ux or writing to dangerous places. It's all a matter of understanding what each action does and after that things get a lot simpler.
__________________
|
|
#141
|
|||
|
|||
|
Thanks for the links tlu, still way over my head. I'll read up on it though.1111
|
|
#142
|
|||
|
|||
|
Quote:
Always use "ix" unless you have a separate profile for that process. In that case you can use Px. If you select Px when there is no profile defined, apparmor will begin writing a profile for that process. Some apps may not work with "ix" which is why you sometimes see Ux. Instead of using Ux, you should take the time to write a separate profile for that process. Then you can use Px. Quote:
It will vary slightly based on which version of Chrome and what exactly you use Chrome for. I use abstractions, HM doesn't. However, the abstractions I use have all been checked for weaknesses and I haven't found any. I try to stay away from "base" and a few others, but some of the abstractions are fine to use. For instance, "fonts" and "dbus-session" and "gnome" are fine to use. I have checked them and they are pretty restrictive and have no "Ux" entries. But all in all, I feel my Chrome profile is pretty restrictive. |
|
#143
|
||||
|
||||
|
Thank you so much for the help, HM and chronomatic! That helps clear things up, especially re the Px leading to a separate profile. HM had mentoioned something along those lines several posts back when he advised I use Px then create a separate profile for Java, but I coinfess I didn't fully understand at the time.
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter |
|
#144
|
||||
|
||||
|
Having Chrome open Java in a separate profile is useful. If you use ix you effectively combine your Java and Chrome profiles. That's why its good to separate them.
I posted the Java and Chrome profiles on my blog for reference. My profile won't work for everyone. I don't use chrome to print - it needs access to new libraries that I haven't allowed. But by blocking access to those libraries and others I've reduced the visible attack surface a lot. That + the multitude of security enhancements in PaX and Grsecurity means Chrome is just not a viable process to attack. I would suggest you look at grsecurity if you're interested in taking your security setup as far as it can go.
__________________
|
|
#145
|
|||
|
|||
|
Quote:
I compiled a Grsec kernel for 12.04 and while it will boot, I cannot install the nvidia graphics drivers, so I gave up. |
|
#146
|
||||
|
||||
|
Yeah the GPU drivers can be the biggest issue. I use the open source ones. I've got it working well with the open source ATI drivers. The closed source ones work too but you have to disable one of the PaX features.
__________________
|
|
#147
|
||||
|
||||
|
Since I use nVidia gpus I better hold off on GRsecurity at least for now.
__________________
Win 7x64 Ultimate SUA | UAC @ Max | AppLocker w/DLL enforcement | Win fw w/advanced security| EMET 3.5 | Firefox w/NS +AdBlock+ plugins | GPO restrictions | Bitlocker and Truecrypt | ShadowProtect images | IFW data backups + dual boot to XP Pro: GPO, SRP, Jetico firewall w/Process Attack filter |
|
#148
|
||||
|
||||
|
There's probably a specific grsecurity feature that doesn't work with it. You could always just stick to safe ones like chroot hardening and restrictions. Just stay away from PaX features.
__________________
|
|
#149
|
||||
|
||||
|
Another apparmor profile combined with an apparmor sandbox profile for your perusal.
http://www.broadbandreports.com/foru...-On-the-Planet
__________________
|
|
#150
|
|||
|
|||
|
Quote:
I wrote that. I am KodiacZiller on BBR.com. ![]() |
| « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|
|