# iOS Burp Suite Configuration

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中被广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[NFTs](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

<figure><img src="/files/PcmnOBrpXxCjYC5y3bif" alt=""><figcaption></figcaption></figure>

\
使用[**Trickest**](https://trickest.com/?utm_campaign=hacktrics\&utm_medium=banner\&utm_source=hacktricks)可以轻松构建和**自动化工作流程**，使用世界上**最先进**的社区工具。\
立即获取访问权限：

{% embed url="<https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks>" %}

## 在iOS设备上安装Burp证书

为了进行安全的Web流量分析和iOS设备上的SSL绑定，可以通过**Burp Mobile Assistant**或手动配置来利用Burp Suite。以下是两种方法的简要指南：

### 使用Burp Mobile Assistant进行自动安装

**Burp Mobile Assistant**简化了Burp证书的安装过程、代理配置和SSL Pinning。详细指导可在[PortSwigger的官方文档](https://portswigger.net/burp/documentation/desktop/tools/mobile-assistant/installing)中找到。

### 手动安装步骤

1. **代理配置：** 首先在iPhone的Wi-Fi设置中将Burp设置为代理。
2. **证书下载：** 在设备的浏览器中导航至`http://burp`以下载证书。
3. **证书安装：** 通过**设置** > **通用** > **VPN和设备管理**安装下载的配置文件，然后在**证书信任设置**下启用对PortSwigger CA的信任。

### 配置拦截代理

该设置使iOS设备与互联网之间的流量分析通过Burp进行，需要支持客户端到客户端流量的Wi-Fi网络。如果不可用，通过usbmuxd的USB连接可以作为替代方法。PortSwigger的教程提供了关于[设备配置](https://support.portswigger.net/customer/portal/articles/1841108-configuring-an-ios-device-to-work-with-burp)和[证书安装](https://support.portswigger.net/customer/portal/articles/1841109-installing-burp-s-ca-certificate-in-an-ios-device)的详细说明。

### 针对越狱设备的高级配置

对于越狱设备的用户，通过USB上的SSH（通过**iproxy**）提供了一种直接通过Burp路由流量的方法：

1. **建立SSH连接：** 使用iproxy将SSH转发到本地主机，允许iOS设备连接到运行Burp的计算机。

```bash
iproxy 2222 22
```

2. **远程端口转发：** 将iOS设备的端口8080转发到计算机的localhost，以便直接访问Burp的界面。

```bash
ssh -R 8080:localhost:8080 root@localhost -p 2222
```

3. **全局代理设置：** 最后，配置iOS设备的Wi-Fi设置使用手动代理，将所有Web流量引导通过Burp。

### 完整的网络监控/嗅探

可以使用**Wireshark**高效地监控非HTTP设备流量，这是一种能够捕获所有形式数据流量的工具。对于iOS设备，通过创建远程虚拟接口实现实时流量监控，这一过程在[此Stack Overflow帖子](https://stackoverflow.com/questions/9555403/capturing-mobile-phone-traffic-on-wireshark/33175819#33175819)中有详细说明。在开始之前，需要在macOS系统上安装**Wireshark**。

该过程涉及几个关键步骤：

1. 通过USB在iOS设备和macOS主机之间建立连接。
2. 确定iOS设备的**UDID**，这是进行流量监控的必要步骤。可以通过在macOS终端中执行命令来完成：

```bash
$ rvictl -s <UDID>
Starting device <UDID> [SUCCEEDED] with interface rvi0
```

3. 在确定了UDID之后，需要打开**Wireshark**，并选择“rvi0”接口进行数据捕获。
4. 对于目标监控，例如捕获与特定IP地址相关的HTTP流量，可以使用Wireshark的捕获过滤器：

## 在模拟器中安装Burp证书

* **导出Burp证书**

在\_Proxy\_ --> *Options* --> *Export CA certificate* --> *Certificate in DER format*

![](/files/7FAlntWg9PLb7MV7k7iH)

* **拖放**证书到模拟器中
* **在模拟器中**转到\_Settings\_ --> *General* --> *Profile* --> *PortSwigger CA*，并**验证证书**
* **在模拟器中**转到\_Settings\_ --> *General* --> *About* --> *Certificate Trust Settings*，并**启用PortSwigger CA**

![](/files/2BNz4LmOqflM5ajq0WeG)

**恭喜，您已成功在iOS模拟器中配置了Burp CA证书**

{% hint style="info" %}
**iOS模拟器将使用MacOS的代理配置。**
{% endhint %}

### MacOS代理配置

配置Burp作为代理的步骤：

* 转到\_System Preferences\_ --> *Network* --> *Advanced*
* 在\_Proxies\_选项卡中标记\_Web Proxy (HTTP)*和\_Secure Web Proxy (HTTPS)*
* 在两个选项中配置\_127.0.0.1:8080\_

![](/files/ZqoppFzcTpli5B3QiKsL)

* 点击\_**Ok***，然后点击***Apply**\_

<figure><img src="/files/PcmnOBrpXxCjYC5y3bif" alt=""><figcaption></figcaption></figure>

\
使用[**Trickest**](https://trickest.com/?utm_campaign=hacktrics\&utm_medium=banner\&utm_source=hacktricks)可以轻松构建和**自动化工作流**，使用世界上**最先进**的社区工具。\
立即获取访问权限：

{% embed url="<https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks>" %}

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>

支持HackTricks的其他方式：

* 如果您想在HackTricks中看到您的**公司广告**或**下载PDF格式的HackTricks**，请查看[**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[NFTs](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**上关注**我们。
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hacktricks.xsx.tw/mobile-pentesting/ios-pentesting/burp-configuration-for-ios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
