实战获取某某app_cer证书

ps -e,先查找要搞的app
然后登录ssh,然后在cycript

这里我试过了,无法进行cycript,不过我们有其他的办法,我们随便拿到程序app里的一个viewController(用reveal 很简单就能拿到),。
然后我们在hook这个viewController的viewDidLoad函数。代码如下:“、
%hook 你的ViewController
@interface 你的ViewController : UIViewController

  • (void)viewDidLoad;
    @end
  • (void)viewDidLoad{
    NSString *rs = %orig();
    NSString *aa = (NSString *)[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask][0];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@“hhehe”
    message:[NSString stringWithFormat:@"%@",aa]
    delegate:nil
    cancelButtonTitle:@“Thanks”
    otherButtonTitles:nil];
    [alert show];
    [alert release];
    }}

%end

第一步:砸壳,不会的可以看这个连接:http://bbs.iosre.com/t/dumpdecrypted-app/22

第二步:查找到登录按钮所属viewController,(用reveal)

第三步:把砸过的壳拖拽到hp里。

开始分析::


我们这个LoginVieController里面就是那个reveal查找到的button所属的viewController,
我们点进去这个函数看看:

他在这里又调用了onSigInClick函数,我们继续跟进去

r6寄存器==[WBACCountStore share] 一看就知道是跟单例.
然后调用了loginBasecAccount函数。我们继续跟进去看看。

在这里又实例化了。[WBRSA alloc]
然后调用了他的encrypt函数,我们继续跟进去:

fuck,在这里没有任何函数,我们可以推测他肯定有一个父类,函数都在父类里。。
我们直接搜索这个函数:encrypt

这个RSA encrypt函数很可疑,。我们点进去

我们可以看到, 他调用了 self encrypt:r6 usingKey:[self getPublicKey]
这个[self getPublicKey] 函数就是获取cer证书,我们继续跟进去。


找到,这个_pubKeyFilePath是一个属性。我们可以hook这个函数。然后用kvc拿到这个证书的路径。

NSString *xxxx = [self valueForKey:@"_pubKeyFilePath"];

证书已到手。结贴。。。

1 个赞

你把帖子的排版好好整理一下,看着太乱了