πŸ“± Android client app for the AryKey πŸ”‘

Overview

AryKey Android


Android Android App

Chrome Chrome Extension

Android Firmware


πŸ‘€ Overview

Android application that prepares an hardware device via USB serial port with a specific password generated deterministically based on three (3) inputs: the App we want to Unlock, the User ID used for login (typically an email address) and the PIN (6 numeric digits) we want to associate with previous inputs.

The hardware being used, during development, is a RPi Pico flashed with a custom firmware. It implements a key derivation function (KDF) that derives deterministic passwords from the given elements and a unique key stored in the ROM.

This app loads the 'hardware key' with the user inputs, and the KDF will derive a password for it. The password is not transmitted back via USB to eliminate a possible attack vector, instead is typed by emulating an external keyboard when the user clicks the physical button on the device.

πŸ–Ό Architecture

πŸŒ™ πŸ”§ How to use during Dev

  1. Install & launch the AryKey app
  2. Plug in hardware device into the USB port of the phone (OR) Skip the connect screen if you don't have the hardware device yet
  3. Click on the SnackBar action to jump to the Accessibility settings and enable it if you want the app to auto detect the current/last app in foreground
  4. Type the App name if you haven't enabled Accessibility for this app yet
  5. Type the respective User ID (typically an email address) (OR) If you click the dropdown icon it will ask permission to access Contacts so it can suggest your existing email accounts to autocomplete
  6. Click Unlock
  7. Type a 6 digits PIN (a different PIN will derive a different password)
  8. Wait for a success or error response* from the communication with the hardware device
  9. Done!

At this point, by pressing the hardware button of the device it starts typing the password in the current input field with focus.

*As long the device receives the data in the correct format, it will always return a success code. That means any entered PIN will work, so that we can eliminate another possible vector of attack.

β˜€οΈ πŸ”§ How to use everyday

  1. Assuming you are in the login screen of a random app, Linkedin app for example, just plug in the device into the USB port and the AryKey app will open automatically with the Linkedin app auto-filled.
  2. If the first time choosing this app, type your User ID which in this case will be an email address. Following times will be auto-populated, with your last input for this app.
  3. Click Unlock
  4. Type your 6 digits PIN
  5. Done! (preparing the device)

πŸ—οΈ Features

  • UX concept solely with bottom sheets
  • Auto launch the app when the hardware device (Raspberry Pi Pico) is plugged in
  • Auto detect current/last app in foreground with AccessibilityService
  • Obtain the list of installed apps in the phone, for user manual selection
  • Retrieve device email accounts given permission from user during runtime
  • Auto load image associated to given email address, either from Android Contacts or Gravatar API
  • Certificate pinning of host gravatar.com to prevent connections through man-in-the-middle certificate authorities
  • Simple hostname check to help preventing man-in-the-middle attacks
  • Request PIN input with 6 digits from the user
  • Communication with hardware device (Raspberry Pi Pico) via Serial USB
  • When app is 'minimised' show notification with status and an action to help jumping back in
  • Lottie Animations
  • Snackbars with enabled swipe to dismiss
  • Dark-Theme support

TODO

  • Navigate to right fragment when hardware device is plugged in
  • Replace hardcoded success event
  • Persist encrypted in SharedPref a map of App<>User ID
  • Hash PIN+App+Email before sending it over USB serial
  • Auto-detect current URL when used with a known browser app
  • Parse app domain from package name and use that instead to ensure cross-compatibility
  • Migrating LiveData to StateFlow
  • Increase test code coverage
  • Migrate to Compose UI
  • Navigating in Compose
  • Add LICENSE
  • More TBD

🐞 Known Bugs

  • Dropdown popup background of the App input is broken. Style with rounded corners not being applied and some overlay is occurring.
  • Dropdown popup of the User ID input have the wrong anchor the first time and its conflicting with the keyboard events.
  • Padding bottom of the Snackbar is incorrect

Note: Some view & layouts are not fully optimised because they will be discarded soon when migrating to compose UI

πŸ“Έ Screenshots

πŸ“„ License

//TODO

You might also like...
Tiny app to enforce security policies of your device
Tiny app to enforce security policies of your device

Sentry Enforce security policies. Tiny app to enforce security policies of your device. It can: limit the maximum number of failed password attempts d

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.
BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

BlackDex is an Android unpack tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phones or emulators, you can unpack APK File in several seconds.

Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt

AESCrypt-Android Simple API to perform AES encryption on Android with no dependancies. This is the Android counterpart to the AESCrypt library Ruby an

PermissionX is an extension Android library that makes Android runtime permission request extremely easy
PermissionX is an extension Android library that makes Android runtime permission request extremely easy

PermissionX is an extension Android library that makes Android runtime permission request extremely easy. You can use it for basic pe

Signal Protocol library for Java/Android

Overview A ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging environments. PreKeys This protocol uses a concept

Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.
Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

A collection of android security related resources

android-security-awesome A collection of android security related resources. Tools Academic/Research/Publications/Books Exploits/Vulnerabilities/Bugs

A port of gnupg to Android (UNMAINTAINED!)

Gnu Privacy Guard for Android A port of the whole GnuPG 2.1 suite to Android. If you are using these tools in your own apps, we'd love to hear about i

Owner
Ryan Amaral
Ryan Amaral
a version of the official Android openssl setup to build standalone for use in app

OpenSSL on the Android platform. --- The code in this directory is based on $OPENSSL_VERSION in the file openssl.version. See patches/README for more

Guardian Project 371 Dec 8, 2022
Analyze any Android/Java based app or game

ClassyShark Introduction ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and

Google 7.2k Jan 3, 2023
A android app for encrypting apk

A android app for encrypting apk

FlyingYu 124 Jan 5, 2023
A simple android app that parses its own signature and displays it

SigDisplayer Usage Download the release APK or clone the repository and compile yourself. Sign the APK with your preferred keystore. Install and open

Jonah 5 Oct 18, 2022
Android app to test various cryptography algorithm.

CryptographyLesson Introduction This android app shows how cryptographic algorithm works. You can encrypt or decrypt messages and try different algori

null 3 Mar 21, 2022
Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928, a `writeToParcel`/`createFromParcel` serialization mismatch in `OutputConfiguration`

Writeup and exploit for installed app to system privilege escalation on Android 12 Beta through CVE-2021-0928, a `writeToParcel`/`createFromParcel` serialization mismatch in `OutputConfiguration`

null 52 Dec 30, 2022
Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.

Document Index 1.overview 2.startup 3.how to write rules 4.how to find compliance problems use appshark 5.a path traversal game 6.argument 7.engine co

Bytedance Inc. 998 Jan 7, 2023
A simple library that can help you detect if you app is modded or tampered with

Android Tamper Detector A simple library that can help you detect if you app is modded or tampered with. This adds a security level that makes it diff

Mukesh Solanki 130 Nov 14, 2022
This app should provide a common interface to fetch the estimated time of arrival for parcels

ETA-App This app should provide a common interface to fetch the estimated time of arrival for parcels. It will integrate with several backend systems

bring 0 Dec 14, 2021
Keepass2Android is a password manager app.

Keepass2Android What is Keepass2Android? Keepass2Android is a password manager app. It allows to store and retrieve passwords and other sensitive info

null 3.5k Jan 7, 2023