Skip to main content

Posts

Showing posts with the label udid

Detect UDID spoofing on the iPhone at runtime

Jailbroken iPhones get on my nerve as it taints some fundamental APIs on iOS, by using MobileSubstrate. http://www.iphonedevwiki.net/index.php/MobileSubstrate I believe many apps use UDID as a mean to authenticate a device and/or a user since it's semi-automatic and handy, but you should be aware of this problem: UIDevice is not as tamper-proof as it should be. There's an app called UDID Faker, which easily enables you to spoof someone else's UDID at runtime. http://www.iphone-network.net/how-to-fake-udid-on-ios-4/ Here's the source code of it: // // UDIDFaker.m // UDIDFaker // #include "substrate.h" #define ALog(...) NSLog(@"*** udidfaker: %@", [NSString stringWithFormat:__VA_ARGS__]); #define kConfigPath @"/var/mobile/Library/Preferences/com.Reilly.UDIDFaker.plist" @protocol Hook - (NSString *)orig_uniqueIdentifier; @end NSString *fakeUDID = nil; static NSString *$UIDevice$uniqueIdentifier(UIDevice<Hook> *self, SEL sel)