之前仅仅介绍了工具的使用,本文将实践一下如何利用 cycript 结合 class-dump 结果hack,还要牺牲一下支付宝app。
首先,老套路,取到手势解锁界面的View Controller:
1 2 3 4 5 6 7 8
| cy # var app = [UIApplication sharedApplication]
@ "<DFApplication: 0x1666c960>"
cy # var keyWindow = app.keyWindow
@ "<UIWindow: 0x16591bd0; frame = (0 0; 320 568); gestureRecognizers = <NSArray: 0x1b047000>; layer = <UIWindowLayer: 0x165d0650>>"
cy # var root = keyWindow.rootViewController
@ "<UINavigationController: 0x179779a0>"
cy # var visible = root.visibleViewController
@ "<GestureUnlockViewController: 0x165de090>"
|
然后,对照class-dump-z结果,来分析 GestureUnlockViewController 有什么利用价值 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| @interface GestureUnlockViewController : DTViewController <UIAlertViewDelegate, GestureHeadImageViewDelegate> {
@private
GestureHeadImageView* _headImageView;
GestureTipLabel* _tipLabel;
GestureInputView* _inputView;
DTButton* _forgetButton;
DTButton* _changeAccountButton;
int _retryCount;
UIView* _guideView;
id<GestrueViewControllerDelegate> _delegate;
}
@property(assign, nonatomic) __weak id<GestrueViewControllerDelegate> delegate;
-(void).cxx_destruct;
-(BOOL)shouldAutorotateToInterfaceOrientation:(int)interfaceOrientation;
-(void)headClicked;
-(void)gestureInputView:(id)view didFinishWithPassword:(id)password;
-(void)gestureInputViewFirstEffectiveTouch:(id)touch;
-(void)alertView:(id)view clickedButtonAtIndex:(int)index;
-(void)actionChangeAccountToLogin;
-(void)actionResetPswBtnClick;
-(void)resetCurrentUser;
-(void)resetPsw;
-(void)viewWillDisappear:(BOOL)view;
-(void)notifyFaceToFacePayReceivedData:(id)facePayReceivedData;
-(void)viewWillAppear:(BOOL)view;
-(void)breakFirstRun;
-(BOOL)isFirstRun;
-(void)guideViewClicked:(id)clicked;
-(void)viewDidLoad;
-(void)viewWillLayoutSubviews;
@end
|
目测 _tipLabel 是写账户名和提示操作的label,上篇文章我提到过:@private限制不了keyPath,现在我们来修改一下支付宝登录页的用户名信息:
1
| cy # [visible setValue:@"Test By yiyaaixuexi" forKeyPath:@"_tipLabel.text"]
|
images/loading.gif' data-original="http://jbcdn2.b0.upaiyun.com/2014/02/765a02e76c4c11065cdfa1a4dc247d1b.png" />
支付宝手势密码解锁有尝试次数限制,连续错5次就要重新登录。
我想解除重试解锁次数的限制,发现了记录解锁次数的类型是int,int _retryCount ,这一点让我很不开心,因为我无法通过KVC来修改其值了。
但是没有关系,我可以通过指针访问:
1 2
| cy # visible->_retryCount = 0
0
|
这样我就能无限制的用程序暴力破解手势密码了,来计算一下有多少种可能呢?
这个数字对我来说有点大,可是对iPhone5的CPU来说就是小菜一碟了~
等一下,密码格式是什么呢?
1
| -( void )gestureInputView:(id)view didFinishWithPassword:(id)password;
|
id类型的密码,很严谨,又给hack带来不少麻烦呀~
不过没关系,我们可以利用 Method Swizzling 来打出password到底是什么,不过呢,貌似可以再写一篇新文章去介绍了……
前两天在一群里看见有人推荐一个app叫问啊,就可以发题答题那种的,感觉就跟uber滴滴打车似的,一般这种软件一上来就砸钱给红包啥的,哥之前刷过uber的单有经验!试验了几次应该可以刷,把注册红包和之前领的红包钱套现,目前我提了五十多,目测还能刷更多。ps,但是尽量要问技术相关的问题,不然容易被封。
有技术的可以自己试,不会的可以q我315414695:QQ群290551701 聚集很多互联网精英,技术总监,架构师,项目经理!开源技术研究,欢迎业内人士,大牛及新手有志于从事IT行业人员进入!
原标题:Hack实战——解除支付宝app手势解锁错误次数限制
关键词: