Giter Club home page Giter Club logo

grapheneos / auditor Goto Github PK

View Code? Open in Web Editor NEW
439.0 25.0 84.0 1.79 MB

Hardware-based attestation / intrusion detection app for Android devices. It provides both local verification with another Android device via QR codes and optional scheduled server-based verification with support for alert emails. It uses hardware-backed keys and attestation support as the foundation and chains trust to the app for software checks.

Home Page: https://attestation.app/

License: MIT License

Java 93.63% Kotlin 6.37%
security attestation cryptography verifiedboot remote-attestation hsm android grapheneos strongbox monitoring

auditor's People

Contributors

chirayudesai avatar david-ruitter avatar dependabot[bot] avatar empratyush avatar flawedworld avatar girlbossceo avatar handymenny avatar inthewaves avatar izzysoft avatar jorgeluiscarrillo avatar lberrymage avatar maximbaz avatar mhshetty avatar muhomorr avatar octocorvus avatar patrykmis avatar peter-easton avatar quh4gko8 avatar randomhydrosol avatar rene0 avatar t895 avatar thestinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auditor's Issues

add support for checking CRLs

This is currently very low priority because the Pixel intermediate is pinned and the batch certificates aren't narrowly scoped enough. The security is coming from keys being hardware-backed, not so much the certificate chain.

improve layout / design of instruction labels

At the moment, they get screwed up in landscape mode. The QR code should probably be moved all the way to the right side or the left side so there's room to have the label. At the moment, the image view / bitmap ends up on top of the text view so it can overlap.

consider integrating StrongBox support

It may not be wise to replace the TEE-based key and attestation. It would be nicer to have an additional StrongBox attestation alongside it, but it would cause a substantial increase in the size of the attestation message which would likely be painful / impractical with QR codes.

better key attestation via per-app generated intermediate to leverage pinning for future generated keys

It should start the attestation certificate chain with an app-specific intermediate generated once the app requests a key with attestation and kept unusable by the OS.

The certificate chain would go from generated attestation certificate -> batch intermediate -> device variant intermediate -> root to generated attestation certificate -> generated per-app intermediate -> batch intermediate -> device variant intermediate -> root without it opening up a new way of tracking identity.

The addition to the chain would end being part of what we pin, improving the guarantees offered by attestation. The provisioned intermediate being compromised doesn't need to prevent attestation from still being useful since we have pairing.

A future keymaster API level could also guarantee that the attestation certificate chain will be the same for keys generated by the same app to make it usable like this in a portable way.

server-based verification support

We want to add support for submitting attestations via an account on a server. It will be implemented at https://github.com/GrapheneOS/AttestationServer, which is also where we already implement support for submitting samples. Devices paired with the account should be nicely listed out via a web interface. They have a nice provable unique identifier via the fingerprint of the hardware-backed key generated by the app already, which is not overly persistent/identifying like a serialno / IMEI.

The way it will work is the server will send an email alert if the device fails verification, fails to report in for a configured time period or falls behind on security patches.

For example, a device could be set to send an attestation weekly with alerts after 2 weeks of it not reporting in. The app can handle sending the attestations with a periodic JobScheduler job.

There's currently hardware attestation for the OS version and OS patch level. There's not much that can be done with the OS version automatically, but the OS patch level is incredibly useful for automatic alerts since devices shouldn't be falling far behind. Even if it's because the vendor isn't releasing updates rather than an attacker with root holding back upgrades, it's something a company probably wants to know about their fleet of devices.

A good default for Pixels would be alerts when a device is more than 1 months behind, i.e. when the 2018-05-05 patch level is released, it should be on at least 2018-04-05. Some devices would need more lenience if they take 2 months for non-AOSP fixes which is expected to be the case for some devices (i.e. enforcing 2018-04-01 patch level instead). The reality is that many don't get proper monthly security updates so non-Pixels may need a more conservative default like 3+ months. As long as it only warns once or twice, it should be okay.

It could eventually support other kinds of alerts like sending a Signal message.

By default, we'll use the same kind of information as the Auditor app, i.e. nothing sensitive like identifiers persisting past the Auditor app being uninstalled or having data cleared. It would make sense to offer the option of sending persistent identifiers for enterprise use though, and GrapheneOS might be able to use ID attestation if it bundles the app to actually have devices prove their IMEI / serialno. Can't see a reason anyone would want that for personal use though so perhaps it should only be exposed when using the Auditor app with our planned device manager. It's unclear how closely they should be paired together.

generate real signing keys for release builds

The release key being used for testing is a secp256r1 ECDSA (128-bit security) key with SHA256withECDSA signatures to match the curve and signing algorithm used within the app.

It probably doesn't make any sense to attempt any future proofing since Android is apparently going to be adding proper key rotation with APK Signature Scheme v3 and the Pixel 2 will almost certainly receive that since it has 3 major upgrades remaining.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.