How to protect the iOS application in case of any OS attack(On jail broken devices)

不打扰是莪最后的温柔 提交于 2019-12-06 08:46:07

问题


I would like to protect my application data in case of any OS attack or unauthorized access on jail broken iOS devices. Is there any way to detect such threats and protect app data in such cases.


回答1:


Although I agree with what jrturton has said, if you have critical data that you want to protect from rogue apps(not the user), you may try the following:

1) Detect if your app has launced on a jailbroken device. Close the app, delete sensitive data. Refer this this thread.

2)Use third party solutions like one from EnsureIT. They are somewhat helpful in saving critical data stored by an app, from a rogue user/app on a jailbroken device.

3) Try Obfuscating your code. More information on this link.

You may also find something useful from discussion in this thread




回答2:


If the user has jailbroken their device, then they have given up any expectation of protecting their data. It's not your problem. Do you want to deal with support requests from people who've done this?




回答3:


No, you can't stop an OS (compromised or not) from reading out your application's memory no matter what. Don't even be fooled into thinking otherwise either, obfuscation/'encrypting' anything that will be decrypted for use on the same compromised device is a red herring and circumventable by definition.

Depending on what exactly your app is supposed to do you might be able to implement something that does that but doesn't have to know any sensitive data in the process though.




回答4:


Jailbreaking doesn't really make any difference to the question, you have to assume that someone can get the files.

You can set up file protection so the data is protected, e.g.

NSDictionary*   attr = [NSDictionary dictionaryWithObjectsAndKeys:
    NSFileProtectionComplete, NSFileProtectionKey, nil];
[[NSFileManager defaultManager] setAttributes: attr ofItemAtPath: path error: &error];


来源:https://stackoverflow.com/questions/8559301/how-to-protect-the-ios-application-in-case-of-any-os-attackon-jail-broken-devic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!