Using the Safari Web Inspector with Corellium

How to Get Started Debugging JavaScript on your Corellium Device
Technical Writeup
Using the Safari Web Inspector with Corellium

Overview

In this guide, we'll be setting up a Corellium iOS virtual device to perform debugging of web applications using Safari's Web Inspector tool. For web developers, this is useful for testing rapid tweaks to CSS or troubleshooting responsive web design on an iPhone-sized display. For security researchers, the Javascript console can help identify why their fakeobj and addrof primitives aren't working.

Configure the virtual device

Enabling Web Inspector

First, Safari on the virtual device must be configured to enable the Web Inspector. From the home screen, select the Settings icon, and then scroll down to Safari. On the next screen, scroll all the way to the bottom and select Advanced.

Enable the Web Inspector and return to the home screen.

Open Safari and browse to any page.

Configure Safari on the Mac

Next, ensure that the Corellium VPN is connected and connect with USBFlux.


If Safari is already running on the Mac, restart it fully by clicking Safari in the menu bar, followed by Quit Safari (or press ⌘Q with Safari selected) and then re-opening the application.

From the Safari menu, select Preferences and then switch to the Advanced tab. At the bottom of the window, ensure that "Show Develop menu in menu bar" is selected. Close the Preferences window.

The advanced tab screen in the Safari preferences menu

The Develop menu will now appear in the menu bar, including a list of devices that have inspectable browsers. In this case, it will include the virtual device (named "iPhone" by default) and the local Mac (named "User's Mac" in the screenshot). When mousing over the iPhone submenu, the available tabs will appear under Safari, and selecting one will open the inspector.

iPhone "Develop" submenu dropdown
web inspector

The inspector has many features that are out of the scope of this guide, see the official documentation for additional details.

Troubleshooting

  • If you are in the cloud, always ensure you are connected to VPN with the correct configuration profile.
  • If a device is not detected properly, try closing and reopening USBFlux and Safari, in that order.


Keep reading

Thoughts, stories and ideas from the Corellium team.

Keep reading

Thoughts, stories and ideas from the Corellium team.

View all posts

Subscribe to stay connected

Stay up to date with the latest news and announcements.