Burp Suite Android Emulator
2023-2-8 02:54:31 Author: infosecwriteups.com(查看原文) 阅读量:45 收藏

Guide to setup Burp Suite on your Android Emulator

Burp Suite has a great guide for setting this up, which I’ll be referencing, but it’s not for emulators, and I’ve found no complete guide online, so I’ll make one here. If you like it follow my Twitter and medium for more guides and tips

Install Android Studio

Run this command in your terminal to allow you to make changes to your emulator’s system

launchctl setenv studio.emu.params -writable-system

Install adb: adb devices will let you know if it’s installed

Go to the "Proxy Tab" in Burp and select "Options." In the ‘Proxy listeners’ export your cert in der format. I called it cacert.der

Run these 3 commands to change the cert to a pem and it’s name to it’s hash value appended with .0 (Replace <hash> with the hash printed from the second command)

openssl x509 -inform DER -in cacert.der -out cacert.pem
openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1
mv cacert.pem <hash>.0

We need to start the emulator on android studio, so open an empty project and hit the start button that’s highlighted in my photo

Once the emulator is up we are going to adb push the cert to the device

adb root
adb remount
adb push <cert>.0 /sdcard/

Now we are going to move the file and give it permissions

adb shell
mv /sdcard/<cert>.0 /system/etc/security/cacerts/
chmod 644 /system/etc/security/cacerts/<cert>.0
reboot

After a reboot your cert should show up in ‘Settings’ => ‘Security’ => ‘More security settings’ => ‘Encryptions and credentials’ => ‘Trusted credentials’

The last step is to go into Android Studio settings and enable proxy (whatever port you use works as long as it’s the same on burp)

Manual proxy configuration

For me it didn’t work until I used 127.0.0.1 and I used Check connection with google and saw it on my burp HTTP history

I did have the Play Store on the emulator so instead I used https://apkpure.com/ to get APKs and just abd push to get them on the device and run them

Follow me on Twitter https://twitter.com/AdamJSturge and here on medium

If you enjoy reading stories like these and want to support me as a writer, consider signing up to become a Medium member. It’s $5 a month, giving you unlimited access to thousands of articles, including mine. If you sign up using my link, I’ll earn a small commission at no extra cost to you.


文章来源: https://infosecwriteups.com/burp-suite-android-emulator-5c030d420394?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh