Updated instruction to compile app for iOS 10 & Xcode 8 can be found here. Written by Andrew Hoog from NowSecure.com
Kyle Levin has published a video on Youtube on getting started with DVIA. I recommend you check it out.
Note: App will only work on IOS 7 devices, older versions of IOS are not supported. To build the app from source code, you should be running minimum Xcode 5 on IOS 7 targets.
This tutorial will guide you on how to get up and running with Damn Vulnerable IOS Application.
The first thing to do is to set up a mobile penetration testing platform on your device. To know how to do that, read this article that talks about setting up a mobile pentesting platform for IOS 7. You will need to have a jailbroken device running IOS 7 in order to run this application.
Running on System or Device using Xcode
Download the latest source code of Damn Vulnerable IOS Application from here
Note that you will need to have Xcode installed on your computer to build this application. Once you have installed the latest version of Xcode, you can just run the application on your computer by using Xcode and do all the analysis on the simulator if you want.
Please open DamnVulnerableIOSApp.xcworkspace to run the project. Don’t use the file DamnVulnerableIOSApp.xcodeproj as the build will fail. This is because DVIA uses Cocoapods.
To run the application on your system using IOS simulator, just run the application (Cmd + R) after selecting the target and the application will install on the simulator.
To install and run the application on your device using the source code, you need to have a valid provisioning profile. This requires purchasing the iOS developer program that comes at a cost of $99/year.Go to the DVIA Project, Select your Target -> Settings -> Code Signing and make sure the proper Code Signing identity and Provisioning profile are selected.
Make sure to select your IOS device and not the simulator to run the application on. Then run the application by using the command Cmd+R and the application will install on your device.
Installing DVIA on Device
Copying .app file and using uicache
Download the .ipa file from the downloads page, change its name from DamnVulnerableIOSApp.ipa to DamnVulnerableIOSApp.zip and unzip this file. This will unzip to a folder named Payload. Inside it, there will be a file named DamnVulnerableIOSApp.app. Then copy the .app file to the /Applications directory on the device using Scp. You can also use sftp or the utility iExplorer to upload this application.
Now login as the mobile user, use the command su to get root privileges and give the DVIA binary executable permissions. Then use the exit command to go back as the mobile user, and use the command uicache to install the application. If this doesn’t work, you can reboot the device or try this method again.
Using IPA installer
Requires device running IOS 7 and Appsync installed. Please note that we don’t promote the use of Appsync and hence this method should only be used as a last alternative.
Download the latest IPA of Damn Vulnerable IOS Application from here
One of the ways to install the application is by using the terminal utility IPA Installer Console. Make sure you install it on your device.
Now sftp into your device and upload the IPA file that we have just downloaded.
Now use the command “ipainstaller DamnVulnerableIOSApp.ipa” or “installipa DamnVulnerableIOSApp.ipa” to install the application on your device.
Make sure AppSync is installed on your device. To install AppSync on your device, follow these steps.
1. Launch Cydia app on your device
2. Select Manage
3. Select Sources
4. Select Edit
5. Select Add
6. Add the source repo.hackyouriphone.org
7. Now search for AppSync
8. Install AppSync for IOS 7+.
Now double click on the ipa file that you just downloaded on your computer. This will add the application to iTunes. Now go to iTunes, select the install option on DVIA application and sync it to your device. This will install the application on your device.
Exploring the application
This application comes with a bunch of vulnerabilities that you can exploit and test your skills on.
You can easily access the menu by swiping from the left any time. You can select different challenges and even learn about the theory by tapping on the tutorials mentioned under every challenge.
If you are having trouble solving these challenges, you can buy the solutions from here.