Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed in swiftOnceDenyFishHooK #60

Open
luzsyn opened this issue Jan 25, 2022 · 18 comments
Open

Crashed in swiftOnceDenyFishHooK #60

luzsyn opened this issue Jan 25, 2022 · 18 comments

Comments

@luzsyn
Copy link

luzsyn commented Jan 25, 2022

Hi, my app crashed in method 'swiftOnceDenyFishHooK'.
System: iOS 11.2.6, 11.4.1, 12.0.0, 12.0.1, 12.1.4.

I use "amIRuntimeHook" to check my custom UIViewController`s method, how to fix it?

截屏2022-01-25 10 08 30

@luzsyn
Copy link
Author

luzsyn commented Jan 25, 2022

FishHookChecker.swift - 第 663 行
closure #1 in variable initialization expression of static AdditionalRHChecker.xr_swiftOnceDenyFishHooK + 663

@luzsyn
Copy link
Author

luzsyn commented Jan 25, 2022

I need to know "impDyldPath" in RuntimeHookChecker.amIRuntimeHook, so i copy code from RuntimeHookChecker to AdditionalRHChecker.

@luzsyn
Copy link
Author

luzsyn commented Jan 26, 2022

Another crash reported:
Crash method: JailbreakChecker.swift 'checkFork'
Device: iPhone Xs Max(14.8)

@r3ggi
Copy link
Collaborator

r3ggi commented Feb 4, 2022

Hey,

Please provide us code that actually makes ISS crash your app. Without it it's hard to reproduce the issue

@luzsyn
Copy link
Author

luzsyn commented Feb 10, 2022

Sorry, i also can not reproduce the 'swiftOnceDenyFishHooK' issue with my devices. It happened in our customers, and reported by 'Firebase'. it happened bellow iOS 12.2 till now.

The function checkFork() crashed in iPhone Xs Max(14.8)and iPhone 12 (14.2.1), and The function always return true, even in jailbreak device, how it return false?

@Samr87a
Copy link

Samr87a commented Mar 14, 2022

Hey,

Please provide us code that actually makes ISS crash your app. Without it it's hard to reproduce the issue

http://app.adjust.com/forget_device?app_token={yourAppToken}&adid={adidValue}

@Samr87a
Copy link

Samr87a commented Mar 14, 2022

Hey,

Please provide us code that actually makes ISS crash your app. Without it it's hard to reproduce the issue

Ios_sdk is his handle

@luzsyn
Copy link
Author

luzsyn commented Mar 14, 2022

Hey,
Please provide us code that actually makes ISS crash your app. Without it it's hard to reproduce the issue

http://app.adjust.com/forget_device?app_token={yourAppToken}&adid={adidValue}

Sorry, I also cannt reproduce the crash, which happens in our customers device.
If reproduce in the future, I'll ask questions again.
Thanks.

@luzsyn luzsyn closed this as completed Mar 14, 2022
@Samr87a
Copy link

Samr87a commented Mar 15, 2022 via email

@Mukul444
Copy link

Mukul444 commented Apr 5, 2023

Hello @r3ggi
My application gets crashed on ios version 14.4, 14.7.1, basically on ios 14 in FishHookCheck File . Please find attached screenshot

Screenshot 2023-04-05 at 7 21 44 PM

Crash Report
Screenshot 2023-04-05 at 7 37 34 PM

@r3ggi
Copy link
Collaborator

r3ggi commented Apr 5, 2023

Hey!

Please provide me with the code in your app that called ISS' FishHook and caused the crash

@Mukul444
Copy link

Mukul444 commented Apr 6, 2023

class RuntimeClass {
@objc dynamic func runtimeModifiedFunction()-> Int {
exit(0)
}
}

func checkRunTimeHook(){
let dylds = ["UIKit"]
let _ = IOSSecuritySuite.amIRuntimeHooked(dyldWhiteList: dylds, detectionClass: RuntimeClass.self, selector: #selector(RuntimeClass.runtimeModifiedFunction), isClassMethod: false)
}

// calling checkRunTimeHook from AppDelegate
class AppDelegate: UIResponder, UIApplicationDelegate {
override init() {
super.init()
checkRunTimeHook()
}
}
@r3ggi I have already shared the crash report
Thanks

@luzsyn
Copy link
Author

luzsyn commented Apr 20, 2023

Hello, @r3ggi
My application also gets crashed on iOS version 13.3 (17C54), 14.6 (18F72), 14.8 (18H17), in FishHookChecker.swift: 663.

@luzsyn luzsyn reopened this Apr 20, 2023
@luzsyn
Copy link
Author

luzsyn commented Apr 20, 2023

Can I use FishHookChecker in background thread?

@luzsyn
Copy link
Author

luzsyn commented Apr 21, 2023

Unbelievable,Debug or install Ad-hoc ipa works OK, but install app from App Store will crashed in FishHookChecker.swift: 663. 😭

@luzsyn
Copy link
Author

luzsyn commented Apr 23, 2023

Hello @r3ggi , I found the crash reason: Use both Alamofire and AFNetworking, just install Alamofire by Cocoapods, not use it ever can also cause crash.

Crash below iOS15.

Confused,Debug or Ad-hoc can not replicate, only upload ipa to App Store Connect, install app from TestFlight can replicate the crash.

I'd like to migrate from AFNetworking to Alamofire step by step, so my app use both Alamofire and AFNetworking for network request, Alamofire for Swift, AFNetworking for OC.

How can I solve the crash?
Thanks very much.

@r3ggi
Copy link
Collaborator

r3ggi commented Apr 27, 2023

Hey!

@TannerJin I think we need you help here 🙏🏻

@dmaulikr
Copy link

dmaulikr commented May 16, 2023

Hello @r3ggi I am also facing the same issue here. Got crashed at the same line
let curStrTabOff = symtab.advanced(by: Int(curIndirectSym.pointee)).pointee.n_un.n_strx
Yet unable to identify the cause as it's working perfectly in debugging but when I intend on sharing an iPA file or via TestFlight it crashes. Here's what I am doing with code
`let test = RuntimeClass.init()
test.runtimeModifiedFunction()
let dylds = ["UIKit"]
let amIRuntimeHooked: Bool = IOSSecuritySuite.amIRuntimeHooked(dyldWhiteList: dylds, detectionClass: RuntimeClass.self, selector: #selector(RuntimeClass.runtimeModifiedFunction), isClassMethod: false)

if IOSSecuritySuite.amIRunInEmulator() || IOSSecuritySuite.amIDebugged() || IOSSecuritySuite.hasBreakpointAt(funcAddr, functionSize: nil) || testWatchpoint() || IOSSecuritySuite.amIReverseEngineered() || IOSSecuritySuite.amIMSHooked(funcAddr)
//|| amIRuntimeHooked || IOSSecuritySuite.amITampered([.bundleID("com.mintoak.hdfc")]).result {
{
}`
It is an exact copy of how it's shown in the demo project here.

any suggestion would be great here! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@r3ggi @luzsyn @dmaulikr @Mukul444 @Samr87a and others