Skip to content
Leaked secrets Write-up Beginner

Tally Ira’s :- Hardcoded Production Secrets

The Android app shipped a plaintext .env file inside its Flutter assets containing production API keys for four backend services. Anyone who downloaded the APK could extract these keys and use them to call the backends, including querying quota for any license serial and triggering consent OTPs for arbitrary TallyNet IDs.

akashkansal065 Follow

Published on akashkansal065.medium.com

Reverse Engineering

Akash K@nsal, on akashkansal065.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

Tally Solutions shipped a new AI application called Tally Ira, distributed as TallyIra.apk with the package name com.tally.heytally, version 1.0.14, build 140. The app is a Flutter application and talks to several cloud backends: a conversational LLM subsystem ("Hey Tally"), a Document AI subsystem (DocAI / Tally Eye) for invoice OCR, a bank statement ingestion subsystem, and a consent, session, quota and account-state microservice surface under connectedservices.tallysolutions.com/doc-ai.

Every one of those backends is gated by an x-api-key header. The researcher's point is that this key is not held by a server: it is a string baked into a file that ships to every phone. The whole series of findings that follows (an unauthenticated account state mutation endpoint, an SMS toll fraud vector, a quota bypass) sits behind the same header, which is why this extraction is described as the keystone of the report.

The author frames the disclosure as responsible and coordinated. Credentials are reproduced verbatim as extracted from the shipped APK, and verification was limited to liveness checks and test or simulated payloads; no customer data was accessed or modified.

Setup

The only precondition is the public APK. No account, role or special access is needed: anyone can download the app and unpack it. The toolchain used is apktool plus the standard unzip and cat utilities. The target version is v1.0.14 / build 140.

Finding it

Flutter apps bundle configuration differently from native Android apps. Instead of BuildConfig fields compiled into smali, many Flutter projects ship a .env file into assets/flutter_assets/ at build time, and it lands in the APK unobfuscated and unencrypted. The researcher looked in exactly that location and found the entire production environment in plaintext.

Exploitation

Step 1: unpack the APK and read the Flutter asset bundle

Bash
apktool d TallyIra.apkunzip -q TallyIra.apk "assets/flutter_assets/.env" -d extracted_envcat extracted_env/assets/flutter_assets/.env

apktool d decodes the APK, unzip pulls the single .env asset out of the archive into extracted_env, and cat prints it. The file contained credentials for four separate backend subsystems:

The same pattern repeated in res/values/strings.xml for the Google stack:

XML
<string name="project_id">docai-dev-appstore</string><string name="google_app_id">1:569892422023:android:f7d5436125985e96415322</string><string name="gcm_defaultSenderId">569892422023</string><string name="google_api_key">[redacted]</string><string name="google_storage_bucket">docai-dev-appstore.firebasestorage.app</string>

The Firebase project name is docai-dev-appstore: a dev project wired into a production App Store build, which the author flags as worth keeping in mind for the rest of the series.

Step 2: map what each credential unlocks

The report tabulates the credentials against their backends and what they authorise:

Credential Backend What it authorizes
API_KEY (iraconvai) iraconvai.asktallyai.com, AWS Mumbai ap-south-1 "Hey Tally" conversational LLM inference and WebSocket token streams
DOC_AI_API_KEY + DOC_AI_APP_SIGN_SECRET docai.asktallyai.com/ip/ Invoice OCR extraction and the ability to forge valid client signatures
BANK_API_KEY bankstatements.asktallyai.com/bank/ Bank statement parsing and reconciliation API
CONSENT_AUTH_API_KEY connectedservices.tallysolutions.com/doc-ai The entire consent, session, quota and account-state microservice surface

Step 3: liveness check on the consent service

Using only the extracted CONSENT_AUTH_API_KEY:

Bash
curl -s -H "x-api-key: [redacted]" \  https://connectedservices.tallysolutions.com/doc-ai/status
JSON
{"service":"doc-ai","status":"ok","message":"DOC AI Service is running"}

That is the entire authentication model for the consent and quota microservice: one static header, distributed to millions of devices.

Step 4: fetch the session handshake public key

The first step of the encrypted session handshake is retrieving the RSA-2048 public key:

Bash
curl -s -H "x-api-key: [redacted]" \  https://connectedservices.tallysolutions.com/doc-ai/v1/get-public-key
HTTP
HTTP/1.1 200 OKContent-Type: text/plain-----BEGIN PUBLIC KEY-----[redacted]/+kEVry0qGiJKxUvP41WmUmF0zmRNgZ/[redacted]/30basaBU7n0mi0zh4gXk22eQ96qBAuD/qqmmCYtlv7bIZDsEetq/dIqI/[redacted]+mzlA6MKY+0MqMJey34y1UQDmBJS+VND6fGNrhFCsJVwIDAQAB-----END PUBLIC KEY-----

The response is a plain-text PEM public key, returned to any caller holding the static header.

Step 5: query any licence's AI quota balance

The quota endpoint takes a serial number and performs no ownership check:

JSON
{  "quota_available": 49,  "quota_used": 1,  "product_type": "invoice"}

Any serial number can be queried, and the response discloses the remaining and used quota plus the product type.

Step 6: trigger a consent OTP for any TallyNet ID and serial pair

The consent OTP endpoint accepts a TallyNet ID and a serial number:

JSON
{"status": 1, "message": "OTP sent successfully"}

On an unrecognised serial the same endpoint returns a structured business-logic rejection instead:

JSON
{"status": 0, "error": {"error_code": 8016, "error_message": "Invalid Serial"}}

That difference incidentally confirms the endpoint distinguishes valid from invalid licence pairs for anyone probing it.

Root cause

The mistake is architectural: the API keys that gate every cloud backend are shipped in cleartext inside the APK's Flutter asset bundle at assets/flutter_assets/.env. Flutter projects commonly ship a .env file into assets/flutter_assets/ at build time, and it lands in the APK unobfuscated and unencrypted. The report lists three contributing habits:

  1. flutter_dotenv-style packages encourage shipping .env as an asset because it is the path of least resistance.
  2. Dart's const String.fromEnvironment() exists precisely for compile-time injection, but it requires CI discipline (--dart-define per build flavour) that teams often skip.
  3. Security reviewers accustomed to auditing AndroidManifest.xml and smali frequently forget that the asset table is part of the attack surface; apktool d plus a glance at flutter_assets/ is a 30-second check.

The .env also contained BUILD_NAME = "null", which the author reads as evidence that the file was generated by a generic template rather than a hardened build pipeline. On the server side, the authentication model is a single static header distributed to millions of devices. The report does not describe any additional defence that was bypassed.

Impact

The author rates the finding Critical (P0 / S1), CWE-798 and CWE-321, OWASP Mobile M1/M9, and sets out four consequences:

  1. Free-riding on paid AI infrastructure. The LLM gateway is backed by AWS (ap-south-1, SigV4-signed execute-api). With the embedded key, anyone can script unmetered LLM inference and OCR extraction, compute Tally pays for, billed to Tally's cloud accounts, with no TallyPrime licence attached.
  2. Signature forgery. DOC_AI_APP_SIGN_SECRET is not just an API key: it is the HMAC-style signing secret used to prove a request came from the genuine app. Possession of it means forged requests are indistinguishable from legitimate client traffic.
  3. Full microservice reach. The connectedservices key is described as the master key for 20 production endpoints: login, session validation, quota sync, consent management, and the account-state mutation webhook covered in Part 2.
  4. Persistence. Even if the app is patched, every historical APK remains a valid credential source until keys are rotated server-side.

The blast radius, in the author's words, covers production credentials for financial infrastructure: invoice images, bank statements and accounting data for Indian MSMEs, including every endpoint documented in the publicly exposed OpenAPI spec covered in a later post. If the keys were rotated out of band, most of what follows in the series would at least require a new extraction; as shipped, the attack surface is public by default.

Fix

