M1: Improper Credential Usage in Mobile Apps

M1: Improper Credential Usage in Mobile Apps

Every install of the app carried the company's SMS gateway key.

What Is M1: Improper Credential Usage in Mobile Apps?

An API key compiled into a mobile app ships to everyone who installs it. You'll watch an attacker decompile a public app, lift its SMS gateway key and send phishing texts under the company's name, then revoke the key and move the secret behind the app's own backend.

What You'll Learn in M1: Improper Credential Usage in Mobile Apps

M1: Improper Credential Usage in Mobile Apps — Training Steps

  1. Pull the app apart

    Ridlowe is a ride-hailing app with a share-my-trip feature: a rider taps a button and a contact gets a text with a live link to the ride. Bob has no account with Ridlowe and no access to anything it runs. He has what every rider has: the app. He downloaded the Android build from a public APK mirror and now unpacks it back into readable source.

  2. Look for anything secret

    Bob does not read 4,000 files. He searches them for the names developers give to credentials: key, token, secret, and the names of the services an app like this would talk to.

  3. Ask the gateway who he is

    A key alone could be a test key or a dead one. Bob asks the SMS gateway what account it belongs to and what it is allowed to do, exactly as the app would.

  4. Find the audience

    Campaign access means Ridlowe's rider lists live on the gateway. Bob lists them.

  5. Text every rider as Ridlowe

    Bob writes one message: a fake failed-payment notice with a link to his own card-capture page. He sends it to the whole rider list, from Ridlowe's sender name, billed to Ridlowe's account.

  6. Where the key came from

  7. A text from your own app

    Alice builds the Ridlowe apps for Android and iOS, and her own test phone is signed up as a rider. A text has just arrived on it, in the Ridlowe thread.

  8. A message from Priya

    Before the details land in her inbox, Priya Nandakumar messages Alice directly.

  9. The gateway sees it too

    A few minutes later the security lead writes. The SMS gateway has flagged the campaign.

  10. Read the build like an attacker

    Alice does not need the source tree to know what is in the app. She looks at the shipped APK the way anyone with a copy could.

Security Framework Coverage

OWASP Mobile Top 10

  • M1:2024 Improper Credential Usage

OWASP MASVS

  • MASVS-AUTH-1 The app uses secure authentication and authorization protocols and follows the relevant best practices.

CWE

  • CWE-798 Use of Hard-coded Credentials

CIS Controls

  • CIS 16 Application Software Security

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security

NICE Framework

  • DD-WRL-003 Secure Software Development