LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > [BUG?] Litespeed + ModSec2

Reply
 
Thread Tools Display Modes
  #11  
Old 12-07-2010, 02:12 PM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
Any help? George? NiteWave? webizen?
Reply With Quote
  #12  
Old 12-07-2010, 09:21 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Looks like a bug with handling rule actions.
you add actions to those rules, without "deny" action, lsws default to allow, while apache may use SecDefaultAction.
You can explicitly add "deny" to the rule action for now.
Reply With Quote
  #13  
Old 12-08-2010, 02:37 AM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
Quote:
Originally Posted by mistwang View Post
Looks like a bug with handling rule actions.
you add actions to those rules, without "deny" action, lsws default to allow, while apache may use SecDefaultAction.
You can explicitly add "deny" to the rule action for now.
Yes all rules that I've wrote and even from gotroot.com are mostly without "deny" at rule line as you told.
I am now add that "deny" action to all rules.
But while litespeed included "Deny" as "SecDefaultAction", I believe that would be more nice
So the issue has SOLVED! George is the master
Reply With Quote
  #14  
Old 12-08-2010, 06:36 AM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
Added "deny" just like rules below but still lsws bypassing the rules

-------------------------------------------------------------
SecRule REQUEST_URI|REQUEST_FILENAME "[A-Z|a-z|0-9]\.(cgi|pl|plx|ppl|perl)\?" "id:123456,rev:1,severity:2,msg:'PERL-CGI-1',deny"
SecRule REQUEST_URI|REQUEST_FILENAME "[A-Z|a-z|0-9]\.(cgi|pl|plx|ppl|perl)" "id:234567,rev:1,severity:2,msg:'PERL-CGI-2,deny'"
-------------------------------------------------------------

Switch to apache make domain.com/asdf.pl have forbidden access as it should be.
Not yet resolved
Reply With Quote
  #15  
Old 12-08-2010, 09:52 AM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
Another update :
**************

Include "/usr/local/apache/conf/modsec2.whitelist.conf" is ignored too.
The file is used to white list allowed path for an example :
-----------------------------------------------------------
<LocationMatch "/cgi-sys/suspendedpage.cgi">
SecRuleRemoveById 123456 234567
</LocationMatch>
-----------------------------------------------------------


While with the modsec2 rule :
----------------------------------------------------------
SecRule REQUEST_URI|REQUEST_FILENAME "[A-Z|a-z|0-9]\.(cgi|pl|plx|ppl|perl)" "id:234567,rev:1,severity:2,msg:'PERL-CGI-2',deny'"
----------------------------------------------------------

Lsws still deny/forbidden the white list path for /cgi-sys/suspendedpage.cgi
And apache did allow accessing white list the path as it should be.


The conclusion is : this is the real lsws bug that should get fix a.s.a.p.
Modsec2 is very important thing that must be instaled on all of shared hosting server.
Reply With Quote
  #16  
Old 12-08-2010, 12:43 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
SecRuleRemoveById is not support in 4.0.x, will be supported in 4.1
Reply With Quote
  #17  
Old 12-08-2010, 12:44 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
solution now, is to use a "chain" secrule to exclude URL "/cgi-sys/suspendedpage.cgi"
Reply With Quote
  #18  
Old 12-10-2010, 12:58 PM
DraCoola DraCoola is offline
Senior Member
 
Join Date: Mar 2009
Posts: 149
I will try to put "chain" to the rules with "!ARGS" to get an exclusion path.
But the newest 4.0.18 sounds very tasty on the change log

I hope "Improved mod_security compatibility" on that 4.0.18 were also "SecRuleRemoveById" recognition and "SecDefaultAction deny" included
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:50 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.