Skip to content

Instantly share code, notes, and snippets.

@secfb
Forked from dwisiswant0/install_burp_cert.sh
Created November 14, 2020 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save secfb/16f47c5a694ada6e131d6b06e943290c to your computer and use it in GitHub Desktop.
Save secfb/16f47c5a694ada6e131d6b06e943290c to your computer and use it in GitHub Desktop.
10-line to Install BurpSuite Certificate on Android 7+
#!/bin/bash
curl -s http://burp/cert -x http://127.0.0.1:8080 -o cacert.der
openssl x509 -inform DER -in cacert.der -out cacert.pem
export CERT_HASH=$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem | head -1)
adb root && adb remount
adb push cacert.pem "/sdcard/${CERT_HASH}.0"
adb shell su -c "mv /sdcard/${CERT_HASH}.0 /system/etc/security/cacerts"
adb shell su -c "chmod 644 /system/etc/security/cacerts/${CERT_HASH}.0"
rm -rf cacert.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment