如何检测破解的iPhone应用程序和越狱的设备(不同的方法)

发布于 2024-10-13 06:36:57 字数 691 浏览 10 评论 0原文

我正在为破解的 iPhone 应用程序构建黑名单服务,我很好奇我是否错过了检测破解应用程序的方法。

目前,以下应用程序破解检测方法可用于该服务:

  1. 检查plist大小
  2. 检查签名者身份
  3. 检查二进制文件是否加密(不确定是否这是正常工作的,因为没有以这种方式检测到破解的应用程序)
  4. 检查 info.plist 的 修改日期 与包的修改日期(不确定这是否有效 - 使用的代码如下:http://snippie.net/snip/f7530ff2 来做到这一点)

我也想知道是否可以检查设备是否越狱了? 这也会有所帮助,因为该服务的工作方式与垃圾邮件黑名单非常相似,并且可以使用越狱来提高分数。

我还添加了一个蜜罐,它向我表明破解者使用的工具消除了我所做的一些检查。例如,plist 检查大小或签名者身份。

我现在的问题是:

  • 我应该使用更多“好的”检查吗?

  • 有没有办法检测越狱?

I'm building a blacklisting service for cracked iPhone apps and I am curious if I missed a method for detecting cracked apps.

In the moment following app crack detection methods are available for the service:

  1. checking plist size
  2. checking signer identity
  3. checking if binary is crypted (not sure if this is working correctly since no cracked app got detected this way)
  4. checking modified date of info.plist against modified date of package (not sure if this is working - used code like: http://snippie.net/snip/f7530ff2 to do that)

I also wonder if it is possible to check if the device is jailbroken?
This would help, too, because the service will work much like a spam blacklist and jailbreak could be used to increase the score.

I have also included a honeypot, which shows me that the tools used by the crackers eliminate some of the checks I do. For instance the plist check for size or signer identity.

My question is now:

  • Are there more "good" checks I should use?

and

  • Is there a way to detect Jailbreak?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月牙弯弯 2024-10-20 06:36:57

切勿尝试阻止越狱设备使用您的应用程序,仅阻止破解的设备。如果您阻止越狱设备,他们将被迫使用删除了所有检查的修补版本。
另外,我的所有设备都已越狱,因此如果开发人员阻止越狱设备,我将不得不忽略他们的应用程序。
超过 10% 的 iDevice 已越狱,因此这是一个非常糟糕的主意。

编辑:由于我对此投了很多反对票,因此我将发布一些检测越狱的方法。

- (BOOL)fileExistsAtPath:(NSString *)path{
    NSLog(@"Check if file '%@' exists", path);

    struct stat buffer;   
    return stat([path UTF8String], &buffer) == 0;
}

- (BOOL)jailbroken{
    return ([self fileExistsAtPath:@"/Applications/Cydia.app"]);
}

NEVER try and block jailbroken devices from using your app, just cracked ones. If you block jailbroken devices they'll be forced to use a patched version with all the checks removed.
Also ALL my devices are jailbroken so if a developer blocks jailbroken devices I would have to ignore their apps.
Over 10% of all iDevices are jailbroken so this is a very bad idea.

EDIT: As I'm getting lots of down votes for this I'll post some methods to detect a jailbreak.

- (BOOL)fileExistsAtPath:(NSString *)path{
    NSLog(@"Check if file '%@' exists", path);

    struct stat buffer;   
    return stat([path UTF8String], &buffer) == 0;
}

- (BOOL)jailbroken{
    return ([self fileExistsAtPath:@"/Applications/Cydia.app"]);
}
毅然前行 2024-10-20 06:36:57
-(IBAction)rootCheck:(id)sender {

    NSArray *jailbrokenPath = [NSArray arrayWithObjects:
                               @"/Applications/Cydia.app",
                               @"/Applications/RockApp.app",
                               @"/Applications/Icy.app",
                               @"/usr/sbin/sshd",
                               @"/usr/bin/sshd",
                               @"/usr/libexec/sftp-server",
                               @"/Applications/WinterBoard.app",
                               @"/Applications/SBSettings.app",
                               @"/Applications/MxTube.app",
                               @"/Applications/IntelliScreen.app",
                               @"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
                               @"/Applications/FakeCarrier.app",
                               @"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist",
                               @"/private/var/lib/apt",
                               @"/Applications/blackra1n.app",
                               @"/private/var/stash",
                               @"/private/var/mobile/Library/SBSettings/Themes",
                               @"/System/Library/LaunchDaemons/com.ikey.bbot.plist",
                               @"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist",
                               @"/private/var/tmp/cydia.log",
                               @"/private/var/lib/cydia", nil];

    NSString *rooted;
    for(NSString *string in jailbrokenPath)
        if ([[NSFileManager defaultManager] fileExistsAtPath:string])
            rooted=@"y";
        else
            rooted=@"n";

    NSLog(@"%@", rooted);
}

示例代码:
http://www.evernote.com/shard /s13/sh/e45f27ee-3dd5-4eb1-9f56-1981cdd3286b/bc156eb773315647c13c2c7ee4191866

-(IBAction)rootCheck:(id)sender {

    NSArray *jailbrokenPath = [NSArray arrayWithObjects:
                               @"/Applications/Cydia.app",
                               @"/Applications/RockApp.app",
                               @"/Applications/Icy.app",
                               @"/usr/sbin/sshd",
                               @"/usr/bin/sshd",
                               @"/usr/libexec/sftp-server",
                               @"/Applications/WinterBoard.app",
                               @"/Applications/SBSettings.app",
                               @"/Applications/MxTube.app",
                               @"/Applications/IntelliScreen.app",
                               @"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
                               @"/Applications/FakeCarrier.app",
                               @"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist",
                               @"/private/var/lib/apt",
                               @"/Applications/blackra1n.app",
                               @"/private/var/stash",
                               @"/private/var/mobile/Library/SBSettings/Themes",
                               @"/System/Library/LaunchDaemons/com.ikey.bbot.plist",
                               @"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist",
                               @"/private/var/tmp/cydia.log",
                               @"/private/var/lib/cydia", nil];

    NSString *rooted;
    for(NSString *string in jailbrokenPath)
        if ([[NSFileManager defaultManager] fileExistsAtPath:string])
            rooted=@"y";
        else
            rooted=@"n";

    NSLog(@"%@", rooted);
}

sample code:
http://www.evernote.com/shard/s13/sh/e45f27ee-3dd5-4eb1-9f56-1981cdd3286b/bc156eb773315647c13c2c7ee4191866

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文