store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Sat May 25, 2013 6:22 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 
Author Message
 Post subject: Checking rule class settings
Unread postPosted: Tue Mar 20, 2012 12:18 pm 
Offline
Forum User
Forum User

Joined: Mon Jan 15, 2007 2:03 am
Posts: 40
Hi I noticed I have some ruleset's turned off, with a "HIGH" notice, for instance "Advanced Attack Ruleset". Not sure how those got turned off and is this something I should be concerned about?

Checking rule class settings
RBL Ruleset: off [LOW]
Antievasion Ruleset: on [OK]
Strict Multiform Ruleset: off [MODERATE]
Whitelist Ruleset: off [OK]
Antievasion Ruleset: off [HIGH]
Advanced Antievasion Ruleset: off [HIGH]
Exclude Ruleset: on [OK]
Anti-Malware Ruleset: on [OK]
Generic Attack Ruleset: on [OK]
Advanced Attack Ruleset: off [HIGH]
Data Loss Protection Ruleset: off [MODERATE]
Brute Force Protection Ruleset: on [OK]
Malicious Useragents Ruleset: on [OK]
Anti-Spam Ruleset: on [OK]
Anti-Spam URI RBL Ruleset: off [LOW]
Rootkit Detection Ruleset: on [OK]
Reconnaissance Attacks Ruleset: on [OK]
Data Leak Prevention Ruleset: on [OK]
Just In Time Patches: on [OK]
Malicious Output Removal Ruleset: off [MODERATE]
Malicious Output Detector: on [OK]
Web Malware Upload Scanner: on [OK]


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Tue Mar 20, 2012 6:01 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3249
Location: Chantilly, VA
These rulesets:

Strict Multiform Ruleset: off [MODERATE]
Advanced Attack Ruleset: off [HIGH]
Data Loss Protection Ruleset: off [MODERATE]

Are not enabled by default in ASL, so if you didnt enable them that may be why they are disabled.

Do you know if you disabled or enabled them?

You aren't in bad shape if you leave them disabled, but you will be able to combat more advanced attacks if you enable them. They shouldnt generate any false positives, but in the past some platforms and older clients had some difficulty with these rules.

These rulesets:

Antievasion Ruleset: off [HIGH]
Advanced Antievasion Ruleset: off [HIGH]

Require at least modsecurity version 2.6.3. ASL will try to upgrade modsecurity, if its configured to do so. Can you tell me what version of ASL you have installed, and what version of mosecurity?

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Thu Mar 22, 2012 7:52 pm 
Offline
Forum User
Forum User

Joined: Mon Jan 15, 2007 2:03 am
Posts: 40
Hi thanks for the thorough helpful response as always :) I did not turn on/off these rulesets so it's all default settings and upgrades since ASL 2 about 3 years ago I'd say.

I am running:
ASL Version 3.0.21: CentOS 5 (SUPPORTED)

I'm not sure how to check mod_security version, although it looks like at least 2 from the httpd/modules directory.

I'm fairly new to mod_security so any help on activating these would be appreciated. As long as there is not a huge performance hit or a high amount of false positives I don't see any reason to not do it.


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Fri Mar 23, 2012 5:16 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
zonathen wrote:
I'm not sure how to check mod_security version


Ask your package manager:

Code:
rpm -q mod_security

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Mon Mar 26, 2012 8:46 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
OK, I'm in a similar situation with a new, clean install under EL6

Here's what gets configured, using the ASL installer script, out of the box:

