Intercepting a tvOS App on Burpsuite

Intro: 

I've done countless pentests of websites and mobile apps, but when it comes to iOS or any Apple device app pentesting, I'll always have one or the other proxying issues. Mostly they are specific to TLS/not properly importing into Keychain or Burp acting weird (there are Java specific issues, compatibility issues with OpenJDK and Oracle Java i.e. if you are like me I've installed Oracle JDK on MacOS). So I thought I should write this up, hoping it will be useful to someone. 

Note: this article is for advanced users, I've not detailed every step.

At the time of writing this app, I found the following article very informative, I've pretty much followed the same steps, the article originally is meant for Charles Proxy but in the pentesting world who likes Charles Proxy ;-) 

https://medium.com/@rwgrier/setting-up-charles-proxy-on-apple-tv-tvos-1ce64ee39b07

Credit to the author above, however it is not up-to-date.

Pre-Reqs:

  • Non-Jailbroken AppleTV (supervised state, see steps below)
  • Burpsuite 
  • Apple Configurator 2
  • MacOS (however could apply to other OSes as well)

Steps:

Step 1 - Get the iDevice in a Supervised state on Apple Configurator. (Prepare will reset the iDevice into factory).

Step 2 - Create a new session on Burp, set the listener with a binding as LocalIPAddress:Port (with Certificate settings as "Generate CA-Signed per-host certificates)

Step 3 - Export the Certificate and Import, it into the keychain as a "System" certificate. Accept it as trusted.

Step 4 - Ensure Burp proxying is working. i.e. use chrome and proxy if it allowing requests on a known / popular website like Google.com. If it is then the proxy is not throwing any TLS errors etc.

Step 5 - Create a new profile on Apple Configurator, add the cert, that we added to the Keychain. Add the machine IP address in the Global Proxy settings. Remember in my case I had the iDevice and macOS on the same Raspberry PI WiFI AP.

Step 6 - Add the profile into the iDevice from the Configurator. Note this will be installed and if you navigate to Settings > General > Profiles you should see your new profile on the iDevice. On the About menu the "Certificate Trust Settings" should appear and you should see "PortSwigger CA" as trusted.

Learnings:

1. Always start a new burp session.






Comments

Anonymous said…
Thanks this works for HTTP but somehow still seeing boringssl issues -- CA pinning? Is there a way to bypass that too?
Krupal Bylaiah said…
If any HTTPS app/service is not working then it's again to do with the config, like go back to configurator ensure the device is supervised. If other apps are working over HTTPS then it definitely cert pinning, if it's cert pinning then find what is the way they have implemented cert pinning, they use the bypass methods just like any other iOS apps. Identifying the way they have implemented is key.

Popular posts from this blog

The correct way to install Jython (for Burpsuite)

RFID cloning with Proxmark3 Easy

Extracting an IPA; App distributed through Testflight