johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

Security Questions #206

Open michaeleiselsc opened 7 years ago

michaeleiselsc commented 7 years ago

Hi, we're looking at using this plugin widely at the large tech company, but we want to make sure that the security is very solid before we do so. It seems to be opening up a port between the device (simulator or real) and the computer, and sending arbitrary code across for the device to run. What if we were to encrypt communication between the computer and device and for each to have a shared secret that they communicate with each other to before sending code? Or we could use IP whitelisting for each user's test phones. Measures like these, I imagine would make larger companies like ours more willing to use these sorts of tools. For us personally, to start, we'll be creating a version of this plugin that only accepts local connections so that it works for the simulator.

johnno1962 commented 7 years ago

Hi Michael, no warrantees but there are a number of reasons why security is less of a problem when using injection.

Give "injection as an app" a try and let me know how you get on. It has almost the same functionality without having to tangle with plugins.

michaeleiselsc commented 7 years ago

the app is working well! so you're saying that the app will always block external connections?

michaeleiselsc commented 7 years ago

do you have the source code for the app for us to poke through?

johnno1962 commented 7 years ago

The app’s socket is only bound to localhost. It’s not open source at the moment being largely an integration of my previous work but if you email injectionapp at johnholdsworth.com I can send you a zip file for review.

michaeleiselsc commented 7 years ago

thanks! we'll reach out via email if we decide that's necessary

johnno1962 commented 6 years ago

App has been open sourced and Licenses are all MIT now https://github.com/johnno1962/InjectionApp