If the script is going to be executed locally, particular attention should be given to certain types of operations that can answer questions about its purpose, persistence mechanism, and communication protocol. In terms of similarity with VBScript, on Windows, exactly the same COM objects can be used for this purpose, as described previously:

Figure 13: An example of JS code writing to a file on Windows
On Linux, JS is not being used to execute commands locally as it requires some custom modules, such as node.js, which might be not available on the target system.
In terms of web applications, the following functions need to be paid attention to:
- Code execution:
- eval: Execute a script block provided as an argument
- Page redirects:
- window.location = '<new_url>'; (variation is location = '<new_url>';)
- window.location.href = '<new_url>';
- window.location.assign('<new_url>');
- window.location.replace('<...