Skip to main content
Third-Party SDK Just Stole Your Users' Data—Now What?Research
5 min readFor Security Engineers

Third-Party SDK Just Stole Your Users' Data—Now What?

When mobile teams discovered that a seemingly legitimate advertising SDK was doing more than displaying ads, they faced serious security challenges. Snyk found that the Mintegral SDK included method swizzling attacks, click hijacking, and remote code execution backdoors. Here's how to address these risks and protect your app.

How to Detect Suspicious SDK Behavior

Begin with runtime behavior analysis instead of static code review. The Mintegral SDK versions 5.5.1 and above appeared harmless in static analysis but used method swizzling to hijack app functions after installation.

Your detection checklist:

  • Monitor network traffic during SDK initialization and idle periods. Unexpected connections to undocumented endpoints are a red flag.
  • Use dynamic instrumentation tools like Frida to observe method calls at runtime. Look for swizzled methods that intercept UIViewController lifecycle events or network handlers.
  • Check for obfuscated code sections. Legitimate SDKs don't need heavy obfuscation unless they're hiding functionality.
  • Review required permissions against stated functionality. An ad SDK requesting access to clipboard, location, or installed apps should trigger immediate investigation.

For iOS, search your codebase for method_exchangeImplementations or similar runtime manipulation. For Android, look for dynamic class loading and reflection patterns that modify system behavior.

Understanding Method Swizzling

Method swizzling is an Objective-C runtime feature that allows code to replace existing method implementations. While sometimes used for debugging or analytics, it can intercept data you never intended to share.

With Mintegral, the SDK swizzled methods in UIViewController and network classes to intercept user interactions and API responses. Every time your app made a network call, the swizzled method captured the data first.

Why it matters:

  • It bypasses your security controls. Your authentication, encryption, and data handling policies don't matter if the SDK copies data before you process it.
  • It's nearly invisible to code review. The swizzling happens at runtime, so reading the SDK's source (if available) won't reveal the attack.
  • It violates PCI DSS v4.0.1 Requirement 6.2.4, which mandates maintaining an inventory of bespoke and custom software. If you don't know an SDK is modifying your app's behavior, you can't properly inventory or assess it.

To detect it: Use runtime analysis tools during your SDK vetting process. Monitor what the SDK does during background operations, app state transitions, and error conditions.

Legal Approval vs. Technical Validation

A legal team's approval of an SDK's privacy policy doesn't ensure security. Privacy policies describe intended behavior, not actual behavior. The Mintegral SDK's documentation didn't mention click hijacking or remote code execution capabilities—these were discovered through security research.

For SOC 2 Type II compliance, you need to demonstrate that you've validated third-party components against your security criteria (CC6.1 - Logical and Physical Access Controls). Accepting a privacy policy without technical validation won't satisfy your auditor.

Build a technical vetting process:

  • Sandbox the SDK in an isolated environment and monitor all I/O operations.
  • Decompile or disassemble the binary to review actual code paths.
  • Test with instrumentation to observe runtime behavior.
  • Document findings before approval.

Keep records of your vetting process. When an SDK update arrives, repeat the analysis—version 5.5.0 might be clean while 5.5.1 contains malicious code.

Disclosure Obligations for a Compromised SDK

If a sketchy SDK is found in your app, disclosure depends on the data exposed and applicable regulations. If personal data was accessed or exfiltrated, you likely have obligations under GDPR, CCPA, or state breach notification laws.

Immediate actions:

  1. Preserve evidence. Don't delete the SDK—you need to understand what it accessed for your disclosure determination.
  2. Analyze the scope. Review network logs, crash reports, and analytics to determine what data the SDK could have accessed.
  3. Check your data processing agreements. If you're a processor for other companies' data, you may have contractual notification requirements separate from legal ones.
  4. Consult legal counsel before making disclosure decisions.

For the technical investigation, focus on:

  • What data did the SDK have access to based on granted permissions?
  • What network connections did it make and to which endpoints?
  • What data appears in the transmitted payloads?
  • How long was the vulnerable version deployed?

Document everything. Your disclosure obligations depend on accurate scope determination, and your legal team needs technical facts, not assumptions.

Preventing Future SDK Risks

Integrate SDK vetting into your development pipeline, not just procurement. Every SDK update should trigger a security review before deployment.

Your prevention framework:

  • Dependency pinning: Lock SDK versions in your build configuration. Auto-updates bypass your security review.
  • Network policy enforcement: Use iOS App Transport Security or Android Network Security Configuration to restrict SDK network access to documented endpoints only.
  • Runtime monitoring: Deploy mobile app security testing in production to detect anomalous SDK behavior after release.
  • Contractual requirements: Include security audit rights and incident notification clauses in SDK vendor agreements.

For OWASP ASVS v4.0.3 compliance, review Requirement 14.2.1: verify that all third-party components come from trusted sources and are actively maintained. "Trusted" means technically validated, not just legally approved.

Create a decision matrix for SDK approval: What data can it access? What permissions does it require? What's the vendor's security track record? What's your fallback if the SDK becomes unavailable or compromised?

Trusting SDK Updates

When a vendor claims to have fixed a malicious SDK, verify the update. When Mintegral's malicious functionality was discovered, the vendor could push an update—but you need to verify that update actually removes the malicious code.

Your update vetting process:

  • Repeat your full security analysis on the new version.
  • Compare binaries to identify exactly what changed (use diffing tools).
  • Test in isolation before deploying to production.
  • Monitor the new version's behavior for at least two weeks before trusting it.

Consider whether you need this SDK at all. If a vendor shipped malicious code once, your risk assessment should account for potential repeat behavior. Calculate the business value of the SDK against the cost of ongoing intensive monitoring.

Learning More About Mobile SDK Security

Start with the OWASP Mobile Application Security Testing Guide (MASTG) for technical testing procedures. The NIST Cybersecurity Framework provides governance structure for third-party risk management (focus on the Supply Chain Risk Management section).

For runtime analysis tools, explore Frida for dynamic instrumentation and MobSF for automated security testing. Both are open source and widely used in mobile security research.

Join mobile security communities where practitioners share SDK analysis techniques and findings. Real-world threat intelligence beats vendor marketing every time.

Topics:Research

You Might Also Like