Kotani bald collection

  • My previous blog was mostly about how things work. But in development we often use tools for efficiency and convenience

  • But of course, we still need to know the principle, if the tool expires and breaks down, we can quickly locate and solve the problem

  • Today blog to write a practical relatively high ~

1. MonkeyDev & Cycript

  • Anyone who has ever done reverse development will use a toolMonkeyDev(It really works. Automates resigning, injection, etc.), and gives you an installation address:MonkeyDev installation address, installation process problems can be inPossible problems with installationFind inside

Now the latest version 12.5 xcode installation will flash back, but there is also a solution in the inside (so don’t panic if you encounter problems, of course, you can also contact xiaoya 😆).

  • I used it on my blogIn a letter.Heavy signatureandInjecting code. Let’s try another wave with this

1.1. MonkeyDevuse

    1. We clickXcodeTo create aMonkeyengineering

    1. After the completion of the. selectIn a lettertheipaorappAnd put itTargetAppIn the

You can put either IPA or APP

    1. Run on it (if there is a mistake should also be solved, can also throw to me, I help brothers see 😆)

The plugins you install and viewDebug can be used in this plugin.

1.2. Cycriptuse

  • installedMonkeyDevAfter that, it comes with a callCycriptThe plug-in

This plugin feels necessary to say all of a sudden ~

  • Let me illustrate his use through a case of interest to the brothers

    1. Link mobile phones ~ (in the same network segment)

cycript -r xxx.xx.x.xx:6666

    1. Success occurs when the following conditions occur

    1. Start a new wave of data testingIn a letter(cycriptHere’s the kickerDo not block the process)

Xiao Gu is a law-abiding citizen. I just want to learn their technology. I was driven by the motivation to learn.

    1. To transfer money first

    1. I guess he’s alabel. If he is not I guess again ~ 😆

Terminal input: Choose (UILabel)

    1. Look in the output1.00

    1. We were looking for thisaddressSee if you can change the display

#0x13ba82ad0. Text = @"ï¿¥10000"

    1. Look at the results

Of course, exit and enter again, and it’s restored. We’re just changing the text that’s displayed.

2. Logos

  • When I first came to Logos, I thought it was a new language. Brothers. Not really. He basically had a few orders.

  • Logos syntax I won’t go into much more. Brothers can spend 20 minutes watching ~ Logos-Grammar

2.1. Hook method

Let’s just give you an example

  • Start with a demo: login ~

  • Let me draw a simple interface

The code is as follows:

@interface ViewController(a)
@property (weak.nonatomic) IBOutlet UITextField *userTextField;

@property (weak.nonatomic) IBOutlet UITextField *pwdTextField;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)loginBtnClick:(id)sender {
    if ([self isEmpty:_userTextField.text]) {
        [self alert:@"username is empty!"];
        return;
    }
    if ([self isEmpty:_pwdTextField.text]) {
        [self alert:@"password is empty!"];
        return;
    }
    
    [self alert:@"login success!"];
}

- (void)alert:(NSString *)title{
    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:title message:nil preferredStyle:(UIAlertControllerStyleAlert)];
    UIAlertAction *cancle = [UIAlertAction actionWithTitle:@"OK" style:(UIAlertActionStyleCancel) handler:nil];
    [alertVC addAction:cancle];
    [self showViewController:alertVC sender:nil];
}

- (BOOL)isEmpty:(NSString *)string{
    if (string == nil || string == NULL) {
        return YES;
    }
    if ([string isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
        return YES;
    }
    return NO;
}
@end
Copy the code
  • And then we useLogosgrammarhookUnder thisloginbutton

2.2. Logos are used

    1. createMonkey-demoAnd then theappIn thetargetAPPIn the

    1. LogosVery readable, direct useOCCan write

That’s all the code is, of course, in the logos folder

3. Summary

  • Gu is a law-abiding citizen, and I just want to learn their skills. It’s the drive to learn that drives me

  • Kotani feels that the reverse is mostly a matter of experience, or practice

  • Logos grammar is very simple. Don’t be as nervous as I was when I heard a new grammar

  • We use Monkey and Logos a lot later when we reverse engineer

  • Finally hope brothers give advice 😜