Hack 實(shí)戰(zhàn)——解除支付寶 App 手勢解鎖錯誤次數(shù)限制(轉(zhuǎn))

之前僅僅介紹了工具的使用,本文將實(shí)踐一下如何利用 cycript 結(jié)合 class-dump 結(jié)果 hack,還要犧牲一下支付寶 App 。

首先,老套路,取到手勢解鎖界面的 View Controller:

然后,對照 class-dump-z 結(jié)果,來分析 GestureUnlockViewController 有什么利用價值 :

@interface GestureUnlockViewController : DTViewController{? @private? ? ? GestureHeadImageView* _headImageView;? ? ? GestureTipLabel* _tipLabel;? ? ? GestureInputView* _inputView;? ? ? DTButton* _forgetButton;? ? ? DTButton* _changeAccountButton;? ? ? int _retryCount;? ? ? UIView* _guideView;? ? ? id_delegate;? }? @property(assign, nonatomic) __weak iddelegate;

-(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 ,現(xiàn)在我們來修改一下支付寶登錄頁的用戶名信息:

cy# [visible setValue:@"Test By yiyaaixuexi" forKeyPath:@"_tipLabel.text"]


支付寶手勢密碼解鎖有嘗試次數(shù)限制,連續(xù)錯 5 次就要重新登錄。 我想解除重試解鎖次數(shù)的限制,發(fā)現(xiàn)了記錄解鎖次數(shù)的類型是 int ,int _retryCount ,這一點(diǎn)讓我很不開心,因為我無法通過 KVC 來修改其值了。

但是沒有關(guān)系,我可以通過指針訪問:

cy# visible->_retryCount = 0

0

這樣我就能無限制的用程序暴力破解手勢密碼了,來計算一下有多少種可能呢?

hack-practice2

這個數(shù)字對我來說有點(diǎn)大,可是對 iPhone5 的 CPU 來說就是小菜一碟了~

等一下,密碼格式是什么呢?

-(void)gestureInputView:(id)view

didFinishWithPassword:(id)password;

id 類型的密碼,很嚴(yán)謹(jǐn),又給 hack 帶來不少麻煩呀~ 不過沒關(guān)系,我們可以利用 Method Swizzling 來打出 password 到底是什么,不過呢,貌似可以再寫一篇新文章去介紹了……

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容