Oops. SSL was unnecessary in this example.
[web-hugo.git] / content / posts / reverse-engineering-a-mobile-app-protobuf-api.md
index 67c912014ccbf802c757a374dff879df55e34594..2fb1f5797a19068bb34b454cb0cd4926cc9f0ecd 100644 (file)
@@ -98,7 +98,12 @@ certain global values.
 ## The smoke-test
 
 So we have a potential API endpoint, let's put it to the test. We're not going to recompile anything yet or do any byte-patching,
-let's try a quick smoke-test. Ensure your phone is rooted and you have a variant of Xposed Framework installed (I used LSPosed).
+let's try a quick smoke-test.
+
+**UPDATE 15/05/2024: It turns out this old app version uses HTTP only, instead of HTTPS. You will only need to perform the AdAway instruction here.
+As this information is still vastly useful for reverse engineering most apps, I will be leaving this section intact.**
+
+Ensure your phone is rooted and you have a variant of Xposed Framework installed (I used LSPosed).
 We will need to unarm the SSL pinning present in most apps, including this one, I used [io.github.tehcneko.sslunpinning](https://github.com/Xposed-Modules-Repo/io.github.tehcneko.sslunpinning) module.
 (NOTE: Users without root might want to skip to end of article where I showcase unpinning the app manually)
 
@@ -124,9 +129,14 @@ EOF
 openssl genrsa -des3 -out myCA.key 2048
 openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
 # Create a CSR and lets have the new CA sign it
+openssl genrsa -out auxbrain.key 2048
 openssl req -new -key auxbrain.key -out auxbrain.csr -nodes
 openssl x509 -req -in auxbrain.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out auxbrain.crt -days 825 -sha256 -extfile auxbrain.ext
-# You now have myCA.pem - the public certificate of your root CA, auxbrain.key - the private key for your webserver, auxbrain.pem - the public cert for your webserver.
+cat auxbrain.crt myCA.pem > auxbrain.pem
+# You now have:
+# myCA.pem - the public certificate of your root CA
+# auxbrain.key - the private key for your webserver
+# auxbrain.pem - the public cert for your webserver.
 ```
 
 Use the generated `auxbrain.pem` and `auxbrain.key` files for your webserver SSL/TLS configuration. For nginx, append following values to your server directive: