Analysis of iOS.GuiInject Adware Library By Arnaud Abbati Published: 2016-11-08 · Archived: 2026-04-05 21:51:58 UTC There ain’t no such thing as a free $2 cracked software, especially if one went all-in buying that latest top-notch iOS device! Our crackers friends know, and if one takes the bet to use an out-of-date insecure jailbroken iOS version to install cracked software, he or she is likely to be abused by the ads injector we describe in this post. Adware masquerading already targeted Android or iOS. These cracks use poor security practices that could lead to spyware masquerading. iOS Application File Recently, an iOS App file got our attention on VirusTotal: $ openssl dgst -sha256 com.mailtime.MailTimePro-clutch2.ipa SHA256(com.mailtime.MailTimePro-clutch2.ipa)= 332cf0a45170d6787dcbefb086f5a5f0f6e920d485e377fe37e900a The filename reveals we are probably dealing with a cracked software, using Clutch, an iOS cracking toolbox. Let’s decompress the iOS App file (it is a Zip archive): $ ditto -xk com.mailtime.MailTimePro-clutch2.ipa com.mailtime.MailTimePro-clutch2 https://sentinelone.com/blogs/analysis-ios-guiinject-adware-library/ Page 1 of 9 $ cd "com.mailtime.MailTimePro-clutch2/Payload/MailTime Pro.app/" $ find . -type f -exec file {} \; | grep "Mach-O" (...) ./jailbreak: Mach-O universal binary with 2 architectures ./jailbreak (for architecture armv7): Mach-O dynamically linked shared library arm ./jailbreak (for architecture arm64): Mach-O 64-bit dynamically linked shared library ./MailTime Pro: Mach-O universal binary with 2 architectures ./MailTime Pro (for architecture armv7): Mach-O executable arm ./MailTime Pro (for architecture arm64): Mach-O 64-bit executable That jailbreak shared library looks suspicious. $ codesign -dvv "MailTime Pro" 2>&1 | grep Authority Authority=iPhone Developer: nguyen tat hung (T99T9WYY54) Authority=Apple Worldwide Developer Relations Certification Authority Authority=Apple Root CA $ codesign -dvv jailbreak 2>&1 | grep Authority Authority=iPhone Developer: nguyen tat hung (T99T9WYY54) Authority=Apple Worldwide Developer Relations Certification Authority Authority=Apple Root CA While nguyen tat hung is a known developer identifier, he is not the expected MailTime developer. Going further, we find jailbreak dynamic library is added to the original binary imports: $ otool -arch arm64 -L "MailTime Pro" (...) @executable_path/jailbreak (compatibility version 0.0.0, current version 0.0.0) Most libraries contain their installation prefix and real name in their imports: $ otool -arch arm64 -L jailbreak jailbreak: /usr/local/lib/libguiinject.dylib (compatibility version 1.0.0, current version 1.0.0) (...) And thanks to assert() macros, project-related information are leaking: $ strings -arch arm64 jailbreak | grep -i guiinject /Users/gtt/Documents/workspaceIOS/guiinject/guiinject/MBProgressHUD.m /Users/gtt/Documents/workspaceIOS/guiinject/guiinject/SSZipArchive.m guiinject https://sentinelone.com/blogs/analysis-ios-guiinject-adware-library/ Page 2 of 9 Injected Library Browsing the symbols, we quickly isolate well-known SDKs and Cocoa Pods: Advertisement SDKs Carrot Facebook Audience Network Google AdMob StartApp Cocoa Pods FileMD5Hash MBProgressHUD SSZipArchive So many ads stuff for a jailbreak is unusual. Here you have the remaining classes headers. We run most of the cracked apps on a jailbroken device without problems. -[Config getConfig] loads wrap.json from the host program resources: { "udid": "jailbreak", "wait_loop": "3", "is_jb": "1", "package_name": "com.mailtime.MailTimePro" } After several wait_loop launch, the injected code will contact an insecure remote host. Half of the services seem to work. For example, the coreapi service seems down: http://wrapper.laughworld.net/coreapi/active_device.php? pk=IPANAME&is_jb=1&udid=REDACTED&signature=MD5 : { "return": -2, "message": "DB operator fail!" } http://wrapper.laughworld.net/coreapi/get_list_message.php? pk=IPANAME&is_jb=1&udid=REDACTED&libver=20160818&app_pk=IPANAME_AGAIN&app_ver=1.2.3&signature=MD5 : { "return": 0, https://sentinelone.com/blogs/analysis-ios-guiinject-adware-library/ Page 3 of 9 "messages": [] } While the api service is up: http://wrapper.laughworld.net/api/com.mailtime.MailTimePro_ads.json : { "advertising_list": [ { "id": 1, "act_type": "0", "b": "