FrenchYeti / dexcalibur

[Official] Android reverse engineering tool focused on dynamic instrumentation automation leveraging Frida. It disassembles dex, analyzes it statically, generates hooks, discovers reflected methods, stores intercepted data and does new things from it. Its aim is to be an all-in-one Android reverse engineering platform.
Apache License 2.0
1.06k stars 126 forks source link

[ParrotOS] After installing via npm the program says there is no config file. #47

Closed CYB3RMX closed 3 years ago

CYB3RMX commented 3 years ago

I installed dexcalibur on ParrotOS via npm command. After the installation I tried to execute the program with dexcalibur command and program threws errors. Error message:

internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/home/user/.dexcalibur/config.json'
    at Object.openSync (fs.js:462:3)
    at Object.writeFileSync (fs.js:1384:35)
    at DexcaliburEngine.postInstall (/usr/local/lib/node_modules/dexcalibur/src/DexcaliburEngine.js:573:14)
    at Object.onSuccess (/usr/local/lib/node_modules/dexcalibur/src/DexcaliburEngine.js:519:26)
    at Installer.runTask (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:150:28)
    at Installer.nextTask (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:162:22)
    at Object.onSuccess (/usr/local/lib/node_modules/dexcalibur/src/Installer.js:139:26)
    at /usr/local/lib/node_modules/dexcalibur/src/Installer.js:77:36
    at internal/streams/pipeline.js:90:7
    at internal/util.js:392:14 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/user/.dexcalibur/config.json'
}

How can I fix this error?

FrenchYeti commented 3 years ago

Hey, with some distribution this error happens because /home/user/.dexcalibur folder has not good permissions (some distribution require 'execute' attr even for a simple write) => NPM does not set right permissions at install

Can you try chmod 777 /home/user/.dexcaliburand dexcalibur --reinstall ?

CYB3RMX commented 3 years ago

I created .dexcalibur folder manually then I executed commands. But now program hangs here:

Server started on : 8000
[Object: null prototype] { _t: '1616022167300' }
Execute command request : java -jar /usr/local/lib/node_modules/dexcalibur/bin/baksmali.jar d /home/user/dexcaliburWS/.dxc/tmp/sdk_androidapi_29_google.dex -o /home/user/dexcaliburWS/.dxc/api/sdk_androidapi_29_google

What should I do now?

FrenchYeti commented 3 years ago

For 'Execute command request', red text is not an error. It just lets you know Dexcalibur executes a command on your computer.

FrenchYeti commented 3 years ago

did you open http://127.0.0.1:8000/ ?

CYB3RMX commented 3 years ago

Yes. The installation page says success.

FrenchYeti commented 3 years ago

ok, you can exit (Control+C) process, and rerun dexcalibur

CYB3RMX commented 3 years ago

It worked :D Thank you so much!!

FrenchYeti commented 3 years ago

I recommend this tutorial : https://braincoke.fr/blog/2021/03/android-reverse-engineering-for-beginners-dexcalibur/