> For the complete documentation index, see [llms.txt](https://sallam.gitbook.io/sec-88/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sallam.gitbook.io/sec-88/ios-appsec/configuring-xcode-ios-simulator-with-burp-suite-for-pentesting-on-macos.md).

# Configuring Xcode iOS Simulator with Burp Suite for Pentesting on macOS

### Prerequisites

* Install Xcode from the Mac App Store, including the iOS Simulator add-on.
* Install Burp Suite (Community or Professional Edition) on your macOS system. Download from [PortSwigger](https://portswigger.net/burp/communitydownload).
* Ensure both Burp Suite and Xcode are running on the same macOS system.

### Steps to Configure Xcode iOS Simulator with Burp Suite

1. **Identify Local IP Address**:
   * Find your macOS system’s local IP address in **System Preferences > Network > Wi-Fi > Details**.
   * Example: 192.168.1.100.

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FXmW8nHycGM2qRApVc80B%2Fimage.png?alt=media&amp;token=8cee199b-5b95-49f7-a50e-935bc0e65283" alt=""><figcaption></figcaption></figure>

1. **Configure Burp Suite Proxy Listener**:
   * Open Burp Suite and navigate to **Proxy > Options** (or **Settings > Tools > Proxy** in newer versions).
   * In the **Proxy Listeners** section, click **Add** (or edit the default listener).
   * Set **Bind to port** to 8080 (or another free port, e.g., 8082 or 8888).
   * Set **Bind to address** to **Specific address** and select your local IP address (e.g., 192.168.1.100) or **All interfaces** for broader access.
   * Confirm the listener is running (check for a tick in the **Running** column).
2. **Set macOS Proxy Settings**:
   * The iOS Simulator uses the macOS system’s network settings. Configure the proxy to route traffic through Burp Suite.
   * Go to **System Preferences > Network > Wi-Fi > Advanced**.
   * Enable **Web Proxy (HTTP)** and **Secure Web Proxy (HTTPS)**.
   * Set both to 127.0.0.1 (localhost) and port 8080 (or the port chosen in Burp Suite).
   * Apply changes. Note: Launch the iOS Simulator after setting the proxy, as it uses the network settings at launch. Quit and restart the simulator if settings change.
3. **Install Burp Suite CA Certificate in Simulator**:
   * Open the iOS Simulator via Xcode: **Xcode > Open Developer Tools > Simulator**.
   * In the simulator, open Safari and navigate to <http://burp> or http\://\<your-local-ip>:\<port> (e.g., <http://192.168.1.100:8080>).
   * Click **CA Certificate** to download the PortSwigger CA certificate.
   * Go to **Settings > General > VPN & Device Management** in the simulator.
   * Select the downloaded **PortSwigger CA** profile and click **Install**. Enter the device passcode if prompted.
   * Navigate to **Settings > General > About > Certificate Trust Settings** and toggle **PortSwigger CA** to enable trust. Confirm any warnings about root certificates.
4. **Enable Interception in Burp Suite**:
   * In Burp Suite, go to **Proxy > Intercept**.
   * Click **Intercept is off** to toggle it to **Intercept is on**. This allows Burp to capture and display HTTP/HTTPS traffic.
5. **Test the Setup**:
   * In the iOS Simulator, open Safari and visit a website (e.g., <https://www.netflix.com>).
   * Verify that Burp Suite captures the traffic in the **Proxy > HTTP History** tab.
   * If no traffic appears, ensure **Intercept is off** (to avoid blocking traffic) and verify proxy settings.
6. **Optional: Scope Filtering**:
   * To reduce noise in Burp Suite’s logs, add target websites to the scope.
   * In **Proxy > HTTP History**, right-click a request (e.g., <https://www.netflix.com>) and select **Add to scope**.
   * Check the scope in **Target > Scope** to ensure only relevant traffic is displayed.

### Troubleshooting

* **No Traffic in Burp**: Ensure the proxy listener is running, the correct IP and port are used, and the simulator was launched after proxy settings were applied. Check that **Intercept is off** unless actively inspecting requests.
* **Certificate Issues**: Verify the PortSwigger CA certificate is installed and trusted in the simulator. Re-download if necessary.
* **Simulator Not Responding**: Restart the simulator or Xcode. Ensure the macOS proxy settings are correct before launching.

### References

* [Configure Xcode iOS Simulator + Burp Suite for Pentesting on macOS](https://medium.com/@sharp488/configure-xcode-ios-simulator-burpsuite-for-pentesting-on-macos-5e4193e0e0a0)
* [PortSwigger: Configuring an iOS Device to Work with Burp Suite Professional](https://portswigger.net/burp/documentation/desktop/mobile/config-ios-device)
* [HackTricks: iOS Burp Suite Configuration](https://book.hacktricks.wiki/mobile-pentesting/ios-pentesting/burp-configuration-for-ios)
* [Learning iOS Penetration Testing: Intercepting iOS Simulator Traffic](https://www.oreilly.com/library/view/learning-ios-penetration/9781785883255/)
* [iOS Pentesting Series on X](https://t.co/McUWApKN2j)
* <https://www.youtube.com/watch?v=22gAJwzae1Q>
