mod-security-users Mailing List for ModSecurity (Page 565)
Brought to you by:
victorhora,
zimmerletw
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(17) |
Aug
(7) |
Sep
(8) |
Oct
(11) |
Nov
(14) |
Dec
(19) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(46) |
Feb
(14) |
Mar
(20) |
Apr
(48) |
May
(15) |
Jun
(20) |
Jul
(36) |
Aug
(24) |
Sep
(31) |
Oct
(28) |
Nov
(23) |
Dec
(12) |
| 2005 |
Jan
(69) |
Feb
(61) |
Mar
(82) |
Apr
(53) |
May
(26) |
Jun
(71) |
Jul
(27) |
Aug
(52) |
Sep
(28) |
Oct
(49) |
Nov
(104) |
Dec
(74) |
| 2006 |
Jan
(61) |
Feb
(148) |
Mar
(82) |
Apr
(139) |
May
(65) |
Jun
(116) |
Jul
(92) |
Aug
(101) |
Sep
(84) |
Oct
(103) |
Nov
(174) |
Dec
(102) |
| 2007 |
Jan
(166) |
Feb
(161) |
Mar
(181) |
Apr
(152) |
May
(192) |
Jun
(250) |
Jul
(127) |
Aug
(165) |
Sep
(97) |
Oct
(135) |
Nov
(206) |
Dec
(56) |
| 2008 |
Jan
(160) |
Feb
(135) |
Mar
(98) |
Apr
(89) |
May
(115) |
Jun
(95) |
Jul
(188) |
Aug
(167) |
Sep
(153) |
Oct
(84) |
Nov
(82) |
Dec
(85) |
| 2009 |
Jan
(139) |
Feb
(133) |
Mar
(128) |
Apr
(105) |
May
(135) |
Jun
(79) |
Jul
(92) |
Aug
(134) |
Sep
(73) |
Oct
(112) |
Nov
(159) |
Dec
(80) |
| 2010 |
Jan
(100) |
Feb
(116) |
Mar
(130) |
Apr
(59) |
May
(88) |
Jun
(59) |
Jul
(69) |
Aug
(67) |
Sep
(82) |
Oct
(76) |
Nov
(59) |
Dec
(34) |
| 2011 |
Jan
(84) |
Feb
(74) |
Mar
(81) |
Apr
(94) |
May
(188) |
Jun
(72) |
Jul
(118) |
Aug
(109) |
Sep
(111) |
Oct
(80) |
Nov
(51) |
Dec
(44) |
| 2012 |
Jan
(80) |
Feb
(123) |
Mar
(46) |
Apr
(12) |
May
(40) |
Jun
(62) |
Jul
(95) |
Aug
(66) |
Sep
(65) |
Oct
(53) |
Nov
(42) |
Dec
(60) |
| 2013 |
Jan
(96) |
Feb
(96) |
Mar
(108) |
Apr
(72) |
May
(115) |
Jun
(111) |
Jul
(114) |
Aug
(87) |
Sep
(93) |
Oct
(97) |
Nov
(104) |
Dec
(82) |
| 2014 |
Jan
(96) |
Feb
(77) |
Mar
(71) |
Apr
(40) |
May
(48) |
Jun
(78) |
Jul
(54) |
Aug
(44) |
Sep
(58) |
Oct
(79) |
Nov
(51) |
Dec
(52) |
| 2015 |
Jan
(55) |
Feb
(59) |
Mar
(48) |
Apr
(40) |
May
(45) |
Jun
(63) |
Jul
(36) |
Aug
(49) |
Sep
(35) |
Oct
(58) |
Nov
(21) |
Dec
(47) |
| 2016 |
Jan
(35) |
Feb
(81) |
Mar
(43) |
Apr
(41) |
May
(77) |
Jun
(52) |
Jul
(39) |
Aug
(34) |
Sep
(107) |
Oct
(67) |
Nov
(54) |
Dec
(20) |
| 2017 |
Jan
(99) |
Feb
(37) |
Mar
(86) |
Apr
(47) |
May
(57) |
Jun
(55) |
Jul
(34) |
Aug
(31) |
Sep
(16) |
Oct
(49) |
Nov
(53) |
Dec
(33) |
| 2018 |
Jan
(25) |
Feb
(11) |
Mar
(79) |
Apr
(77) |
May
(5) |
Jun
(19) |
Jul
(17) |
Aug
(7) |
Sep
(13) |
Oct
(22) |
Nov
(13) |
Dec
(68) |
| 2019 |
Jan
(44) |
Feb
(17) |
Mar
(40) |
Apr
(39) |
May
(18) |
Jun
(14) |
Jul
(20) |
Aug
(31) |
Sep
(11) |
Oct
(35) |
Nov
(3) |
Dec
(10) |
| 2020 |
Jan
(32) |
Feb
(16) |
Mar
(10) |
Apr
(22) |
May
(2) |
Jun
(34) |
Jul
(1) |
Aug
(8) |
Sep
(36) |
Oct
(16) |
Nov
(13) |
Dec
(10) |
| 2021 |
Jan
(16) |
Feb
(23) |
Mar
(45) |
Apr
(28) |
May
(6) |
Jun
(17) |
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
(35) |
Nov
|
Dec
(5) |
| 2022 |
Jan
|
Feb
(17) |
Mar
(23) |
Apr
(23) |
May
(9) |
Jun
(8) |
Jul
|
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(16) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2024 |
Jan
(7) |
Feb
(13) |
Mar
(18) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(5) |
Dec
(3) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(12) |
Jun
(2) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ivan R. <iv...@we...> - 2005-03-10 09:43:25
|
Ann Hopkins wrote: > DOCUMENTATION: > SecFilterCheckCookieFormat Off Since 1.8.7 the SecFilterCheckCookieFormat directive does nothing (read about it in the manual). I don't see this changing in the future. > (Includes HEAD and a semicolon at the end) > # Only accept request encodings we know how to handle > # we exclude GET requests from this because some (automated) > # clients supply "text/html" as Content-Type > SecFilterSelective REQUEST_METHOD "!^(GET|HEAD)$" chain > SecFilterSelective HTTP_Content-Type \ > "!(^application/x-www-form-urlencoded$|^multipart/form-data;)" This is better. HTTP clients are not required to send a Content-Type header when HEAD is used. The semicolon at the end is not very important - I am yet to encounter a valid HTTP client that does not use it. > Also is default status code 403 (forbidden) a better choice than 500 > (server bad) as I have seen 500 recommended in an article. They are the same. 500 is somewhat "more stealthy" because it could be interpreted as internal error (and error often occur when someone is trying to hack). 403 implies the web server determined the request may be bad in some way. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Ivan R. <iv...@we...> - 2005-03-10 08:54:36
|
Mark wrote: >>>Does this version contain the functionality for >>>"SecFilterExternal" ? >> >> No, that's still in the development branch. > > > Hmm, interesting; :) Would that be like a sendmail > program map? Might come with a performance penalty, > but still. It's a way to execute external scripts and have them inspect the request. There will certainly be a performance penalty associated with the execution but it should be good enough for the casual blogger who wants to fight blog spam. BTW, at some point in the future I will expose the mod_security functionality so that other Apache modules can use its services. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Ivan R. <iv...@we...> - 2005-03-10 08:50:56
|
Thomas B=F6rnert wrote: > Hi List, >=20 > I've a problem with the following URL: >=20 > http://www.domain.de/module/lauftext.swf?text=3D%3Cb%3ENeu%3A+F%C3%B6rd= er- > +und+Siebrinnen+VCS%3C%2Fb%3E+-+Sch%C3%BCttg%C3%BCter+kostensparend > +transportieren&link=3Dverfahrenstechnik%2Frinnen%2Fvcs%2F%3Fde >=20 > i found no "." and no "\n" in the URL. Why matches mod_security > this URL by this Rule ? That's because . is a special character in regular expressions, and stands for any one character (except for \n in some cases). In your case the rule matched <b> [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Checking against "/module/lauftext.swf?text=3D<b>Neu: F\xc3\xb6rder- und Siebrinne= n VCS</b> - Sch\xc3\xbcttg\xc3\xbcter kostensparend transportieren&link=3Dverfahrenstechnik/rinnen/vcs/?de" See here for more information about regular expressions: http://www.pcre.org/ --=20 Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Ann H. <sea...@ha...> - 2005-03-10 00:52:21
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is just a question between the difference between the recommended minimum configuration in the documentation and the minimum configuration for httpd.conf in the distribution. DOCUMENTATION: SecFilterCheckCookieFormat Off (Includes HEAD and a semicolon at the end) # Only accept request encodings we know how to handle # we exclude GET requests from this because some (automated) # clients supply "text/html" as Content-Type SecFilterSelective REQUEST_METHOD "!^(GET|HEAD)$" chain SecFilterSelective HTTP_Content-Type \ "!(^application/x-www-form-urlencoded$|^multipart/form-data;)" DISTRIBUTION COPY: SecFilterCheckCookieFormat On # Only accept request encodings we know how to handle # we exclude GET requests from this because some (automated) # clients supply "text/html" as Content-Type SecFilterSelective REQUEST_METHOD "!^GET$" chain SecFilterSelective HTTP_Content-Type "!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)" Also is default status code 403 (forbidden) a better choice than 500 (server bad) as I have seen 500 recommended in an article. Thanks, Beginning mod_security user and small-time webmaster Ann -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCL5o7hs7JGk93PT0RAg9bAKC2OiKsymYvmLidX8ksOKMvF4Ua4gCguJas VqTQ0A38mJmSdKSXlAl4Hc0= =l8el -----END PGP SIGNATURE----- |
|
From: Thomas <tb...@tb...> - 2005-03-09 22:03:46
|
Hi List, I've a problem with the following URL: http://www.domain.de/module/lauftext.swf?text=%3Cb%3ENeu%3A+F%C3%B6rder- +und+Siebrinnen+VCS%3C%2Fb%3E+-+Sch%C3%BCttg%C3%BCter+kostensparend +transportieren&link=verfahrenstechnik%2Frinnen%2Fvcs%2F%3Fde the debug shows [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Signature check returned 0 [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Checking signature "<(.|\\n)+>" at THE_REQUEST [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Checking against "/module/lauftext.swf?text=<b>Neu: F\xc3\xb6rder- und Siebrinnen VCS</b> - Sch\xc3\xbcttg\xc3\xbcter kostensparend transportieren&link=verfahrenstechnik/rinnen/vcs/?de" [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Signature check returned 500 [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Access denied with code 500. Pattern match "<(.|\\n)+>" at THE_REQUEST [09/Mar/2005:22:53:17 +0100] [www.domain.de/sid#8269140][rid#830cd88][/module/lauftext.swf] Rule match, returning code 500 i found no "." and no "\n" in the URL. Why matches mod_security this URL by this Rule ? Many thanks for help. -Thomas |
|
From: Mark <ad...@as...> - 2005-03-09 11:31:30
|
> -----Original Message-----
> From: mod...@li...
> [mailto:mod...@li...] On
> Behalf Of Ivan Ristic
> Sent: woensdag 9 maart 2005 12:18
> To: mod...@li...
> Subject: Re: [mod-security-users] [ANNOUNCE] ModSecurity
> 1.8.7 has been released
>
>
> Spence, Ian (ELS-CAM) wrote:
> > Ivan,
> >
> > Does this version contain the functionality for
> > "SecFilterExternal" ?
>
> No, that's still in the development branch.
Hmm, interesting; :) Would that be like a sendmail
program map? Might come with a performance penalty,
but still.
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx
|
|
From: Ivan R. <iv...@we...> - 2005-03-09 11:17:22
|
Spence, Ian (ELS-CAM) wrote: > Ivan, > > Does this version contain the functionality for "SecFilterExternal" ? No, that's still in the development branch. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Spence, I. (ELS-CAM) <I.S...@El...> - 2005-03-09 11:14:55
|
Ivan,
Does this version contain the functionality for "SecFilterExternal" ?
Regards,
Ian Spence
-----Original Message-----
From: mod...@li...
[mailto:mod...@li...] On Behalf Of Ivan
Ristic
Sent: 09 March 2005 09:54
To: mod...@li...
Subject: [mod-security-users] [ANNOUNCE] ModSecurity 1.8.7 has been released
ModSecurity 1.8.7 has been released. It is available for immediate download
from:
http://www.modsecurity.org/download/
This release brings a mixture of small bug fixes, one minor security fix,
and minor enhancements. Cookie parsing has been enhanced.
ModSecurity now has two cookie parsers, one for each major version of the
specification. Failures to execute external scripts are now properly logged.
If the approver script is missing or not working the request is now
rejected. A bug that allows attacker to bypass some of the checks is now
fixed.
About ModSecurity
-----------------
ModSecurity is a web application firewall, designed to protect vulnerable
applications and reject manual and automated attacks.
It is an open source intrusion detection and prevention system. It can work
embedded in Apache, or as a standalone security device when configured to
work as part of an Apache-based reverse proxy.
Optionally, ModSecurity creates application audit logs, which contain the
full request body in addition to all other details. Requests are filtered
using regular expressions. Some of the things possible are:
* Apply filters against any part of the request (URI,
headers, either GET or POST)
* Apply filters against individual parameters
* Reject SQL injection attacks
* Reject Cross site scripting attacks
* Store the files uploaded through the web server, and have them
checked by external scripts
With few general rules ModSecurity can protect from both known and unknown
vulnerabilities. A Java version is also available, which works with any
Servlet 2.3 compatible web server.
Changes (v1.8.7)
----------------
* Stefan Esser discovered a trivial way to craft request to sneak
in the request parameters that are in the request body past the
named parameter syntax (e.g. ARG_name). Non-selective filtering
(SecFilter), other variables (e.g. THE_REQUEST, ARGS, POST_PAYLOAD),
and the audit log worked fine. Fixed.
* Stefan Esser also pointed out PHP parses cookies differently from
mod_security, and demonstrated a way to exploit the differences
to sneak in a cookie past the named cookie syntax (e.g. COOKIE_name).
So I decided to add another cookie parser to mod_security. A new
directive, SecFilterCookieFormat, determines which parser is used.
Possible values are 0 (default, for Netscape-style cookies, aka
version 0) and 1 (for RFC 2965 aka version 1 cookies). Without
spending more time on research (to determine how different platforms
parse cookies) -- which is on my TODO list -- I can't give a
definitive answer whether the COOKIE_name syntax is good enough. It
should be, but if you are very paranoid you may choose to use the
HTTP_Cookie syntax to examine the whole cookie header. Look for more
details in the documentation. As a consequence of the recent changes,
the SecFilterCheckCookieFormat directive is now obsolete and has
no effect.
* BUG Request error messages are now escaped properly when logged
to the audit log.
* BUG (Apache 2 only) Failure to execute external scripts is now
properly detected and logged.
* BUG If the approver script does not exist the file is rejected.
* BUG (Apache 2 only) Made the allow action work with output
filtering.
* BUG (Apache 2 only) Warning messages (e.g. "log,pass") did
not get logged in output filtering.
* Cookie normalization is now off by default (as was stated in the
documentation previously).
* BUG (Apache 2 only) The audit logging code can cause a segfault
when it isn't explicitly configured in the configuration, and
the main handler does not run for some reason. Fixed.
* BUG (Apache 2 only) Fixed a bug in the code that handles the exec
action, which would sometimes cause a segfault (when an external
script is executed).
--
Ivan Ristic
Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web
application firewall - http://www.modsecurity.org
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
mod-security-users mailing list
mod...@li...
https://lists.sourceforge.net/lists/listinfo/mod-security-users
|
|
From: Ivan R. <iv...@we...> - 2005-03-09 10:19:42
|
Here's another post that addresses the issues inherent to external web application protection. (It also explains why I changed cookie parsers in a minor release.) External Web Application Protection: Impedance Mismatch http://www.modsecurity.org/blog/archives/000053.html -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Ivan R. <iv...@we...> - 2005-03-09 10:16:06
|
Mark wrote: > > But I already downloaded 1.8.7 on the 6th. Is this still the > same release? Yes it is. I just couldn't find the time to write & send the announcements sooner. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Mark <ad...@as...> - 2005-03-09 10:12:57
|
> -----Original Message-----
> From: mod...@li...
> [mailto:mod...@li...] On
> Behalf Of Ivan Ristic
> Sent: woensdag 9 maart 2005 11:07
> To: mod...@li...
> Subject: Re: [mod-security-users] [ANNOUNCE] ModSecurity
> 1.8.7 has been released
>
>
> Gerwin Krist -|- Digitalus Webhosting wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Great ivan :) Will do some testing ....
>
> Maybe next time I can notify you *before* I make a release
> for testing? :)
Great!
But I already downloaded 1.8.7 on the 6th. Is this still the
same release?
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx
|
|
From: Ivan R. <iv...@we...> - 2005-03-09 10:06:35
|
Gerwin Krist -|- Digitalus Webhosting wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Great ivan :) Will do some testing .... Maybe next time I can notify you *before* I make a release for testing? :) Speaking of which, if there's anyone interested to give a RC release a quick compile and test drive please let me know. I still test only on Linux. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Gerwin K. -|- D. W. <ge...@di...> - 2005-03-09 10:02:53
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Great ivan :) Will do some testing .... Ivan Ristic wrote: | | ModSecurity 1.8.7 has been released. It is available for immediate | download from: | | http://www.modsecurity.org/download/ | | This release brings a mixture of small bug fixes, one minor security | fix, and minor enhancements. Cookie parsing has been enhanced. | ModSecurity now has two cookie parsers, one for each major version of | the specification. Failures to execute external scripts are now properly | logged. If the approver script is missing or not working the request is | now rejected. A bug that allows attacker to bypass some of the checks is | now fixed. | | | About ModSecurity | ----------------- | ModSecurity is a web application firewall, designed to protect | vulnerable applications and reject manual and automated attacks. | It is an open source intrusion detection and prevention system. It | can work embedded in Apache, or as a standalone security device when | configured to work as part of an Apache-based reverse proxy. | | Optionally, ModSecurity creates application audit logs, which contain | the full request body in addition to all other details. Requests are | filtered using regular expressions. Some of the things possible are: | | * Apply filters against any part of the request (URI, | headers, either GET or POST) | * Apply filters against individual parameters | * Reject SQL injection attacks | * Reject Cross site scripting attacks | * Store the files uploaded through the web server, and have them | checked by external scripts | | With few general rules ModSecurity can protect from both known | and unknown vulnerabilities. A Java version is also available, which | works with any Servlet 2.3 compatible web server. | | | Changes (v1.8.7) | ---------------- | | * Stefan Esser discovered a trivial way to craft request to sneak | in the request parameters that are in the request body past the | named parameter syntax (e.g. ARG_name). Non-selective filtering | (SecFilter), other variables (e.g. THE_REQUEST, ARGS, POST_PAYLOAD), | and the audit log worked fine. Fixed. | | * Stefan Esser also pointed out PHP parses cookies differently from | mod_security, and demonstrated a way to exploit the differences | to sneak in a cookie past the named cookie syntax (e.g. COOKIE_name). | So I decided to add another cookie parser to mod_security. A new | directive, SecFilterCookieFormat, determines which parser is used. | Possible values are 0 (default, for Netscape-style cookies, aka | version 0) and 1 (for RFC 2965 aka version 1 cookies). Without | spending more time on research (to determine how different platforms | parse cookies) -- which is on my TODO list -- I can't give a | definitive answer whether the COOKIE_name syntax is good enough. It | should be, but if you are very paranoid you may choose to use the | HTTP_Cookie syntax to examine the whole cookie header. Look for more | details in the documentation. As a consequence of the recent changes, | the SecFilterCheckCookieFormat directive is now obsolete and has | no effect. | | * BUG Request error messages are now escaped properly when logged | to the audit log. | | * BUG (Apache 2 only) Failure to execute external scripts is now | properly detected and logged. | | * BUG If the approver script does not exist the file is rejected. | | * BUG (Apache 2 only) Made the allow action work with output | filtering. | | * BUG (Apache 2 only) Warning messages (e.g. "log,pass") did | not get logged in output filtering. | | * Cookie normalization is now off by default (as was stated in the | documentation previously). | | * BUG (Apache 2 only) The audit logging code can cause a segfault | when it isn't explicitly configured in the configuration, and | the main handler does not run for some reason. Fixed. | | * BUG (Apache 2 only) Fixed a bug in the code that handles the exec | action, which would sometimes cause a segfault (when an external | script is executed). | - -- Met vriendelijke groet/With kind regards, Gerwin Krist Digitalus First-class Internet Webhosting (w) http://www.digitalus.nl (e) gerwin at digitalus.nl (p) PGP-ID: 79B325D4 (t) +31 (0) 598 630000 (f) +31 (0) 598 631860 *************************************************************************************** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. *************************************************************************************** -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCLsm/CwaJ0XmzJdQRAq5LAJ9OnxePfeUHX9xwAPkdrbKhFPJZbwCghbVI coBoSBKAm/BQf/xowzs7yF8= =qi9k -----END PGP SIGNATURE----- |
|
From: Ivan R. <iv...@we...> - 2005-03-09 10:00:25
|
Peter Wood wrote: > P.S. > > The mod_security reference manual is excellent. Had I bothered to > fully read the section on Path Normalization, I could have avoided > asking this question. :-) Thanks. The manual does contain everything I know of ModSecurity, or at least everything I know I know. In retrospective, I wish it were more structured (e.g. a proper reference manual) but I "grew" it organically and it shows. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Ivan R. <iv...@we...> - 2005-03-09 09:51:30
|
ModSecurity 1.8.7 has been released. It is available for immediate
download from:
http://www.modsecurity.org/download/
This release brings a mixture of small bug fixes, one minor security
fix, and minor enhancements. Cookie parsing has been enhanced.
ModSecurity now has two cookie parsers, one for each major version of
the specification. Failures to execute external scripts are now properly
logged. If the approver script is missing or not working the request is
now rejected. A bug that allows attacker to bypass some of the checks is
now fixed.
About ModSecurity
-----------------
ModSecurity is a web application firewall, designed to protect
vulnerable applications and reject manual and automated attacks.
It is an open source intrusion detection and prevention system. It
can work embedded in Apache, or as a standalone security device when
configured to work as part of an Apache-based reverse proxy.
Optionally, ModSecurity creates application audit logs, which contain
the full request body in addition to all other details. Requests are
filtered using regular expressions. Some of the things possible are:
* Apply filters against any part of the request (URI,
headers, either GET or POST)
* Apply filters against individual parameters
* Reject SQL injection attacks
* Reject Cross site scripting attacks
* Store the files uploaded through the web server, and have them
checked by external scripts
With few general rules ModSecurity can protect from both known
and unknown vulnerabilities. A Java version is also available, which
works with any Servlet 2.3 compatible web server.
Changes (v1.8.7)
----------------
* Stefan Esser discovered a trivial way to craft request to sneak
in the request parameters that are in the request body past the
named parameter syntax (e.g. ARG_name). Non-selective filtering
(SecFilter), other variables (e.g. THE_REQUEST, ARGS, POST_PAYLOAD),
and the audit log worked fine. Fixed.
* Stefan Esser also pointed out PHP parses cookies differently from
mod_security, and demonstrated a way to exploit the differences
to sneak in a cookie past the named cookie syntax (e.g. COOKIE_name).
So I decided to add another cookie parser to mod_security. A new
directive, SecFilterCookieFormat, determines which parser is used.
Possible values are 0 (default, for Netscape-style cookies, aka
version 0) and 1 (for RFC 2965 aka version 1 cookies). Without
spending more time on research (to determine how different platforms
parse cookies) -- which is on my TODO list -- I can't give a
definitive answer whether the COOKIE_name syntax is good enough. It
should be, but if you are very paranoid you may choose to use the
HTTP_Cookie syntax to examine the whole cookie header. Look for more
details in the documentation. As a consequence of the recent changes,
the SecFilterCheckCookieFormat directive is now obsolete and has
no effect.
* BUG Request error messages are now escaped properly when logged
to the audit log.
* BUG (Apache 2 only) Failure to execute external scripts is now
properly detected and logged.
* BUG If the approver script does not exist the file is rejected.
* BUG (Apache 2 only) Made the allow action work with output
filtering.
* BUG (Apache 2 only) Warning messages (e.g. "log,pass") did
not get logged in output filtering.
* Cookie normalization is now off by default (as was stated in the
documentation previously).
* BUG (Apache 2 only) The audit logging code can cause a segfault
when it isn't explicitly configured in the configuration, and
the main handler does not run for some reason. Fixed.
* BUG (Apache 2 only) Fixed a bug in the code that handles the exec
action, which would sometimes cause a segfault (when an external
script is executed).
--
Ivan Ristic
Apache Security (O'Reilly) - http://www.apachesecurity.net
Open source web application firewall - http://www.modsecurity.org
|
|
From: Tom A. <tan...@oa...> - 2005-03-07 20:48:00
|
----- Original Message ----- From: "Ivan Ristic" <iv...@we...> > Try replacing \w with [:word:], but beware [:word:] works only > when used in [ and ]. So [\w\-_.]* becomes [[:word:]\-_.] Or you could be a little more liberal and replace [\w\-_.]* with [^/]* Tom |
|
From: Peter W. <prw...@gm...> - 2005-03-07 20:42:35
|
> > Is he running Apache 1.x and you Apache 2.x? > I'm running Apache 2.x... not sure what he's running, but you may be on to something here. I keep forgetting that not everybody has jumped on the Apache 2.x bandwagon. :-) > In my experience (I can't test now) \w does not work in Apache 1.x. > (Neither do \d and \s.) The really interesting thing is that the > documentation for Apache 1.x regex engine does not exist. > > Try replacing \w with [:word:], but beware [:word:] works only > when used in [ and ]. So [\w\-_.]* becomes [[:word:]\-_.] Thanks, I'll have him try this. Peter -- Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/ |
|
From: Ivan R. <iv...@we...> - 2005-03-07 20:40:21
|
Peter Wood wrote: > I'm having someone help me test these rules. On my machine, this rule > matches just fine. On his machine, it doesn't match at all. He is > running mod_security 1.8.6, I'm running 1.8.7. Is there any difference > in between the two that might cause this not to match? No, there shouldn't be any. Is he running Apache 1.x and you Apache 2.x? These two have completely different regular expression engines. (The one in Apache 2.x being much better.) In my experience (I can't test now) \w does not work in Apache 1.x. (Neither do \d and \s.) The really interesting thing is that the documentation for Apache 1.x regex engine does not exist. Try replacing \w with [:word:], but beware [:word:] works only when used in [ and ]. So [\w\-_.]* becomes [[:word:]\-_.] -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: Peter W. <prw...@gm...> - 2005-03-07 20:24:13
|
I'm having someone help me test these rules. On my machine, this rule
matches just fine. On his machine, it doesn't match at all. He is
running mod_security 1.8.6, I'm running 1.8.7. Is there any difference
in between the two that might cause this not to match?
SecFilterSelective HTTP_Referer|ARGS
"[a-z]+:/[\w\-_.]*online[\w\-_.]*\.[a-z]{2,}"
Matches e.g. http://www.buy-online.com/ on my machine, but not on his.
- Peter
On Mon, 07 Mar 2005 16:58:26 +0000, Ivan Ristic <iv...@we...> wrote:
> Peter Wood wrote:
> > Ivan,
> >
> > Thanks for the response. Can you suggest any way to work around this
> > so that we can match 'http://'? Would '/{2}' work, or would that also
> > be normalized?
>
> Normalisation is not performed against the regex, only against
> the incoming data. In the regex just use "http:/" instead of
> "http://" and you should be fine.
>
> --
> Ivan Ristic
> Apache Security (O'Reilly) - http://www.apachesecurity.net
> Open source web application firewall - http://www.modsecurity.org
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> mod-security-users mailing list
> mod...@li...
> https://lists.sourceforge.net/lists/listinfo/mod-security-users
>
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Peter W. <prw...@gm...> - 2005-03-07 18:16:04
|
Tom,
> Then it will match whether you use normalization or not. Better still:
>
> SecFilterSelective HTTP_Referer|ARGS
> "(ht|f)tps?:/{1,2}[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,4}(/|$)"
>
Thanks for this. I had considered using {2,4} for the TLD... as far as
I know there aren't any TLD's with length > 4, but it could always
happen, which is why I had left that as just {2,}... also I'd
personally prefer to be a bit liberal as to what can appear before the
:// in a URL... you never know what crazy schemes attackers will think
up...
Peter
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Tom A. <tan...@oa...> - 2005-03-07 17:48:41
|
SecFilterSelective HTTP_Referer|ARGS
"[a-z]+:/+[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,}"
That will work whether there's one or two (or more) slashes. For just one
or two, try:
SecFilterSelective HTTP_Referer|ARGS
"[a-z]+:/{1,2}[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,}"
Then it will match whether you use normalization or not. Better still:
SecFilterSelective HTTP_Referer|ARGS
"(ht|f)tps?:/{1,2}[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,4}(/|$)"
Tom
----- Original Message -----
From: "Peter Wood" <prw...@gm...>
To: <mod...@li...>
Sent: Monday, March 07, 2005 11:55 AM
Subject: Re: [mod-security-users] regex for matching urls
> Hrm, never mind, I just tried that, and it didn't work either... any
> other way around it?
>
>
> On Mon, 7 Mar 2005 11:45:37 -0500, Peter Wood <prw...@gm...> wrote:
>> Ivan,
>>
>> Thanks for the response. Can you suggest any way to work around this
>> so that we can match 'http://'? Would '/{2}' work, or would that also
>> be normalized?
>>
>> Thanks,
>>
>> Peter
>>
>>
>> On Mon, 07 Mar 2005 16:45:58 +0000, Ivan Ristic <iv...@we...>
>> wrote:
>> > Peter Wood wrote:
>> > > Greetings,
>> >
>> > > What is wrong with '[a-z]+://' ?
>> >
>> > Before regular expression is applied to a piece of data
>> > mod_security performs data normalization and reduces
>> > redundant forward slashes. Thus "http://" becomes "http:/".
>> >
>> > (No, I don't like it either. That's why in 1.9 normalization
>> > will become optional and configurable per-rule.)
>> >
>> > --
>> > Ivan Ristic
>> > Apache Security (O'Reilly) - http://www.apachesecurity.net
>> > Open source web application firewall - http://www.modsecurity.org
>> >
>> > -------------------------------------------------------
>> > SF email is sponsored by - The IT Product Guide
>> > Read honest & candid reviews on hundreds of IT Products from real
>> > users.
>> > Discover which products truly live up to the hype. Start reading now.
>> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>> > _______________________________________________
>> > mod-security-users mailing list
>> > mod...@li...
>> > https://lists.sourceforge.net/lists/listinfo/mod-security-users
>> >
>>
>> --
>> Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
>>
>
>
> --
> Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> mod-security-users mailing list
> mod...@li...
> https://lists.sourceforge.net/lists/listinfo/mod-security-users
|
|
From: Peter W. <prw...@gm...> - 2005-03-07 17:02:56
|
P.S.
The mod_security reference manual is excellent. Had I bothered to
fully read the section on Path Normalization, I could have avoided
asking this question. :-)
Peter
On Mon, 07 Mar 2005 16:58:26 +0000, Ivan Ristic <iv...@we...> wrote:
> Peter Wood wrote:
> > Ivan,
> >
> > Thanks for the response. Can you suggest any way to work around this
> > so that we can match 'http://'? Would '/{2}' work, or would that also
> > be normalized?
>
> Normalisation is not performed against the regex, only against
> the incoming data. In the regex just use "http:/" instead of
> "http://" and you should be fine.
>
> --
> Ivan Ristic
> Apache Security (O'Reilly) - http://www.apachesecurity.net
> Open source web application firewall - http://www.modsecurity.org
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> mod-security-users mailing list
> mod...@li...
> https://lists.sourceforge.net/lists/listinfo/mod-security-users
>
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Peter W. <prw...@gm...> - 2005-03-07 16:57:10
|
Ah, excellent! I just took the extra / out and it works great now. Thanks!
On Mon, 07 Mar 2005 16:58:26 +0000, Ivan Ristic <iv...@we...> wrote:
> Peter Wood wrote:
> > Ivan,
> >
> > Thanks for the response. Can you suggest any way to work around this
> > so that we can match 'http://'? Would '/{2}' work, or would that also
> > be normalized?
>
> Normalisation is not performed against the regex, only against
> the incoming data. In the regex just use "http:/" instead of
> "http://" and you should be fine.
>
> --
> Ivan Ristic
> Apache Security (O'Reilly) - http://www.apachesecurity.net
> Open source web application firewall - http://www.modsecurity.org
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> mod-security-users mailing list
> mod...@li...
> https://lists.sourceforge.net/lists/listinfo/mod-security-users
>
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Peter W. <prw...@gm...> - 2005-03-07 16:55:44
|
Hrm, never mind, I just tried that, and it didn't work either... any
other way around it?
On Mon, 7 Mar 2005 11:45:37 -0500, Peter Wood <prw...@gm...> wrote:
> Ivan,
>
> Thanks for the response. Can you suggest any way to work around this
> so that we can match 'http://'? Would '/{2}' work, or would that also
> be normalized?
>
> Thanks,
>
> Peter
>
>
> On Mon, 07 Mar 2005 16:45:58 +0000, Ivan Ristic <iv...@we...> wrote:
> > Peter Wood wrote:
> > > Greetings,
> >
> > > What is wrong with '[a-z]+://' ?
> >
> > Before regular expression is applied to a piece of data
> > mod_security performs data normalization and reduces
> > redundant forward slashes. Thus "http://" becomes "http:/".
> >
> > (No, I don't like it either. That's why in 1.9 normalization
> > will become optional and configurable per-rule.)
> >
> > --
> > Ivan Ristic
> > Apache Security (O'Reilly) - http://www.apachesecurity.net
> > Open source web application firewall - http://www.modsecurity.org
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > mod-security-users mailing list
> > mod...@li...
> > https://lists.sourceforge.net/lists/listinfo/mod-security-users
> >
>
> --
> Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
>
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Ivan R. <iv...@we...> - 2005-03-07 16:52:54
|
Peter Wood wrote:
> Ivan,
>
> Thanks for the response. Can you suggest any way to work around this
> so that we can match 'http://'? Would '/{2}' work, or would that also
> be normalized?
Normalisation is not performed against the regex, only against
the incoming data. In the regex just use "http:/" instead of
"http://" and you should be fine.
--
Ivan Ristic
Apache Security (O'Reilly) - http://www.apachesecurity.net
Open source web application firewall - http://www.modsecurity.org
|