How to detect webserver hacks etc. / Usefulness of Antivir
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to detect webserver hacks etc. / Usefulness of Antivir
Hi all,
Can somebody give me jsut a quick hint (for google search), how to check my webserver if there are dangerous scripts (e.g. via upload) on my webserver.
I wonder if the ususal AV software (translated for Linux) can detect such exploit software? Our company has some licences for Antivir Linux...
Does it make sense to install Antivir for Linux and create a daily cronjob that scans my webfiles/ upload dirs?
Unfortunately, I don't think there is an easy answer to what you're asking. There are programs like chkrootkit or rkhunter that will check to see if the machine has been infected with some known rootkits. There are also programs like Aide or Samhain that will check the files to see if anything has changed, but to be useful those have to be installed an initialized BEFORE you put the server on the web. These are probably closest to what you want to do, but they only detect changes, they don't tell if the changes are hazardous or not. You could also check the checksums of the installed packages for your distro against the published versions to see if they match, but that won't detect any malware that is outside of the distro. As for antivirus, there aren't a lot of viruses for Linux out in the wild. Linux tends to have more issue with trojans and rootkits.
Maybe if you gave us some more details about your existing situation and what you're concerned about we can give some better advice.
I agree. Instead you should harden the host, particularly the web stack components, before exposing the machine to the Wickedly Wild intarWeb: only use off-the-shelf and updated software versions (esp. if based on PHP and other popular interpreted languages) and avoid home-brewn applications unless you know what you're doing, configure all components as tightly as possible (don't enable features you don't really need), use SSL (or stunnel?) if you can, use an application firewall like mod_security, maybe use a reverse proxy and an IDS to watch over traffic. Ensure logging is combined with alerting (Logwatch, SEC, et cetera?) because without logging and alerting you'll be blind until way after the fact. And finally do test your setup (regularly) before exposing services.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.