Difference between revisions of "Atomic ModSecurity Rules FAQ"

From Atomicorp Wiki
Jump to: navigation, search
m (What are your normal support hours?)
m (LiteSpeed)
Line 279: Line 279:
 
==== LiteSpeed ====
 
==== LiteSpeed ====
  
LiteSpeed has a proprietary implementation of mod_security, the WAF module we use in Apache.  It is not a drop in replacement and supports a very old version of the ruleset (1.9).  This ruleset was deprecated many years ago, and is no longer supported or used.  Unfortunately, this means that LiteSpeed does not support modern modsecurity rules, and it is therefore not currently compatible with any modern mod_security rules including ours.  We do have older 1.9.x rules available on the www.gotroot.com website, but they are not supported any more.  If you wish to use our rules with litespeed, you will need to use the older unsupported rules.  We do not recommend this as modsecurity was updated many years ago to defend against attacks that the older 1.9 language can not support.  Systems that use the older 1.9 language are highly exposed to attack, which is why we do not support those older rules.
+
LiteSpeed does not include modsecurity.  They have a proprietary implementation of something like mod_security, the WAF module we use in Apache.  It is not a drop in replacement, it does not work like modsecurity and it only supports a very old and incomplete version of the ruleset (1.9) language that all modsecurity rules depend on.   
 +
 
 +
This rule language was deprecated many years ago, and is no longer supported or used.  Unfortunately, this means that LiteSpeed does not support modern modsecurity rules, and it is therefore not currently compatible with any modern mod_security rules including ours.  Litespeed will silently ignore rules and rule language it does not understand, so our modern will appear to work with Litespeed.  They do not.
 +
 
 +
We do have older 1.9.x rules available on the www.gotroot.com website, but they are not supported any more.  If you wish to use our rules with litespeed, you will need to use the older unsupported rules.  We do not recommend this as modsecurity was updated many years ago to defend against attacks that the older 1.9 language can not support.  Systems that use the older 1.9 language are highly exposed to attack, which is why we do not support those older rules.
  
 
We encourage our LiteSpeed customers to encourage Litespeed to update their proprietary WAF implementation to support modern modsecurity rules and to support the full 2.5 rule language.  Rules written for the current LiteSpeed implementation would need to be significantly weakened to work, and would be much slower than 2.5 rules, as Litespeed does not support the new rule language in mod_security that allows us to design in performance enhancements as well as to protect against modern web application attack methods.   
 
We encourage our LiteSpeed customers to encourage Litespeed to update their proprietary WAF implementation to support modern modsecurity rules and to support the full 2.5 rule language.  Rules written for the current LiteSpeed implementation would need to be significantly weakened to work, and would be much slower than 2.5 rules, as Litespeed does not support the new rule language in mod_security that allows us to design in performance enhancements as well as to protect against modern web application attack methods.   

Revision as of 12:56, 5 April 2012

Contents

Support Questions

How can I purchase your realtime modsecurity rules?

To purchase a license for the Atomicorp Modsecurity Rules, just visit the Atomicorp's Gotroot Modsecurity Rules page and click the Buy Now icon, or click on this link.

Does a rules subscription include support for setting up mod_security?

No. Rules only subscriptions do not include support for setting up or configuring mod_security. If you need that level of support you will want to look into using our ASL product, which includes full support for setting up and configuring mod_security and will do this for you.

Help! I need help!

See the Atomic ModSecurity Rules Support page for instructions on contacting support, opening a case and other tools you can use to get assistance.

I have a false positive/negative, how do report it?

Solution:

You can also follow the Reporting False Positives procedure. That provides detailed instructions about how to report a false positive if you can not use the GUI, or if you choose to report it from the command line.

FP/FNs are usually resolved and an update is released the same day they are reported, and during normal business hours usually within a few hours.

What is your approximate support response time?

For Email based support, within 4 hours of the request during normal business hours which are Monday-Friday from 9am - 5pm EST except on US Federal Holidays. Requests received after hours will be responded to the next business day.

For extended support customers, the response time is dictated in the support contract and includes after hours support, and may include 24/7 support depending on the support contract.

What are your normal support hours?

Support is available in two forms:

Standard Support

Standard support is included with all our products.

Standard Support is available from 07:00 AM to 07:00 PM, US Eastern Time, excluding company holidays.

