Microsoft Word - iOSAppReverseEngineering.docx

(Romina) #1

Figure 10- 56 Hide “Send”


Neat. After pressing this UIButton, an iMessage will be sent; a UIButton and its response


action are always associated with [UIControl addTarget:action:forControlEvents:]. Since


UIControl offers another method actionsForTarget:forControlEvent: to find its own response


method, let’s see what method will get called after pressing “Send” with this method:


cy# [#0x1605a8b0 setHidden:NO]
cy# button = #0x1605a8b0
#"<UIButton: 0x1605a8b0; frame = (266 27; 53 33); hidden = YES; opaque = NO; layer =
<CALayer: 0x16052a00>>"
cy# [button allTargets]
[NSSet setWithArray:@[#"<CKMessageEntryView: 0x160c6180; frame = (0 0; 320 65); opaque =
NO; autoresize = W; layer = <CALayer: 0x16089920>>"]]]
cy# [button allControlEvents]
64
cy# [button actionsForTarget:#0x160c6180 forControlEvent:64]
@["touchUpInsideSendButton:"]

As we can see, the response method is [CKMessageEntryView touchUpInsideSendButton:].


Now let’s turn to IDA and LLDB for deeper analysis.


10.3.3 Find suspicious sending action in response method


[CKMessageEntryView touchUpInsideSendButton:] doesn’t do much, as shown in figure


10-57.

Free download pdf