Code:
MODSEC_00_ANTIEVASION="yes"
MODSEC_00_STRICT="no"
MODSEC_00_WHITELIST="no"
MODSEC_00_RBL="no"
MODSEC_00_AE_RULES="no"
MODSEC_01_RULES="no"
MODSEC_10_ANTIMALWARE="yes"
MODSEC_10_RULES="yes"
MODSEC_11_ADV_RULES="no"
MODSEC_11_DLP="no"
MODSEC_12_BRUTE="yes"
MODSEC_20_USERAGENTS="yes"
MODSEC_30_ANTISPAM="yes"
MODSEC_31_ANTISPAM_URI="no"
MODSEC_50_ROOTKITS="yes"
MODSEC_60_RECONS="yes"
MODSEC_61_RECONS_DLP="yes"
MODSEC_99_JITP="yes"
MODSEC_99_REDACTOR="yes"
MODSEC_99_MALWARE_OUTPUT="yes"
MODSEC_99_SCANNER="yes"


This default config corresponds with what zonathen is seeing, as my asl -s output is the same as his with the above configuration.

# rpm -qa mod_security
mod_security-2.6.5-1.el6.art.x86_64

# rpm -qa asl
asl-3.0.21-1.el6.art.x86_64


Incidentally, it is very hard to match some of the rule configuration options in the config file to the output of asl -s

For example:
MODSEC_01_RULES="no" means nothing much to me. No idea which ruleset this refers to from its name.
MODSEC_00_AE_RULES="no" -- I'm guessing it is ADVANCED anti-evasion since we already have MODSEC_00_ANTIEVASION="yes" but in that case it would have been nice to name it AAE or something.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Mon Mar 26, 2012 8:56 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
And moving on, I know that I don't want to enable MODSEC_00_RBL because it will cause too many false positives (and potentially slow-downs)

What other rules should we really not turn on for production servers?

MODSEC_31_ANTISPAM_URI involves an rbl lookup, for example.

There's nothing in the wiki or KB that I can see with any references to help with this.

Any hints would be appreciated

Thanks,

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Mon Mar 26, 2012 3:33 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3249
Location: Chantilly, VA
Quote:
MODSEC_31_ANTISPAM_URI involves an rbl lookup, for example.

There's nothing in the wiki or KB that I can see with any references to help with this.


And thats on purpose. The lesson we learned from the RBL rules was that some folks were just blindly turning everything on, and then reporting (or loudly complaining to the whole world on other forums, sigh... why do people do that when all they have to do is ask for help, its free afterall) that their sites were slow. And we don't want that.

So consider this ruleset a super duper secret easter egg for those that ask! :-)

Now that you have asked, that will look up URIs in POSTS (as opposed to IPs) to see if they are known to be spammy. Its pretty spiffy. It will need a nice quick DNS server because its totally blocking code, it will look up the URL and will wait for the DNS to return a result before it will pass on the POST to the application to process. So if you have a slow DNS server, or the DNSBL is slow then the application will appear to be slow. Neither the app, WAF or apache will actually be slow, they will just be waiting for a DNS reply. Twittling their proverbial thumbs and whistling into the wind until they get an answer, thumbs up or down.

The long term plan with all DNS based rules it to include a highspeed RBL-DNS with ASL to manage all the requests, and to store local copies of the zones where possible to "eliminate" the speed issues (there will still be a small penalty, because its still got to make the request, but it will be fractional compared to a remote request with a normal RBL).

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Fri Jul 13, 2012 8:57 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
faris wrote:
MODSEC_01_RULES="no" means nothing much to me. No idea which ruleset this refers to from its name.
MODSEC_00_AE_RULES="no" -- I'm guessing it is ADVANCED anti-evasion since we already have MODSEC_00_ANTIEVASION="yes" but in that case it would have been nice to name it AAE or something.


I have MODSEC_00_AE_RULES & MODSEC_00_ANTIEVASION set to on, but in ASL Scan "Advanced Antievasion Ruleset" is still OFF. Additionally, I have two identical "Antievasion Ruleset" in the scan results, which is confusing.

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
 Post subject: Re: Checking rule class settings
Unread postPosted: Wed Jul 18, 2012 7:31 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
which exact setting needs to be switched to turn "Advanced Antievasion Ruleset" ON ?

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 9 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group