The report does not state what was changed. It notes that patching the app alone leaves every historical APK a valid credential source until keys are rotated server-side.

Variants to test

  1. Flutter asset bundle sweep. Run apktool d on any Flutter APK and list assets/flutter_assets/, looking for .env, config.json and similar files. A positive result is a plaintext file containing base URLs, keys or signing secrets.
  2. Resource string sweep. Grep res/values/strings.xml for google_api_key, project_id, gcm_defaultSenderId and storage bucket names. A positive result is a live Firebase API key or a dev project name in a production build.
  3. Static header liveness check. Take any extracted key and call a low-impact status endpoint with it. A positive result is a 200 with a service status body rather than 401 or 403.
  4. Object-level authorisation on identifier parameters. Take endpoints that accept a serial number, licence ID or account ID and substitute one you do not own. A positive result is data for that identifier, as with the quota response above.
  5. Enumeration oracle on business-logic errors. Send a known-invalid identifier and compare the error with a valid one. A positive result is a distinct structured error such as Invalid Serial, which confirms the endpoint validates identifiers for unauthenticated callers.
  6. Signing secret abuse. Where an app signing secret is extracted, replay a request with a signature computed from it. A positive result is the backend accepting the forged request as genuine client traffic.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 20 min read.

What happened, in plain words

Tally Solutions makes accounting software, and it released a new AI app called Tally Ira. The app is an Android app, and its installable file is called TallyIra.apk. The package name is com.tally.heytally, the version is 1.0.14 and the build number is 140.

That app talks to several cloud services run by Tally. One service powers a chat assistant called "Hey Tally". Another reads invoices from photos, a feature called DocAI or Tally Eye. Another imports bank statements. A fourth handles consent, sessions, usage quotas and account state. Every one of those services is protected by a single password-like string sent in a request header called x-api-key.

The problem is where that string lives. It is not kept on a server where nobody can see it. It is written into a file that is packed inside the app, and that file is shipped to every phone that installs the app. Anyone who downloads the app can open it up and read the string.

The researcher who wrote this report did exactly that, and found not one but a whole set of production credentials for four separate backend systems. The report calls this finding the keystone of the whole series, because the other problems it describes (an endpoint that changes account state without authentication, an SMS toll fraud vector, a quota bypass) all sit behind the same header. If the keys were changed on the server side, most of those later findings would at least need a fresh extraction first. As shipped, the attack surface is public by default.

The author describes the disclosure as responsible and coordinated. The credentials are reproduced exactly as they came out of the shipped APK, and checking was limited to liveness checks and test or simulated payloads. No customer data was accessed or modified.

Some words you will need