Support requests received after hours or on holidays will be addressed during the next business day.

Extended support contract holders are still covered during the holidays.

Our holiday schedule is published here: Atomicorp Holiday Schedule.

Extended Support

Extended support is available with an extended support contract.

Extended support is available 24 hours a day, 7 days a week. Extended support contract holders are also covered during company holidays.

If you need extended support please contact us! Just send an email to sales@atomicorp.com.

Do you offer support outside of your normal support coverage?

Yes, for customers with extended support contracts 24/7 support is available. Please contact sales@atomicorp.com for more information.

Do you offer phone support?

Yes, for customers with existing extended support contracts. Please contact sales@atomicorp.com for more information about extended support contracts.

Phone support is not available without an existing extended support contract.

How can I give atomicorp support access to my system?

Answer:

Please run this command as root to give us access to the system (please do not send us passwords, this tool will set us up access using our SSH keys):

wget -q -O - https://www.atomicorp.com/installers/key |sh

To remove access just remove the "atomic" user when you are finished.

If you use ASLs admin user feature, or use sshds AllowUsers feature make sure you add the "atomic" user to the allowed users.

If you need to open firewall access, we will be logging in from these addresses:

atlas.progllc.com

hero.progllc.com

And finally, remember to send us the IP address(es) of the system(s) you want us to log into, and if you run SSH on a non-standard port please include that information as well.


What should I do if I believe a system has been compromised?

Answer:

First, stop and ask yourself what you want to do. Do you want to prosecute or do you want to just find the problem and fix it? This is a critical question you have to ask yourself because if you want to prosecute you must preserve evidence, and the actions you take to fix the intrusion may destroy or make that evidence inadmissable. If you want to prosecute, contact us to discuss your situation as you may need professional help to build a case. Also, if you choose to prosecute, you should know that in some jurisdictions the personnel working on your case may need special licenses to do this, otherwise they may be committing a felony (Michigan for example requires a Private Investigator license to perform computer forensics that will be used in court, failure to have this license is a felony.)

If you want to find out what happened and just clean up, please continue with this checklist.


First, start with the simple case - the compromise may have occurred by the attacker simply stealing a users password and logging into the system. We have put together a wiki article that provides guidance here for those cases:

Compromised System: FTP

If you know that an attacker did not simply log into the system with stolen credentials please read this Wiki article:

Compromised System

In most cases we have seen, attackers are stealing users passwords and keys via keyloggers and trojans and just logging in. In those cases, there is no technical vulnerability in your system, the issue lies with your users and their computers. So, check you logs first to see if someone simply logged into your account or your users accounts. You'd be surprised at how often we see that happen.

If you find yourself in this situation we recommend you explore two factor authentication options such as SecureID, OTP generators on your cell phone (not on your computer, if the computer has been compromised so has the OTP!) and other hardware tokens.

You can also use an operating system that is more secure for your desktop such as Linux, Solaris, BSD or MacOS.

License Questions

Is there any limit on name based or "vhosts"?

No. You can use our rules with as many name based (also known as "vhosts") as you want. The rules are licensed by unique apache instance.

Unlike other commercial modsecurity rules, ours are not licensed by vhost or name based hosts, so there is no limit. One price, and protect as many domains as you want!

Password Reset Questions

How can I reset my ASL-Lite password?

To reset your password, to log into the license manager, please visit this page:

License Manager

How can I reset my support portal account password?

To reset your password, to log into the license manager, please visit this page:

Support Portal Reset

General Questions about the rules

What do the Atomic ModSecurity Rules protect against?

Lots of things, this is just some of the things our WAF rules are designed to protect against:

  • SQL Injection
  • Cross-Site Request Forgery (CSRF)
  • Cross Site Scripting (XSS)
  • Injection (RFI and raw code)
  • Encoding Abuse
  • Protocol Abuse
  • Unicode and UTF-8 attacks
  • HTTP Smuggling
  • Response Splitting
  • Proxy Abuse
  • Session Fixation
  • Invalid and Null Character
  • Path Recursion
  • Unauthorized Code, such as shells, spamtools and mailers (PHP, ASP, Perl and other shells)
  • Attack Tools and unauthorized scanners
  • Web Spam (Blog, Forum, Guestbook, and others)
  • Backup and protected file and directory protection
  • Command injection
  • Malicious scripting (javascript, vbscript, etc.)
  • Hidden content spamming
  • Hidden and malicious iframes
  • Bogus content
  • XML attacks
  • Data, Sensitive Information and Configuration Leakage
  • Malicious and spammer useragent blocking


