{"id":244,"date":"2011-07-28T11:52:35","date_gmt":"2011-07-28T10:52:35","guid":{"rendered":"http:\/\/www.floyd.ch\/?p=244"},"modified":"2022-02-09T11:33:40","modified_gmt":"2022-02-09T10:33:40","slug":"importing-burp-ca-into-rooted-android-device","status":"publish","type":"post","link":"https:\/\/www.floyd.ch\/?p=244","title":{"rendered":"Importing Burp CA into rooted Android device"},"content":{"rendered":"<p>The Android operating system is on the rise. The last months I spent a lot of time testing mobile devices, especially the Android platform.l<\/p>\n<p>One of the things that helped me a lot, is the ability to intercept SSL traffic on my Wireless Access Point. Therefore I set up a laptop with <a href=\"https:\/\/portswigger.net\/burp\" title=\"Burp\" target=\"_blank\" rel=\"noopener\">Burp<\/a>, <a href=\"http:\/\/www.aircrack-ng.org\/\" title=\"airbase\" target=\"_blank\" rel=\"noopener\">airbase<\/a> and some iptables commands to redirect the traffic to the Burp proxy. In the Android browser I could simply accept the certificate warning, but for applications like the Google Android Market that&#8217;s not possible. Therefore I had to import the Burp CA into my Android device. As far as I know, this is only possible for rooted (and s-off) phones! The follwing things are necessary:<\/p>\n<p>&#8211; The PortSwiggerCA from your Burp install (see <a href=\"https:\/\/portswigger.net\/burp\/documentation\/desktop\/tools\/proxy\/options#certificate\" title=\"instructions\" target=\"_blank\" rel=\"noopener\">instructions here<\/a>)<br \/>\n&#8211; The cacerts.bks (from your phone or from the <a href=\"https:\/\/android.googlesource.com\/platform\/libcore\/\" title=\"cacerts.bks source\" target=\"_blank\" rel=\"noopener\">Android source<\/a>)<br \/>\n&#8211; <a href=\"https:\/\/www.bouncycastle.org\/archive\/141\/bcprov-jdk16-141.jar\" title=\"Bouncycastle Java Library\" target=\"_blank\" rel=\"noopener\">Bouncycastle Java Library<\/a><\/p>\n<p>Except for the PortSwiggerCA, everything is included in <a href=\"https:\/\/www.floyd.ch\/download\/android-burp-ca-install.zip\" title=\"android-burp-ca-install\" target=\"_blank\" rel=\"noopener\">this zip file<\/a>. After adding the PortSwiggerCA, just execute the import-ca-and-upload.sh script and follow the instructions.<\/p>\n<p>Happy intercepting!<\/p>\n<p>Edit: Depending on which Android version you are running, Android now supports installing &#8220;Trusted Credentials&#8221;. It&#8217;s pretty simple: Download the Burp CA certificate (e.g. through the webinterface on http:\/\/burp\/ or see below), rename cacert.der to cacert.crt, transfer it to your SD card (or \/sdcard folder if you don&#8217;t have a physical card in your phone). Then go to &#8220;Settings &#8211; Security &#8211; Install from storage&#8221; and it should get recognised automatically. From now on you&#8217;ll get a very annoying message everytime you startup your phone (&#8220;Network may be monitored-by an unknown third party&#8221;) as if a custom CA is a bigger problem than the default CAs&#8230; To me all the default CAs are way worse &#8220;unknown third party&#8221;s. However, this setup is usually not working with your default Android browser and you might still need the steps above. Some apps work, but for example <a href=\"https:\/\/web.archive.org\/web\/20140227155032\/http:\/\/source.android.com\/devices\/tech\/security\/enhancements44.html\" target=\"_blank\" rel=\"noopener\">from Android 4.4 on Google uses certificate pinning on its Google server connections<\/a>. Certificate pinning means you really have to apply hooking techniques to the app you are analysing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Android operating system is on the rise. The last months I spent a lot of time testing mobile devices, especially the Android platform.l One of the things that helped me a lot, is the ability to intercept SSL traffic &hellip; <a href=\"https:\/\/www.floyd.ch\/?p=244\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,10],"tags":[158,12,13],"class_list":["post-244","post","type-post","status-publish","format-standard","hentry","category-android","category-mobile-security","tag-android","tag-burp","tag-ca-install"],"_links":{"self":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=244"}],"version-history":[{"count":23,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions"}],"predecessor-version":[{"id":1298,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=\/wp\/v2\/posts\/244\/revisions\/1298"}],"wp:attachment":[{"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.floyd.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}