Before the steps, a few ideas from zero.

  • APK: the file format Android uses to install an app. It is really a zip archive, like a folder compressed into one file, containing code, images, configuration and other resources. Because it is a zip, you can unpack it with ordinary tools.
  • API: an interface that lets one piece of software ask another piece of software to do something. Think of a restaurant: the menu and the waiter are the API. You do not walk into the kitchen; you ask through the waiter. Here, the app asks Tally's cloud services through their APIs.
  • API key: a long random-looking string that a service accepts as proof that the caller is allowed in. It works like a membership card: whoever shows the card gets served. If the card is copied, the copy works just as well as the original.
  • Header: extra information attached to a web request, separate from the address and the body. Headers carry things like the content type or, in this case, the API key. The header name here is x-api-key.
  • Endpoint: one specific address on a server that does one specific job, for example /status or /v1/get-public-key. A service is a collection of endpoints.
  • Backend: the part of a system that runs on servers and does the real work, as opposed to the app on your phone.
  • Flutter: a toolkit for building apps, made by Google, that lets one codebase run on Android and other platforms. Flutter apps pack their files in a particular layout inside the APK, under a folder called assets/flutter_assets/.
  • .env file: a plain text file that lists configuration values, one per line, in the form NAME = value. Developers use it to keep settings such as server addresses and keys out of the code itself. It is meant to be convenient, not secret.
  • Plaintext: readable text that has not been scrambled or encrypted. If you open the file and can read it, it is plaintext.
  • Hardcoded secret: a password or key written directly into something that is distributed, such as an app, instead of being kept on a server. This is the vulnerability class here. The report labels it CWE-798 (use of hardcoded credentials) and CWE-321 (use of a hardcoded cryptographic key), and maps it to OWASP Mobile M1 (improper credential usage) and M9 (reverse engineering).
  • Reverse engineering: taking a finished program apart to understand how it works. For an APK, that means unpacking the archive and reading what is inside.
  • curl: a command-line tool for sending web requests. You give it a URL and some options, and it prints the server's answer. It is the browser's address bar in text form.
  • JSON: a text format for structured data, built from names and values in curly braces, like {"status": "ok"}. Servers commonly answer in JSON.
  • RSA public key: a piece of cryptography used to set up encrypted connections. A public key is, as the name says, meant to be public; it is the private counterpart that must stay secret. The report fetches the public key as the first step of an encrypted session handshake.
  • HMAC-style signing secret: a secret string used to compute a signature over a request, so the server can check the request really came from the genuine app. If you hold the secret, you can produce signatures the server will accept.
  • OCR: optical character recognition, software that turns a picture of text, such as a photographed invoice, into actual text.
  • Quota: an allowance, for example how many AI requests a licence may still make.
  • Serial number: the identifier of a particular software licence.
  • OTP: one-time password, a short code sent to prove you control a phone number or account.
  • TallyNet ID: an account identifier used with Tally's online services.
  • OpenAPI spec: a document that describes an API's endpoints in a standard format. If it is publicly exposed, it tells anyone which doors exist.
  • MSME: micro, small and medium enterprises, the kind of businesses whose accounting data this app handles.
  • AWS ap-south-1: Amazon's cloud region in Mumbai. execute-api is the AWS service that runs APIs, and SigV4 is AWS's request-signing scheme.

The starting point

The only thing needed is the public APK. No account, no special role, no insider access. Anyone can download the app from wherever it is distributed and unpack it. The tools used are apktool, plus the ordinary unzip and cat commands that come with most computers.

Finding it

Flutter apps bundle their configuration differently from native Android apps. A native app often compiles settings into its code, in fields called BuildConfig that end up in the compiled bytecode known as smali. Many Flutter projects instead ship a .env file into assets/flutter_assets/ at build time, and it lands in the APK unobfuscated and unencrypted. The researcher looked in exactly that location and found the entire production environment in plaintext.

Step 1: unpack the APK and read the Flutter asset bundle

Bash
apktool d TallyIra.apkunzip -q TallyIra.apk "assets/flutter_assets/.env" -d extracted_envcat extracted_env/assets/flutter_assets/.env

Line by line, in plain words:

  1. apktool d TallyIra.apk decodes the APK. apktool is a tool made for taking Android apps apart; d means decode. This gives a readable view of the app's contents.
  2. unzip -q TallyIra.apk "assets/flutter_assets/.env" -d extracted_env pulls one single file out of the archive. -q keeps the output quiet, the quoted path is the file to extract, and -d extracted_env says to put it in a folder called extracted_env. The reason for this step is that the APK is a zip, so the configuration file can be lifted out directly without decoding anything else.
  3. cat extracted_env/assets/flutter_assets/.env prints the file to the screen. cat simply shows a file's contents. The reason is obvious: once the file is out, you read it.

The file contained credentials for four separate backend subsystems:

What each line means:

  • The lines starting with # are comments, notes for humans. They divide the file into four sections.
  • API_BASE_URL and WS_URL are the addresses of the chat assistant's backend. wss:// is the secure WebSocket protocol, a connection that stays open so text can stream back and forth, which is how a chat reply appears word by word.
  • API_KEY is the key for that chat backend.
  • DOC_AI_CLIENT_ID, DOC_AI_API_KEY and DOC_AI_API_GW_URL belong to the invoice-reading service. GW stands for gateway, the front door.
  • DOC_AI_APP_SIGN_SECRET is the signing secret described earlier: the string used to prove a request came from the real app.
  • BANK_API_GW_URL and BANK_API_KEY belong to the bank statement service.
  • CONSENT_AUTH_API_GW_URL and CONSENT_AUTH_API_KEY belong to the consent, session, quota and account-state service.

