Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I inject code into an iOS process

Question:

Looking at: https://github.com/Flipboard/FLEX I see a screenshot of the framework being used on the Apple Springboard with a caption that reads:

The code injection is left as an exercise for the reader. 😇

I'm not directly interested in injecting it into the Springboard, but if I did want to inject the framework into another process (like the Calculator app for instance), how would I go about doing so?

As a side-note, I am willing to jailbreak my device if that's the only way of doing something like this.

What I've tried:

  • I've tried using: https://github.com/DyCI/dyci-main to inject apps that I had the source to, but I couldn't run it on my device, and I also couldn't run it on apps I didn't have the source to
  • I've also tried using: https://github.com/johnno1962/injectionforxcode but I kept getting provisioning errors during the injecting process
like image 701
Zane Helton Avatar asked Mar 22 '15 19:03

Zane Helton


People also ask

Is it possible to code on iOS?

While most developers use popular IDEs like Xcode and Sublime Text on their Macs, few realize that their iPhones and iPads can also handle coding apps.

What is injection on iOS?

Dependency Injection is a software design pattern in which an object receives other instances that it depends on. It's a commonly used technique that allows reusing code, insert mocked data, and simplify testing.


1 Answers

I Tweeted to Ryan Olson (according to the Git blame log he posted the picture) and got this reply: https://twitter.com/ryanolsonk/status/580011917491601408

It looks like it is necessary to Jailbreak for this.

After doing more research I found a tool called "Cycript" by Jay Freeman (Saurik). If you're interested in remote injection on a live application: take a look at: http://resources.infosecinstitute.com/ios-application-security-part-1-setting-up-a-mobile-pentesting-platform/

If you're unfamiliar with MobileSubstrate and Theos, you should definitely take a look: http://iphonedevwiki.net/index.php/Theos/Setup

like image 122
Zane Helton Avatar answered Sep 29 '22 17:09

Zane Helton