Skip to main content

Insecure service configuration - Certificates

Description

Due to a misconfiguration of X.509 certificates, the application can accept invalid certificates, making it possible to carry out Man in The Middle attacks.

Impact

Execute Man-in-the-middle attacks.

Recommendation

Throw typed exceptions in case of detection of invalid certificates.

Threat

Atacante sin autorización desde intranet.

Expected Remediation Time

⌚ 60 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: A
  • Attack complexity: H
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: N
  • Integrity: L
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N/E:P/RL:O/RC:X
  • Score:
    • Base: 2.6
    • Temporal: 2.4
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

The application manifest is safely configured

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="31" android:compileSdkVersionCodename="2" minSdkVersion="25" android:installLocation="internalOnly" package="com.example" platformBuildVersionCode="31" platformBuildVersionName="12">

Non compliant code

The application manifest misconfigures the allowed certificates

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="17" android:compileSdkVersionCodename="20" minSdkVersion="17" android:installLocation="internalOnly" package="com.example" platformBuildVersionCode="31" platformBuildVersionName="12">

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.