The same pattern repeated in res/values/strings.xml for the Google stack:

XML
<string name="project_id">docai-dev-appstore</string><string name="google_app_id">1:569892422023:android:f7d5436125985e96415322</string><string name="gcm_defaultSenderId">569892422023</string><string name="google_api_key">[redacted]</string><string name="google_storage_bucket">docai-dev-appstore.firebasestorage.app</string>

res/values/strings.xml is a standard Android file that holds text values the app uses. Each <string> element gives a name and a value. Here the values are a Firebase project identifier, a Google app ID, a messaging sender ID, a Google API key and a storage bucket name. Firebase is Google's platform for app backends, and these values tell the app which Firebase project to talk to.

The Firebase project name is docai-dev-appstore: a dev project wired into a production App Store build. The word dev suggests a development environment, yet it is in the build that ships to real users. The author flags this as worth keeping in mind for the rest of the series.

Step 2: map what each credential unlocks

Before testing anything, the researcher worked out which key opens which door. The report tabulates the credentials against their backends and what they authorise:

Credential Backend What it authorizes
API_KEY (iraconvai) iraconvai.asktallyai.com, AWS Mumbai ap-south-1 "Hey Tally" conversational LLM inference and WebSocket token streams
DOC_AI_API_KEY + DOC_AI_APP_SIGN_SECRET docai.asktallyai.com/ip/ Invoice OCR extraction and the ability to forge valid client signatures
BANK_API_KEY bankstatements.asktallyai.com/bank/ Bank statement parsing and reconciliation API
CONSENT_AUTH_API_KEY connectedservices.tallysolutions.com/doc-ai The entire consent, session, quota and account-state microservice surface

In plain words: the first key lets a caller use the chat assistant's AI model, which costs real computing money. The second pair lets a caller read invoices from images and, because of the signing secret, produce requests that look like they came from the genuine app. The third lets a caller send bank statements in for parsing. The fourth is the broadest: it covers consent, sessions, quotas and account state.

Step 3: liveness check on the consent service

A liveness check simply asks a service whether it is alive. It is the gentlest possible test: it does not read or change any data. The researcher used only the extracted CONSENT_AUTH_API_KEY:

Bash
curl -s -H "x-api-key: [redacted]" \  https://connectedservices.tallysolutions.com/doc-ai/status

Line by line:

  1. curl sends the request. -s means silent, so it does not print progress noise.
  2. -H "x-api-key: [redacted]" attaches the header carrying the key. This is the whole point: the request presents the key found in the app.
  3. The backslash at the end of the line continues the command on the next line, purely for readability.
  4. The URL is the /status endpoint of the consent service.

The answer was:

JSON
{"service":"doc-ai","status":"ok","message":"DOC AI Service is running"}

That is a JSON object saying the service is called doc-ai, its status is ok, and it is running. A server that rejects unauthorised callers would have answered with an error such as 401 or 403 instead. Getting a normal answer means the key was accepted.

That is the entire authentication model for the consent and quota microservice: one static header, distributed to millions of devices. The word static matters. The key does not change per user, per phone or per session. It is the same string for everybody.

Step 4: fetch the session handshake public key

The next step was to retrieve the RSA-2048 public key, which is the first step of the encrypted session handshake. A handshake is how two parties agree on how to talk securely; the public key is the part meant to be shared.

Bash
curl -s -H "x-api-key: [redacted]" \  https://connectedservices.tallysolutions.com/doc-ai/v1/get-public-key

This is the same shape as before: send a request to a different endpoint, /v1/get-public-key, with the same key header.

