Mobile Device Vulnerability Management for Android¶
This flow describes the process of an Android Wallet Instance (WI) registering at the Mobile Device Vulnerability Management (MDVM) endpoint as described in the mobile devices chapter.
To Do¶
- add rate limiting/replay attack detection based on
mdvm_auth_challenge - add more details how to validate which MDVM signals
- add more information how databases (leaked PAP keys, vulnerable device classes) are organized and used
- provide more details on KeyGenParameterSpec.Builder settings
Data Flow¶
This section describes the data flow of the MDVM Registration in a sequence diagram and a more detailed table. Artifacts in italics are further explained in the data register chapter.
MDVM Registration¶
Detailed Description¶
| No | Description |
|---|---|
| 001 | The Wallet Instance contains a Runtime Application Self-Protection (RASP), that locally monitors the device for rooting and emulation, and the app for hooking, re-packaging and tampering. See MDVM chapter for details. |
| 002 - 004 | The WI requests a challenge from the MDVM challenge endpoint using an HTTP POST request. The MDVM generates a JSON structure containing a random nonce and a timestamp of the current time and MACs it using a symmetric key (mdvm_mac_symk) as a JSON Web Token (JWT), the resulting structure is the mdvm_auth_challenge. The MDVM responds to the WI with the mdvm_auth_challenge in the HTTP payload. The WI uses the challenge as a transparent string and does not evaluate the JWT claims. The MDVM does not store the challenge after creation, thus the operation is stateless. |
| 005 | The WI queries information from the Android Build API to assess it's device class utilizing Build.VERSION.RELEASE, Build.VERSION.SECURITY_PATCH, Build.MODEL, Build.PRODUCT, Build.HARDWARE, Build.ID. The WI encodes this software-attested information as wi_device_class. |
| 006 - 007 | The WI creates an authentication factor by:
|
| 008 - 010 | The WI creates an app attestation by:
|
| 011 | The WI generates a proof of possession by signing the following content with the newly generated wi_mdvm_auth_prvk:
|
| 012 | The WI requests to register by sending the wi_mdvm_register_pop to the MDVM's registration endpoint. The request is authenticated. |
| 013 - 017 | The MDVM verifies the wi_mdvm_register_pop by:
|
| 018 | The MDVM verifies the pap_playintegrity_attestation by:
|
| 019 - 021 | The MDVM collects and compares the sources to assess a device class for the WI using
|
| 022 | The MDVM has completed all validation steps and decides that the security posture of the WI is sufficient. The MDVM creates an account for the WI and stores:
|
| 023 | The MDVM issues an initial token mdvm_token that asserts the security posture of the WI. Therefore, the MDVM creates an MDVM token by signing wi_mdvm_auth_pubk and the expiry time with it's signing key mdvm_attestation_prvk. |
| 024 | The MDVM responds to the WI by sending the identifier mdvm_wi_id and the initial mdvm_token. |
Renewal of MDVM Token¶
Detailed Description¶
| No | Description |
|---|---|
| 001 | See registration step 001. |
| 002 - 004 | See registration steps 002- 004. |
| 005 | See registration step 005. |
| 006 | The WI generates a new hardware-backed key pair (wi_mdvm_reattest_prvk, wi_mdvm_reattest_pubk) with a key attestation wi_android_key_attestation utilizing mdvm_auth_challenge for setAttestationChallenge and wi_mdvm_parent_pubk for setAttestKeyAlias function to sign the key attestation. Using the attestation signing key pair (wi_mdvm_parent_prvk, wi_mdvm_parent_pubk) from the registration process, let's the MDVM proof that both wi_mdvm_auth_pubk and wi_mdvm_reattest_pubk originate from the same device. The WI must use the same key store that was used for wi_mdvm_auth_priv. The key must have sufficient security, information on algorithms and key lengths can be found in the cryptography chapter. The new key pair (wi_mdvm_reattest_prvk, wi_mdvm_reattest_pubk) is needed, because key attestations cannot be re-generated for existing keys, only while creating new keys. Hence, this is a throw-away key and the WI may delete the key after Step 010. |
| 007 - 009 | See registration steps 008- 010. |
| 010 | The WI generates a proof of possession by multi-signing the following content with both the newly generated wi_mdvm_reattest_prvk and the existing key from registration wi_mdvm_auth_prvk:
|
| 011 | The WI requests renew the MDVM token by sending the wi_mdvm_auth_pop to the MDVM's renewal endpoint. The request is authenticated. |
| 012 - 019 | The MDVM verifies the wi_mdvm_auth_pop by:
|
| 020 | See registration step 019, using wi_mdvm_auth_pop instead of wi_mdvm_registration_pop. |
| 021 - 024 | The MDVM collects and compares the sources to assess a device class for the WI using
|
| 025 | The MDVM issues an updated mdvm_token that re-asserts the security posture of the WI. Therefore, the MDVM creates an MDVM token by signing wi_mdvm_auth_pubk and the expiry time with it's signing key mdvm_attestation_prvk. |
| 026 | The MDVM responds to the WI by sending the updated mdvm_token. |