Skip to content
Back to Blog
·10 min read·news

Android Package Manager Flaw: How SMBs Can Detect App-Based Threats

A critical Android vulnerability lets attackers discover installed apps without permissions. Here's how Indian businesses can protect mobile infrastructure a...

BR

Bachao.AI Research Team

Cybersecurity Research

Source: NIST NVD

See If You're Exposed
Android Package Manager Flaw: How SMBs Can Detect App-Based Threats

Business impact of this development

Emerging threats move fast. Indian SMBs are primary targets because they're under-defended. Here's what you need to know and do now.

What Happened

In early 2023, security researchers identified CVE-2023-21349, a side-channel vulnerability in Android's Package Manager that allows attackers to determine whether specific applications are installed on a device—without requiring any query permissions or user interaction.

This isn't a traditional code execution vulnerability. Instead, it's an information disclosure flaw that exploits timing differences and system behavior patterns. When an app queries the Package Manager for installed applications, the system responds differently depending on whether the target app exists or not. An attacker can measure these response patterns (latency, memory access patterns, or API behavior) to infer which apps are installed, effectively building a profile of the device's software ecosystem.

The vulnerability affects multiple Android versions and has been exploited in the wild. What makes this particularly dangerous is the zero user interaction requirement—a malicious app running in the background can continuously probe the device without the user knowing anything is happening.

Affected Android VersionsMultiple releases including Android 12 and 13
Exploitation ComplexityLow - no special privileges needed
User Interaction RequiredNone
Disclosure ImpactHigh - enables targeted second-stage attacks

Why This Matters for Indian Businesses

If you're an Indian SMB using Android devices for business operations—whether for employee smartphones, customer-facing apps, or IoT devices—this vulnerability directly impacts your DPDP Act compliance and data security posture.

Here's why:

DPDP Act Compliance Risk: Under the Digital Personal Data Protection Act, businesses are responsible for protecting personal data processed on devices. If an attacker uses CVE-2023-21349 to detect security apps, password managers, or banking applications on your employees' phones, they can then deploy targeted malware to steal that data. Your organization becomes liable for the breach.

CERT-In Reporting Obligation: If a breach occurs as a result of this vulnerability being exploited, you have 6 hours to notify CERT-In (the Indian Computer Emergency Response Team). Detecting and responding to app-based attacks requires visibility into device-level threats—something most Indian SMBs lack.

RBI Guidelines for Financial Institutions: If your business handles payments or financial data, the RBI's Cyber Security Framework mandates multi-factor authentication and secure device management. An attacker who knows your employees have banking apps installed can target them with phishing or malware specifically designed to bypass those apps' security.

In my years building enterprise systems for Fortune 500 companies, I've seen attackers use exactly this pattern: first, reconnaissance (what apps are installed), then targeted payload delivery (malware designed for those specific apps). Indian SMBs rarely have the visibility to detect this reconnaissance phase.

⚠️
WARNING
If attackers discover your business uses specific security, banking, or communication apps, they can craft targeted malware for those exact applications—making detection 10x harder.

Technical Breakdown

Let's understand how this vulnerability actually works:

graph TD A[Malicious App Running] -->|Queries Package Manager| B{Does Target App Exist?} B -->|App Exists| C[System Returns Data Quickly] B -->|App Missing| D[System Returns Error Quickly] C -->|Timing Difference Detected| E[Attacker Infers App is Installed] D -->|Timing Difference Detected| F[Attacker Infers App is NOT Installed] E -->|Builds App Profile| G[Targets Second-Stage Attack] F -->|Refines Attack Vector| G G -->|Deploys Malware| H[Data Exfiltration]

The core issue is a side-channel information disclosure. Here's what happens technically:

  1. Query Without Permissions: An app sends a request to the Package Manager asking about installed applications. Normally, this requires the QUERY_ALL_PACKAGES permission.
  1. Timing-Based Inference: The Package Manager responds differently based on whether the app exists:
- If the app exists: The system retrieves metadata and responds in ~X milliseconds - If the app doesn't exist: The system throws an exception and responds in ~Y milliseconds - The difference between X and Y is measurable and exploitable
  1. Pattern Recognition: By querying hundreds of known apps and measuring response times, an attacker can build a complete map of installed applications.
  1. Targeted Exploitation: Once the attacker knows which apps are installed (especially security apps, password managers, or banking apps), they can deploy a second-stage payload specifically designed for those applications.
