Tuesday, February 2, 2016

[Discussion] Security-Focused Marshmellow-Based ROM

Hey all,

I've been toying with some ideas for improving security / implementing existing security tools / creating a security-focused ROM for the ZF2. I thought I would bring my ideas here and invite discussion on the ideas / take improvements and suggestions from the community.

Purpose for this Post:
This discussion is for envisioning, dreaming, brainstorming. I want to put my ideas out there and have the community improve them. Currently there are a number of facets of mobile security that have a large number of options / apps available for managing them:
- Internet traffic encryption: OpenVPN apps (many available)
- EncFS style disk encryption: built in encryption tool, Kryptonite, LUKS, etc
- Per-app firewall, internet denial: AFWall+
- Secure texting: Text Secure and I'm sure there are others
- Keychains: KeePass, others
- Secure keyboards, etc
For the person who wants to use all of these features, keeping apps updated and properly working is a LOT of work. The idea would be to integrate these tools into a ROM with a simple GUI control for all of them, and the updates for the tools would come via the ROM updates. Perhaps this post may spark a change in the way current things are done, and a separate ROM wouldn't be needed. If CM implemented some/all of these features, it would affect a lot (all?) of ROMs that are currently made for this device.

I would see the following principles as important to this idea:
- Encryption without reliance on external services - encryption done on the device, and key exchanges would be done device to device (of course securely through cell towers)
- Seamless integration without the user usually seeing it (unless they want to)
- If services are allowed access to data like contacts, notifications, and SMS, the user has fine control over what data they want to provide (individual contacts and lists, certain subset of SMS list selected by the user, call logs only through XX date or from XX person, etc)

Before kicking off into the content, here's a disclaimer:
- I am very busy lately (60 hours work / week). I'm not saying I will be working on this or that this is an up and coming ROM that you can expect to hit the shelves next week (unless someone else wants to take the idea and run with it)
- I have some self-taught programming, and encryption knowledge, but no formal background. As such, there may be some gaps in my knowledge, misinformation, misunderstanding on my part and some of my ideas might not make sense.
- Notwithstanding #1, I may stretch myself some day (at least longer than 6 months from now) to create some of this according to my limited capability

Now to the ROM:
Marshmallow Based:
- Would have dm-Verity enabled - making changes to system would / should be somewhat difficult
- SE Linux
- Intel encryption hardware on our CPU utilized

Calls:
- Public / Private key based voice data encryption: The keys would be generated on startup, stored in memory only , dumped on power off or regenerated every so often
- Maybe first second or two of the call would be a handshake request (data over the voice channel like a 56k modem)
>> If there is a response to the handshake request - exchange keys and encrypt voice data
>> If no response to handshake request, no encryption

Contacts:
- Encryption / Decryption Middleware based on stored private keys on phone
- Contacts are synced to Google encrypted, decrypted on phone to user (not stored on internal storage - or that's ok?)
- Apps requesting contacts can either have the legit contacts or fake and/or encrypted (user choice)
>> Downfall - if keys are lost, contacts are lost. Requires backups
- SMS public keys stored for each contact perhaps?
- Contact lists allowing apps to access partial lists (like if you want to use whatsapp, whatsapp doesn't get your whole contact list, just who you choose)
- Options for using Roll Your Own Cloud services in lieu of Google (one click to switch between OwnCloud, google contacts, for example)

Messaging (SMS, MMS):
- Something like TextSecure - but based on device to device key exchange...
- Looking for help on this one...maybe each contact on first text ever received by the phone exchanges public keys over text and keys are stored per contact?
- Appended special character to the front/back of text to indicate handshake request?

Email:
- Email client for encryption/signing with PGP built in
- Can send emails encrypted through google so google (or whoever) doesn't see your message (not by default - who wants an inbox full of emails only readable by phone?)
- Other features?

PGP:
- PGP integration with email / what else??
- User friendly interface for building key and signing others
- Other PGP uses?

Keychain:
- Some sort of Keepass like keychain - maybe browser integration?
- Maybe utilizing private key stored on disk?
- Secure password generation feature for creating accounts

Wifi/4G:
- Selective OpenVPN integration - options to force connection (or no internet), prefer (on certain types of networks - no password networks), notify (persistent notification on lack of connection), or disable entirely
>> Per app settings and possibly per network settings (SSID based - like when you connect to "Starbucks", force connection, but at home, no connection)
>> GUI for easy key generation, config file creation for those who roll their own
- Built in firewall with features like AF Wall+ for selective disabling of app network access
- Is Tor use or option worth it?

Browser:
- Permanent incognito mode / no cookies / no trace? At least as an option - like a "Snowden" mode or something
- Ad blocker integration. Whoo.
- Something like "HTTPS Everywhere" plugin

Disk Encryption:
- How is google's? Do we need something better?
- How to secure disk better than digit passcode (keyspace ten thou - hundred million - trivial for modern PW crackers)
Looking for help / ideas here.

Key Storage:
- As mentioned - where possible, generate new keys on startup every time for non-persistent data (phone calls, etc)
- When on disk, in encrypted folders through some sort of EncFS functionality or similar
- Disk decrypted keys only stored in memory, flushed on power off

Security tips:
- Password checkers / other tips for the average user for being more secure as an option (perhaps through notifications or toasts)

Theft/Data Loss Prevention:
- Integrated SMS-based option to erase keys / factory reset phone / other features?

Something like this would give Blackberry a run for their money! What are your thoughts? Tell me what you like and what you don't - what's great and what's stupid. Looking forward to the discussion.


via xda-developers http://ift.tt/1KnAajN

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

No comments:

Post a Comment