LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2016, 12:13 PM   #1
PeterW2
LQ Newbie
 
Registered: Mar 2016
Location: Germany, Muenster
Distribution: Opensuse 64bit Leap 42.1
Posts: 12

Rep: Reputation: Disabled
Security: Virus/Malware/Attack defense


How about slackware software against virii, malware and other attacks?
I am mainly thinking about AppArmor, ClamAV (yeah its db sucks) and perhaps a firewall.

1.) What is available? In the standard Slackware distro? As a package?

2.) What is reasonable?
 
Old 04-06-2016, 01:24 PM   #2
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,718

Rep: Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857
Lightbulb

What do you intend to use the box for, home PC, business, internet banking/purchases, top secret stuff for work....etc?

For most home users Slack is very secure by default, you can add a firewall with Erics script:
http://www.slackware.com/~alien/efg/

or use ufw from Slackbuilds:
https://slackbuilds.org/repository/14.1/network/ufw/

Re UFW: after building then copy "run" code to rc.local then do (as root) "ufw enable", "ufw default deny", "ufw deny ssh" (if you want to block all incoming including ssh). "ufw status verbose" will show you details, "ufw" will bring up help page etc....

AppArmor and SELinux are mainly overkill for most users, some commercial interests like it though.

Check out: http://docs.slackware.com/howtos:security:start
 
1 members found this post helpful.
Old 04-06-2016, 01:54 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
As above, it depends on what your intended use is.

But the basics, iptables, SSH, SSL, etc. are all there in a Slackware install.

I am not a fan of UFW at all - you can't easily read the rules and you never know what you've got! I recommend a little time spent learning how to write your own rules, or at the very least, learn what the UFW or other front end options actually mean so that you can configure it intelligently.

Then if you are running a web server, use an application level firewall such as mod_security - and again, learn how to configure the rules intelligently.

For a mail server, same advice - learn how it works and configure it carefully.

Then monitor the logs and system status closely, and apply all applicable security patches quickly.

So the thing to take away is that security is not something you install with defaults and forget about... it is primarily the result of knowledge applied with care, using tools that you understand.
 
2 members found this post helpful.
Old 04-06-2016, 06:16 PM   #4
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
In addition to the above excellent advice remember to patch your Slackware stations with the security updates that Pat provides. The updates will protect you from known security threats.
 
Old 04-06-2016, 06:51 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
ClamAV does not "suck". The database it uses is basic, which is why you enable the extra databases in the configuration for comprehensive coverage. If ClamAV still isn't for you, BitDefender for UNICES is available as well, but I don't know how well it works.

You should also add rkhunter and run it in a timed cronjob with it logged to your user or emailed to yourself internally.

For a firewall, just use iptables. Plenty of FAQs exist on it.
 
Old 04-06-2016, 06:54 PM   #6
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,095

Rep: Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273Reputation: 7273
The lack of an easy to use firewall like the Kerio Personal Firewall for winXp has always made me feel a little uneasy when online. Of course, I used Alien Bob's firewall generator to create a rc.firewall and made it executable so it is loaded on boot up, but something like Kerio would give one more control over one's system without having to learn iptables, etc., etc., etc.
 
Old 04-06-2016, 07:49 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
If you want a graphical frontend for iptables (that's the firewall function in the Linux kernel), gufw works quite nicely. Slackbuilds.org also contains a KDE-based frontend for iptables called kcm-ufw; I haven't used that.

I use an rc.firewall script that I've used for years, simply because I'm used to it.
 
Old 04-06-2016, 08:45 PM   #8
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
I appear to be having good luck with firehol firewall, a sort of front-end to iptables.
Also, looking into running Samhain for intrusion detecion, but waiting for a fresh Slack install.
As for viruses/malware, I just try and practice good browser/$NET_FACING_APP hygiene.
Home desktop scenario here.
 
Old 04-06-2016, 09:59 PM   #9
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Bitdefender no longer offers protection for linux
 
Old 04-06-2016, 10:25 PM   #10
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Many attacks are designed to work on Windows and will not execute on Linux.

Once, just for grins and giggles, I clicked on one of those "virus checks" that pop up from time to time. I nearly giggled as it pretended to scan my C:\ drive, as I had no C:\ drive. Furthermore, as a Windows veteran who has run many virus scans, the pretend scan ran far faster than a legit scan could have done. It was as phony as a pay-day loan ad.

Browser exploits may work in any vulnerable browser, so keeping your browser updated is important. I generally also run NoScript (or equivalent) in my browsers, but, frankly, that's not so much for security as for minimizing annoying internet stuff.

The biggest dangers that you face on Linux, other than those that can be blocked by a firewall, are dangers that user inflicts on him- or herself. As STDOUBT points out, practicing safe HEX is your best defense. If you click on a link in an email that claims to come from "mybank.com," when it actually comes from "mybankfooledyou.com," really, now, that's on you.

Port scans are a fact of life on the internet. Make sure any incoming ports are closed down in your router unless they are ports that you wish to allow access. Nevertheless, I would recommend installing fail2ban if you have any public-facing ports.

If you wish to have ssh access to your machine from the Big Wide World, consider running ssh on a non-standard port. The same goes if you wish to have VNC or VPN access from the internet. Otherwise, closing the relevant ports in your router should be enough.

Also, if you have not already done so, change your router password from the default to something else and disable external logins to the router. If someone can get into your router from the internet with "admin/admin," all bets are off.

Last edited by frankbell; 04-06-2016 at 11:01 PM.
 
3 members found this post helpful.
Old 04-06-2016, 11:36 PM   #11
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by PeterW2 View Post
How about slackware software against virii, malware and other attacks?
I am mainly thinking about AppArmor, ClamAV (yeah its db sucks) and perhaps a firewall.
As a relatively easy option I would recommened Firejail for any applications that connect to the Internet (but maybe most importantly the web browser). There's really no reason for a browser to be able to read ~/.gnupg or other sensitive directories. Unfortunately the current version in SBo is a little out of date as preparations are being made for Slack 14.2, but you could tweak the SlackBuild to get the latest version (which has some security patches).

I'm sure grsec is worthwhile, but that means patching your kernel, and it might be a bit too much effort (depending on what you want).

Oh yeah, disable any services that you don't need
 
1 members found this post helpful.
Old 04-07-2016, 03:48 AM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by PeterW2 View Post
How about slackware software against virii, malware and other attacks?
I am mainly thinking about AppArmor, ClamAV (yeah its db sucks) and perhaps a firewall.

1.) What is available? In the standard Slackware distro? As a package?

