-
Notifications
You must be signed in to change notification settings - Fork 26
SSL Pinning Solution
Tim Guenther edited this page Jul 24, 2017
·
2 revisions
- Follow the challenge set up guide.
- Open Burp Suite in the OWASP VM with
burp
- Set the
Proxy -> Options -> Proxy Options -> Edit -> Specific address
to10.13.13.101
. - Enable
Proxy -> Options -> Proxy Options -> Edit -> Request handling -> Support invisible proxying
. - Troubleshooting: Enable
Proxy -> Options -> Proxy Options -> Edit -> Miscellaneous -> Allow request to web interface using full qualified DNS hostnames
.
- Set the
- Import the Burp CA into the Android VM:
- Download the Burp CA via
http://burp
via a web browser (this might need proxy settings for the browser) - Move the CA to the Android VM
adb push Downloads/cacert.der /sdcard/Download/burpCA.crt
- Now open the Android
Settings -> Security -> Install from SD-Card
and install the CA from/sdcard/Download/
- Download the Burp CA via
- Get the application (
.apk
) form the Android VM or download the latest releaseadb pull /data/app/ruhrpott.owasp.com.vuln_app_1-2/base.apk ./
- Decompile the android application
apktool d base.apk
- Move to the new folder
cd base
- The application has the certificate of the https server stored inside and will check all connections against this certificate the idea is to replace this certificate with the one Burp has create for us:
- Move to the folder with the certificate
cd assets
. The location is disclosed via theSSLPinning.java -> KeyPinStore.java:39
. - Export the Burp certificate via
Proxy -> Options -> Proxy Options -> Import / export CA certificate -> Certificate in DER format
and follow the dialog. - Replace the certificate
base/assets/owasp.crt
with the exported certificate. (it must have the same file name) - The android application needs to be build and signed.
cd ../../ apktool b base keytool -genkey -v -keystore owasp.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore owasp.keystore base.apk alias_name
- Uninstall the android application and install the new one:
adb unistall ruhrpott.owasp.com.vuln_app_1-2 adb install base.apk
- The application is now installed and patched.
- Move to the folder with the certificate
- In the Android VM navigate to
Basic HTTPS Request
and submit the request via the button. - Burp and the application should now show you the string:
HAHAHAHAHAH! No one will steal my secret messages! They are soooo "Military Grade" encrypted! And buzzwords can't fail.
Please open an issue in the case you found a mistake in the wiki.