I do not know how the attacks take place, but based on what mentioned here, the way is to execute scripts to the browser. Do you think that disable Javascript would eliminate such attacks?
Anonymous cybercriminals are using a fragment in over 170,000 routers made by MikroTik to execute scripts on the computers of unaware victims to mine Cryptos for the hacker, according to Simon Kenin, a TrustWave researcher.
The statistics appear to be inaccurate as the article spoke of some numbers "200,000 & 170,000".
It was also not confirmed that all these devices already used for currency mining.