Skip to content

Commit bce38a1

Browse files
carlospolopgitbook-bot
authored andcommitted
GITBOOK-4110: change request with no subject merged in GitBook
1 parent d6f717d commit bce38a1

File tree

6 files changed

+192
-163
lines changed

6 files changed

+192
-163
lines changed

SUMMARY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,19 +287,19 @@
287287
* [ADB Commands](mobile-pentesting/android-app-pentesting/adb-commands.md)
288288
* [APK decompilers](mobile-pentesting/android-app-pentesting/apk-decompilers.md)
289289
* [AVD - Android Virtual Device](mobile-pentesting/android-app-pentesting/avd-android-virtual-device.md)
290-
* [Burp Suite Configuration for Android](mobile-pentesting/android-app-pentesting/android-burp-suite-settings.md)
291290
* [Bypass Biometric Authentication (Android)](mobile-pentesting/android-app-pentesting/bypass-biometric-authentication-android.md)
292291
* [content:// protocol](mobile-pentesting/android-app-pentesting/content-protocol.md)
293292
* [Drozer Tutorial](mobile-pentesting/android-app-pentesting/drozer-tutorial/README.md)
294293
* [Exploiting Content Providers](mobile-pentesting/android-app-pentesting/drozer-tutorial/exploiting-content-providers.md)
295-
* [Exploiting a debuggeable applciation](mobile-pentesting/android-app-pentesting/exploiting-a-debuggeable-applciation.md)
294+
* [Exploiting a debuggeable application](mobile-pentesting/android-app-pentesting/exploiting-a-debuggeable-applciation.md)
296295
* [Frida Tutorial](mobile-pentesting/android-app-pentesting/frida-tutorial/README.md)
297296
* [Frida Tutorial 1](mobile-pentesting/android-app-pentesting/frida-tutorial/frida-tutorial-1.md)
298297
* [Frida Tutorial 2](mobile-pentesting/android-app-pentesting/frida-tutorial/frida-tutorial-2.md)
299298
* [Frida Tutorial 3](mobile-pentesting/android-app-pentesting/frida-tutorial/owaspuncrackable-1.md)
300299
* [Objection Tutorial](mobile-pentesting/android-app-pentesting/frida-tutorial/objection-tutorial.md)
301300
* [Google CTF 2018 - Shall We Play a Game?](mobile-pentesting/android-app-pentesting/google-ctf-2018-shall-we-play-a-game.md)
302301
* [Inspeckage Tutorial](mobile-pentesting/android-app-pentesting/inspeckage-tutorial.md)
302+
* [Install Burp Certificate](mobile-pentesting/android-app-pentesting/install-burp-certificate.md)
303303
* [Intent Injection](mobile-pentesting/android-app-pentesting/intent-injection.md)
304304
* [Make APK Accept CA Certificate](mobile-pentesting/android-app-pentesting/make-apk-accept-ca-certificate.md)
305305
* [Manual DeObfuscation](mobile-pentesting/android-app-pentesting/manual-deobfuscation.md)

mobile-pentesting/android-app-pentesting/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ It's recommended to **apply SSL Pinning** for the sites where sensitive informat
454454
### Inspecting HTTP traffic
455455

456456
First of all, you should (must) **install the certificate** of the **proxy** tool that you are going to use, probably Burp. If you don't install the CA certificate of the proxy tool, you probably aren't going to see the encrypted traffic in the proxy.\
457-
**Please,** [**read this guide to learn how to do install a custom CA certificate**](android-burp-suite-settings.md)**.**
457+
**Please,** [**read this guide to learn how to do install a custom CA certificate**](avd-android-virtual-device.md#install-burp-certificate-on-a-virtual-machine)**.**
458458

459459
For applications targeting **API Level 24+ it isn't enough to install the Burp CA** certificate in the device. To bypass this new protection you need to modify the Network Security Config file. So, you could modify this file to authorise your CA certificate or you can [**read this page for a tutorial on how to force the application to accept again all the installed certificate sin the device**](make-apk-accept-ca-certificate.md).
460460

mobile-pentesting/android-app-pentesting/android-burp-suite-settings.md

-109
This file was deleted.

mobile-pentesting/android-app-pentesting/avd-android-virtual-device.md

+5-51
Original file line numberDiff line numberDiff line change
@@ -230,59 +230,13 @@ adbd cannot run as root in production builds
230230

231231
Using [rootAVD](https://github.com/newbit1/rootAVD) with [Magisk](https://github.com/topjohnwu/Magisk) I was able to root it (follow for example [**this video**](https://www.youtube.com/watch?v=Wk0ixxmkzAI) **or** [**this one**](https://www.youtube.com/watch?v=qQicUW0svB8)).
232232

233-
## Install Burp certificate on a Virtual Machine
233+
## Install Burp Certificate
234234

235-
First of all you need to download the Der certificate from Burp. You can do this in _**Proxy**_ --> _**Options**_ --> _**Import / Export CA certificate**_
235+
Check the following page to learn how to install a custom CA cert:
236236

237-
![](<../../.gitbook/assets/image (367).png>)
238-
239-
**Export the certificate in Der format** and lets **transform** it to a form that **Android** is going to be able to **understand.** Note that **in order to configure the burp certificate on the Android machine in AVD** you need to **run** this machine **with** the **`-writable-system`** option.\
240-
For example you can run it like:
241-
242-
{% code overflow="wrap" %}
243-
```bash
244-
C:\Users\<UserName>\AppData\Local\Android\Sdk\tools\emulator.exe -avd "AVD9" -http-proxy 192.168.1.12:8080 -writable-system
245-
```
246-
{% endcode %}
247-
248-
Then, to **configure burps certificate do**:
249-
250-
{% code overflow="wrap" %}
251-
```bash
252-
openssl x509 -inform DER -in burp_cacert.der -out burp_cacert.pem
253-
CERTHASHNAME="`openssl x509 -inform PEM -subject_hash_old -in burp_cacert.pem | head -1`.0"
254-
mv burp_cacert.pem $CERTHASHNAME #Correct name
255-
adb root && sleep 2 && adb remount #Allow to write on /syste
256-
adb push $CERTHASHNAME /sdcard/ #Upload certificate
257-
adb shell mv /sdcard/$CERTHASHNAME /system/etc/security/cacerts/ #Move to correct location
258-
adb shell chmod 644 /system/etc/security/cacerts/$CERTHASHNAME #Assign privileges
259-
adb reboot #Now, reboot the machine
260-
```
261-
{% endcode %}
262-
263-
Once the **machine finish rebooting** the burp certificate will be in use by it!
264-
265-
## Install Burp Certificate with Magisc
266-
267-
If you **rooted your device with Magisc** (maybe an emulator), and you **can't follow** the previous **steps** to install the Burp cert because the **filesystem is read-only** and you cannot remount it writable, there is another way.
268-
269-
Explained in [**this video**](https://www.youtube.com/watch?v=qQicUW0svB8) you need to:
270-
271-
1. **Install a CA certificate**: Just **drag\&drop** the DER Burp certificate **changing the extension** to `.crt` in the mobile so it's stored in the Downloads folder and go to `Install a certificate` -> `CA certificate`
272-
273-
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" width="164"><figcaption></figcaption></figure>
274-
275-
* Check that the certificate was correctly stored going to `Trusted credentials` -> `USER`
276-
277-
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1).png" alt="" width="334"><figcaption></figcaption></figure>
278-
279-
2. **Make it System trusted**: Download the Magisc module [MagiskTrustUserCerts](https://github.com/NVISOsecurity/MagiskTrustUserCerts) (a .zip file), **drag\&drop it** in the phone, go to the **Magics app** in the phone to the **`Modules`** section, click on **`Install from storage`**, select the `.zip` module and once installed **reboot** the phone:
280-
281-
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1).png" alt="" width="345"><figcaption></figcaption></figure>
282-
283-
* After rebooting, go to `Trusted credentials` -> `SYSTEM` and check the Postswigger cert is there
284-
285-
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1).png" alt="" width="314"><figcaption></figcaption></figure>
237+
{% content-ref url="install-burp-certificate.md" %}
238+
[install-burp-certificate.md](install-burp-certificate.md)
239+
{% endcontent-ref %}
286240

287241
## Nice AVD Options
288242

0 commit comments

Comments
 (0)