Monitoring Systemcalls made by the WebAssembly Modules

81 Views Asked by At

I want to understand the behaviors of the WebAssembly modules of the website how can I achieve this? Can I monitor the system calls made by the Webassembly modules?

1

There are 1 best solutions below

0
sbc100 On

WebAssembly modules cannot make system calls per se. All they can do is make calls to the their imports which are provided by JavaScript.

If you want to monitor calls to those imports you can wrap each of the functions that are provided in the importObject argument to the instantiate function. That gives you way to intercept all calls made to the outside world (in this case JavaScript).