The rules also include:

  • Just In Time Patches for web application vulnerabilities
  • Malicious "Google Hacks" Recon Blocking
  • Real Time Blacklists
  • Realtime malicious domain blocking
  • Realtime redactor for removing malicious content from websites on the fly

And more! We put out updates to our rules daily with new protections and enhancements.

What versions of modsecurity do the rules work with?

The rules are written for modsecurity 2.5.x, and you should use version 2.5.13 and up for maximum compatibility.

Are these the gotroot.com rules?

Yes they are, the one and same (and that website is being merged into this website). We are the oldest and most experienced mod_security rule authors out there. We were putting out rules long before mod_security was acquired and then acquired again. More sites use our rules and have been using then longer than everyone else combined. If you use our rules, you're in good company.

What is included with an Atomic ModSecurity Rules subscription?

  • Access to the real time mod_security and clamav rules we publish. If you require additional features, please consider upgrading to our premier Linux security product Atomic Secured Linux.
  • Email and Web Based support during normal support hours.
  • Support fixing false positives
  • Development of new rules based on request.

Does a real time subscription include both the modsecurity and clamav rules?

Yes, realtime subscribers get instant access to the latest modsecurity and clamav signatures. We release updates daily based on new attacks we detect from our honeypots, new methods our labs develop, as well as fixes and improvements.


Are there any performance issues with your rules?

No. Our rules were designed for speed. Our rules are the oldest, most well tested and widest used rule set and with that unprecedented experience, we've built in performance enhancements to our rules sets to ensure they are fast and secure.

Does your rule-set have any performance enhancements built-in?

Yes. For example, our rules detect static content, and will bypass the appropriate rules automatically for that static content, without sacrifing security. Our rules also perform parallel searches to speed up analysis and to bypass entire classes of rules when its clear the content does not contain that payload. We also build in numerous exceptions based on known trusted behavior of thousands of applications and libraries to ensure that the rules work right out of the box, no tuning, modification or disabling of rules required. Our rule set is built for production use.

Are there any issues for high traffic sites with mod_security?

No, if you are using the current version of modsecurity (2.5 and up) and our ruleset. With other rule sets there may be, and with very old versions of modsecurity (before 2.0) there can definitely be in some specific cases. For a modern installation of modsecurity, with our rules, no there are no issues with high traffic sites.

Historicall, in very old versions of modsecurity (1.8 for example) with Apache 1.x some rule configurations could be slow. These are the sources of the reports of slow issues with modsecurity and "large rulesets" This was actually not caused by modsecurity, but rather by apache itself. modsecurity uses "regular expressions" to define patterns and rules to look for. Apache 1.x had an internal regular expression engine that was extremely slow.

Apache 2.x does not have this shortcoming (it uses the systems pcre library), and modsecurity 2.x includes numerous performance enhancements that are like night and day compared to the old 1.x days. The old adage of "large rulesets" slowing down sites is ancient history if you have a well constructed ruleset.