2.) What is reasonable?
There are plenty of solutions available. Linux's firewall is part of the kernel. Under Slackware you only need a script to enable it.

As to the second part of your question, it depends upon your scenario. Are you setting up a Server or Desktop? If you want to run a server, which type? Will it be Internet-facing?

I've been running Slackware for almost 17 years without any AV or anti-malware software... but this is only on my home network (i.e: not running any Internet-facing services).

In my use case, this type of protection is simply unnecessary and a waste of resources.

This is a good article (old, but still relevant): http://www.caribyte.com/articles/sho...of_linux_virus

Last edited by rkelsen; 04-07-2016 at 03:55 AM.
 
Old 04-07-2016, 04:45 AM   #13
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Viruses on linux - wet dream 's Windows thinking about linux without antivirus.
For 15 years of use linux desktop without antivirus there was no , even 1 virus :-)


Grsec is quite simple and powerfull.For desktop is 1 option to simplify configuration.
Apparmor or selinux is more or less the same corporate clone of RSBAC concept from grsec.
RSBAC is less complicated /most simple yet powerfull/for home user IMHO.

and so consider options missing in the distribution kernel decsribed here

Next option is the use of 100% ASLR. Sadly binaries are not compiled with -pie option so they do not use power of full randomization .
It's also worth consider sanitize source with fortify source option and add canary to the stack with stack protector.
With slackbuilds it's simple but need some time /not too much/and works OK on current for me.

NOw will be as secure as Win10 :-)
Maybe more ;-)

Some simple sec post instalation instructions
Next is iptables.I prefer good HowTo over windoze way "click and do not think" which is present in every graphical frontend for iptables.
I am not against graphical , but if you know iptables you never need graphical for it.
Browser with implemented seccomp filters and sandbox like Chrome,Opera,Vivaldi.
Plus some filtering stuff to protect from malware like µBlock simple and customizable from easy to paranoid.
MAybe some disk encryption

and

we are more secure than in Bill's newest product for dummies :-)

Last edited by BratPit; 04-07-2016 at 05:00 AM.
 
Old 04-07-2016, 10:21 AM   #14
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by BratPit View Post
Viruses on linux - wet dream 's Windows thinking about linux without antivirus.
For 15 years of use linux desktop without antivirus there was no , even 1 virus :-)
http://www.zdnet.com/article/linux-b...ease-in-scale/
 
Old 04-07-2016, 12:08 PM   #15
BratPit
Member
 
Registered: Jan 2011
Posts: 250

Rep: Reputation: 100Reputation: 100
Ya.It's wet dream.

Code:
The attackers are using
the same methods for infection, which are primarily SSH brute force attempts for root login
credentials (previously it was reported that infection methods include a vulnerability in
ElasticSearch Java VM).
This malware needs stupidity and laziness user to be dangerous .This is main part of its code.
If you have not noticed in your system, that someone is using SSH is better to go back to Windoze than to install anti-virus .
*For Linux is not dangerous , it is dangerous for those together with corporations who converge Linux to Windows philosophy.
Reason - money.
It's Windows way thinking malware - you do not know the system. antivir protect you but it does not protect you from yourself :-)
The name of that malware /BillGates/ captures the spirit of the environment in which it can spread , or the lack of elementary care about what the Administrator account which is common in in certain "user friendly" system. Before that, no antivir will protect.
But in today's world when corpo installs embeded Linux on IP cameras, Tv-s , fridges etc. and every that thing has remote access that backdoor has a chance to come in "user friendly" world .

Last edited by BratPit; 04-07-2016 at 12:52 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Defense against government-grade malware: FinFisher displace Linux - Security 5 10-09-2014 09:34 PM
system call table attack . How to defense ? prabhurajreddy Linux - Security 2 03-12-2014 12:11 AM
LXer: To build the best defense, know which attack is which LXer Syndicated Linux News 0 03-02-2014 10:50 PM
NSA on Computer Network Attack & Defense win32sux Linux - Security 1 05-03-2010 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration