LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-02-2012, 04:05 AM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
mod_security denies w3c validation service


Hello,
On one of my servers I'am using mod_security with the standard rules.

It blocks w3c validation service: http://validator.w3.org/

In the logs I get:
Quote:
[Thu Aug 02 11:59:11 2012] [error] [client 128.30.52.70] ModSecurity: Access denied with code 403 (phase 2). Operator EQ matched 0 at REQUEST_HEADERS. [file "/etc/apache2/modsec/base_rules/modsecurity_crs_21_protocol_anomalies.conf"] [line "46"] [id "960015"] [rev "2.1.1"] [msg "Request Missing an Accept Header"] [severity "CRITICAL"] [tag "PROTOCOL_VIOLATION/MISSING_HEADER_ACCEPT"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [hostname "www.myhost-here.com"] [uri "/cam-2012/"] [unique_id "UBpBX38AAQEAAGVrAWAAAAAA"]
In modsecurity_crs_10_config.conf before the inclusion of the modsecurity_crs_21_protocol_anomalies.conf I tried the following rule with no success: SecRule HTTP_User-Agent "W3C-checklink" allow,ctl:ruleEngine=Off


How can I allow w3c validator?

Thanks
 
Old 08-02-2012, 06:11 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ddaas View Post
I tried the following rule with no success
Wouldn't that allow anyone with the "W3C-checklink" UA set ('curl -A "W3C-checklink"') to bypass your WAF? (Kind of odd BTW seeing the request missing an Accept header, esp. from a validation service, unless it's part of the testing.) How about a line "SecRule REMOTE_ADDR "^128\.30\.52\.70$" "phase:1,t:none,nolog,pass,ctl:ruleRemoveById=960015""?* That would at least limit removal to only krusty.w3.org and markup1.w3.org and only this particular rule. Not that I'm a WAF guru though.
 
  


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
LXer: SourceForge Denies Service for "Rogue" Nations LXer Syndicated Linux News 0 01-26-2010 03:20 PM
W3C log parser acedreds Linux - Software 0 10-16-2008 03:10 PM
LXer: Why Comply? The Movement To W3C Compliance LXer Syndicated Linux News 0 04-01-2006 07:54 AM
apache+w3c validator problem diptanshu Linux - Software 0 07-13-2005 01:26 AM
w3c validator diptanshu Linux - Software 1 07-12-2005 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:34 PM.

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