CopperheadOS: A hardened open-source operating system based on Android
copperhead.co
copperhead.co
And track/logs all of them per Apk.
Don't run programs you can't trust.
edit: i never touched ios (except for my employer, but it's their data) and my Android phones all have my kernel and pf tables limiting all apps network access. specially to the local network!
There always are ways to defeat any security; the goal is to make it more difficult and costly for the attacker, and blacklists do that.
> whitelisting just means you have to jump through hoops just to get your work done, which users will //always// do.
I agree that's true for most end-users, but the HN crowd and other power users could make good use of it.
I'll add: I haven't come across another fork of Android that focuses on security so I'm rooting for these guys.
https://github.com/copperhead/bugtracker/issues/184
https://github.com/copperhead/bugtracker/issues/194
EDIT: To avoid any possible confusion, Google Apps / services aren't included in Copperhead; I'm talking about other connections to Google.
CopperheadOS is not going to outright prevent connections to Google. That doesn't mean the OS is going to have Google services.
The only known case where AOSP connects to Google is an HTTP GET to test if internet access is available. It could just as easily use something like example.com but Google's domain is known to have effectively 100% uptime. All that switching it would accomplish is pinging a CloudFlare/OpenShift server instead of Google. And CloudFlare might break it for users behind a VPN... so in the end, what would that really accomplish?
I didn't meant to imply that; I'll clarify.
> The only known case where AOSP connects to Google is an HTTP GET to test if internet access is available. ... in the end, what would that really accomplish?
The GET tells Google and the user's ISP, and probably a few others, that someone at the IP address is using Android, plus whatever is in the GET headers, and that they just booted/woke their phone (which also locates the user at home or elsewhere, in some cases). It shouldn't be hard to identify people by IP. EDIT: In these days of one mass surveillance overreach after another, by government and business, it's doesn't seem rational to assume these companies aren't monitoring users and collecting all the data they can.
> The only known case where AOSP connects to Google ...
When I read this I think, 'Copperhead's priority isn't investigating whether there are other cases.' That is Copperhead's choice; I have no criticism of them.
Personally, I very much would like just one OS that prioritizes privacy (which is attacked much more than the exploits Copperhead focuses on) and gives me full end-user control over the information my device sends to others. EDIT: Again, I appreciate Copperhead's efforts and free OS; also, I realize they can't implement everything at once
It's not a browser making the request so there's not much information in these requests. It's just a GET request with an unused result. It only checks to see if it succeeds. Every Android device does this, so it barely leaks any information. If it was changed to a CopperheadOS-specific URL, it would actually be leaking more information to networks.
I don't think there are other connections to Google in the base system but that doesn't extend to the user-facing apps like Chromium. I know for a fact that it doesn't make any other connections in normal usage, but there are a lot of edge cases.
We could make the internet access checks optional, but what about update checks? Those are leaking strictly more information (a phone connecting to builds.copperhead.co runs CopperheadOS and that can be seen without access to the HTTPS data) and it tells us which device is being used since it has to ask for the available updates. We don't really know how many people use CopperheadOS, but it would be possible to make a solid estimate from the update checks. Most people won't change the default of 1 check per day, so the number of checks per day in total is the approximate number of users, and the server has the IPs they connected from. It doesn't log anything itself but CloudFlare could.
F-Droid also does updates checks itself, so any F-Droid repositories that are enabled end up with similar information.
I am not really sure how this could be improved. You can use Tor... but in some ways that makes the situation worse.
An option to disable the internet access checks is possible, but I don't know what it would really accomplish. I don't want to make changes without a clear threat model in mind. So I'm not inclined to touch stuff like the internet connectivity check unless there are clear benefits rather than it just feeling right to people.
EDIT:
Those are all excellent points. Where there are tradeoffs, perhaps you could put some settings in your security slider UI.
An optional software firewall that requires outgoing connections to be whitelisted would be great for my purposes, but everyone knows how painful those can be.
Regarding connections, I've come across the following potential issues; I haven't looked into them but they give me the impression that locking down Android's network activity is too complex even for technical users, and that only a carefully secured OS will solve the problem (a big reason I've looked forward to Copperhead):
* Some connections are made during bootup so an effective firewall somehow has to load early, or at least first in the network stack.
* The address of the DNS server, Google's, is hard-coded in an in-kernel DNS resolver. Among other issues, it makes it hard to choose a different DNS server or to identify the application doing the lookup.
* Some other kernel connection activity is hard to stop even with a firewall [1][2]
> I don't want to make changes without a clear threat model in mind.
Confidentiality is part of security, and exploits of confidentiality by businesses are almost certainly the most common security exploits.
People tend to overlook them because usually they are technically legal and currently they are a sort of technological norm -- though remember that lead and asbestos were once norms. Certainly users should have the option; they should control their data.
----
[1] http://forum.xda-developers.com/showpost.php?s=12c116f17804f...
[2] http://forum.xda-developers.com/showpost.php?s=a5c6cb3da0cb6...
https://googleprojectzero.blogspot.com/2015/09/stagefrighten...
And the systems continue to get hacked through the very holes covered in bandaids. As he said, if you're using a bandaid, you're covering up something inherently broken.
But in a mass-produced software/hardware? Realistically my choice for productive desktop is OSX/Win/Lin. We can talk about cool, perfect solutions for a very long time. In the meantime I'm making sure my apps are running with ASLR. I hope you're not actually advising people not to use it, just because there's some ideal solution maybe possible on the horizon, that doesn't run any apps they need?
Btw, solutions like OKL4 exist already and are fielded w/ Android + other OS support. Android hardening tech also exists. Cryptophones also exist. Not perfect, future tech so much as existing tech companies and FOSS developers mostly ignore. With exception of Blackberry that tried something decent by integrating QNX with stellar results.
> With exception of Blackberry that tried something decent by integrating QNX with stellar results.
Are you saying Blackberry 10 is significantly more secure than Android and iOS?
Far as Blackberry, no Im not saying it's more secure. I'm saying using the QNX OS made it more secure, reliable, and responsive than it was. That's because of QNX's great design.
(That's not to say ASLR isn't great as a way to harden the C and C++ code at the core levels of the system, of course. Daniel Micay's work here is very solid.)
I'm just ticked off by people lately repeating that ASLR is a bandaid, like it's a bad thing. It's a bandaid, but it can still crash-instead-of-own your app/system with 99.XX% probability. Why complain about it being accepted rather than say: "great, we're nowhere near secure, but at least we have something that works most of the time, now we can work on better protection". Safe runtimes can fail too (CVE-2015-3837 / serialization bug).
Basically, if anyone reads threads like this and thinks "it's a bandaid, it's not needed / it doesn't protect me", then we're all worse off.
Note that using bandaids is A Good Thing if you have something broken already. It's just best to avoid what causes the breaks where possible and look for prevention measures. Our industry loves bandaids while systematically ignoring stuff that negates a need for them. So, I call out that problem but doesnt mean someone shouldnt use ASLR if it's the best bandaid they have.
Despite Android's usage of Java, most vulnerabilities are memory corruption bugs. It makes sense to focus on those since it's low-hanging fruit. High-level security/privacy changes involve much more subjective changes and usually have a perceptible impact on users. Hardening the base system is invisible, and that's a good thing.
Android already does an amazing job at the access control level via very locked down SELinux policies. There's a lot of work to do there, but it involves making changes that are going to make some Android developers/users unhappy. For example, `hidepid=2` made it into Android N from CopperheadOS and there's going to be fallout from that: https://code.google.com/p/android/issues/detail?id=205565. I think Google will end up shipping it, but it's not a sure thing.
https://copperhead.co/blog/2015/06/11/android-pax
Protection from zeroDays Prevents many vulnerabilities and makes exploits harder
So they don't claim to provide immunity from zero days, but
This is really sad to me. :/ As far as we've come, everything mobile is still irritatingly device-specific.
But instead they told everyone to just build it themselves... resulting in the current situation. They could have also solved the updating problem in the same way.
No big deal though, someone will make this build on other platforms if there's interest. It's all open source and I'm sure some 14 year olds on XDA are already racing to make it build on their phone from 1982. Then I'll probably flash it. Because that's apparently who I trust to write my phone ROM.
But my understanding is that they couldn't "just" do something like what Windows does, they don't get to boss the OEMs around in that capacity, some of the big ones effectively have their own Android forks (Samsung) or have already forked (Amazon), and if Google starts bossing them around they're just as likely to fully fork it as be brought into the fold.
They ABSOLUTELY do get to boss OEMs around in that capacity.
So no, they definitely don't get to boss the OEMs around. Unlike Microsoft with Windows they don't get to just say "you can't ship Windows^HAndroid anymore".
They do have a bit of hold over the OEMs in the form of it being a PITA to fork, access to Google's own apps etc. So I'm not saying they have no leverage, but it's a lot less than what Microsoft has, and definitely not enough to say "my way or the highway".
As a result, the device is supported only by the kernel they provide, rather than by generic Linux. And their kernel never gets updates.
ARM do not really have this. Unless you know exactly what device is on what address range etc, you risk sending the wrong signals and fill its firmware with garbage or something.
This means you can't really cook up a generic kernel package and apply it across the product range as you can on PC.
Your statement is true, however, that someone knowledgeable of the actual hardware has to create the correct FDT. This is slowly getting better and easier.
The more intractable problem, as others observed, is that ARM hardware vendors tend to throw together a custom kernel for a given ARM processor and board and then abandon it.
As someone that is still using a phone from 2012, this is problematic since I have no intention of getting a new phone that often. Is there no stable, secure, and open combination of OS and smartphone out there?
[0]https://download.cyanogenmod.org/?type=nightly&device=galaxy...
It kinda works. Had to force a move from dalvik to art, and force HW rendering - there are quite a few stalls. I haven't tried encrypting the device; it's already slow enough.
Ironically(?) Firefox works better than Chrome. Signal seems to work OK (only for sms so far due to missing network effect; I don't message anyone with signal installed).
I'm considering just getting a new battery (replaceable battery, yay!) - as it is cheaper than getting an LG g3, nexus 5 (no memory card slot, bleh) or a Sony xperia z3 (waterproof). I wouldn't really say it's usable - but a g2 or 3 might be OK. [Ed:The low RAM on the early devices appear to me to be the worst issue. I wouldn't recommend buying a device with less than a gig of ram. the Galaxy S has ~384mb.]
The three most recent stable "snapshots" are from 2015-09-01 00:25:00, 2015-06-26 07:37:01, and 2014-11-12 08:14:51. Given Google has been pushing monthly security updates for a long time, I'd have massive doubts about about the status of security updates for it.
What we need is more original codebases in the mobile ecosystem, not endless modifications on top of the same old shaky foundation.
I'm not too familiar with security on Android (much more familiar with iOS) – what are the weakest links?
Both CyanogenMod and CopperheadOS should be able to run smoothly withoug google-specific apps I believe, which is nice for some.
This is an exaggeration; you can find plenty of solutions that don't require Gapps, AFAIK. However, I don't know that the typical end-user would be happy solving that problem or using imperfect workarounds. For one thing, you need some sort of GApps solution to access the Play store, AFAIK.
> the vast majority of applications actually require Google services to run
There are plenty of GApps subsitutes for people who want them; I've done some homework on it, but haven't gotten around to trying them and all of the following is "AFAIK"; it's just based on a bunch of reading.
----
These appear to be the two leading substitutes:
* TKApps: 6 editions containing varying subsets of Google Apps
http://forum.xda-developers.com/android/software/tk-gapps-t3...
http://forum.xda-developers.com/android/help/qa-tk-gapps-hel...
* MicroG Project: My impression is that this is most carefully engineered option. In addition to its full suite I think it gives you the option of installing only one component, the stripped down GMSCore, which provides substitutes for several Google Play Services APIs.
http://forum.xda-developers.com/showthread.php?t=1715375
http://forum.xda-developers.com/android/apps-games/app-micro...
----
Also of interest:
* Blankstore: For minimal Play Store access, or maybe just the API to keep other apps happy.
https://github.com/mar-v-in/BlankStore
http://forum.xda-developers.com/showpost.php?p=29115263&...
* Fakestore: (I don't have a link, but it's the same concept as Blankstore)
* BeansTown106's Gapps: (I don't have a link, but your search engine should find it), "very complete and work quite well" per a dev of OmniROM, a leading Android fork
* GApps Browser: Google Apps sandboxed, so can login there without being logged on in web browser, for confidentiality
https://f-droid.org/repository/browse/?fdfilter=browser&fdca...
Rule #1 of CM is "Don't break apps".
We recognize that there are nefarious apps out there, and many of our users would actually understand how to use permission controls (and the implications of using them). With our huge userbase, we have a responsibility to ensure that applications aren't running in a hostile environment, and work as designed.
We are all privacy advocates at CM, but I am not willing to compromise our good relationship with application developers in order to implement features like this.
Much more here:
https://plus.google.com/+SteveKondik/posts/iLrvqH8tbce
[1] See Kondik's 29 May 2013 message in https://jira.cyanogenmod.org/browse/CYAN-28?page=com.atlassi...
[1] https://www.debian.org/security/ [2] https://access.redhat.com/security/security-updates/#/securi... [3] https://www.suse.com/support/update/ [4] https://www.freebsd.org/security/advisories.html
But no, in all seriousness, Copperhead (and AOSP itself) are open source. Go audit it for NSA backdoors yourself if you're worried about that.
I don't see how it gets there with such a narrow hardware selection.
Do they have great security track records? I know a lot of the integrations like games into their systems are terribly insecure.