Skip to content
Leaked secrets Write-up Beginner

Information Disclosure: Hardcoded Encryption Keys

The Sogexia Android app contained hardcoded AES encryption keys and plaintext keys embedded in its compiled Flutter code. An attacker who decompiled the APK could extract these keys and potentially decrypt protected data.

sudosu01 Follow

Published on medium.com

During a routine security assessment of the Sogexia Android application, a vulnerability was identified involving hardcoded encryption keys within the application’s compiled code. The issue affects builds compiled against SDK version 35 (Max SDK: 32) and was resolved in version 36.

Umanhonlen Gabriel, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the developers embedded cryptographic keys as constants in the Flutter source code rather than using secure key management or dynamic derivation.

Impact

An attacker could extract the hardcoded keys and potentially decrypt data protected by the app's encryption, though the report does not demonstrate actual decryption.

What the attacker needed

Access to the Android APK

The fix

The issue was fixed in SDK version 36 by removing hardcoded cryptographic material and refactoring key management.

How it was found

  1. Obtain the Sogexia Android APK.
  2. Decompile the Flutter binary.
  3. Locate the file encryption_helper.dart.
  4. Identify Base64-encoded cryptographic material and plaintext keys in the code.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When an app needs to encrypt data, it uses a secret key. Here the developers wrote that secret key directly into the app's code instead of keeping it safe elsewhere. Anyone who downloads the app can unpack it and read the key, which defeats the purpose of encryption.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.