docs: structure APK research findings and API inventory

This commit is contained in:
alex committed 2026-09-25 02:14:18 +00:00
1 parent c5c5ac473e
commit c9c5e9431e
9 files changed
+374 -8

No files matched your search

+2
View File
@@ -1,4 +1,6 @@
node_modules/
__pycache__/
*.py[cod]
.next/
dist/
build/
+25 -8
View File
@@ -1,21 +1,38 @@
# EnBW Recharge
Private research and interoperability project for a personal EnBW mobility+ account.
Private research and interoperability project for a personal EnBW mobility+ account. The repository combines a static analysis record of the EnBW mobility+ Android APK with a future read-only Node.js SDK and web panel.
## Current conclusion
The APK exposes a broad JSON/Retrofit API surface covering stations, profiles, charging history, tariffs, invoices, payment, cards, vouchers, contracts, and live charging. Static analysis has **not** demonstrated an API vulnerability, authorization bypass, or payment/charging bypass. Runtime authorization testing has not yet been performed.
Start with [`docs/README.md`](docs/README.md), then see [`docs/FINDINGS.md`](docs/FINDINGS.md), [`docs/API-SURFACE.md`](docs/API-SURFACE.md), [`docs/AUTHENTICATION.md`](docs/AUTHENTICATION.md), and [`docs/SECURITY-ASSESSMENT.md`](docs/SECURITY-ASSESSMENT.md).
The main product is a Node.js SDK and web panel. APK reverse-engineering material is kept under [`apk/`](./apk) and is not committed by default.
## Evidence boundary
Claims are labelled by evidence strength: confirmed static, negative static, inferred, or live verified. There are currently no live API results in this repository. Do not commit credentials, access tokens, raw session captures, payment details, or personal data.
## Safety boundary
Use only an authorized account. Begin with read-only API calls. Charge start/stop, payment, voucher, card, contract, account deletion, and auto-charge operations require explicit per-action approval.
## Layout
- `panel/` — web panel application
- `sdk/` — Node.js client SDK and tests
- `docs/` — durable findings, API/auth/security reports, and methodology
- `scripts/` — repeatable offline analysis helpers
- `panel/` — web panel application (planned)
- `sdk/` — Node.js client SDK (planned)
- `apk/` — APK, decompilation output, extracted resources, schemas, captures, and analysis notes
- `scripts/` — repeatable local tooling
- `notes/` — project-level design and operational notes
## Responsible-use boundary
## Setup
This project is for authorized access to the maintainer's own account. It does not bypass authentication, paid access, certificate pinning, or server-side authorization. Do not commit credentials, access tokens, raw session captures, or personal data.
The documentation and inventory script are offline. To regenerate the API inventory after decompilation:
## Status
```bash
python3 scripts/inventory-api-interfaces.py > /tmp/api-inventory.md
```
Project bootstrap complete. APK acquisition, decompilation, API mapping, SDK implementation, and panel implementation are pending verification.
The generated APK and runtime capture directories are ignored by Git; see `.gitignore` before adding new artifacts.
+32
View File
@@ -0,0 +1,32 @@
# APK analysis methodology
## Reproducibility
The analysis target is recorded in [`FINDINGS.md`](FINDINGS.md) with filename, package, version, size, and SHA-256. Decompiled material is kept under `apk/` and is intentionally ignored where it may contain generated or sensitive data.
Recommended tools:
- `unzip` for integrity, contents, and embedded resource inspection;
- `apktool` for manifest, resources, and smali;
- `jadx` for higher-level Java reconstruction;
- `strings` and targeted search for hostnames, config, and feature names;
- runtime capture only with an authorized account and redaction.
## Evidence discipline
Every statement should be tagged mentally or in prose as one of:
- **Confirmed static:** directly observable in the APK or generated decompilation.
- **Negative static:** absent from a defined search scope.
- **Inferred:** likely based on names or call structure but not proven.
- **Live verified:** observed by exercising the actual app/service.
Do not turn an endpoint declaration into a claim that the endpoint is reachable, unauthenticated, or vulnerable. Do not turn an API client identifier into a secret. Do not store live credentials or bearer tokens in Git.
## Repository safety
- Keep raw APKs and generated decompilation under `apk/`.
- Keep durable conclusions under `docs/`.
- Keep runtime captures outside Git or in a separately protected local directory.
- Prefer read-only API calls and reversible tests.
- Require explicit approval before charging, payment, contract, voucher, card, deletion, or auto-charge mutations.
+119
View File
@@ -0,0 +1,119 @@
# Retrofit API interface inventory
Generated from `apk/jadx-out/sources`; interfaces: 33; declarations: 112.
| Interface | HTTP | Path |
|---|---:|---|
| `com/enbw/lib/data/addresscheck/remote/api/AddressCheckApi.java` | `GET` | `address/cities` |
| `com/enbw/lib/data/addresscheck/remote/api/AddressCheckApi.java` | `GET` | `address/{postalCode}/streets` |
| `com/enbw/lib/data/auth/api/AuthApi.java` | `GET` | `v1/countryInfos` |
| `com/enbw/lib/data/auth/api/AuthApi.java` | `GET` | `v1/document/{type}` |
| `com/enbw/lib/data/auth/api/AuthApi.java` | `POST` | `v1/sharedprofiles/invitation/accept/{invitationCode}` |
| `com/enbw/lib/data/autocharge/api/AutoChargeApi.java` | `DELETE` | `v1/autocharge/{sessionId}` |
| `com/enbw/lib/data/autocharge/api/AutoChargeApi.java` | `POST` | `v1/autocharge/disconnect` |
| `com/enbw/lib/data/autocharge/api/AutoChargeApi.java` | `GET` | `v1/autocharge/status/{sessionId}` |
| `com/enbw/lib/data/autocharge/api/AutoChargeApi.java` | `POST` | `v1/autocharge/request` |
| `com/enbw/lib/data/brandedsalespartner/api/BrandedSalesPartnerApi.java` | `GET` | `v1/brandedSalesPartnerSwitch/details` |
| `com/enbw/lib/data/btb/api/B2bApi.java` | `GET` | `permissions` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/disable` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/enable` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `GET` | `v1/chargecard/order/list` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `GET` | `v1/chargecard/list` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/activate` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/checkvoucher` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/order` |
| `com/enbw/lib/data/chargingcard/api/ChargingCardApi.java` | `POST` | `v1/chargecard/order` |
| `com/enbw/lib/data/charginglocation/api/FavoriteChargingLocationApi.java` | `PUT` | `users/favorites/{chargingLocationId}` |
| `com/enbw/lib/data/charginglocation/api/FavoriteChargingLocationApi.java` | `GET` | `users/favorites` |
| `com/enbw/lib/data/charginglocation/api/FavoriteChargingLocationApi.java` | `DELETE` | `users/favorites/{chargingLocationId}` |
| `com/enbw/lib/data/charginglocation/api/RealTimeChargingLocationApi.java` | `POST` | `charging-locations/charging-points/realtime-data/_query` |
| `com/enbw/lib/data/charginglocation/api/RealTimeChargingLocationApi.java` | `GET` | `charging-locations/{id}/charging-points/realtime-data` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `GET` | `charging-locations/{location_reference}/pictures` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `GET` | `charging-locations/static-data` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `POST` | `charging-locations/static-data/_query` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `POST` | `charging-locations/recommendations/_query` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `POST` | `charging-locations/routes/_query` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `GET` | `charging-locations/{location_reference}/points-of-interest` |
| `com/enbw/lib/data/charginglocation/api/StaticChargingLocationApi.java` | `POST` | `charging-locations/map-search/_query` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `GET` | `v1/charge/{evseId}` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `GET` | `v1/charge/qr` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `GET` | `v2/chargings/active` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `GET` | `v2/chargings/history` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `POST` | `v1/chargings/start` |
| `com/enbw/lib/data/chargingstation/api/ChargingPointApi.java` | `POST` | `v1/chargings/stop` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `DELETE` | `v1/chargestations/favorites/{stationId}` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `POST` | `v1/mapsearch` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `GET` | `v3/chargestations/{stationId}/chargingpoints` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `POST` | `v3/chargestations/{stationId}` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `GET` | `v1/charginglocations/{stationId}/pictures` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `GET` | `v3/chargestations/{stationId}/pointsofinterest` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `GET` | `v2/chargestations/favorites` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `POST` | `v1/mapsearch/recommendation` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `POST` | `v1/mapsearch/recommendation/updateWithFilter` |
| `com/enbw/lib/data/chargingstation/api/ChargingStationApi.java` | `POST` | `v1/chargestations/favorites` |
| `com/enbw/lib/data/chargingstation/api/GooglePlacesApi.java` | `GET` | `directions/json` |
| `com/enbw/lib/data/chargingstation/api/RouteModeApi.java` | `POST` | `v2/routes/chargestations` |
| `com/enbw/lib/data/contracts/api/ContractsApi.java` | `POST` | `v1/contracts/termination/revocation` |
| `com/enbw/lib/data/contracts/api/ContractsApi.java` | `POST` | `v1/contracts/termination` |
| `com/enbw/lib/data/datasource/carselector/remote/api/CarSelectorApi.java` | `GET` | `/car-selector/api/v1/cars` |
| `com/enbw/lib/data/datasource/carselector/remote/api/CarSelectorApi.java` | `GET` | `/car-selector/api/v1/cars/{id}` |
| `com/enbw/lib/data/datasource/profile/remote/api/ProfileApi.java` | `GET` | `v1/profiles` |
| `com/enbw/lib/data/datasource/profile/remote/api/ProfileApi.java` | `PATCH` | `v1/profiles/{id}/interestedinautocharge` |
| `com/enbw/lib/data/engagecontract/api/EngageContractApi.java` | `GET` | `contracts/{contractId}/billing/payment/active-payment-method` |
| `com/enbw/lib/data/engagecontract/api/EngageContractApi.java` | `POST` | `contracts/{contractId}/revocation` |
| `com/enbw/lib/data/engagecontract/api/EngageContractApi.java` | `POST` | `contracts/{chargingContractId}/tariff-bookings/revocation` |
| `com/enbw/lib/data/engagecontract/api/EngageContractApi.java` | `PUT` | `contracts/{contractId}/billing/payment/active-payment-method` |
| `com/enbw/lib/data/engagecontract/api/EngageContractApi.java` | `POST` | `contracts/{contractId}/start-credit-card-verification` |
| `com/enbw/lib/data/feedback/api/FeedbackApi.java` | `GET` | `v1/feedback/{feedbackId}` |
| `com/enbw/lib/data/feedback/api/FeedbackApi.java` | `GET` | `v1/feedbacksubjects` |
| `com/enbw/lib/data/feedback/api/FeedbackApi.java` | `POST` | `v1/feedback` |
| `com/enbw/lib/data/finder/api/OthersApi.java` | `GET` | `v1/document/{type}` |
| `com/enbw/lib/data/finder/api/OthersApi.java` | `GET` | `v1/version` |
| `com/enbw/lib/data/identity/api/IdentityApi.java` | `POST` | `identity` |
| `com/enbw/lib/data/invoice/api/InvoiceApi.java` | `GET` | `v1/accounting/invoice/document/{documentId}` |
| `com/enbw/lib/data/invoice/api/InvoiceApi.java` | `GET` | `v1/accounting/bookings` |
| `com/enbw/lib/data/invoice/api/InvoiceApi.java` | `GET` | `v1/accounting/invoice/list` |
| `com/enbw/lib/data/joincode/api/JoinCodeApi.java` | `POST` | `v2/joincode/verify` |
| `com/enbw/lib/data/legaldocument/api/LegalDocumentApi.java` | `GET` | `public/documents` |
| `com/enbw/lib/data/operator/api/OperatorApi.java` | `GET` | `v1/operators` |
| `com/enbw/lib/data/operator/api/OperatorApi.java` | `POST` | `v1/operators` |
| `com/enbw/lib/data/operator/api/OperatorFilterApiV2.java` | `GET` | `users/operator-filter` |
| `com/enbw/lib/data/operator/api/OperatorFilterApiV2.java` | `PATCH` | `users/operator-filter` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `PUT` | `charging-contract-order/address` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `PUT` | `charging-contract-order/sales-partner-info` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `PUT` | `charging-contract-order/payment-method/credit-card` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `PUT` | `charging-contract-order/personal-data` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `POST` | `charging-contract-order/confirm` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `POST` | `charging-contract-order` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `POST` | `charging-contract-order/credit-check` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `PUT` | `charging-contract-order/payment-method/sepa` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `GET` | `payment-method-verification/credit-card-verification-form` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `GET` | `charging-contract-order` |
| `com/enbw/lib/data/order/api/OrderApi.java` | `POST` | `charging-contract-order/start-credit-card-verification` |
| `com/enbw/lib/data/payment/api/PaymentApi.java` | `POST` | `v1/payment/activate` |
| `com/enbw/lib/data/payment/api/PaymentApi.java` | `GET` | `v1/payment/creditcard/registrationform` |
| `com/enbw/lib/data/payment/api/PaymentApi.java` | `GET` | `v1/payment/supportedmethods` |
| `com/enbw/lib/data/payment/api/PaymentApi.java` | `GET` | `v1/payment/methods` |
| `com/enbw/lib/data/products/remote/api/ProductsApi.java` | `POST` | `v1/products` |
| `com/enbw/lib/data/products/remote/api/ProductsApi.java` | `DELETE` | `v1/products` |
| `com/enbw/lib/data/products/remote/api/ProductsApi.java` | `PUT` | `v1/products` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `DELETE` | `v1/profiles/{id}` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `DELETE` | `v1/profiles/{id}/vehicle` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `GET` | `v1/profiles` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `POST` | `v1/profiles` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `PUT` | `v1/profiles` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `PATCH` | `v1/profiles/{id}/interestedinautocharge` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `PATCH` | `v1/profiles/{id}` |
| `com/enbw/lib/data/profiles/api/ProfilesApi.java` | `PATCH` | `v1/profiles/{id}/vehicle` |
| `com/enbw/lib/data/tariffs/remote/api/TariffsApi.java` | `GET` | `v2/tariffs` |
| `com/enbw/lib/data/tariffs/remote/api/TariffsApi.java` | `GET` | `v1/tariffs` |
| `com/enbw/lib/data/user/api/UsersApi.java` | `GET` | `v1/users/profile` |
| `com/enbw/lib/data/user/api/UsersApi.java` | `GET` | `v1/users/productdata` |
| `com/enbw/lib/data/user/api/UsersApi.java` | `GET` | `v1/users/userdata` |
| `com/enbw/lib/data/user/api/UsersApi.java` | `POST` | `v1/users/userdata` |
| `com/enbw/lib/data/user/permissions/api/PermissionsApi.java` | `GET` | `v1/users/permissions` |
| `com/enbw/lib/data/user/permissions/api/PermissionsApi.java` | `POST` | `v1/users/permissions` |
| `com/enbw/lib/data/vouchersandcredit/api/VouchersAndCreditApi.java` | `GET` | `v1/voucher/wallet` |
| `com/enbw/lib/data/vouchersandcredit/api/VouchersAndCreditApi.java` | `GET` | `v2/voucher/wallet` |
| `com/enbw/lib/data/vouchersandcredit/api/VouchersAndCreditApi.java` | `POST` | `v1/voucher/redeem` |
+35
View File
@@ -0,0 +1,35 @@
# Authentication and token architecture
## Static facts
The APK uses Auth0-related Android SDK classes and configures the EnBW myEnergyKey identity service:
- Auth0/domain reference: `myenergykey.com`
- Additional legacy/login reference: `pro-login.enbw.com`
- Android callback: `emob://myenergykey.com/android/com.enbw.ev/callback`
- Auth0 SDK storage preference name: `com.auth0.authentication.storage`
- Google web client resource: `default_web_client_id` = `481460993887-g3v5s96roorfld4ch40dto2n0115rot8.apps.googleusercontent.com`
The web client ID is a public client identifier, not a secret. It should not be treated as a credential.
The startup code also constructs a business-system/scope enum containing entries such as `emp`, `mobilityplus-engage`, `smart-mobility`, `permission`, `airship`, `lms`, `cmdm`, and `enbw-collect`. The exact token request, audience, and resulting claims have not been captured.
## Storage observations
The application uses app-private SharedPreferences for Auth0 SDK storage. The manifest sets `android:allowBackup="false"`, so ordinary Android backup portability is not an identified path from this artifact.
No access token, refresh token, password, or private key belongs in this repository. Any runtime capture must stay outside Git and be redacted before analysis notes are updated.
## What is not yet known
- Exact Auth0 client ID used by the native login flow.
- Exact audience and scopes in the authorization request.
- Authorization server discovery response and issuer metadata.
- Which API host corresponds to each Retrofit interface at runtime.
- Access-token claims and API-side enforcement behavior.
- Refresh-token rotation/reuse behavior.
- Whether the legacy login host is reachable or only retained for compatibility.
## Safe next step
Use a permitted test account and a local capture environment to observe the normal login and one read-only API request. Record only redacted request metadata, endpoint paths, response status, and DTO shape. Never commit cookies, authorization headers, tokens, personal data, invoices, payment details, or raw captures.
+57
View File
@@ -0,0 +1,57 @@
# EnBW mobility+ APK findings
## Scope and evidence status
This report records static analysis of the authorized research artifact below. It does **not** claim that any API call, account action, or vulnerability has been verified live.
## Artifact identity
- Source: `apk/original/enbw-mobility-8.19.0.apk`
- Package: `com.enbw.ev`
- Version: `8.19.0` (version code `425`)
- Size: `40,748,519` bytes
- SHA-256: `3413e945148e9539fd221b2ccdd6c03991d870a50da1e3430cac6f713b5f6274`
- DEX: `classes.dex`, `classes2.dex`, `classes3.dex`
- Native ABIs: `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`
- Minimum SDK: 26
- Target SDK: 36
- ZIP integrity: verified
## Analysis outputs
- Apktool: `apk/apktool-out/`
- JADX: `apk/jadx-out/` (84 warnings/errors; smali is the fallback for failed methods)
- Strings: `apk/strings/all-strings.txt`
- Filtered strings: `apk/strings/endpoints-and-auth.txt`
- Extracted embedded schemas: `apk/schemas/`
## Confirmed static findings
1. The application is a native Android app with a large EnBW package surface under `com.enbw.*`.
2. Business APIs are declared as Retrofit HTTP interfaces; the recovered `.proto` files are Firebase analytics/messaging schemas, not the charging API contract.
3. At least 55 API interface files are present under `com/enbw/lib/data/**/api/`.
4. The app includes authentication/access management, profiles, charging stations, live charging, charging history, cards, vouchers, contracts, invoices, payment, auto-charge, tariffs, and B2B modules.
5. Auth0 integration is statically visible. The app configures `myenergykey.com`, references `pro-login.enbw.com`, and declares the callback `emob://myenergykey.com/android/com.enbw.ev/callback`.
6. The manifest sets `android:allowBackup="false"`; no app `network_security_config.xml` was found in the decoded output.
7. No application-code references to `CertificatePinner`, custom `sslSocketFactory`, or custom `hostnameVerifier` were found in the targeted EnBW packages. This is a negative static finding, not a proof that no library or runtime pinning exists.
8. The `POST v1/chargings/start` declaration includes an `X-Firebase-AppCheck` header, indicating an additional client-integrity signal for start-charge requests.
9. Exported application components were reviewed in the manifest. Main/launch, Android Auto, install-referrer, language, diagnostics, and Auth0 redirect entry points are exported; the FileProvider is explicitly non-exported.
10. No hard-coded bearer token or obvious server-side credential was identified in the reviewed resources and decompiled application package.
## Important non-findings
- No API vulnerability has been demonstrated.
- No authorization bypass has been demonstrated.
- No premium/subscription bypass has been demonstrated.
- No live OAuth exchange, API request, replay, or mutation has been performed.
- No raw network capture or account credential is stored in this repository.
## Highest-value next investigations
1. Trace the Retrofit base-URL construction and environment selection.
2. Trace Auth0 `WebAuthProvider`/client configuration to recover the actual client ID, audience, and scopes.
3. Use a permitted test account and read-only calls first to confirm hosts, headers, DTOs, and authorization behavior.
4. Compare object identifiers across two authorized profiles to test for object-level authorization only with explicit permission and harmless reads.
5. Review the start-charge flow and App Check lifecycle without attempting to start or stop a charge unless separately approved.
See [`SECURITY-ASSESSMENT.md`](SECURITY-ASSESSMENT.md) for the security interpretation and [`API-SURFACE.md`](API-SURFACE.md) for the endpoint inventory.
+20
View File
@@ -0,0 +1,20 @@
# EnBW Recharge research documentation
This directory contains the durable, evidence-labelled documentation for the EnBW mobility+ APK reverse-engineering and interoperability project.
## Documents
- [`FINDINGS.md`](FINDINGS.md) — concise evidence ledger: artifact identity, static findings, verified negatives, and open questions.
- [`API-SURFACE.md`](API-SURFACE.md) — API interfaces and endpoint inventory recovered from the APK's decompiled Retrofit declarations.
- [`AUTHENTICATION.md`](AUTHENTICATION.md) — authentication architecture, callback configuration, token-storage observations, and what remains unverified.
- [`SECURITY-ASSESSMENT.md`](SECURITY-ASSESSMENT.md) — static security assessment, candidate investigation areas, and explicit non-findings.
- [`ANALYSIS-METHODOLOGY.md`](ANALYSIS-METHODOLOGY.md) — reproducible analysis workflow and evidence-strength terminology.
## Evidence labels
- **Confirmed static** — directly present in the APK, manifest, resources, or decompiled code.
- **Negative static** — a targeted search did not find the item in the searched scope; this is not proof of absence everywhere.
- **Inferred** — a reasonable interpretation that requires runtime validation.
- **Live verified** — exercised against a permitted test account or service. There are currently no live API results in this repository.
Raw and generated APK artifacts remain under [`../apk/`](../apk/). Sensitive captures, credentials, and access tokens are intentionally excluded from Git.
+56
View File
@@ -0,0 +1,56 @@
# Static security assessment
## Executive conclusion
The APK reveals a broad, useful API surface, but the static evidence currently supports **no confirmed API vulnerability**. The project is at the reconnaissance stage: endpoints and client behavior are mapped sufficiently to plan safe interoperability work, but server-side authorization and abuse controls remain untested.
## Findings
### S-001 — No application-level certificate-pinning implementation located
- **Evidence:** targeted search of the decompiled EnBW packages found no `CertificatePinner`, custom `sslSocketFactory`, custom `hostnameVerifier`, or equivalent application-level implementation.
- **Severity:** informational / defense-in-depth observation.
- **Interpretation:** the app appears to rely on platform TLS validation. A user who controls their own device trust store may be able to inspect their own session. This is not, by itself, an EnBW API vulnerability or an authorization bypass.
- **Status:** static only; runtime interception has not been attempted.
### S-002 — Start-charge request includes Firebase App Check
- **Evidence:** `ChargingPointApi.startCharging` declares `X-Firebase-AppCheck`.
- **Severity:** positive control / abuse-resistance signal.
- **Interpretation:** starting a charge has an additional client-integrity input beyond the normal authenticated request. The server's enforcement, expiry, replay handling, and relationship to Play Integrity are not known.
- **Status:** static only; do not test by starting a charge without explicit approval.
### S-003 — Multiple identifier-bearing paths require authorization testing
- **Evidence:** paths include `{profileId}`, `{contractId}`, `{documentId}`, `{sessionId}`, `{stationId}`, `{id}`, and `{evseId}`.
- **Severity:** investigation candidate, not a finding.
- **Interpretation:** these are normal REST resource identifiers. The only meaningful question is whether the server checks that the authenticated principal may access or mutate each object. Testing must use harmless reads and authorized accounts only.
- **Status:** unverified.
### S-004 — Sensitive mutation surface is present
- **Evidence:** charging start/stop, payment activation, contract revocation, profile deletion, card activation/disable, voucher redemption, and auto-charge operations are declared in the app.
- **Severity:** operational risk, not a vulnerability.
- **Interpretation:** an SDK must make mutating calls opt-in, clearly labelled, and difficult to invoke accidentally. The repository should begin with read-only methods.
- **Status:** confirmed static.
## Explicit non-findings
The current work has not demonstrated:
- broken object-level authorization (BOLA/IDOR);
- token forgery, token leakage, or refresh-token reuse;
- unauthenticated access to private profile, invoice, or charging data;
- payment, voucher, tariff, or contract bypass;
- App Check bypass;
- insecure cleartext business API transport;
- exploitable exported-component data disclosure.
## Safe test plan
1. Recover the runtime base URL and Auth0 request parameters statically.
2. Run only the normal login flow with an authorized test account.
3. Validate read-only profile, station, tariff, and charging-history calls.
4. Compare access behavior for harmless resource reads using only identifiers belonging to authorized test accounts.
5. Stop before any charge, payment, voucher, contract, card, deletion, or auto-charge mutation unless the exact action is separately approved.
6. Redact all credentials and tokens before saving notes.
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""Extract Retrofit declarations from JADX Java output.
Usage:
python3 scripts/inventory-api-interfaces.py [jadx-source-root]
The script emits a Markdown inventory. It performs no network access and does
not read credentials or runtime captures.
"""
from __future__ import annotations
import re
import sys
from pathlib import Path
root = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("apk/jadx-out/sources")
pattern = re.compile(r"@retrofit2\.http\.(GET|POST|PUT|PATCH|DELETE|HEAD)\(\"([^\"]+)\"\)")
rows: list[tuple[str, str, str]] = []
for path in sorted(root.glob("com/enbw/**/api/*.java")):
rel = path.relative_to(root).as_posix()
for method, endpoint in pattern.findall(path.read_text(errors="replace")):
rows.append((rel, method, endpoint))
print("# Retrofit API interface inventory\n")
print(f"Generated from `{root}`; interfaces: {len({r[0] for r in rows})}; declarations: {len(rows)}.\n")
print("| Interface | HTTP | Path |\n|---|---:|---|\n")
for interface, method, endpoint in rows:
print(f"| `{interface}` | `{method}` | `{endpoint}` |")