Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

How to Check if Your Linux System is Infected with a Virus
LinuxSecurity ^ | 23 January 2023 | Brittany Day

Posted on 02/07/2023 9:50:22 AM PST by ShadowAce

Linux is undoubtedly the best open-source operating system, and is arguably the most secure OS by design.  Most computers these days are Linux-based. Android OS, which is the most commonly used mobile operating system, is also Linux-based. The same goes for Chromebooks and a variety of tablets.

As amazing as Linux  is, the chances of it getting compromised are also increasing due to its growing popularity. Although many tech enthusiasts believe that Linux is immune to viruses and malware, and doesn't require any anti-malware or anti-virus solutions, this isn't entirely true. What you need to understand is that no operating system in the world is 100% immune to such things.

Though Linux is safer than the rest, it can still fall victim to attack. Thus, taking precautions is necessary when it comes to robust cybersecurity.  However, before choosing an antivirus or anti-malware solution, the first thing that you need to do is check if your Linux system is compromised or how vulnerable it is. In this article, we're going to cover it all in detail so that you're prepared to deal with the worst-case scenario beforehand.

What Threats Do Linux Users Face? 

LinuxsecThe growing threat of Linux malware and ransomware has put businesses on a red alert. Many of them have implanted new strategies and tools to protect themselves. The digital market is  dominated by Windows, but Linux is the most used operating system. In other words, it's everyone's favorite.

The global Linux market was worth 5.33 billion USD in 2021 and it's expected to grow to 22.15 billion USD by 2029. A record increase in malware attacks on Linux devices has been recorded in the second half of 2021 and the first half of 2022.

Moreover, cross-platform ransomware has become common between Android, Linux, and iOS. As a result, individuals and companies are now investing in keeping their Linux devices secure. However, before making this investment it is important to know about the threats you face. This will help you identify security measures to combat them, and determine those that are not for you.

Malware

Malware, a blanket term for viruses, is any software that's designed to disrupt a smartphone, personal computer, laptop, server, etc. Malware interferes with your computer network's regular functioning, causing data leaks and breaches. There are different kinds of attacks that Linux users are coming across these days, including: 

State-Sponsored Attacks 

State-sponsored attacks are becoming increasingly common in the Linux environment. These attacks can usually be attributed to organizations and individuals monitoring countries or nations. Many security researchers have shed light on state-sponsored malware post-Russia-Ukraine dispute. Wiper malware has been deployed to monitor different nation-state groups and their activities concerning the war. 

IoT Malware 

A family of viruses, including Mozi, Mirai, and XorDDos, have been reported to target Linux devices via IoT. These viruses infect your Linux device and use it to launch DDoS attacks after taking control of the server. The number of cases of malware attacks on Linux devices increased by 35% in 2021 due to Mozi, Mirai, and XorDDos. A large number of Mirai malware attacks were reported in the first quarter of 2022 as well. 

Cryptojacking 

Cryptojacking is extremely prevalent among Linux devices. It is becoming increasingly common as malicious hackers worldwide are making money using cryptojacking. Cryptojacking uses software that's specifically designed to generate cryptocurrencies for attackers using computational resources. The first case of cryptojacking was reported in 2018 when Tesla's Kubernetes console was infiltrated by a threat actor. Since then, it has become quite common with Sysrv and XMRig being two of the most significant crypto-miner families.

Ransomware 

Ransomware is malicious software that blocks access to your device and encrypts all your data. Ransomware gangs are also becoming increasingly known in the Linux community. Hive, REvil, DarkSide, and Conti are some of the most notable ransomware gangs. Although they have different malware samples, they're all carefully planned and quite harmful. At the moment, Conti and Defray777/RansomExx are targeting Linux host images to catch users' valuable digital assets. 

Rootkits

A rootkit is a malicious software program that provides a malicious hacker with administrative-level, privileged access to a computer system. It can interfere with your computer's functioning and put your data at risk.