HTTP
HTTP/1.1 200 OKContent-Type: text/plain-----BEGIN PUBLIC KEY-----[redacted]/+kEVry0qGiJKxUvP41WmUmF0zmRNgZ/[redacted]/30basaBU7n0mi0zh4gXk22eQ96qBAuD/qqmmCYtlv7bIZDsEetq/dIqI/[redacted]+mzlA6MKY+0MqMJey34y1UQDmBJS+VND6fGNrhFCsJVwIDAQAB-----END PUBLIC KEY-----

Reading it:

  1. HTTP/1.1 200 OK is the status line. 200 means success.
  2. Content-Type: text/plain says the body is ordinary text, not JSON.
  3. The block between -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- is a PEM-encoded public key, a standard text wrapping for cryptographic keys. The report describes it as RSA-2048.

The response is a plain-text PEM public key, returned to any caller holding the static header. The key itself is public by design; the point is that the endpoint handed it out on the strength of the shipped key alone.

Step 5: query any licence's AI quota balance

The quota endpoint takes a serial number and performs no ownership check. In other words, it does not ask whether the caller owns that licence; it just answers.

Line by line:

  1. Again curl -s with the key header.
  2. The URL ends in ?serial_number=782910283. Everything after the question mark is a query parameter, a value passed to the endpoint. Here it is a licence serial number.
  3. The URL is in quotes so the shell treats it as one piece.

The answer:

JSON
{  "quota_available": 49,  "quota_used": 1,  "product_type": "invoice"}

This JSON says the licence has 49 units of quota available, has used 1, and is for the invoice product. Any serial number can be queried, and the response discloses the remaining and used quota plus the product type. This is an authorisation problem: the caller is authenticated as an app, but nothing checks that the caller has any relationship to the serial number being asked about.

Step 6: trigger a consent OTP for any TallyNet ID and serial pair

The consent OTP endpoint accepts a TallyNet ID and a serial number. An OTP is a one-time password, normally sent by SMS or email to prove you control an account.

Line by line:

  1. -X POST sets the HTTP method to POST. Methods are verbs: GET asks for something, POST sends something to be processed. Generating an OTP is an action, so it is a POST.
  2. The URL is the endpoint that generates the consent OTP.
  3. -H "x-api-key: [redacted]" is the same key header as before.
  4. -H "Content-Type: application/json" tells the server the body is JSON, so it knows how to read it.
  5. -d '...' is the body being sent: a JSON object with a tallynet_id and a serial_number.

The answer:

JSON
{"status": 1, "message": "OTP sent successfully"}

status 1 with the message OTP sent successfully means the service accepted the request and sent a code.

On an unrecognised serial the same endpoint returns a structured business-logic rejection instead:

JSON
{"status": 0, "error": {"error_code": 8016, "error_message": "Invalid Serial"}}

Here status is 0 and the error object carries code 8016 with the message Invalid Serial. That difference incidentally confirms the endpoint distinguishes valid from invalid licence pairs for anyone probing it. In other words, an outsider can use the endpoint as an oracle: send a serial number and learn from the reply whether it is a real licence.

Why this happens

The mistake is architectural: the API keys that gate every cloud backend are shipped in cleartext inside the APK's Flutter asset bundle at assets/flutter_assets/.env. Flutter projects commonly ship a .env file into assets/flutter_assets/ at build time, and it lands in the APK unobfuscated and unencrypted. The report lists three contributing habits:

  1. flutter_dotenv-style packages encourage shipping .env as an asset because it is the path of least resistance. A package is a reusable piece of code other developers install; flutter_dotenv is one that reads .env files at runtime, which only works if the file is inside the app.
  2. Dart's const String.fromEnvironment() exists precisely for compile-time injection, but it requires CI discipline (--dart-define per build flavour) that teams often skip. Dart is the programming language Flutter uses. Compile-time injection means the value is inserted while the app is being built rather than stored as a file, and --dart-define is the build flag that supplies such values. CI is the automated build system, and a build flavour is a variant such as development or production.
  3. Security reviewers accustomed to auditing AndroidManifest.xml and smali frequently forget that the asset table is part of the attack surface; apktool d plus a glance at flutter_assets/ is a 30-second check. AndroidManifest.xml is the file that declares an Android app's components and permissions, and smali is the readable form of Android bytecode. The asset table is simply the list of bundled files, and it is just as reachable.