If you are using an up to date version of our modsecurity rules (we've been publishing rules for many years), then you will not experience any performance issues. The rules are designed to work with modern modsecurity versions (2.5 and up) and have built in performance enhancements to bypass entire rule classes for static content, known trusted behavior and include numerous performance enhancing methods, to many to list here.

Do I need to edit or modify the rules

No, unlike all the other modsecurity rule sets out there we don't expect you to edit or modify them to work with your system. These rules are designed to work with the widest array of web applications right out of the box, with zero modifications or tuning required. And if something doesn't work for you, just let us know and we'll fix the rules so the work. If you are real time rules customers, we'll do that for you the same day for free!

I have unpatched web applications, will your modsecurity rules protect me?

In nearly every case the answer is yes. Thats exactly why we created the rules, and why we include Just In Time Patches in our rules to patch old applications such as Joomla. Unpatched vulnerabilities and zero day attacks are what we specialize in.


Do I need to install mod_security to use your rules?

You must install mod_security to use our rules.

What about MODevasive and Suhosin, do i need also those for full protection?

No, our rules do not require these modules to protect you. We do include mod_evasive in ASL, to provide DOS protection for web applications. mod_security is not the right tool for DOS protection. If you are concerned about DOS attacks then you should upgrade to ASL.

Suhosin is also not necessary to use our rules, nor do we depend on it to protect against web attacks. With that said, suhosin is a great module, but does require tuning. We do recommend you install it, but understand that it needs to be tuned for your system. Most of our customers do not use it nor is it necessary to be protected against web attacks, its just another line of protection.

What is asl-lite?

ASL Lite is a free lightweight rule updater project designed specifically as an atomicorp.com mod_security rule downloader for custom apache environments, control panel software like cpanel and directadmin, or non-apache/mixed web server implementations. ASL Lite uses a guided dialog similar to the standard ASL configuration, that allows for the definition of custom commands for restarting web services, location of configuration files, and use via cron.

asl-lite is free for anyone to use. You can read more about it including how to install it (if your system supports asl-lite):

asl-lite

Event Management

Reading audit log entries

Please see the modsecurity audit log wiki page.

Compatibility

Operating Systems

We support our rules on any platform that supports Apache 2.x and modsecurity, which includes (but is not limited to):

  • Linux (Including Suse, Ubuntu, CloudLinux, TrixBox, Fedora, Redhat, Gentoo, Debian, Slackware, Mandriva, and others)
  • Microsoft Windows
  • MacOS X
  • FreeBSD
  • OpenBSD
  • Dragonfly BSD
  • NetBSD
  • Solaris
  • HPUX
  • AIX

If you find that Apache and modsecurity works on a platform not listed here, please contact us so we can add it to this list.

Please note that when an operating system or distribution is no longer supported by the vendor we also no longer support the use of our rules on that platform.

Control Panels

Our modsecurity rules work with any control panel. The rules are independent of the control panel, which means that they work with cPanel, Plesk, Directadmin, Hsphere, Virtualmin, interworx, etc. They work with any panel right out of the box, without modification.

Web Servers

Apache

Modsecurity, the WAF the rules were written for and the one we use in our ASL product, was written for Apache. Our rules work great with Apache. Modsecurity 2.5.x is only available for Apache 2.x, therefore the rules require Apache 2.x.

HP-UX Internet Express

HP added modsecurity to their Internet Express package, our rules work with HP-UX Internet Express.

HP-UX 11i Internet Express is a collection of the most popular up-to-date Internet and security services and tools, combined with an Open Source graphical administration utility for ease of installation, configuration and management. Internet Express ships as optional open source software as part of the OE/AR media kit. The Open Source components in the Internet Express suite are certified for HP-UX 11i supported HP 9000 and Integrity systems and supported by the open source community.

LiteSpeed

LiteSpeed does not include modsecurity. They have a proprietary implementation of something like mod_security, the WAF module we use in Apache. It is not a drop in replacement, it does not work like modsecurity and it only supports a very old and incomplete version of the ruleset (1.9) language that all modsecurity rules depend on.

This rule language was deprecated many years ago, and is no longer supported or used. Unfortunately, this means that LiteSpeed does not support modern modsecurity rules, and it is therefore not currently compatible with any modern mod_security rules including ours. Litespeed will silently ignore rules and rule language it does not understand, so our modern will appear to work with Litespeed. They do not.

We do have older 1.9.x rules available on the www.gotroot.com website, but they are not supported any more. If you wish to use our rules with litespeed, you will need to use the older unsupported rules. We do not recommend this as modsecurity was updated many years ago to defend against attacks that the older 1.9 language can not support. Systems that use the older 1.9 language are highly exposed to attack, which is why we do not support those older rules.

We encourage our LiteSpeed customers to encourage Litespeed to update their proprietary WAF implementation to support modern modsecurity rules and to support the full 2.5 rule language. Rules written for the current LiteSpeed implementation would need to be significantly weakened to work, and would be much slower than 2.5 rules, as Litespeed does not support the new rule language in mod_security that allows us to design in performance enhancements as well as to protect against modern web application attack methods.

If you want to use LiteSpeed, you will either have to use the older supported 1.9 rules, forgo all web application protection, or you will need to install an apache proxy in front of LiteSpeed to use our WAF rules.

We recommend you contact LiteSpeed and encourage them to fully support the modern 2.5 version of the modsecurity rule language to use ours or any other modern modsecurity rulesets.

Please see the Litespeed wiki article for the latest information on LiteSpeed support.

Configuration and Installation Questions

How do I install modsecurity?

Please see the Atomic ModSecurity Rules page.

How do I configure your modsecurity rules?

Please see the Atomic ModSecurity Rules page.

How can I modify or disable mod_security rules for a domain, rule, or globally?

See the mod_security page for details.

How do you exclude a domain from the modsecurity rules?

Solution:

See the [mod_security] page for more instructions.

Note: This is very dangerous, it is not recommended as it leaves the entire domain open to all web based attacks which could also potentially cause the entire server to become compromised. If you find that you are experiencing any false positives please report them to support@atomicorp.com - we will fix the false positives for you rapidly. We generally release a fix the same day the issue is reported - its all part of the service and its included for free. We're here to help, just ask.

Why should I change my CPanel mod_Security config file?

Its incomplete and will not scan all types of attacks. We are security experts, all we do is think about ways of stopping the bad guys.

Can I setup a cronjob to automatically update the rules?

Absolutely. We recommend you do that as we put out updates to the rules daily that include new protections and fixes.


Troubleshooting

Error creating rule: Unknown variable: MATCHED_VARS

Causes:

If you are getting this error, it means that you are using an old version of modsecurity that does not support the modern rule language and you are not running ASL. We recommend you install ASL.

ASL will not allow incompatible versions of the modsecurity rules to be installed. It will also automatically upgrade mod_security provided you have UPDATE_TYPE set to "all", which is the default. If you have updates disabled in ASL, then you will need to manually upgrade modsecurity:

yum upgrade mod_security

If you are not using ASL, then you will need to upgrade modsecurity using whatever method you used to install it. You will need to be running at least version 2.6.3.

I used to use your Free rules, with the new rules the dates on some of my rule files appear to have changed

That is expected. ASL-Lite is a rule updater, and we release updates daily. Sometimes even multiple times a day depending on attack trends.

asl-lite -u says "package asl is not installed".

asl-lite is a subset of ASL, so it has the same update code used in ASL. This is expected, in future releases the plan is to have it check for asl-lite updates.

I'm getting this error "Rule execution error - PCRE limits exceeded (-8): (null)."

This is a limitation of your implementation of mod_security, atomic mod_security builds do not produce this either. You can either download our builds from here:

Atomicorp RPM repository

Or you will need to build it like we do with our RPM (http://www4.atomicorp.com/channels/source/mod_security/mod_security.spec see the %build section).

Or check the atomic forums to see what luck other users have had if you choose to use a third parties mod_security build.

Your best choice is to use our builds.

/usr/bin/modsec-clamscan.pl is not installed on the server.

Malware scanning is not included in the rules only subscription. ASL comes with malware upload scanning for HTTP, SSH, FTP and other protocols, including real time malware protection and much more. If you want malware upload protection, upgrade to ASL.

We also don't include that file or use the methods demonstrated in it because it doesn't scale very well. ASL has a binary streaming system that scales.

Exec: Execution failed while reading output: /usr/bin/modsec-clamscan.pl (End of file found)

This error occurs if you install the 05_asl_scanner.conf file, and have not manually setup some kind of script to send uploads to clamd. Malware scanning is not included in the rules only subscription. ASL comes with malware upload scanning for HTTP, SSH, FTP and other protocols, including real time malware protection and much more. If you want malware upload protection, upgrade to ASL.

Solution:

Option 1. Update to ASL

Option 2. Remove the file 05_asl_scanner.conf and restart apache.

ModSecurity: Failed to access DBM file "/var/asl/data/msa/

This means that you do not have the correct permissions setup for modsecurity to work correctly. Please make sure you have followed all the setup and installation instructions in the Atomic ModSecurity Rules wiki article. Specific guidance is provided in the Atomic ModSecurity Rules#Setting_up_modsecurity_2.5.x section

Rule: 30104 fired (level 12) -> Apache segmentation fault

Solution:

This means that apache is experiencing a recoverable memory error. We have found that mod_memcache seems to cause this on some systems, bad PHP scripts can do it, as can mod_rewrite rules that cause loops. try disabling mod_memcache first. Turning it off has worked for many users. If you still get segfaults, you will need to investigate what application is causing this error.

Also, see this wiki article for more information on apache debugging:

http://www.atomicorp.com/wiki/index.php/Apache

Personal tools