-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MASWE-0047, MASWE-0048, MASWE-0049, MASWE-0050, MASWE-0051, MASWE…
…-0052 (#2919) * Add overview, impact, modes of introduction, and mitigations * inital drafts * Apply suggestions from code review Co-authored-by: Jeroen Beckers <[email protected]> * Apply suggestions from code review Co-authored-by: Sven <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Jeroen Beckers <[email protected]> * Update weaknesses/MASVS-NETWORK/MASWE-0047.md * Update weaknesses/MASVS-NETWORK/MASWE-0047.md * Refactor MASWE-0048: Update title and description for Insecure Machine-to-Machine Communication; remove content and enhance draft data * Refactor MASWE-0047, MASWE-0049, MASWE-0051 and MASWE-0052: Remove draft sections and update status to new * Refactor MASWE-0050: Update modes of introduction and mitigations for cleartext traffic; merge Platform-provided Settings (global and per-domain), incorporate non-http and remove pinning mitigation * Apply suggestions from code review * Update weaknesses/MASVS-NETWORK/MASWE-0051.md --------- Co-authored-by: Jeroen Beckers <[email protected]> Co-authored-by: Sven <[email protected]> Co-authored-by: Copilot <[email protected]>
- Loading branch information
1 parent
dee0701
commit 6c0c8e8
Showing
6 changed files
with
182 additions
and
87 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
--- | ||
title: Insecure Non-HTTP Traffic | ||
title: Insecure Machine-to-Machine Communication | ||
id: MASWE-0048 | ||
alias: insecure-non-http | ||
alias: insecure-m2m | ||
platform: [android, ios] | ||
profiles: [L1, L2] | ||
mappings: | ||
masvs-v1: [MSTG-NETWORK-1] | ||
masvs-v2: [MASVS-NETWORK-1] | ||
|
||
android-risks: | ||
- https://developer.android.com/privacy-and-security/risks/insecure-machine-to-machine | ||
draft: | ||
description: e.g. FTP, SMTP, etc. | ||
topics: null | ||
description: Android applications often use technologies like Bluetooth, NFC, and USB for data transfer and device interaction. Developers must use these APIs carefully to prevent data exposure and remote device takeover by attackers. | ||
topics: | ||
- Bluetooth | ||
- BLE | ||
- NFC | ||
- USB | ||
- Wi-Fi P2P | ||
status: draft | ||
|
||
--- | ||
|
This file contains 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 |
---|---|---|
@@ -1,23 +1,38 @@ | ||
--- | ||
title: Proved Networking APIs Not used | ||
title: Proven Networking APIs Not used | ||
id: MASWE-0049 | ||
alias: no-proved-net-apis | ||
alias: no-proven-net-apis | ||
platform: [android, ios] | ||
profiles: [L2] | ||
mappings: | ||
masvs-v1: [MSTG-NETWORK-6] | ||
masvs-v2: [MASVS-NETWORK-1, MASVS-CODE-3] | ||
status: new | ||
--- | ||
|
||
draft: | ||
description: AKA don't roll your own network security. For example, platform-provided | ||
authentication APIs or openssl are designed and implemented by experts who have | ||
deep knowledge of the platform's security features and considerations. These APIs | ||
often incorporate security best practices and are regularly updated to address | ||
new threats and vulnerabilities. | ||
topics: | ||
- Platform-provided Networking APIs Not used | ||
note: maybe merge with the next one or find a better separation | ||
status: draft | ||
## Overview | ||
|
||
--- | ||
Applications that do not utilize platform-provided networking APIs or well-established security libraries are susceptible to security vulnerabilities. When developers implement custom networking code or "roll-your-own" security mechanisms, they risk introducing flaws due to a lack of deep expertise in cryptography and network security. Platform-provided APIs and libraries, such as `NSURLSession` on iOS or `HttpsURLConnection` on Android, are designed and maintained by experts, incorporating security best practices and regular updates to address new threats and vulnerabilities. | ||
|
||
## Impact | ||
|
||
- **Security Vulnerabilities**: Custom networking implementations may contain flaws that attackers can exploit, leading to data breaches and unauthorized access. | ||
- **Lack of Updates**: Custom code may not receive timely updates to address new vulnerabilities or comply with evolving security standards. | ||
- **Inconsistent Security Measures**: Bypassing standard APIs can result in inconsistent application of security features like encryption, certificate validation, and error handling. | ||
- **Increased Development Complexity**: Writing and maintaining custom networking code increases complexity, making it harder to audit and secure the application. | ||
- **Non-Compliance with Standards**: Failing to use approved APIs may lead to non-compliance with industry regulations and security guidelines. | ||
|
||
## Modes of Introduction | ||
|
||
- **Custom Networking Stack Development**: Developers create their own networking code instead of using platform-provided APIs, possibly to add custom features or due to unfamiliarity with existing APIs. | ||
- **Use of Insecure Third-Party Libraries**: Incorporating third-party networking libraries that are outdated or do not follow current security best practices. | ||
- **Bypassing Security Mechanisms**: Deliberately avoiding standard APIs to circumvent security checks, such as certificate pinning or TLS enforcement. | ||
- **Insufficient Security Knowledge**: Developers may lack adequate understanding of network security principles, leading to insecure implementations. | ||
- **Performance Optimization Attempts**: Writing custom networking code to optimize performance without fully considering the security implications. | ||
|
||
## Mitigations | ||
|
||
- **Utilize Platform-Provided Networking APIs**: Always use the networking APIs provided by the platform, such as `NSURLSession` for iOS and `HttpsURLConnection` for Android, which handle many security concerns internally. | ||
- **Adopt Established Security Libraries**: If additional functionality is required, use reputable, well-maintained libraries like `OkHttp` for Android or `Alamofire` on iOS that adhere to security best practices. | ||
- **Avoid Custom Security Implementations**: Refrain from implementing custom cryptographic algorithms or security protocols; rely on standard, vetted solutions instead. | ||
- **Keep Dependencies Updated**: Regularly update all libraries and dependencies to incorporate the latest security patches and improvements. |
This file contains 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
This file contains 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
Oops, something went wrong.