Skip to content

feat(mobile): add Security Misconfiguration - #1118

Open
SeanDuggan wants to merge 24 commits into
OWASP:devfrom
SeanDuggan:mobile-split/13-security-misconfiguration
Open

SeanDuggan wants to merge 24 commits into
OWASP:devfrom
SeanDuggan:mobile-split/13-security-misconfiguration

Conversation

@SeanDuggan

Copy link
Copy Markdown
Member

Summary

Adds the Security Misconfiguration (OWASP Mobile Top 10 M8) lesson and one challenge to the Mobile Shepherd app, with the matching server-side module content. Part of the #894 split. This PR covers one category only.

What's included

Android app

  • SecurityMisconfigLessonFragment: a "Scan App Components" button that lists the app's activities (via PackageManager) and marks each EXPORTED or Safe. The lesson has one vulnerability: a debug activity (MisconfigLessonSecretActivity) that is exported when it should not be. The student launches it with adb shell am start -n org.owasp.mobileshepherd/<activity> to retrieve the key.
  • SecurityMisconfigChallenge2Fragment ("Security Misconfiguration 1"): the app has ADB backup enabled; the student extracts the app data and finds the plaintext key.
  • Navigation entries, ModuleInfoHelper info dialogs and KeyValidator module ids. The ids are the server's string names, because the app sends them to /mobileModuleStart, /mobileFlagGet and /mobileFlagSubmit.
  • Unit tests for both fragments.

Server / content

  • Lesson and challenge i18n properties and JSPs.
  • coreSchema.sql rows and cheat-sheet entries, solutions.properties, moduleNames.properties.
  • Registration in level-classification.toml and the Setter.java mobile category where clause. docs/mobile-levels.md updated.

Dependencies

Testing

  • assembleDebug and testDebugUnitTest pass.
  • Emulator (API 37) against a local Tomcat 11 + MariaDB: signed in, opened the module, waited out the 30 s minimum solve time, and exploited it as a student would. Both submissions are recorded and scored in core.results.
  • The challenge's adb backup step returns a 0-byte file on API 37. A pre-API-31 emulator or a device that still supports backup is needed to exercise it.

Notes

  • No platform changes. This touches only the Android app and module content, plus the Setter.java category where clause and the module-registration files.

SeanDuggan and others added 12 commits October 26, 2026 19:09
Adds the Gradle project, manifest, resources, launch/login/main activities,
navigation, preferences, authentication, key validation and progress
tracking utilities, and the home, progress, scoreboard and ADB reference
screens. Lesson and challenge screens referenced by the navigation graph are
added in the following PRs, so those destinations are not usable until then.

Part of the split of OWASP#894 (mobile app).
Disable cleartext traffic app-wide via a network security config and reject non-https server URLs at login, registration and key validation. Debug builds additionally trust user-installed CAs for local development.
The shell now builds with an empty KeyValidator.Module enum and empty
nav, menu and module-info registries. Each lesson/challenge category PR
registers its own entries. Removes the myapp://open deep link and the
KeyValidator unit test, which return with the first category.
Removes lesson/challenge strings and the Insufficient Cryptography ADB
reference card. These return with their own category PRs.
The app asks /mobileModuleStatus which modules the signed-in student can
open and greys out the rest in the navigation drawer and progress list,
with the server's reason shown when tapped. This mirrors the platform's
open floor / CTF rules: module closed, event not running, module blocked.

Advisory only: the server re-checks every module start and key request.
It fails open, so signed-out or offline use and failed requests grey out
nothing. Status refreshes on resume, drawer open, sign in and sign out.
…JDK path

Changing server_preference while signed in kept the old server's session
cookie, so it would be sent to the new server. Log out when the server
actually changes.

Remove org.gradle.java.home, which pinned a Windows Android Studio path and
overrode JAVA_HOME on other machines.
Replace the individually listed local planning docs with a single *.md rule.
Remove CHALLENGE_SOLUTIONS.txt and missing_challenges.txt, which refer to
no files in the repository.
The logcat grep example rendered a literal &quot;search_term&quot; on the ADB Commands screen.
Adds the Mobile Security Misconfiguration (OWASP M8) lesson and Challenge 1
to the Android app, with the matching server-side module registrations.

Lesson: the learner scans the app's activities, finds the debug screen that
is exported when it should not be, and launches it with `adb shell am start`
to retrieve the key.

Challenge: the app ships with backup enabled and stores the key in plaintext
shared preferences; the learner extracts the app data and reads it.

Server-side: coreSchema.sql module rows and cheat sheets, solutions,
moduleNames, level-classification.toml topic, and the Setter.java mobile
category clause. Also adds the lesson/challenge JSPs and i18n properties and
a docs/mobile-levels.md entry.

Scoring depends on the Mobile* servlets from the server-API PR.
@SeanDuggan SeanDuggan added this to the 4.0.0 milestone Nov 8, 2026
@SeanDuggan SeanDuggan self-assigned this Nov 8, 2026
SeanDuggan and others added 12 commits November 8, 2026 22:01
…iguration' into mobile-split/13-security-misconfiguration
Run generate-level-catalogue.py so docs/mobile-levels.md matches coreSchema.sql
and level-classification.toml (fixes the docs-build catalogue check).
The Android app lives in mobile/, not mobile/MobileShepherd/.
Insecure Communication is deferred to 4.0.1. Remove its key hash
entries, ProGuard rules and the cleartext-traffic comment.
…ng to it

The lesson footer now names the risk (for example 'OWASP Mobile Top 10 - M4: Insufficient Input/Output Validation') without an external URL, and no uri.properties key is required.
Drop the About dialog button that opened owasp.org and the unused hidden Top 10 FAB with its string. Lessons now name the relevant risk as plain text.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants