Arcane: backdoor iOS packages (iphone-arm)
Arcane
Arcane is a simple script designed to backdoor iOS packages (iphone-arm) and create the necessary resources for APT repositories. It was created for this publication to help illustrate why Cydia repositories can be dangerous and what post-exploitation attacks are possible from a compromised iOS device.
How Arcane works…
To understand what’s happening in the GIF, decompress a package created with Arcane.
dpkg-deb -R /tmp/cydia/whois_5.3.2-1_iphoneos-arm_BACKDOORED.deb /tmp/whois-decomp
Notice the control and postinst files in the DEBIAN directory. Both files are important.
It’s possible to supply scripts as part of a package when installing or removing applications. Package maintainer scripts include the preinst, postinst, prerm, and postrm files. Arcane takes advantage of the postinst file to execute commands during the installation.
The control file contains values that package management tools use when installing packages. Arcane will either modify an existing control or create it.