Skip to content

Instantly share code, notes, and snippets.

@castexyz
Forked from vavkamil/android-burp-cert.sh
Last active November 23, 2023 10:26
Show Gist options
  • Save castexyz/4f0d7813ea3b2676214ae80e4128dd68 to your computer and use it in GitHub Desktop.
Save castexyz/4f0d7813ea3b2676214ae80e4128dd68 to your computer and use it in GitHub Desktop.
Android cert
on rooted devices we have to install burp certificate as SYSTEM like this:
1. Export burp certificate and convert it to pem
a. openssl x509 -inform DER -in cacert.der -out cacert.pem
2. output the subject_hash_old and rename the file:
a. openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1
b. mv cacert.pem <hash>.0
3. Copy the certificate to the device
a. adb push <hash>.0 /sdcard/
b. Adb shell
c. Su
d. mount -o rw,remount /system
e. mv /sdcard/<hash>.0 /system/etc/security/cacerts/
f. chmod 644 /system/etc/security/cacerts/<hash>.0
g. adb reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment