nowsecure / fsmon

monitor filesystem on iOS / OS X / Android / FirefoxOS / Linux
https://www.nowsecure.com
MIT License
881 stars 151 forks source link

Not working on iOS 11 #38

Closed whoot closed 5 years ago

whoot commented 5 years ago

Hey,

i downloaded and installed the 'fsmon_1.4_iphoneos-arm.deb' to my iPhone with iOS 11.1.2. However, no matter what I try, I always get the same error:

root# fsmon -h
Killed: 9

Is there any way to get this tool working on iOS 11 or any replacement for it?

trufae commented 5 years ago

Thats probably because a missing required entitlement for the latest jb. Just resign in it should be enough. I’ll update the bin and do a new release later this week when i get some spare time

Thanks for reporting

On 15 Jan 2019, at 18:05, Jan Rude notifications@github.com wrote:

Hey,

i downloaded and installed the 'fsmon_1.4_iphoneos-arm.deb' to my iPhone with iOS 11.1.2. However, no matter what I try, I always get the same error:

root# fsmon -h Killed: 9 Is there any way to get this tool working on iOS 11 or any replacement for it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

trufae commented 5 years ago

Please this this binary. i just pushed the blind fix

trufae commented 5 years ago

fsmon-ios.zip

whoot commented 5 years ago

Wow, that was fast. However, it does still not work :/

root# chmod +x fsmon-ios 
root# ./fsmon-ios 
dyld: Library not loaded: /System/Library/Frameworks/CoreServices.framework/CoreServices
  Referenced from: //./fsmon-ios
  Reason: image not found
Abort trap: 6
trufae commented 5 years ago

I can confirm this error. Seems like Apple added this CoreServices framework as a new dependency for iOS12.

https://www.theiphonewiki.com/wiki//System/Library/Frameworks

I'm downloading the old iOS11 SDK and doing a new build with it, that should be enough to make it work

trufae commented 5 years ago

Ok, so i found an issue in the Apple linker that is not inheriting the -weak_frameworks flag to the dependencies of the weakedly linked frameworks.

Setting a minos option doesnt solves the problem because the ios12 XCode SDK is linking against the CoreServices framework which is only available in iOS12. Switching to older SDKs is kind of a pain, so the best solution i found was to binary patch with r2 the 64 bit slice of the compiled binary:

$ OFF=`rabin2 -H fsmon-ios.arm_64.1 |grep -C 2 /CoreSer|head -n1|cut -d ' ' -f 1` r2 -qnwc "wx 18000080 @ $OFF" fsmon-ios.arm64

And here's the result:

fsmon-ios.arm_64.1.zip

whoot commented 5 years ago

Works as intended. Thanks for the quick fix!

lisongzhe commented 5 years ago

ios 12 not work also killed 9

dengshuaige commented 5 years ago

so?

------------------ 原始邮件 ------------------ 发件人: "李松哲"notifications@github.com; 发送时间: 2019年5月13日(星期一) 下午3:59 收件人: "nowsecure/fsmon"fsmon@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [nowsecure/fsmon] Not working on iOS 11 (#38)

ios 12 not work also killed 9

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.