Once activated, a rootkit can cause further damage with additional malware, including Trojans, keyloggers, bots, and ransomware. The infamous lightning framework, a Linux malware, is used as a backdoor to install rootkits. The lightning framework, also known as 'Swiss Army Knife,' uses Secure Shell (SSH) to infect devices with rootkits.

Popular Open-Source Malware/Virus/Rootkit Scanners

Attackers use a variety of malware, backdoor shells, rootkits, and sniffers. To protect your device from all these threats, there are certain open-source scanners and tools that you can use. Here are a few great options:

Lynis 

Lynis is an incredible open-source security audit scanner for your Linux device. It assists both security professionals and system administrators by scanning their devices and security systems. Its function is to harden your device against security breaches and data leaks. Apart from Linux systems, Lynis also works well with BSD and macOS devices. 

Chkrootkit 

Chkrootkit, also known as Check Rootkit, is another open-source scanner that helps protect your device from malware, botnets, and rootkits. Over the years, Chkrootkit has been tested again and again on different Linux devices and the results have been quite fruitful. It's simple to install and use; hence, great for beginners. 

Linux Malware Detect 

Linux Malware Detect, commonly referred to as LMD, is one of the best open-source malware scanners available. It works by using signatures for detecting malware, creating them according to network intrusion detection systems. It can scan specific files as well as the entire system based on your individual needs.

ClamAV

ClamAV is another great open-source malware scanner. It works well for all devices, including macOS, BSD, and Windows. It brings along a GUI version that is specifically designed to catch malware, viruses, and trojans. Not to mention, it's one of the most frequently used Linux anti-viruses. ClamAV is readily available to install here.

Top Tips to Prevent Malware Attacks on Linux 

As previously mentioned, Linux devices are more secure than most others; however, malware can still sometimes take the wheel regardless. To get the target off the back of your Linux device, there are a few effective security measures that you can take:

Take Care of Your Passwords 

The simpler the password, the easier it is for the hacker to guess it. It's as simple as that. Thus, you must adopt the policy of using strong passwords. Use a combination of letters, numbers, and special characters when setting up the password for your Linux device and the applications in use. Also, don't forget to turn on multi-factor authentication (MFA)

Restrict User Access

Many people call their servers their homes. The reason is that their servers have all their data and, in case it gets hacked, they become both financially and emotionally vulnerable. One way to keep your Linux device safe is by restricting user access. Allow key access to certain users and provide them with minimal access only. 

Use a VPN

Most of the time, your Linux device catches a virus when you browse different websites. Needless to say, not every website is safe and many of them carry viruses and malware. To avoid infecting your Linux device with malware, you should use a VPN. There are different VPNs available for different devices. When using Chrome, you can use a VPN for Chrome. Similarly, when using any other web browser, you can install a suitable VPN and browse safely.

Pay Attention to Fine Logs 

Linux devices offer several logs with tons of information that you can scan. Having log files on your system is useless if you don't pay attention to them. Therefore, make a habit of reading the logs. For anyone who doesn't have time to manually vet the logs, please know that numerous tools are available these days that can comb through the logs for you, saving you both time and energy. 

Keep Your Device Updated 

Many people have complained about their Linux systems being hacked or infected with viruses. It turned out that they weren't updating their devices. Old and un-updated devices are 10x more vulnerable to security issues compared to ones that are updated and new. Thus, to keep malware attacks at bay, it's mandatory to update your Linux device.

The Final Word

The growing threat of Linux malware and ransomware has put many on a red alert, and sadly, the number of infected devices and cyberattacks  is constantly on the rise. However, not everyone is suffering, as many people keep their Linux devices well-protected. Knowing the details on the topic and taking the measures discussed in this article are key to keeping your Linux device safe. By implementing the best practices mentioned above, you’re on the right track to protect your Linux devices and systems against attacks leading to compromise.


