edwindwalker / edwinwalker

Personal site
0 stars 0 forks source link

NowSecure static analysis: App Configuration Allows Insecure Network Connections #33

Closed jnowsecure closed 9 months ago

jnowsecure commented 1 year ago

Finding Description

The app has globally allowed insecure connections.

By default, Android prohibits the use of cleartext communications in apps targeting Android 9 or above. If your app explicitly allows cleartext connections (using the unencrypted HTTP protocol instead of HTTPS), this will increases the risk of exposing sensitive data by accident.

There are two main ways that an app can allow cleartext connections:

Steps to Reproduce

The manifest file included with the app binary is analyzed, specifically the attributes android:usesCleartextTraffic and android:networkSecurityConfig. If a Network Security Config file is specified, this test also inspects that file looking for the global setting cleartextTrafficPermitted being set to true.

Business Impact

The app is configured to allow insecure network connections, which could lead to sensitive data being intercepted or modified.

Remediation Resources

Recommended Fix

No evidence table is provided for this finding, because the conditions described are the only ones that can cause the finding to appear.

Starting with Android 9 (API level 28), cleartext support is disabled by default. You need to ensure that your app is not enabling it.

Review the Android manifest (AndroidManifest.xml) at the root of your project source set:

If your app targets Android 8.1 (API level 27) or lower you must explicitly opt out of cleartext traffic.

Note: If your app needs to establish cleartext connections to some specific backends you may consider allowing cleartext only for those connections. However, this is represents a critical risk in your app and must be avoided at all costs. You should prefer to enable secure connections on that backend or replace it for another one that is secure.

Code Samples

Good Code Example (.xml)

<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>

Additional Guidance

Risk and Regulatory Information

Severity: medium

CVSS: 5.3

Policy Category: Default Priority 1

Application

See more detail in the NowSecure Report

jnowsecure commented 11 months ago

Update: This finding has been marked as resolved by Jack Nevill. No additional action is required.

Powered by NowSecure Platform

jnowsecure commented 11 months ago

Update: This finding has been marked as no longer resolved by Jack Nevill. Additional action is required.

Powered by NowSecure Platform

jnowsecure commented 9 months ago

Update: This finding has been dismissed by Moi, Edwin with reason "risk accepted". No additional action is required.

Powered by NowSecure Platform