Skip to content
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

Add MASWE-0047, MASWE-0048, MASWE-0049, MASWE-0050, MASWE-0051, MASWE-0052 #2919

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

cpholguera
Copy link
Collaborator

@cpholguera cpholguera commented Oct 26, 2024

This PR
closes #2686
closes #2688
closes #2689
closes #2690
closes #2691
closes #2692

@cpholguera cpholguera changed the title Add MASWE-0050 Add MASWE-0047, MASWE-0048, MASWE-0049, MASWE-0050, MASWE-0051, MASWE-0052 Nov 6, 2024
Copy link
Collaborator

@TheDauntless TheDauntless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions :)

@@ -21,3 +21,29 @@ 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 their 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weakness title should be 'Proven' instead of 'Proved'. While both are correct past participles, 'proven' is typically used for the adjective case.

weaknesses/MASVS-NETWORK/MASWE-0050.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0050.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0050.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0050.md Outdated Show resolved Hide resolved
- **Restrict Network Bindings**: Configure the application to bind only to specific, necessary network interfaces, avoiding the use of wildcard addresses like `INADDR_ANY`.
- **Implement Strong Access Controls**: Enforce authentication and authorization for any services exposed through open ports to ensure only authorized entities can connect.
- **Disable Debugging Services in Production**: Ensure that all development and debugging network services are disabled or removed in production builds.
- **Validate and Sanitize Inputs**: Properly validate all incoming data from network connections to prevent injection attacks and buffer overflows.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that this is irrelevant for this specific weakness.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain this a bit more?

- **Implement Strong Access Controls**: Enforce authentication and authorization for any services exposed through open ports to ensure only authorized entities can connect.
- **Disable Debugging Services in Production**: Ensure that all development and debugging network services are disabled or removed in production builds.
- **Validate and Sanitize Inputs**: Properly validate all incoming data from network connections to prevent injection attacks and buffer overflows.
- **Use Secure Communication Protocols**: Employ encryption and secure protocols (e.g., TLS/SSL) for any network communication to protect data in transit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also irrelevant for this weakness?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain this a bit more?


---

## Overview

Applications that do not properly validate SSL/TLS certificates during secure communication are susceptible to man-in-the-middle attacks and other security breaches. This weakness occurs when an application accepts invalid, expired, self-signed, or untrusted certificates without appropriate verification, compromising the integrity and confidentiality of data in transit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially remove SSL? SSL shouldn't be used anymore.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could change man-in-the-middle to machine-in-the-middle which is a common new phrase for it to be gender neutral.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also thinking about that, I've seen also "Manipulator-in-the-middle" a few times. At the end of the day it's a threat actor and done manually in our scenarios, so maybe manipulator instead of machine. But I guess both would work and is better than "man".

weaknesses/MASVS-NETWORK/MASWE-0052.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0052.md Outdated Show resolved Hide resolved
@cpholguera cpholguera requested a review from Copilot November 22, 2024 09:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 suggestion.

Files not reviewed (1)
  • weaknesses/MASVS-NETWORK/MASWE-0050.md: Evaluated as low risk
Comments skipped due to low confidence (1)

weaknesses/MASVS-NETWORK/MASWE-0049.md:46

  • The term "NSURLSession" should be "URLSession".
Utilize Platform-Provided Networking APIs: Always use the networking APIs provided by the platform, such as `NSURLSession` for iOS and `HttpsURLConnection` or `OkHttp` for Android, which handle many security concerns internally.

weaknesses/MASVS-NETWORK/MASWE-0049.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0047.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0047.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0047.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0047.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0047.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0051.md Show resolved Hide resolved

---

## Overview

Applications that do not properly validate SSL/TLS certificates during secure communication are susceptible to man-in-the-middle attacks and other security breaches. This weakness occurs when an application accepts invalid, expired, self-signed, or untrusted certificates without appropriate verification, compromising the integrity and confidentiality of data in transit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also thinking about that, I've seen also "Manipulator-in-the-middle" a few times. At the end of the day it's a threat actor and done manually in our scenarios, so maybe manipulator instead of machine. But I guess both would work and is better than "man".

weaknesses/MASVS-NETWORK/MASWE-0052.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0052.md Outdated Show resolved Hide resolved
weaknesses/MASVS-NETWORK/MASWE-0052.md Outdated Show resolved Hide resolved
…e-to-Machine Communication; remove content and enhance draft data
… cleartext traffic; merge Platform-provided Settings (global and per-domain), incorporate non-http and remove pinning mitigation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants