Skip to content

Commit

Permalink
Fix Markdown formatting to adhere to OWASP's linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
richeeta committed Nov 20, 2024
2 parents bf254e2 + feac408 commit bbf7918
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions cheatsheets/Mobile_Application_Security_Cheat_Sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ developers to consider security in their mobile app development.
- Keep in mind security principles like least privilege, defense in depth, and
separation of concerns.
- Follow industry standards and best practices, such as:
- National Institute of Standards and Technology (NIST)
- Internet Engineering Task Force (IETF)
- National Institute of Standards and Technology (NIST)
- Internet Engineering Task Force (IETF)

For more information, see the
[Secure Product Design Cheat Sheet](Secure_Product_Design_Cheat_Sheet.md).
Expand Down Expand Up @@ -215,9 +215,9 @@ examples of data that should not be logged.

- Perform ethical hacking to identify vulnerabilities.
- Example tests:
- Cryptographic vulnerability assessment.
- Attempt to execute backend server functionality anonymously by removing any
session tokens from POST/GET requests.
- Cryptographic vulnerability assessment.
- Attempt to execute backend server functionality anonymously by removing any
session tokens from POST/GET requests.

### 2. Automated Tests

Expand Down Expand Up @@ -291,6 +291,21 @@ executing sensitive shortcuts. Implement checks with
`UIApplication.shared.isProtectedDataAvailable` to restrict execution
of sensitive actions when the device is locked.

- iOS/iPadOS Shortcuts allow for automation of app functions, which may enable sensitive actions even when the device is locked.

- There are several scenarios in which a user can execute a Shortcut while the device is locked:

1. If a Shortcut is added as a widget to Today View, it can be accessed and executed while the device is locked.
2. If a Shortcut is assigned to the Action Button (on iPhone 15 Pro and iPhone 16 Pro models), it can be executed by pressing the Action Button while the device is locked.
3. If a Shortcut is assigned to the Control Center (on iOS/iPadOS 18+), it can be executed by pulling up the Control Center and pressing the Shortcut button while the device is locked.
4. A Shortcut can be invoked via Siri while the device is locked.
5. If a Shortcut is added to the user's Home Screen (on iOS/iPadOS 18+), it can be directly executed by tapping the Shortcut button on the user's lock screen while the device is locked.
6. If a Shortcut is set to run at a specific interval or a specific time, it can execute even if the device is locked.

- Sensitive app functionalities triggered via Shortcuts should always require device unlock before execution.

- **How**: Store secure tokens in Keychain that the app validates before executing sensitive shortcuts. Implement checks with `UIApplication.shared.isProtectedDataAvailable` to restrict execution of sensitive actions when the device is locked.

#### Siri Permissions

- Siri can access app functionalities through voice or [Type to Siri](
Expand Down Expand Up @@ -324,6 +339,9 @@ the app without proper authentication. (See Apple Developer's
[Supporting universal links in your app](
https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app)
documentation for more information.)
- Deep links offer direct access to specific app screens, which could potentially bypass authentication if not secured, allowing unauthorized users access to secure sections of the app.
- An example of this on Microsoft Authenticator for iOS (which was remediated in July 2024) allowed users to bypass App Lock by simply navigating to `msauth://microsoft.aad.brokerplugin/?`, which would open Authenticator and dismiss the Face ID/Touch ID/passcode prompt.
- **How**: Implement authentication checks on any view controllers or endpoints accessed via deep links. Configure and validate Universal Links using apple-app-site-association files for secure deep linking. Sanitize and validate all parameters received through deep links to prevent injection attacks. Ensure unauthorized users are redirected to the login screen, preventing direct access to sensitive parts of the app without proper authentication. (See Apple Developer's [Supporting universal links in your app](https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app) documentation for more information.)

#### WidgetKit Security

Expand All @@ -348,6 +366,10 @@ features requiring user permissions.
between app and widgets.
- Use ATS (App Transport Security) to enforce strong security policies for
network communication.
- Configure appropriate background refresh policies to prevent sensitive data updates while the device is locked.
- Implement proper privacy-related configurations in `Info.plist` for features requiring user permissions.
- Use App Groups with appropriate security configurations when sharing data between app and widgets.
- Use ATS (App Transport Security) to enforce strong security policies for network communication.
- Do not store sensitive data in `plist` files.

For further reading, visit the
Expand Down

0 comments on commit bbf7918

Please sign in to comment.