Solucionando problemas instalando cacert.der de Burp en Android
https://portswigger.net/support/configuring-an-android-device-to-work-with-burp
Esto no funciona en nuevos Android.
Android rechaza los .der.
Esto sí funciona, hay que instalar el certificado como System.
https://blog.ropnop.com/configuring-burp-suite-with-android-nougat/
Android wants the certificate to be in PEM format, and to have the filename equal to the subject_hash_old value appended with .0.
Note: if you are using OpenSSL <1.0, it’s actually just the subject_hash, not the “old” one // es muy probable que utilices <1
{
Use openssl to convert DER to PEM, then output the subject_hash_old and rename the file:
openssl x509 -inform DER -in cacert.der -out cacert.pem
openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1 // Esto devuelve el hash.
mv cacert.pem <hash>.0
} ????, hay que investigar más, pero funciona.
Copy the certificate to the device We can use adb to copy the certificate over, but since it has to be copied to the /system filesystem, we have to remount it as writable. As root, this is easy with adb remount.
adb root // or use ./adb
adb remount
adb push <cert>.0 /sdcard/
The just drop into a shell (adb shell) and move the file to /system/etc/security/cacerts and chmod it to 644:
mv /sdcard/<cert>.0 /system/etc/security/cacerts/
chmod 644 /system/etc/security/cacerts/<cert>.0
adb reboot
After the device reboots, browsing to Settings -> Security -> Trusted Credentials should show the new “Portswigger CA” as a system trusted CA.
