sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.46k stars 854 forks source link

ios hooking watch class gives IBAction methods but not other methods #368

Open aadarshaddy opened 4 years ago

aadarshaddy commented 4 years ago
....highaltitudehacks.DVIAswiftv2 on (iPhone: 12.4.1) [usb] # ios hooking watch class DVIA_v2.JailbreakDetectionViewController                         
(agent) Watching method: - menuTapped:
(agent) Watching method: - readArticleTapped:
(agent) Watching method: - jailbreakTest1Tapped:
(agent) Watching method: - jailbreakTest2Tapped:
(agent) Watching method: - jailbreakTest3Tapped:
(agent) Watching method: - jailbreakTest4Tapped:
(agent) Watching method: - jailbreakTest5Tapped:
(agent) Watching method: - initWithCoder:
(agent) Watching method: - .cxx_destruct
(agent) Watching method: - initWithNibName:bundle:
(agent) Watching method: - viewWillAppear:
(agent) Watching method: - viewDidLoad
(agent) Watching method: - prepareForSegue:sender:
(agent) Registering job gnvy9cjamr8. Type: watch-class-methods for: DVIA_v2.JailbreakDetectionViewController

source code to JailbreakDetectionViewController: https://github.com/prateek147/DVIA-v2/blob/master/DVIA-v2/DVIA-v2/Vulnerabilities/Jailbreak%20Detection/Controller/JailbreakDetectionViewController.swift

this class also has other methods like isJailbroken, jailbreakTest3 which is not found by watch class. same applies for "ios hooking list class_methods" as well. Is it a bug or how do I do it??

leonjza commented 4 years ago

At the moment we can only find objc-c selectors that way. Swift methods will need some reversing/demangling. PR's welcome!

dineshdinz commented 4 years ago

Do we have limitations on "iOS hooking set" as well? Like what if I found the methods and its return value from RE and I want to use the "iOS hooking set" using objection. is it possible?

In general, what are all the things currently we can't do with swift apps from objection?