From meta
Detects code quality vulnerabilities in mobile apps (Android/iOS). Trigger on: SQL injection in SQLite, JavaScript injection in WebViews, intent injection, unsafe deserialization, NSKeyedUnarchiver, NSCoding, Java serialization, Parcelable, buffer overflow, JNI native code, PIE disabled, NX disabled, stack canary absent, RELRO, ARC disabled, third-party library CVE, vulnerable dependency, outdated SDK, targetSdkVersion, update enforcement missing, implicit Intent, URL loading in WebView, object persistence, memory corruption, OWASP dependency check. Covers MASVS-CODE-1/2/3/4.
npx claudepluginhub securityfortech/hacking-skills --plugin metaThis skill uses the workspace's default tool permissions.
Mobile code quality vulnerabilities arise from using deprecated/unsafe APIs, failing to validate input from local storage or IPC, insecure object deserialization, and shipping with exploitable native code. SQL injection via string-concatenated SQLite queries is common. WebViews that load arbitrary URLs without scheme/host validation allow navigation to attacker-controlled content. Java/Kotlin d...
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Mobile code quality vulnerabilities arise from using deprecated/unsafe APIs, failing to validate input from local storage or IPC, insecure object deserialization, and shipping with exploitable native code. SQL injection via string-concatenated SQLite queries is common. WebViews that load arbitrary URLs without scheme/host validation allow navigation to attacker-controlled content. Java/Kotlin deserialization of untrusted Parcelables or ObjectInputStream can lead to type confusion and arbitrary code execution. Native code (JNI/NDK) compiled without stack canaries, PIE, or NX creates exploitable memory corruption conditions.
rawQuery("SELECT * FROM users WHERE id='" + userInput + "'") — string-concatenated SQLwebView.loadUrl(intent.getStringExtra("url")) — unvalidated URL loadObjectInputStream.readObject() on data from Intent extras or ContentProviderNSKeyedUnarchiver.unarchiveObject(with:) without class whitelist (iOS < 12)checksec --file=libapp.so shows No PIEimplementation dependency with published CVE in OSS IndextargetSdkVersion below 30 — misses numerous security improvementssendBroadcast(Intent("ACTION")) without package targetSQL Injection:
rawQuery, execSQL with + concatenation' OR '1'='1 via deep link parameter or IPCWebView URL loading:
webView.loadUrl() / WKWebView.load(URLRequest) callsjavascript: or file:// scheme payloadsDeserialization:
ObjectInputStream, Parcel.readValue, NSKeyedUnarchiver in sourceBinary hardening:
# Android — check native library protections
apktool d app.apk
for so in app/lib/**/*.so; do checksec --file="$so"; done
# iOS — check binary protections
otool -hv Payload/App.app/App # check MH_PIE flag
otool -Iv Payload/App.app/App | grep stack_chk # stack canary
Dependency scanning:
# Android — OWASP Dependency-Check
dependency-check --project "app" --scan app.apk --format HTML
# iOS — check Podfile.lock or Package.resolved for known CVEs
# semgrep — Android SQL injection patterns
semgrep --pattern 'rawQuery($QUERY + $INPUT, $_)' --lang java android-src/
semgrep --pattern 'execSQL($QUERY + $INPUT)' --lang java android-src/
# adb — inject SQL via deep link
adb shell am start -W -a android.intent.action.VIEW \
-d "app://search?q=' OR '1'='1" TARGET_PKG
# checksec — native library hardening
checksec --file=libapp.so
# Look for: Canary: No, NX: No, PIE: No, RELRO: No
# MobSF — automated scan
docker run -it -p 8000:8000 opensecurity/mobile-security-framework-mobsf
# Upload APK — check "Binary Analysis" and "Code Analysis" sections
# iOS — class whitelist check (correct pattern)
# Should use: NSKeyedUnarchiver.unarchivedObject(ofClass: Target.self, from: data)
# Not: NSKeyedUnarchiver.unarchiveObject(with: data) (deprecated, no type restriction)
intent:// URIs in WebView can launch app components on Android; file:// cross-origin reads possible with setAllowFileAccessFromFileURLsprintf(userInput) without format string → info leak or code executionScenario 1 — SQLite Injection via Deep Link
Setup: App's search feature constructs rawQuery("SELECT * FROM notes WHERE title LIKE '" + query + "'"). Deep link passes query parameter. → Trigger: app://search?q=' UNION SELECT password FROM users --. → Impact: All user passwords extracted from local database.
Scenario 2 — WebView File Read via Intent
Setup: WebViewActivity loads intent.getStringExtra("url") without validation; setAllowFileAccessFromFileURLs(true). → Trigger: Malicious app sends Intent with url=file:///data/data/TARGET/shared_prefs/auth.xml. → Impact: Victim's SharedPreferences (containing tokens) read by attacker via WebView.
Scenario 3 — Native Buffer Overflow
Setup: JNI function processes image metadata with strcpy(buf, userControlledString) — no bounds check, no stack canary. → Trigger: Craft image with oversized EXIF field. → Impact: Stack smash; exploitable for code execution in native context.
rawQuery with parameterized query: rawQuery("SELECT * FROM t WHERE id=?", arrayOf(id)) — safefile:///android_asset/ or https:// with host whitelisttargetSdkVersion in a library module that doesn't affect app runtime security features// Android — parameterized SQLite query
db.rawQuery("SELECT * FROM notes WHERE title LIKE ?", arrayOf("%$userInput%"))
// Or use Room with @Query annotation (handles binding automatically)
// Android — WebView URL whitelist
val allowedHosts = setOf("api.target.com", "assets.target.com")
webView.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
return request.url.host !in allowedHosts // block if not whitelisted
}
}
// iOS — typed NSKeyedUnarchiver (safe)
guard let obj = try? NSKeyedUnarchiver.unarchivedObject(ofClass: MyModel.self, from: data) else { return }
// iOS — force update check
let storeVersion = fetchAppStoreVersion()
if currentVersion < minimumSupportedVersion { showForceUpdateDialog() }
# CMakeLists.txt — enable hardening flags for native code
target_compile_options(mylib PRIVATE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fpie)
target_link_options(mylib PRIVATE -Wl,-z,relro,-z,now -pie)
[[mobile-platform-interaction]] is the delivery layer for many code quality vulnerabilities — exported components and deep links are how untrusted input reaches rawQuery() and webView.loadUrl(). SQLite injection via string concatenation here is the mobile equivalent of [[sql-injection]] on the web, with identical methodology and payloads adapted for Android's rawQuery. Deserialization of Parcelable data mirrors web-side unsafe deserialization and [[xxe]] in the sense that both exploit parser trust of attacker-controlled structured input.