I'm trying to reverse engineer a file that is packaged with pkg. I extracted the bytecodes from the application using pkg-unpacker. From my understanding, application has raw js code in binary itself and that code decompress bytecode and execute it. I wrote a python script to modify that function. So, I have 2 questions

  1. How do I disassemble the bytecode? I tried to use ghidra plugin but no luck for me.

  2. I said, I made a Python script to modify loader JS code. I changed that code to load bytecode from directory, not from binary and it works flawlessly. But if i change a one char from string with a hex editor (Lenght of the file isn't changed). Following function returns null. How do I patch this file?


Thanks for reading.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.