Tutorial #2: How to view the raw HTTP traffic, parameter and data via proxy for mobile applications — iOS Simulator
Another basic proxy set up tutorial to view HTTP or HTTPS traffic that mobile applications are dealing with on your iOS simulator. This allows developers to not only view the traffic but also make changes on the fly as needed for debugging purpose. This is essentially very similar to how set up is made when we wants to intercept the web application traffic from the browser as mention in my previous post for web applications.
Requirements
These are what we will need:
- Java installation of either jre or jdk if you are using BurpSuite .jar version. If you just use installer, I think BurpSuite installer will handle itself.
- BurpSuite community version from https://portswigger.net/burp/communitydownload. For MacOS, download and install .dmg format which is very straight forward.
- Xcode and accompanying iOS simulator.
Viewing mobile application or iOS simulator traffic:
The steps as follows:
- configure proxy in the BurpSuite
- configure proxy in MacOS network configuration
- install Burp CA certificate in your iOS simulator
- view the traffic
configure proxy in the BurpSuite:
configure proxy in the BurpSuite:
In reality, BurpSuite auto configures proxy to port 8080 if the port is free so no additional configuration is needed. But sometime you may have to configure “Bind to address” to “All Interfaces” to get the traffic. There is some nuance to this but this is out of scope in this article. If you can confirm the “tick” presence under Running column, the proxy is working.
configure proxy in the MacOS network configuration:
As iOS simulator directly uses the host MacOS wifi connection, we have to configure the proxy inside the MacOS Network configuration. The downside of this is that all the HTTP/HTTPS traffic will flood your proxy logs but I will show you how to filter it later in the article.
install Burp CA certificate in your iOS simulator:
Next, we will install the Burp CA Certificate in the iOS simulator and check that proxy is working. We will need to install CA Certificate for the initial set up but no longer need to do this step again in subsequent usage. If you happen to reset the iOS simulator then you will need to install again. For Burp or proxy in general to be able to decrypt the HTTPS traffic, it has to do a thing call Man-in-the-Middle attack (MitM) configuration. To do this, the proxy’s certificate (Burp’s CA certificate) need to be installed and trusted. MitM is a separate topic which I may write in details when I have time.
After installing the CA, we still have another step to do: trusting the CA.
Tired? We have finished the setup! Let’s verify it is working.
Like mentioned before, there will be a lot of different server traffic in the History Log due to the fact that iOS simulator is using the MacOS network interface. We can filter our target server by editing the scope for more comfortable viewing.
So, this is it. We are now able to view the traffic as well as filter the traffic. If you do not mind seeing other out-of-scope addresses, you do not need to go through all those filter configuration steps.
I hope this will help. Stay safe!