TOPICS: Computers/Internet
KEYWORDS: linux; malware
Navigation: use the links below to view more comments.
first previous 1-2021-4041-6061 next last
To: lefty-lie-spy
Now I know someone will say that MacOS is not available on Cloud Computing platforms, & etc.

That's a feature, not a bug. Keep personal computers personal.

(For the record, my present box is Ubuntu with Windows dual-boot, but MacOS is fine.)
21 posted on 02/07/2023 11:35:46 AM PST by Dr. Sivana (But yet the Son of man, when he cometh, shall he find, think you, faith on earth? (Luke 18:8))
[ Post Reply | Private Reply | To 6 | View Replies]

To: Bob434

“I tried running # lynis audit system —quick and it just quickly flips to next line/command prompt-”

Well, then it is obviously not working... lol


22 posted on 02/07/2023 11:37:54 AM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 20 | View Replies]

To: lefty-lie-spy
"MacOS. It just works."

MacOS and Linux are both UNIX derivatives. MacOS is the better alternative for people with more cash than command line skill.

23 posted on 02/07/2023 12:00:09 PM PST by Paal Gulli
[ Post Reply | Private Reply | To 6 | View Replies]

To: Openurmind

lol- my guess too=- I’m gonna uninstall it i think- i wanted to see if any areas were in need of securing, but i don’t know how to stop the runnign process when the terminal is running- so i can at least select the output and copy before the dang process closes on me-


24 posted on 02/07/2023 12:04:59 PM PST by Bob434
[ Post Reply | Private Reply | To 22 | View Replies]

To: ShadowAce

25 posted on 02/07/2023 12:34:48 PM PST by martin_fierro (< |:)~)
[ Post Reply | Private Reply | To 2 | View Replies]

To: Bob434

No results if you scroll up in the CLI?


26 posted on 02/07/2023 12:49:03 PM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 24 | View Replies]

To: Openurmind
> I think a VPN tunnel could be helpful if you are going through a lot of nodes. Such as decentralized networking?

Well,... Let's say you're at point 'A' and you need to connect to point 'E', and points 'B, 'C', and 'D' are in the path between 'A' and 'E' (a typical case on the internet):

A == B == C == D == E

If you just connect from 'A' to 'E' your packets traverse 'B', 'C', and 'D' explicitly. Programs like "traceroute" will show those intermediate points as "hops" along the path. Programs running on those hops could in theory read your packets' content, and if you're using an insecure (unencrypted) protocol like HTTP, they can see what you're doing.

If instead you use a VPN between 'A' and 'E', it APPEARS that your packets are going directly from 'A' to 'E', but in fact they're still going through all the same intermediate hops 'B', 'C', and 'D'. But they're encrypted by the VPN tunnel so they're not readable in the intermediate hops.

Does that mean you're any safer? Yeah, in the sense that a Man-In-The-Middle (MITM) attack is harder. So that's something.

27 posted on 02/07/2023 1:30:21 PM PST by dayglored (Strange Women Lying In Ponds Distributing Swords! Arthur Pendragon in 2024)
[ Post Reply | Private Reply | To 13 | View Replies]

To: dayglored

Thank you, I was thinking along those same lines. I had to ask because when I am running through multiple nodes in a tunnel, Etherape shows a direct solid tunnel connection between my box and the exit node.

So I was not sure if it was piping it through without anything possibly being added. Not so much worried about what they can see, more worried about what they can or cannot add to the packets going through the nodes between A=E.


28 posted on 02/07/2023 2:21:22 PM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 27 | View Replies]

To: ShadowAce
Moreover, cross-platform ransomware has become common between Android, Linux, and iOS. As a result, individuals and companies are now investing in keeping their Linux devices secure.

