Is it possible to do this: as soon as the web document is transmitted to the user's computer, a js-script is launched that secretly downloads a binary file from the user and starts it to run? How to implement this? JS himself did not study, the main thing for me is to find out if what I need is possible.
3 answers
No, you can't do that, browsers do not provide access to the user's file system, otherwise it would be a big security hole.
- And in the question about using the browser, nothing is said :) - andmalmal
"Secretly downloads" ... I do not even want to know why.
Probably it is possible if a traitor script is spinning on the node, which can open a loophole in the system.
If "secretly download and run with execution rights" is a legal action, get confused by the instructions for installing the node, starting the script, and writing it.
Otherwise, it is easier to find 0-day.
On js, most likely only with the use of sploits. And in the case you need to create a binary disguised as something ordinary that the user downloads and runs on his PC (under any pretext). Or create a splice. The only way.