03 Чер, 2025

How Disabled Server Identity Verification Exposed a Crypto Platform to MITM Attacks – SAST

як Сервіс:                Static Application Security Testing (SAST)

Industry:              Crypto Exchange

Region:                Switzerland


Background

During a security assessment of the Swiss cryptocurrency exchange, our SAST process revealed a severe misconfiguration in the platform’s backend TLS client settings. The application code disabled server certificate verification by setting in its TLS configuration, effectively disabling TLS server identity checks. This flaw exposed the system to Man-in-the-Middle (MITM) attacks, allowing adversaries to intercept, modify, or redirect encrypted communications without detection. InsecureSkipVerify: true

Серйозність: Критичний
CVSS Score: 9.2 (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:H)
Affected Module: TLS Client Configuration
Exploit Complexity: Low

Discovery — Reproducing the MITM Vulnerability

The vulnerability was identified in the backend Golang services responsible for node communications and external API requests. In the code snippet below, the TLS configuration disables certificate verification:

				
					tr := &http.Transport{
    TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: tr}
				
			

This insecure setting bypasses the crucial verification of the server’s TLS certificate chain, hostname, and revocation status.

Test Flow:

  1. Set up a proxy server with a self-signed certificate to act as a MITM proxy between the backend and external endpoints.

  2. Redirect the application’s traffic through this proxy.

  3. Observe that the application accepts the proxy’s self-signed certificate without error due to disabled verification.

  4. Intercept and modify sensitive data in transit, including node communications and API responses.

  5. Demonstrate potential for credential theft, transaction manipulation, or command injection via the compromised channel.

Technical Root Cause

The root cause is the explicit disabling of server identity verification by setting in the Go TLS configuration. This flag tells the client to skip validation of TLS certificates, allowing any certificate (including self-signed or fraudulent ones) to be trusted. While sometimes used for development or testing, retaining this flag in production is a critical security misconfiguration violating fundamental TLS guarantees of confidentiality and authenticity. The flaw violates standard cryptographic best practices and exposes encrypted communications to interception and tampering. InsecureSkipVerify: true

Real-World Risks

  • A. Man-in-the-Middle Attacks: Attackers can intercept and modify sensitive communication between the platform and external services.

  • B. Credential and Key Theft: TLS session interception enables stealing private API keys, user credentials, and sensitive payloads.

  • C. Transaction Tampering: Alteration of blockchain node requests or financial transactions can cause unauthorized transfers or system instability.

  • D. Service Disruption: MITM can be used to inject errors, causing denial-of-service or data corruption.

з кібербезпеки

  • Enable Strict TLS Verification: Always set to in production environments. InsecureSkipVerify: false

  • Use Trusted Certificate Authorities: Ensure the system uses up-to-date root CA bundles to validate server certificates properly.

  • Implement Certificate Pinning: Where applicable, pin known-good certificates or public keys to further harden TLS connections.

  • Conduct Regular Security Testing: Include MITM testing in the QA process to detect misconfigurations early.

  • Навчати розробників: Raise awareness about the dangers of disabling TLS verification and proper secure coding practices.

Висновок

This case shows how a seemingly simple configuration flag can completely undermine the security of a cryptographic system. Disabling server certificate verification exposes critical infrastructure to MITM attacks with catastrophic consequences, especially in the financial and cryptographic domains. Rigorous enforcement of TLS best practices and secure coding standards is essential to maintaining trust and integrity in blockchain-related services.

All identifiers, domains, and user data in this case study have been anonymized to preserve client confidentiality. 

Інші Послуги

Готові до безпеки?

зв'язатися з нами