Android is where infections are far more likely to occur among Linux kernel devices, rather than desktops, for Android devices are used way more than Desktops. Thus more likely to be targeted, while Linux desktop users overall are more security conscious, and have more tech knowledge. And overall infections are almost always the fault of the user, and his "driving" habits. Likewise, 83% of all Windows malware threats, or roughly 92.3 million, were discovered on consumer computers, while 15%, or 16.7 million, were discovered on business systems And since according to one report, 95 percent of cybersecurity breaches are caused by human error, and as Linux desktop users as a class are likely more tech savy and more skillful (at least years ago) then even among desktop users they would be less prone to infections than your average Windows user on that basis alone, in addition to Linux being more secure.

Researchers at Check Point examined cyberattacks in the first half of 2019 and found that those targeting smartphones and other mobile devices have risen by 50% compared with last year”. - Mobile malware attacks are booming in 2019: These are the most common threats
Research showed a 500% increase in mobile Malware in 2022 and also an 80% increase in banking malware attacks on Android devices; this is high and calls for mobile defense.” - Mobile Malware is Increasing Rapidly: Steps to Reduce your Risk
Analysis based on the malware threat statistics by a threat intelligence platform AV-TEST Gmb based in Germany, found that "the number of new Linux malware reached record highs in the first half of 2022, as nearly 1.7 million samples were discovered. Compared to the same period last year, when 226,324 samples were found, new Linux malware numbers soared by close to 650%.... the cumulative number of new Linux malware samples in H1 2022 was 31% higher than the number of such samples in the whole year of 2021...Although Linux was the only operating system that saw growth in new malware samples in the first half of this year, Windows had the most significant number of new malware applications overall. "

Note that "the most significant number" must be objectively understood relative to the number of users on the platforms installed on it, in which for Windows is desktops and laptops in which is clearly predominates, thus having the most significant number is not surprising, versus mobile devices, where Windows was once judged well in security. Linux desktops are also not much of a target since users of such make up a very small market of such, and require more input to install apps.

Yet in testing [at the time], Microsoft Defender scored 9.6, which is better than any other free product tested with this same sample set, doing better or equal to at that time in 2022 than some of its free "heavyweight rival programs like those from Avast, AVG, and Malwarebytes."

29 posted on 02/07/2023 4:30:11 PM PST by daniel1212 (Turn to the Lord Jesus as a damned+destitute sinner, trust Him who saves, be baptized + follow Him!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Perseverando
Thanks for the info. I’m a Linux newbie. Just playing with an OLD 32-bit laptop. Running Linux Mint 19.3 xfce which is all this old PC can handle. Tried 19.3 Cinnamon, but it kept locking up. Brave.com (which I really like) no longer supports 32-bit hardware, so I just use the browsing software that came with xcfe. Any recommendations?

You need to provide specs. First thing would be to install the OS on a SSD (much much faster than HD's) . Platters are passe.

And you likely need a more basic Linux distro, maybe like Xubuntu.

30 posted on 02/07/2023 4:31:36 PM PST by daniel1212 (Turn to the Lord Jesus as a damned+destitute sinner, trust Him who saves, be baptized + follow Him!)
[ Post Reply | Private Reply | To 4 | View Replies]

To: ShadowAce

I read this and then rooted around to see what this lynis thing is, installed it and ran it in audit mode and it flagged a lot of things but the one of most interest to me was the warning that I have no iptables set up so I am a sitting duck.

So I rooted around some more and found this.

https://www.thegeekstuff.com/2011/03/iptables-inbound-and-outbound-rules/

Completely crashed my communications. Locked in and locked out of the rest of the world.

iptables -F would not solve the problem.

Final fix, .sh file renamed so the computer could not recognize it, iptables -F, a reboot to get rid of any memory problems and now all is well.

In my haste, I forgot that my router is major protection and I am using noip for my IP and they are not allowing bad stuff to pass through.

Plus I use clamav very day.

I have never had an infected machine since I got rid of windoz, and that was when linux users had to build their own system. A long time ago.

A dumb impulsive result of letting bad information influence me.

Be careful.


31 posted on 02/07/2023 7:14:02 PM PST by old curmudgeon (There is no situation so bad that the federal government can not make worse.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Openurmind

CLI? the terminmal closes the second that the lynis process stops- so i can’t scroll up


32 posted on 02/07/2023 8:04:45 PM PST by Bob434
[ Post Reply | Private Reply | To 26 | View Replies]

To: ShadowAce

Last week my Windows 10 pc started having issues with programs not opening, files in the Program Files folders missing. List of programs in Programs & Features missing.

In the end I had to do a clean install of Windows 10 after trying a Windows install over itself (same issue afterwards) and then my EaseUS image recovery which got stuck afterward at the boot. Hours later I installed the brand new copy of Windows 10 and then bought Macrium Reflect 8 and tested it’s ability to recover after I created a image.

I suspect a recent Windows update started the issues as I did not install or modify anything till that point.

My verdict is Windows 10 is a virus.

I have now blocked any new updates. I will rely on my anti-virus to protect against virus and ransomeware and Macrium Reflect also have an ability to protect against.
https://www.windowscentral.com/how-stop-updates-installing-automatically-windows-10


33 posted on 02/07/2023 11:11:53 PM PST by minnesota_bound (Need more money to buy everything now)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Bob434

Command Line Interface -CLI, It is used a lot rather than “Terminal”. Especially when both acronyms GUI and the CLI are used in an article about software Etc.

Well that is a bummer it is actually closing and not just minimizing it’s self. I misunderstood. :)


34 posted on 02/08/2023 2:59:06 AM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 32 | View Replies]

To: old curmudgeon

Thank you for sharing that. :)