The .env also contained BUILD_NAME = "null", which the author reads as evidence that the file was generated by a generic template rather than a hardened build pipeline. A build pipeline is the automated process that turns source code into a shipped app.

On the server side, the authentication model is a single static header distributed to millions of devices. Per-client binding would mean each installation gets its own credential, so a leaked one could be traced and revoked. The report does not describe any additional defence that was bypassed.

Impact

The author rates the finding Critical (P0 / S1), CWE-798 and CWE-321, OWASP Mobile M1/M9, and sets out four consequences:

  1. Free-riding on paid AI infrastructure. The LLM gateway is backed by AWS (ap-south-1, SigV4-signed execute-api). With the embedded key, anyone can script unmetered LLM inference and OCR extraction, compute Tally pays for, billed to Tally's cloud accounts, with no TallyPrime licence attached. LLM means large language model, the kind of AI behind a chat assistant, and inference means running that model to produce an answer. TallyPrime is Tally's accounting product, so the point is that the AI can be used without owning the software it is meant to accompany.
  2. Signature forgery. DOC_AI_APP_SIGN_SECRET is not just an API key: it is the HMAC-style signing secret used to prove a request came from the genuine app. Possession of it means forged requests are indistinguishable from legitimate client traffic. A signature here is like a wax seal: the server checks the seal to decide whether a letter is genuine. If you have the stamp, your letters carry a perfect seal.
  3. Full microservice reach. The connectedservices key is described as the master key for 20 production endpoints: login, session validation, quota sync, consent management, and the account-state mutation webhook covered in Part 2. A microservice is a small service that does one job; a webhook is an endpoint that another system calls automatically.
  4. Persistence. Even if the app is patched, every historical APK remains a valid credential source until keys are rotated server-side. Rotating a key means replacing it with a new one and retiring the old one. Patching the app only helps people who update; old copies of the APK keep working as key dispensers.

The blast radius, in the author's words, covers production credentials for financial infrastructure: invoice images, bank statements and accounting data for Indian MSMEs, including every endpoint documented in the publicly exposed OpenAPI spec covered in a later post. Blast radius means how much damage a single leak can reach. If the keys were rotated out of band, most of what follows in the series would at least require a new extraction; as shipped, the attack surface is public by default.

Fix

The report does not state what was changed. It notes that patching the app alone leaves every historical APK a valid credential source until keys are rotated server-side.

Variants to test

These are the generalised checks the report draws out of the finding, useful on other apps:

  1. Flutter asset bundle sweep. Run apktool d on any Flutter APK and list assets/flutter_assets/, looking for .env, config.json and similar files. A positive result is a plaintext file containing base URLs, keys or signing secrets.
  2. Resource string sweep. Grep res/values/strings.xml for google_api_key, project_id, gcm_defaultSenderId and storage bucket names. A positive result is a live Firebase API key or a dev project name in a production build.
  3. Static header liveness check. Take any extracted key and call a low-impact status endpoint with it. A positive result is a 200 with a service status body rather than 401 or 403.
  4. Object-level authorisation on identifier parameters. Take endpoints that accept a serial number, licence ID or account ID and substitute one you do not own. A positive result is data for that identifier, as with the quota response above. Object-level authorisation means checking that the caller is allowed to touch this particular record, not just that the caller is allowed in at all.
  5. Enumeration oracle on business-logic errors. Send a known-invalid identifier and compare the error with a valid one. A positive result is a distinct structured error such as Invalid Serial, which confirms the endpoint validates identifiers for unauthenticated callers. Enumeration means trying many values one by one; an oracle is any reply that tells you whether a guess was right.
  6. Signing secret abuse. Where an app signing secret is extracted, replay a request with a signature computed from it. A positive result is the backend accepting the forged request as genuine client traffic.

