Implement authorization control system? #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The network plugin includes secrets - most notably an RSA private key - but it is not used as a conventional security measure. Instead, it serves as a proof-of-possession mechanism to indicate to the printer/cloud that the official plugin is in use, effectively functioning as an ecosystem control feature.
Of course, the term "proof-of-possession" feels a bit ironic in practice, given that the key is not actually secret in any meaningful sense and is shipped to every user through the network plugin installation.
Here's my more detailed research about the implementation: https://f.sfconservancy.org/j4k0xb/reverse-networking/src/branch/authorization-control/Authorization%20Control
In practice, any legitimate user with a valid account and printer can perform the relevant "critical operations" through Bambu Studio. However, without these cryptographic components, full compatibility with newer firmware versions and the associated cloud features is not achievable.
It should also be noted that developer mode does not provide full simultaneous LAN and cloud operation, nor cloud compatibility, since some features remain gated by authentication and attestation mechanisms.
Regarding the baltobu reverse-networking project:
I'm asking not only because of third-party slicers, but also regarding Bambu Studio itself:
Hi — thanks for the Authorization Control / credential-rotation write-up. I’ve been reproducing it against the live
api.bambulab.comendpoint and the official Linuxlibbambu_networking.so(Studio / network agent path, not Bambu Connect’s Electron JS).Doc correction (request side)
In Credential Rotation, step 3 says to RSA-wrap
session_keywith the app certificate root public key. That always gets me HTTPcode:101(“outdated”). What actually works is a different RSA-2048 public key baked into the plugin (cloud wrap key; notapplication_root/ chain root). With that key, PKCS#1 v1.5 wrap of a random 32-bytesession_key, and AES-256-GCM ofclient_auth_secretin the path (as documented), the API returnscode:0withcert/crl/cert_id.What works for me
client_auth_secretand the wrap key from a live official pluginsession_keyfrom process memory (matches the URL’s encrypted secret)response.keyblobs (always 704 bytes)response.key)What’s stuck
Decrypting
response.keyto PEM/CRT with the requestsession_keyunder the documented layout (IV[12] || ct || tag[16]→ AES-256-GCM) always fails with InvalidTag. Same for HKDF/SHA256 ofsession_key, CBC/CTR/etc., and treating the 672-byte body as the GCM payload. Flat GCM(PEM) would also be ~1.7 KB, not 704 B; GCM(CRT 640) would be 668 B — close to 672, but still not decrypting.I also drove
bambu_network_update_certon the official plugin, caught URL +session_key+ candidate 704 B frames in memory, and put HW watchpoints on the blob — no useful decrypt traps yet (path looks VMProtect’d /decrypt_aes_256_gcminsideupdate_cert_protected).Question
For the native Studio/plugin path (not Connect JS), is
response.keystill AES-GCM with the same requestsession_keyand the flatIV||ct||tagpacking you document, or is there a different frame/KDF/AAD (given the stable 28+672 layout)? Any pointer on how the official client unpacks that field would help a lot.Happy to share a matching
(session_key, response.key)pair offline if useful.Thanks again for the docs.
Hi, the code may have changed a bit since I last looked at it. afaik libbambu_networking and bambu connect use the same implementation (compared using observed http and mqtt traffic).
Accidentally selected the cert based on issuer CN instead of subject CN . Updated the docs to use
service.bambulab.com.j4k0xb/reverse-networking@eee3140455Please confirm if this works or whether there are other discrepancies: https://bambuzled.github.io/posts/bambu-auth-control/
I updated it for now (
j4k0xb/reverse-networking@08ac7dcbfe,j4k0xb/reverse-networking@b30a368a6b) and confirmed Length, the other fields are an assumption until proven.No luck so far - I still can’t decode
response.key:(