Here's a simplified example of how this might be exploited:
java
// Vulnerable code pattern in Package Manager
public PackageInfo getPackageInfo(String packageName, int flags) {
    long startTime = System.nanoTime();
    
    // This check leaks information through timing
    if (mPackages.containsKey(packageName)) {
        // App exists - returns quickly
        return mPackages.get(packageName);
    } else {
        // App doesn't exist - throws exception quickly
        throw new PackageManager.NameNotFoundException();
    }
    // Attacker measures: endTime - startTime
}

An attacker's reconnaissance script might look like:

python
import subprocess
import time

# List of apps to probe
common_apps = [
    'com.google.android.apps.authenticator2',  # Google Authenticator
    'com.lastpass.lpandroid',                   # LastPass
    'com.samsung.android.knox',                 # Samsung Knox
    'com.axis.mobile',                          # AXIS Bank app
    'com.mobikwik',                             # MobiKwik
]

installed_apps = []

for app in common_apps:
    response_times = []
    
    # Multiple queries to average out noise
    for _ in range(10):
        start = time.time()
        result = subprocess.run(
            ['adb', 'shell', 'pm', 'dump', app],
            capture_output=True
        )
        elapsed = time.time() - start
        response_times.append(elapsed)
    
    avg_time = sum(response_times) / len(response_times)
    
    # If average response time is below threshold, app likely exists
    if avg_time < 0.05:  # Example threshold
        installed_apps.append(app)
        print(f"[+] Detected: {app}")
    else:
        print(f"[-] Not found: {app}")

print(f"\n[*] Total apps detected: {len(installed_apps)}")
🛡️
SECURITY
This vulnerability doesn't require root access, doesn't trigger security warnings, and can be exploited by any installed app continuously in the background.

Know your vulnerabilities before attackers do

Run a free VAPT scan — takes 5 minutes, no signup required.

Book Your Free Scan

How to Protect Your Business

Protection LayerActionDifficulty
Device LevelKeep Android OS and security patches updated immediatelyEasy
App PermissionsAudit which apps have QUERY_ALL_PACKAGES permissionEasy
Network MonitoringMonitor outbound connections from unknown appsMedium
Device ManagementImplement MDM (Mobile Device Management) for employee devicesMedium
App VettingUse only apps from verified developers; avoid sideloadingEasy
Detection & ResponseDeploy mobile threat detection toolsHard

Immediate Actions

Step 1: Update Your Devices Google released patches for this vulnerability in Android Security Bulletin updates. Ensure all Android devices are running the latest security patch:

bash
# Check your current Android security patch level
adb shell getprop ro.build.version.security_patch

# Should show a recent date (e.g., 2024-02-05 or later)
# If older, go to Settings > System > System Update

Step 2: Audit App Permissions Identify which apps have dangerous permissions:

bash
# List all apps with QUERY_ALL_PACKAGES permission
adb shell pm list permissions -g | grep -A 20 "QUERY_ALL_PACKAGES"

# Or on the device:
# Settings > Apps > Permissions > manage permissions for each app

Step 3: Remove Unnecessary Apps Uninstall apps from unknown developers or those you don't actively use. Each app is a potential attack vector.

💡
TIP
Set up a monthly security audit: Check Settings > Apps, sort by install date, and uninstall anything you don't recognize or no longer use.

For IT Administrators

If you manage employee devices, implement these controls:

bash
# Disable installation from unknown sources (via MDM policy)
adb shell settings put secure install_non_market_apps 0

# Enable USB debugging restrictions
adb shell settings put secure adb_enabled 0

# Force automatic security updates
# (Configure via your MDM platform - Google Workspace, Intune, etc.)

Detection Strategies

While the vulnerability itself is silent, you can detect exploitation attempts:

1. Monitor Package Manager Queries If you have a Mobile Threat Detection (MTD) solution, configure it to alert on:

    1. Rapid, repeated queries to Package Manager
    2. Apps querying for security-related packages
    3. Queries from background processes
