public:wikiblog:26-05-2025-en-reverse-engineering-blackberry-q5-setup-wifi-calls
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:wikiblog:26-05-2025-en-reverse-engineering-blackberry-q5-setup-wifi-calls [2025/05/26 22:11] – mdukat | public:wikiblog:26-05-2025-en-reverse-engineering-blackberry-q5-setup-wifi-calls [2025/05/27 00:25] (current) – mdukat | ||
---|---|---|---|
Line 25: | Line 25: | ||
- clients3.google.com | - clients3.google.com | ||
- cs.sl.blackberry.com (only after DNS response for inet.registration.blackberry.com) | - cs.sl.blackberry.com (only after DNS response for inet.registration.blackberry.com) | ||
+ | - time.blackberry.com (only after answer to PKIOperation request) | ||
==== Setting up local DNS server ==== | ==== Setting up local DNS server ==== | ||
Line 77: | Line 78: | ||
- Then it wants to do a '' | - Then it wants to do a '' | ||
- And after pressing the " | - And after pressing the " | ||
+ | |||
+ | What we can do with this information: | ||
+ | |||
+ | - Crash the browser using some webkit exploit in hopes it exits to home screen? | ||
+ | - Check what this PKI Operation sends to server and try to make our own? | ||
+ | |||
+ | ==== Checking out PKI Operation request ==== | ||
+ | |||
+ | Let's check that PKI Operation request. Quick fix in nginx configuration to forward requests to port 5000 which we will use later: | ||
+ | |||
+ | < | ||
+ | location / | ||
+ | proxy_pass http:// | ||
+ | proxy_set_header Host $host; | ||
+ | proxy_set_header X-Real-IP $remote_addr; | ||
+ | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
+ | proxy_set_header X-Forwarded-Proto $scheme; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Restart nginx, run netcat to listen at port 5000, tee output to some file ('' | ||
+ | |||
+ | < | ||
+ | POST / | ||
+ | Host: pki.services.blackberry.com | ||
+ | X-Real-IP: 10.42.0.61 | ||
+ | X-Forwarded-For: | ||
+ | X-Forwarded-Proto: | ||
+ | Connection: close | ||
+ | Content-Length: | ||
+ | Accept: */* | ||
+ | |||
+ | 0�0�1 *�H�� | ||
+ | ��0�1�0�`�He0� *�H�� | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | After removing the header from file, let's check what we're working with... | ||
+ | |||
+ | < | ||
+ | mdukat@mdukat-Latitude-5290: | ||
+ | Downloads/ | ||
+ | mdukat@mdukat-Latitude-5290: | ||
+ | Certificate: | ||
+ | Data: | ||
+ | Version: 3 (0x2) | ||
+ | Serial Number: 9020257421968243025 (0x7d2e64557aff7951) | ||
+ | Signature Algorithm: ecdsa-with-SHA512 | ||
+ | Issuer: C=CA, O=Research In Motion Limited, OU=BlackBerry, | ||
+ | Validity | ||
+ | Not Before: May 26 23:06:27 2025 GMT | ||
+ | Not After : May 26 23:06:27 2026 GMT | ||
+ | Subject: C=CA, O=Research In Motion Limited, OU=BlackBerry, | ||
+ | Subject Public Key Info: | ||
+ | Public Key Algorithm: id-ecPublicKey | ||
+ | Public-Key: (256 bit) | ||
+ | pub: | ||
+ | 04: | ||
+ | b8: | ||
+ | ae: | ||
+ | 90: | ||
+ | 2d: | ||
+ | ASN1 OID: prime256v1 | ||
+ | NIST CURVE: P-256 | ||
+ | X509v3 extensions: | ||
+ | X509v3 Key Usage: critical | ||
+ | Digital Signature, Key Encipherment | ||
+ | X509v3 Extended Key Usage: critical | ||
+ | TLS Web Server Authentication, | ||
+ | Signature Algorithm: ecdsa-with-SHA512 | ||
+ | Signature Value: | ||
+ | 30: | ||
+ | d0: | ||
+ | a4: | ||
+ | c1: | ||
+ | -----BEGIN CERTIFICATE----- | ||
+ | MIIB3zCCAYSgAwIBAgIIfS5kVXr/ | ||
+ | Q0ExIzAhBgNVBAoMGlJlc2VhcmNoIEluIE1vdGlvbiBMaW1pdGVkMRMwEQYDVQQL | ||
+ | DApCbGFja0JlcnJ5MREwDwYDVQQDDAgyQkQwNkUxNzAeFw0yNTA1MjYyMzA2Mjda | ||
+ | Fw0yNjA1MjYyMzA2MjdaMFoxCzAJBgNVBAYTAkNBMSMwIQYDVQQKDBpSZXNlYXJj | ||
+ | aCBJbiBNb3Rpb24gTGltaXRlZDETMBEGA1UECwwKQmxhY2tCZXJyeTERMA8GA1UE | ||
+ | AwwIMkJEMDZFMTcwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ20qEJkjniPSI6 | ||
+ | 9yZhbbgq2tnVrBZhNFnBQSLHQK5Im42HzGzfpXxuk4OdT5A7yxayoDxOTdS6OkvQ | ||
+ | nS0Us+fIozQwMjAOBgNVHQ8BAf8EBAMCBaAwIAYDVR0lAQH/ | ||
+ | AwEGCCsGAQUFBwMCMAoGCCqGSM49BAMEA0kAMEYCIQC+3/ | ||
+ | AeA7bEAirj/ | ||
+ | HbdI | ||
+ | -----END CERTIFICATE----- | ||
+ | </ | ||
+ | |||
+ | Let's make a simple Flask app and try answering an " | ||
+ | |||
+ | <code python> | ||
+ | from flask import Flask, request | ||
+ | import os | ||
+ | import uuid | ||
+ | |||
+ | app = Flask(__name__) | ||
+ | |||
+ | @app.route('/ | ||
+ | def handle_post(): | ||
+ | filename = f"/ | ||
+ | | ||
+ | with open(filename, | ||
+ | f.write(request.data) | ||
+ | | ||
+ | return " | ||
+ | |||
+ | if __name__ == ' | ||
+ | app.run(host=' | ||
+ | </ | ||
+ | |||
+ | Run, and... Nothing, Blackberry still says that there' | ||
+ | |||
+ | < | ||
+ | (venv) mdukat@mdukat-Latitude-5290: | ||
+ | * Serving Flask app ' | ||
+ | * Debug mode: off | ||
+ | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. | ||
+ | * Running on all addresses (0.0.0.0) | ||
+ | * Running on http:// | ||
+ | * Running on http:// | ||
+ | Press CTRL+C to quit | ||
+ | 127.0.0.1 - - [27/ | ||
+ | 127.0.0.1 - - [27/ | ||
+ | 127.0.0.1 - - [27/ | ||
+ | 127.0.0.1 - - [27/ | ||
+ | 127.0.0.1 - - [27/ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | After some more research, I learned that it is a base of [[https:// | ||
+ | |||
+ | ===== Files generated in this analysis ===== | ||
+ | |||
+ | - {{ : |
public/wikiblog/26-05-2025-en-reverse-engineering-blackberry-q5-setup-wifi-calls.1748297498.txt.gz · Last modified: 2025/05/26 22:11 by mdukat