35 posted on 02/08/2023 3:28:37 AM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 31 | View Replies]

To: ShadowAce

As always, excellent post and info


36 posted on 02/08/2023 4:46:35 AM PST by usconservative (When The Ballot Box No Longer Counts, The Ammunition Box Does. (What's In Your Ammo Box?))
[ Post Reply | Private Reply | To 1 | View Replies]

To: Openurmind

Ah, I should known that, doh. Yeah I’m searching g for an answer. Tried updating the program too, but still no luck. I’ll see if I can reach the author of the process, or folks who deal,with it every day or whatever. I was able to see a few warnings come up, about single user something or other not being strengthened enough, and another about a different issue, I can copy and then past about 1/5 of it asmits running, but can’t copy and paste the whole thing before it turns itself off.


37 posted on 02/08/2023 6:38:31 AM PST by Bob434
[ Post Reply | Private Reply | To 34 | View Replies]

To: Bob434

Know what? It has got to be logging and storing those reports in a folder somewhere in your files. Maybe a search of your files for the app name will also bring one up that says “reports” or “logs”. Probably have to dig through several before finding the right one.

If it is the one you need, then make a desktop shortcut to that folder. I have had to do that to find app launch files before so I can add them to my menu. It was there, just had to dig for it. lol


38 posted on 02/08/2023 7:34:30 AM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 37 | View Replies]

To: Openurmind

I checked but couldn’t even find the where the program folder is- tere doesnt appear to,be a lynis folder, or .lynis - I will keep checking g thouh, and good tip about adding shortcut- that will save a ,ot of time as I forget where I find things sometimes and have to start from scratch researching where they are lol


39 posted on 02/08/2023 7:41:23 AM PST by Bob434
[ Post Reply | Private Reply | To 38 | View Replies]

To: Bob434

OK, looks like if it drops and disappears it purges the log reports anyhow. I guess this means there were no issues or it would display a report? I don’t like that idea, I want a report even if it is clean. Be nice as a reference to when it was last done, and when it was last known to be clean. I want each report no matter what. But here is a site that is more detailed and about halfway down it gives sample paths to the folders. It is classified as a “plugin”.

https://cisofy.com/documentation/lynis/


40 posted on 02/08/2023 7:51:39 AM PST by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 39 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-6061 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson