-
-
Notifications
You must be signed in to change notification settings - Fork 12
Add MASWE-0100 - Device Attestation #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sushi2k
wants to merge
2
commits into
main
Choose a base branch
from
maswe-0100
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,37 @@ refs: | |
| - https://github.com/iansampson/AppAttest | ||
| - https://github.com/firebase/firebase-ios-sdk/blob/v8.15.0/FirebaseAppCheck/Sources/AppAttestProvider/DCAppAttestService%2BFIRAppAttestService.h | ||
| - https://blog.restlesslabs.com/john/ios-app-attest | ||
| draft: | ||
| description: The app doesn't use App Attestation APIs, such as Google Play Integrity API, iOS DeviceCheck API,so the backend cannot ensure requests originate from a genuine app binary (CWE-693). This exposes the app to tampering, fraud, replay attacks, and unauthorized use of premium features. | ||
| topics: | ||
| - detection in place | ||
| - Effectiveness Assessment (e.g. bypassing the detection) | ||
| status: placeholder | ||
| status: new | ||
|
|
||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| Device attestation is a security mechanism that allows a mobile application or backend service to verify the integrity and trustworthiness of the environment in which the application is running. It provides cryptographic proof that the device has not been tampered with. | ||
|
|
||
| In this context it need to be differentiated between attestation and assertion: | ||
|
|
||
| - **Attestation** - Occurs during the registration phase, when your app initially connects to your server. | ||
| - **Assertion** - Is used during subsequent interactions, whenever the app needs to authenticate again or make further requests. | ||
|
|
||
| If device attestation is used also app attestation should be considered to confirm that the application instance is genuine. App attestation provides cryptographic proof that the app instance is trustworthy and genuine. | ||
|
|
||
| Attestation can be performed locally on the device or remotely through a backend service. Local checks rely on the application itself to verify system integrity, but these can be bypassed by attackers with sufficient control over the environment (e.g., through hooking and modifying the app during runtime). Server-side attestation shifts the verification to a backend service, which can make it harder for attackers to tamper with the verification logic. | ||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| To summarize: | ||
|
|
||
| - **Device attestation** confirms the environment is trustworthy. | ||
| - **App attestation** confirms the app instance is trustworthy. | ||
|
|
||
| If the app doesn't use attestation APIs or services the backend cannot ensure requests originate from a genuine app binary and from a trusted platform. | ||
|
Comment on lines
+39
to
+44
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd not "summarize" here, prefer to make it more explicit above, e.g., using the bullet points. |
||
|
|
||
| ## Impact | ||
|
|
||
| - **Abuse of Functionality**: Backend systems cannot distinguish between legitimate and tampered apps, enabling abuse such as fake account creation, fraud or unauthorized use of premium features. | ||
| - **App Executed in outdated Environment**: Users may run the application on outdated platforms that have no security patches installed. | ||
| - **App Executed in untrusted Environment**: Attackers may run the application on rooted or jailbroken devices without detection. | ||
|
|
||
| ## Modes of Introduction | ||
|
|
||
| - **Weak Architecture**: The application does not include device attestation in its security model, assuming the device environment can be trusted. | ||
| - **Reliance on Weak Checks**: Instead of proper attestation, the app only performs basic root/jailbreak detection, which is easily bypassed. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mitigations section is missing
See example here:
https://github.com/OWASP/maswe/blob/main/weaknesses/MASVS-CRYPTO/MASWE-0009.md?plain=1
Guidelines: https://docs.google.com/document/d/1EMsVdfrDBAu0gmjWAUEs60q-fWaOmDB5oecY9d9pOlg/edit?usp=sharing