aesthetic0001/js-virtualizer – GitHub

发布于 2 小时前  0 次阅读


Information about aesthetic0001/js-virtualizer is scattered across the web, so I compiled this guide for reference.

Want to learn advanced techniques? Check out our premium courses.

正文

js-virtualizer is a proof-of-concept project which brings virtualization-based obfuscation to javascript. In this implementation, bytecode is fed to a virtual machine implemented in javascript which runs on its own instruction set. A transpiler is included to convert select

to opcodes for the VM. It is important to note that js-virtualizer is

not intended for use on entire programs, but rather for specified functions

! There will be a significant performance hit if you try to run an entire program through the VM (it is also not practical to do so as truely concurrent async is not supported by the current implementation, so everything in the program would have to run synchronously)

You need to mark the functions you want to virtualize by putting a comment with the text

for a full example and the samples folder for some sample code you can try virtualizing.

// the filename of the code; will be used as the default output filename

// whether or not the transpiler should directly write the output to a file

// the path to write the vm for the transpiled code to

// whether or not to remove unused opcodes from the instruction set

// whether or not to obfuscate the VM code through js-confuser

// whether or not to obfuscate the transpiled code through js-confuser `Virtualized code saved to:

) - the filename of the code; will be used as the default output filename where the transpiled code & the VM will be written to

) - whether or not the transpiler should directly write the output to a file

) - the path to write the vm for the transpiled code to

More Details

There are a few more points worth noting. First, browser compatibility varies across different browsers. Second, performance optimization is crucial when handling large amounts of data. Finally, key management is also an important consideration.

This article was first published on JSVMP Blog. Reposting with attribution is welcome.

Reference: aesthetic0001/js-virtualizer - GitHub


点击体验一键VMP加密 |下滑查看JSVMP相关文章