[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.
Describe the bug
I have a malware sample that contains the following SMALI line:
const-string v1 "Auto"\r
Dexcalibur gives an error while analyzing.
To reproduce / to understand
Ran excalibur with debug to get the following error:
TypeError: Cannot read property '1' of null
at Object.setstring [as parse] (/usr/local/lib/node_modules/dexcalibur/src/Opcode.js:329:20)
at Object.parse (/usr/local/lib/node_modules/dexcalibur/src/Opcode.js:1043:15)
at SmaliParser.instr (/usr/local/lib/node_modules/dexcalibur/src/SmaliParser.js:324:23)
at SmaliParser.method (/usr/local/lib/node_modules/dexcalibur/src/SmaliParser.js:611:32)
at SmaliParser.parse (/usr/local/lib/node_modules/dexcalibur/src/SmaliParser.js:733:34)
at Analyzer.file (/usr/local/lib/node_modules/dexcalibur/src/Analyzer.js:800:30)
at /usr/local/lib/node_modules/dexcalibur/src/Analyzer.js:839:18
at Object.forEachFileOf (/usr/local/lib/node_modules/dexcalibur/src/Utils.js:108:21)
at Object.forEachFileOf (/usr/local/lib/node_modules/dexcalibur/src/Utils.js:105:26)
at Analyzer.path (/usr/local/lib/node_modules/dexcalibur/src/Analyzer.js:838:12)
Describe the bug I have a malware sample that contains the following SMALI line:
const-string v1 "Auto"\r
Dexcalibur gives an error while analyzing.
To reproduce / to understand Ran excalibur with debug to get the following error:
I added a few debug lines as wel at line 324:
Expected behavior Not crash
Desktop (please complete the following information):
I'm not sure if it's valid SMALI code, but the sample appears to execute correctly.
Fix
I added
raw_src = raw_src.trim();
to Opcode.js:1040 but there may be a better place to put that.