Glossary

  • APK: the installable file format for Android apps; it is a zip archive containing code, resources and configuration.
  • API: an interface through which one piece of software asks another to do something.
  • API key: a long random string a service accepts as proof the caller may use it.
  • Asset bundle: the folder inside a Flutter app that holds bundled files such as images and configuration.
  • Authentication: proving who or what you are to a service.
  • Authorisation: deciding whether an authenticated caller may perform a particular action or see a particular record.
  • Backend: the server-side part of a system that does the real work.
  • Blast radius: how far the damage from a single leak or flaw can reach.
  • Build flavour: a variant of an app build, such as development or production.
  • Build pipeline: the automated process that turns source code into a shipped app.
  • CI: continuous integration, the automated system that builds and tests software.
  • Compile-time injection: supplying a value while the app is being built rather than storing it as a file in the app.
  • curl: a command-line tool for sending web requests and printing the responses.
  • CWE-798: the common weakness entry for use of hardcoded credentials.
  • CWE-321: the common weakness entry for use of a hardcoded cryptographic key.
  • Dart: the programming language used by Flutter.
  • .env file: a plain text file of configuration values written as NAME = value.
  • Endpoint: one specific address on a server that performs one specific job.
  • Enumeration: trying many candidate values one by one to learn which are valid.
  • Flutter: Google's toolkit for building apps that run on multiple platforms from one codebase.
  • Flutter assets: the files a Flutter app bundles, found under assets/flutter_assets/ in the APK.
  • flutter_dotenv: a Flutter package that reads .env files at runtime, which requires shipping the file inside the app.
  • Handshake: the opening exchange in which two parties agree how to communicate securely.
  • Hardcoded secret: a password or key written directly into distributed software instead of being kept on a server.
  • Header: extra information attached to a web request or response, separate from the address and body.
  • HMAC-style signing secret: a secret string used to compute a signature over a request so the server can verify it came from the genuine app.
  • HTTP method: the verb of a request, such as GET to fetch or POST to submit.
  • Inference: running a trained AI model to produce an answer.
  • JSON: a text format for structured data made of names and values.
  • LLM: large language model, the kind of AI behind a chat assistant.
  • Liveness check: a harmless request that only asks whether a service is running.
  • Microservice: a small service that performs one job within a larger system.
  • MSME: micro, small and medium enterprises.
  • Object-level authorisation: checking that a caller may access this specific record, not merely that the caller is allowed in.
  • OCR: optical character recognition, turning a picture of text into actual text.
  • OpenAPI spec: a standard document describing an API's endpoints.
  • Oracle: any reply that reveals whether a guess was correct.
  • OTP: one-time password, a short code sent to prove control of an account or phone.
  • OWASP Mobile M1/M9: entries in the OWASP mobile security taxonomy for improper credential usage and reverse engineering.
  • PEM: a standard text wrapping for cryptographic keys, marked by BEGIN and END lines.
  • Per-client binding: giving each installation its own credential so a leaked one can be traced and revoked.
  • Plaintext: readable text that has not been encrypted.
  • POST: an HTTP method used to submit data for processing.
  • Public key: the shareable half of a cryptographic key pair, used to set up encrypted communication.
  • Query parameter: a value passed in a URL after a question mark, as in ?serial_number=....
  • Quota: an allowance, such as how many AI requests a licence may still make.
  • Reverse engineering: taking finished software apart to understand how it works.
  • Rotation: replacing a key with a new one and retiring the old one.
  • RSA-2048: a public-key cryptography scheme using 2048-bit keys.
  • SigV4: AWS's scheme for signing API requests.
  • Smali: the readable form of Android app bytecode.
  • Static key: a key that is the same for every user and session rather than unique per client.
  • TallyPrime: Tally's accounting software product.
  • Webhook: an endpoint that another system calls automatically when something happens.
  • WebSocket: a connection that stays open so data can flow both ways, used for streaming replies.
  • x-api-key: the request header carrying the API key in this report.

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.