2. Network Analysis Watch for apps making unusual outbound connections after querying the Package Manager—this suggests reconnaissance followed by command & control communication.

3. Device Behavior Analysis Look for:

    1. Unusual battery drain (background scanning)
    2. Increased network traffic from unknown apps
    3. Apps requesting excessive storage or memory access

Phase 1 (Week 1): Run a free VAPT Scan to identify vulnerable devices and apps

Phase 2 (Week 2-3): Implement basic controls—update OS, audit permissions, remove unnecessary apps

Phase 3 (Month 2): Deploy Mobile Device Management (MDM) if you have 10+ employee devices

Phase 4 (Ongoing): Use Dark Web Monitoring to detect if employee credentials have been compromised

Real-World Impact

This vulnerability has been exploited by:

    1. Spyware operators to detect security apps before deploying surveillance malware
    2. Banking trojans to identify which financial apps are installed before launching targeted attacks
    3. Ransomware gangs to determine if backup apps are present before encrypting data
For Indian businesses, the most common attack pattern is:
  1. Attacker detects AXIS Bank, HDFC, or other banking apps
  2. Attacker deploys a banking trojan targeting that specific app
  3. Credentials are stolen; attacker transfers funds
  4. Business discovers the breach days or weeks later
  5. Business faces DPDP Act liability + RBI penalties

Compliance Checklist

Use this checklist to ensure you're compliant and protected:

    1. [ ] All Android devices are running the latest security patch
    2. [ ] Unnecessary apps have been uninstalled from all devices
    3. [ ] App permissions have been audited and restricted
    4. [ ] USB debugging is disabled on all employee devices
    5. [ ] Installation from unknown sources is disabled
    6. [ ] MDM is deployed (if managing 10+ devices)
    7. [ ] Dark Web Monitoring is enabled for employee credentials
    8. [ ] Incident response procedures are documented
    9. [ ] CERT-In contact information is documented
    10. [ ] Security awareness training has been conducted

Next Steps

For immediate protection, start here:

  1. Update all Android devices to the latest security patch
  2. Run a free VAPT Scan to identify vulnerabilities in your current setup
  3. Audit app permissions on all business devices
  4. Enable Dark Web Monitoring to detect compromised credentials
As someone who's reviewed hundreds of Indian SMB security postures, I can tell you: most breaches could have been prevented with basic hygiene like timely patching and permission audits. This vulnerability is a perfect example of why those basics matter.

Book Your Free Security Scan → (Takes 10 minutes, no credit card required)


Protect your business with Bachao.AI — India's automated vulnerability assessment and penetration testing platform. Get a comprehensive security scan of your web applications and infrastructure. Visit Bachao.AI to get started.

Frequently Asked Questions

What is CVE-2023-21349? CVE-2023-21349 is an Android security vulnerability that allows attackers to exploit weaknesses in the Android operating system. It was publicly disclosed and patched by Google as part of the Android Security Bulletin.

Why does this affect Indian SMBs? Indian SMBs increasingly rely on Android devices for business operations, from mobile banking to customer communication. Many organizations run BYOD policies with unpatched devices, making them prime targets for attackers exploiting known vulnerabilities like CVE-2023-21349.

How can I protect my organization? Ensure all Android devices in your organization are updated to the latest security patch level. Implement an MDM solution to enforce patch compliance, conduct regular VAPT assessments via platforms like Bachao.AI by Dhisattva AI Pvt Ltd, and align with CERT-In guidelines for incident reporting.


Written by Shouvik Mukherjee, Founder & CEO of Bachao.AI. Follow me on LinkedIn for daily cybersecurity insights for Indian businesses.

BR

Bachao.AI Research Team

Cybersecurity Research

AI-powered security research and threat intelligence from the Bachao.AI team. Covering the latest vulnerabilities, CVEs, and cybersecurity developments affecting Indian businesses.

Get cybersecurity insights for Indian SMBs

Weekly vulnerability alerts, DPDP compliance tips, and security guides. No spam — unsubscribe anytime.

We respect your privacy. Your email is never shared.

Run a free scan — get results in minutes

Free automated scan — risk score in under 2 hours. No credit card required.

See If You're Exposed
Find your vulnerabilitiesStart free scan →