Skip to content

How to read the dart virtual code instructions? #90

Open
hpp0hpp opened this issue Apr 9, 2022 · 1 comment
Open

How to read the dart virtual code instructions? #90

hpp0hpp opened this issue Apr 9, 2022 · 1 comment

Comments

@hpp0hpp
Copy link

hpp0hpp commented Apr 9, 2022

Hi there

Seems the dart code is executed by VM, so even if we know the code offset, how can we read that? is there any guidance on how to read?

@hpp0hpp hpp0hpp changed the title How to read the dart virtual code? How to read the dart virtual code instructions? Apr 9, 2022
@hpp0hpp
Copy link
Author

hpp0hpp commented Apr 9, 2022

is this the right way to hook the code using frida?

function hook_native(){
var libc_base = Module.findExportByName('libapp.so', '_kDartIsolateSnapshotInstructions');

var libc_hook = libc_base.add(0x0000000000110608);
// var libc_hook_addr = libc_base.add(0x1b9c);
console.log('libc_hook: ' + libc_hook);
console.log('libc_base: ' + libc_base);

Interceptor.attach(libc_hook, {
    onEnter: function(args) {
        for(var i = 0; i < args.length; i++){
            // console.log('arg[' + i + ']: ' + args[i]);
            console.log('arg[' + i + ']: ' );
        }
        },
    onLeave: function(retval) {
        console.log('retval: ' + retval);
        }

})

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant