chaitin / passionfruit

[WIP] Crappy iOS app analyzer
MIT License
1.66k stars 228 forks source link

run passionfruit with frida 14.0 #79

Closed wyu0hop closed 3 years ago

wyu0hop commented 3 years ago

hello,when i run passionfruit with frida 14.0,a crash happened.

(frida:1380): Frida-CRITICAL **: 16:18:39.033: file ../../../frida-core/lib/interfaces/session.vala: line 167: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “re.frida.HostSession12” on object at path /re/frida/HostSession (g-dbus-error-quark, 19) zsh: segmentation fault passionfruit

bensh commented 3 years ago

Also getting this issue. hits me with this error:

(frida:42655): Frida-CRITICAL **: 12:04:13.775: file ../../../frida-core/lib/interfaces/session.vala: line 167: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “re.frida.HostSession12” on object at path /re/frida/HostSession (g-dbus-error-quark, 19)

I have Frida 14.0.5 both on the mac and on iOS and the usual Frida commands work ok

frida-ps -Uai
  PID  Name                  Identifier                             
-----  --------------------  ---------------------------------------
11374  App Store             com.apple.AppStore                     
11396  Camera                com.apple.camera     

Any ideas? Do I need to clear the session file or something?

geraintwhite commented 3 years ago

I managed to prevent the crash by upgrading the node frida version in the package.json but then I got the following error whenever I selected an app Error: V8 runtime not available due to build configuration.

It appears that https://github.com/ChiChou/Grapefruit is the replacement to passionfruit but I couldn't get it working properly either - I kept running into https://github.com/ChiChou/Grapefruit/issues/17.

ChiChou commented 3 years ago

@bensh @grit96 I've update the dependency to the latest, but it's still not working. It simply hangs without any response. I have no clue on how to fix it

The only workaround now is to downgrade to frida-server@12. You can probably use the .deb package from here: https://github.com/frida/frida/releases/tag/12.11.18

bensh commented 3 years ago

Any idea of the downgrade process? I've tried installing the .debs which seem to work, and are happily echoed in Cydia, however Passionfruit errors when 'Phone' is selected on the web GUI.

(frida:87422): Frida-CRITICAL **: 16:24:45.070: file ../../../frida-core/lib/interfaces/session.vala: line 167: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface ?re.frida.HostSession14? on object at path /re/frida/HostSession (g-dbus-error-quark, 19)
Segmentation fault: 11

I also got the same as you on v14, the web GUI just hangs with the spinner shown.

ChiChou commented 3 years ago

@bensh Also downgrade to passionfruit@0.6.1

ChiChou commented 3 years ago

I will pull passionfruit@0.7 down because it's not working at all

bensh commented 3 years ago

@ChiChou thanks for your work on this, I know its meant to be archived but its a great tool and has some good features; esp when Grapefruit is still in its infancy.

Trying to downgrade and get errors. I have removed both frida and frida-tools before running npm

npm install -g passionfruit
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
/usr/local/bin/passionfruit -> /usr/local/lib/node_modules/passionfruit/bin/cli.js

> frida@12.11.18 install /usr/local/lib/node_modules/passionfruit/node_modules/frida
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.3.1 runtime=node arch=x64 libc= platform=darwin)
gyp: binding.gyp not found (cwd: /usr/local/lib/node_modules/passionfruit/node_modules/frida) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/Cellar/node/12.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/passionfruit/node_modules/frida
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN ws@7.4.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frida@12.11.18 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frida@12.11.18 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
ChiChou commented 3 years ago

@bensh

This is because frida-node doesn't suit your node.js interpreter. Look at these packages:

frida-v12.11.18-node-v68-darwin-x64.tar.gz 21 MB frida-v12.11.18-node-v64-darwin-x64.tar.gz 21 MB frida-v12.11.18-node-v81-darwin-x64.tar.gz 21 MB frida-v12.11.18-node-v83-darwin-x64.tar.gz 21 MB

The numbe in node-vXX is the NODE_MODULE_VERSION. Find a previous node release that match any one of above in this page: https://nodejs.org/en/download/releases

For example, Node.js 14.15.1. It should work

bensh commented 3 years ago

Think I'm just going to throw in the towel for this unfortunately. It loads up fine, displays the grid of apps, altho with missing icons, click an app and its crashes.

#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffeefbf5ce0
 1: 0x1001137c2 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 2: 0x10100e4f2 V8_Fatal(char const*, ...) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 3: 0x1004d4d44 v8::internal::GlobalBackingStoreRegistry::Register(std::__1::shared_ptr<v8::internal::BackingStore>) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 4: 0x1001fa9b6 v8::ArrayBuffer::GetBackingStore() [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 5: 0x10006d335 node::ArrayBufferViewContents<char, 64ul>::Read(v8::Local<v8::ArrayBufferView>) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 6: 0x10008666c void node::Buffer::(anonymous namespace)::StringSlice<(node::encoding)2>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 7: 0x100259878 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 8: 0x100258e0c v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
 9: 0x100258532 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
10: 0x100a796d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/ben/.nvm/versions/node/v14.15.1/bin/node]
Illegal instruction: 4
ChiChou commented 3 years ago

This backing store issue also exists in the latest (14.x) version. I still have no idea what which call caused this

ChiChou commented 3 years ago

@wyu0hop Please upgrade to passionfruit@0.7.1. It worked. So I am closing this issue.

@bensh The backing store crash still exists. Looks like it's related to socket.io. If you see this crash, restart the server