Back to skill

Security audit

Apk Decompiler

Security checks across malware telemetry and agentic risk

Overview

This skill is a disclosed APK reverse-engineering toolkit, but it should be used cautiously because it downloads and runs third-party tools on APK files.

Install only if you need APK reverse-engineering functionality and are authorized to analyze or modify the apps involved. Run setup on a trusted network, verify downloaded tools when possible, keep TOOLS_DIR under your control, and process unknown APKs in a sandbox, VM, emulator, or disposable device.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
os.makedirs(extracted_dir, exist_ok=True)
    
    # 使用 unzip 解压
    result = subprocess.run(
        ['unzip', '-o', apk_path, '-d', extracted_dir],
        capture_output=True, text=True
    )
Confidence
93% confidence
Finding
This invokes the external unzip tool on a user-supplied APK and extracts its contents directly into a local directory without validating archive entry paths or enforcing a safe extraction policy. A malicious APK/ZIP can exploit path traversal or symlink behaviors during extraction, causing files to be written outside the intended output directory and potentially overwriting local files.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"""使用 apktool 解码资源"""
    print("📄 解码资源文件...")
    
    result = subprocess.run(
        ['java', '-jar', os.path.join(TOOLS_DIR, 'apktool.jar'),
         'd', apk_path, '-o', os.path.join(output_dir, 'apktool-out'),
         '-f', '-s'],  # -f 强制覆盖, -s 不反编译源码
Confidence
83% confidence
Finding
The script executes java with a JAR path derived from TOOLS_DIR, which is taken from an environment variable. If an attacker can influence the environment in which this skill runs, they can redirect execution to a malicious apktool.jar and achieve arbitrary code execution under the current user context.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
jar_output = os.path.join(output_dir, f'{Path(apk_path).stem}-dex2jar.jar')
    
    result = subprocess.run(
        [d2j_cmd, apk_path, '-o', jar_output, '--force'],
        capture_output=True, text=True
    )
Confidence
88% confidence
Finding
This executes a script path (d2j_cmd) discovered from a directory ultimately influenced by TOOLS_DIR. Because the code directly runs that script, a poisoned tools directory can substitute a malicious shell/batch file, leading to arbitrary command execution.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
print(f"  处理: {dex_file.name}")
        
        result = subprocess.run(
            ['java', '-jar', os.path.join(TOOLS_DIR, 'baksmali.jar'),
             'd', str(dex_file), '-o', out_dir],
            capture_output=True, text=True
Confidence
83% confidence
Finding
The code runs java with baksmali.jar from TOOLS_DIR, which comes from an environment variable. In a shared or attacker-influenced execution environment, that allows substitution of a malicious JAR and results in arbitrary code execution.

Tainted flow: 'TOOLS_DIR' from os.environ.get (line 19, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
"""使用 apktool 解码资源"""
    print("📄 解码资源文件...")
    
    result = subprocess.run(
        ['java', '-jar', os.path.join(TOOLS_DIR, 'apktool.jar'),
         'd', apk_path, '-o', os.path.join(output_dir, 'apktool-out'),
         '-f', '-s'],  # -f 强制覆盖, -s 不反编译源码
Confidence
95% confidence
Finding
This is a real tainted execution path: TOOLS_DIR is environment-controlled and feeds directly into the JAR path passed to java -jar. An attacker who can set or influence the environment can cause execution of arbitrary code by planting a rogue apktool.jar.

Tainted flow: 'd2j_cmd' from os.environ.get (line 114, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
jar_output = os.path.join(output_dir, f'{Path(apk_path).stem}-dex2jar.jar')
    
    result = subprocess.run(
        [d2j_cmd, apk_path, '-o', jar_output, '--force'],
        capture_output=True, text=True
    )
Confidence
97% confidence
Finding
This is a direct code-execution sink: d2j_cmd is selected from a filesystem path rooted in TOOLS_DIR and then executed. If the tool directory is attacker-controlled, a malicious script or batch file will run with the permissions of the user executing the skill.

Tainted flow: 'TOOLS_DIR' from os.environ.get (line 19, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
print(f"  处理: {dex_file.name}")
        
        result = subprocess.run(
            ['java', '-jar', os.path.join(TOOLS_DIR, 'baksmali.jar'),
             'd', str(dex_file), '-o', out_dir],
            capture_output=True, text=True
Confidence
95% confidence
Finding
TOOLS_DIR flows into the baksmali.jar path used in java -jar, creating an attacker-influenced execution path. In environments where users, wrappers, or CI jobs can set environment variables, this can be abused to run arbitrary Java code.

Tainted flow: 'TOOLS_DIR' from os.environ.get (line 19, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
print(f"❌ Smali 目录不存在: {smali_dir}")
        return False
    
    result = subprocess.run(
        ['java', '-jar', os.path.join(TOOLS_DIR, 'smali.jar'),
         'a', smali_dir, '-o', output_dex],
        capture_output=True, text=True
Confidence
92% confidence
Finding
TOOLS_DIR is taken directly from the environment and used to select the jar executed by java -jar. If an attacker can influence the environment for this script, they can point TOOLS_DIR to a malicious smali.jar and achieve arbitrary code execution under the script's privileges; in an APK reverse-engineering toolchain, executing attacker-controlled tooling is especially dangerous because users routinely process untrusted apps.

Tainted flow: 'TOOLS_DIR' from os.environ.get (line 19, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
"""使用 apktool 重新打包"""
    print("📦 重新打包 APK...")
    
    result = subprocess.run(
        ['java', '-jar', os.path.join(TOOLS_DIR, 'apktool.jar'),
         'b', project_dir, '-o', output_apk],
        capture_output=True, text=True
Confidence
92% confidence
Finding
The script builds the apktool.jar path from TOOLS_DIR, which is environment-controlled, and executes it. An attacker who can set or poison the environment can substitute a malicious jar and get arbitrary code execution, and this is amplified by the skill's context because reverse-engineering workflows often run third-party tools on analyst workstations with access to sensitive files.

Tainted flow: 'signer' from os.environ.get (line 69, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Content
capture_output=True, text=True
        )
    else:
        result = subprocess.run(
            ['java', '-jar', signer, '--apks', apk_path,
             '--out', os.path.dirname(signed_apk) or '.'],
            capture_output=True, text=True
Confidence
93% confidence
Finding
The signer jar path is derived from TOOLS_DIR and then executed with java -jar, creating a direct path from environment control to code execution. Because signing tools may be run as part of packaging pipelines or analyst workflows, a malicious uber-apk-signer.jar could execute arbitrary payloads and tamper with produced artifacts.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The guide explicitly shows setting `android:usesCleartextTraffic="true"` but provides no warning that this allows unencrypted HTTP traffic, which can expose sensitive data to interception or tampering on hostile networks. In an APK reverse-engineering/modification skill, this is more dangerous because users are being taught to alter app security settings and may apply the change to production or third-party apps without understanding the consequences.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The guide shows enabling `android:allowBackup="true"` and `android:fullBackupContent` without noting that backups can increase exposure of app data, secrets, tokens, or personal information through local or cloud backup mechanisms. In the context of APK modification, users may unintentionally enable backup on apps that were not designed for it, expanding the attack surface and privacy risk.

VirusTotal

64/64 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.