New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

android-sec-val

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

android-sec-val

An automated security validation system for Android applications. This tool orchestrates ADB and Appium to verify: - **Runtime Integrity**: Debuggable flags, Logcat leaks, Manifest settings. - **Storage Confidentiality**: Plaintext sensitive data in priva

beta
latest
npmnpm
Version
1.0.0-beta.0
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

Android Security Validator

An automated security validation system for Android applications. This tool orchestrates ADB and Appium to verify:

  • Runtime Integrity: Debuggable flags, Logcat leaks, Manifest settings.
  • Storage Confidentiality: Plaintext sensitive data in private storage (Requires Root).
  • Network Security: Resilience against MITM attacks (Certificate Pinning).

Prerequisites

  • Node.js (v14+)
  • ADB installed and in PATH.
  • Appium Server running (npm install -g appium && appium).
  • Android Emulator (AOSP Image recommended for Root access).

Installation

npm install -g android-sec-val
# OR run directly from source
npm install
npm run build

Usage

Start your Appium server and Emulator first.

# General Usage
android-sec-val validate --package com.example.app

# With APK install and custom sensitive strings
android-sec-val validate \
  --package com.example.app \
  --apk ./path/to/app.apk \
  --sensitive password token auth_key

Options

OptionAliasDescriptionDefault
--package-pTarget Android Package Name(Required)
--apk-aPath to APK to installundefined
--sensitive-sList of strings to grep for in storage['password', 'token', ...]
--output-oJSON Report Pathsecurity_report.json

Security Checks

Runtime

  • Debuggable Flag: Checks android:debuggable.
  • Manifest Analysis: Checks allowBackup and usesCleartextTraffic.
  • Logcat Leakage: Monitors logs for provided sensitive strings.

Storage (Requires adb root)

  • Local Storage Inspection: Recursively greps /data/data/<pkg> for sensitive strings.
  • Cache Hygiene: Checks /data/data/<pkg>/cache for excessive data persistence.
  • External Storage: Checks /sdcard/Android/data/<pkg> and Downloads for leakage.

Network

  • Network Logic: Currently supports manual network validation hooks (see source).

Static Analysis

  • Exported Components: Detects insecurely exported Activities/Services.
  • Permission Audit: Flags dangerous permissions (SMS, Contacts, Location).
  • Hardcoded Secrets: Extracts APK from device and scans for keys (AWS, Bearer, etc.).

Threat Model Coverage (Exploits Detected)

This tool validates defenses against the following specific attack vectors:

Vulnerability ClassExploit / Threat ScenarioValidated By Check
Insecure Data StorageAttacker with physical access (or malware) dumps /data/data to steal Auth Tokens or PII.checkStorageIntegrity (asserts encryption)
Data LeakageSensitive data (passwords, tokens) printed to system logs (logcat) visible to other apps/USB.checkLogcatLeakage
Runtime TamperingAttacker attaches JDWP debugger to inspect memory or hook methods.checkDebuggable
Network InterceptionAttacker on public WiFi (MITM) presents fake cert to steal inflight data.checkNetworkSecurity (Pinning)
Backup TheftAttacker uses adb backup to extract app data without root.checkManifestSettings (allowBackup)
Cleartext TransmissionApp accidentally sends HTTP traffic exposing data to passive monitoring.checkManifestSettings (usesCleartextTraffic)
Cache LeakageSensitive images/responses persist in cache/ after logout/exit.checkCacheHygiene

Report

The tool generates a JSON report:

[
  {
    "check_name": "debuggable_flag",
    "status": "PASS",
    "severity": "LOW",
    "evidence": "Application is NOT debuggable",
    "category": "RUNTIME"
  }
]

FAQs

Package last updated on 30 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts