mod-security-users Mailing List for ModSecurity (Page 566)
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: Peter W. <prw...@gm...> - 2005-03-07 16:45:46
|
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/
|
|
From: Ivan R. <iv...@we...> - 2005-03-07 16:40:32
|
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
|
|
From: Peter W. <prw...@gm...> - 2005-03-07 16:32:28
|
Greetings,
I'm trying to create a mod_security rule that uses regexes to match a
certain piece of text, but only if it is found within a URL. Here is
the initial attempt:
SecFilterSelective HTTP_Referer|ARGS
"[a-z]+://[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,}"
This does *not* match 'poker' if it is found within a URL (e.g.
http://www.high-stakes-poker.com/). However, if you take the
'[a-z]+://' off of the beginning, it *does* work:
SecFilterSelective HTTP_Referer|ARGS "[\w\-_.]*poker[\w\-_.]*\.[a-z]{2,}"
What is wrong with '[a-z]+://' ? I tried escaping the /'s, and that
didn't seem to make any difference.
Thanks,
Peter
--
Peter R. Wood | email: prw...@gm... | blog: http://prwdot.org/
|
|
From: Ivan R. <iv...@we...> - 2005-03-07 09:00:32
|
he...@gm... wrote: >>>PHP is configured to run as CGI with suPHP. >> >> This is the problem. Your jail probably does not contain all >> the files needed for a new PHP process to start (with or >> without suPHP). Because your Apache setup requires new >> processes to be created at runtime you must setup the >> jail the old-fashioned way. >> >> Chapter 2 of Apache Security, Installation and Configuration, >> is available free of charge: >> >> http://www.apachesecurity.net/download/apachesecurity-ch02-beta.pdf >> >> It contains detailed instructions how to create a jail >> from scratch. Good luck :) > > But its still working with mod_php. Just mod_suphp make Problems. Are you > working on this Problem ? There is nothing I (or anyone else) can do to make CGI scripts (or mod_suphp) work in a partial jail. The only way out is to create a proper jail, as I described in my previous email. mod_php works because PHP is embedded in Apache. With mod_suphp, PHP is just a CGI script. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: <he...@gm...> - 2005-03-07 08:41:28
|
>> PHP is configured to run as CGI with suPHP. > > This is the problem. Your jail probably does not contain all > the files needed for a new PHP process to start (with or > without suPHP). Because your Apache setup requires new > processes to be created at runtime you must setup the > jail the old-fashioned way. > > Chapter 2 of Apache Security, Installation and Configuration, > is available free of charge: > > http://www.apachesecurity.net/download/apachesecurity-ch02-beta.pdf > > It contains detailed instructions how to create a jail > from scratch. Good luck :) But its still working with mod_php. Just mod_suphp make Problems. Are you working on this Problem ? Thanks for your Help. -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl |
|
From: Ivan R. <iv...@we...> - 2005-03-05 22:06:03
|
he...@gm... wrote: > Hello there, > I've got some Problems but at first some Informations: With the wealth of information you have provided it's much easier to diagnose the problem. > My mod_security: > debian:/etc/apache2/mods-enabled# apt-cache show libapache2-mod-security > Package: libapache2-mod-security > Priority: optional > Section: web > Installed-Size: 128 > Maintainer: Bruno Rodrigues > Architecture: i386 > Source: libapache-mod-security > Version: 1.8.4-1.1 You would be better off using 1.8.7, I've fixed a dozen or so bugs since 1.8.4. > PHP is configured to run as CGI with suPHP. This is the problem. Your jail probably does not contain all the files needed for a new PHP process to start (with or without suPHP). Because your Apache setup requires new processes to be created at runtime you must setup the jail the old-fashioned way. Chapter 2 of Apache Security, Installation and Configuration, is available free of charge: http://www.apachesecurity.net/download/apachesecurity-ch02-beta.pdf It contains detailed instructions how to create a jail from scratch. Good luck :) -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |
|
From: <he...@gm...> - 2005-03-05 21:09:47
|
Hello there, I've got some Problems but at first some Informations: Operating System: Linux debian 2.4.27 #3 SMP Fri Oct 22 13:50:24 CEST 2004 i686 GNU/Linux Server version: Apache/2.0.53 Server built: Feb 25 2005 08:29:30 Server's Module Magic Number: 20020903:9 Architecture: 32-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/worker" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="" -D SUEXEC_BIN="/usr/lib/apache2/suexec2" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf" Compiled in modules: core.c mod_access.c mod_auth.c mod_log_config.c mod_logio.c mod_env.c mod_setenvif.c worker.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_negotiation.c mod_dir.c mod_alias.c mod_so.c My mod_security: debian:/etc/apache2/mods-enabled# apt-cache show libapache2-mod-security Package: libapache2-mod-security Priority: optional Section: web Installed-Size: 128 Maintainer: Bruno Rodrigues Architecture: i386 Source: libapache-mod-security Version: 1.8.4-1.1 Depends: mod-security-common (= 1.8.4-1.1), apache2-common, libc6 (>= 2.3.2.ds1-4) Filename: pool/main/liba/libapache-mod-security/libapache2-mod-security_1.8.4-1.1_i386.deb Size: 32874 MD5sum: e8dba8ed671ab0e8346aeef1619a1a0e Description: Tighten the Web application security for Apache 2.x Apache error log: [Sat Mar 05 21:23:31 2005] [notice] mod_security: chroot checkpoint #1 (pid=7334 ppid=7332) [Sat Mar 05 21:23:31 2005] [notice] mod_security: chroot checkpoint #2 (pid=7335 ppid=1) [Sat Mar 05 21:23:31 2005] [notice] mod_security: chroot successful, path=/chroot/apache [Sat Mar 05 21:23:31 2005] [notice] Apache/2.0.53 (Debian GNU/Linux) proxy_html/2.4 mod_perl/1.999.20 Perl/v5.8.4 configured -- resuming normal operations [Sat Mar 05 21:23:31 2005] [info] Server built: Feb 25 2005 08:29:30 [Sat Mar 05 21:23:31 2005] [debug] /home/adconrad/apache2/apache2-2.0.53/build-tree/apache2/server/mpm/worker/worker.c(1632): AcceptMutex: sysvsem (default: sysvsem) [Sat Mar 05 21:24:00 2005] [error] [client xxx] Premature end of script headers: index.php mod_security Debug log: [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] sec_check_access, path=(null) [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] Filtering off, switched off for path "(null)" [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] Filtering off, switched off for path "(null)" [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] find_last_request: start with 83dff70 "/index.php" [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] sec_logger: start [05/Mar/2005:21:24:00 +0100] [xxx/sid#81afd70][rid#83dff70][/index.php] Audit log off here There are no informations in the php log file. System description: Apache is used for normal Website Providing. Users could access their Webspaces during FTP and upload HTML Sites, PHP and CGI Script, so that their Pages are provided to the www. A mysql Server is also running. PHP is configured to run as CGI with suPHP. This is provided by the mod_suphp for apache. I tried to configure Apache to run with mod_security and its SecChrootDir Directive. But there must be the error. Either in mod_security or in mod_suphp. When I access a simple PHP Script, with the phpinfo() function I got the following error in the apache log: [Sat Mar 05 21:24:00 2005] [error] [client xxx] Premature end of script headers: index.php And a 500 Internal Server Error at the Browser. Please help me, I don't know what I could do... -- SMS bei wichtigen e-mails und Ihre Gedanken sind frei ... Alle Infos zur SMS-Benachrichtigung: http://www.gmx.net/de/go/sms -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl |
|
From: <bu...@cg...> - 2005-03-05 02:27:24
|
I've also received a copy. Anyone caring about apache security should check out the book ISBN: 0596007248 at http://www.amazon.com/exec/obidos/ASIN/0596007248/wwwcgisecuricom > > Ivan, > > I've just received my copy of Apache Security today and would like to > say congratulations, Thank You, and Excellent job. A wealth of useful > knowledge in one well organized source. > > > -- > +==================================================================+ > | Christopher Cuevas | > | FCLA Open Systems Group | > | fclcac (at) cns (dot) ufl (dot) edu | > +------------------------------------------------------------------+ > gpg fingerprint = CB8E B1B5 43DE 94C9 AFA8 8E89 6B1F 3546 87E0 DCF0 > +==================================================================+ > > (o_ "Why waste time learning, > //\ when ignorance is instantaneous?" - Calvin > V_/_ > quod erat demonstrandum > > > > ------------------------------------------------------- > 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: Christopher C. <fc...@cn...> - 2005-03-04 19:57:56
|
Ivan,
I've just received my copy of Apache Security today and would like to
say congratulations, Thank You, and Excellent job. A wealth of useful
knowledge in one well organized source.
--
+==================================================================+
| Christopher Cuevas |
| FCLA Open Systems Group |
| fclcac (at) cns (dot) ufl (dot) edu |
+------------------------------------------------------------------+
gpg fingerprint = CB8E B1B5 43DE 94C9 AFA8 8E89 6B1F 3546 87E0 DCF0
+==================================================================+
(o_ "Why waste time learning,
//\ when ignorance is instantaneous?" - Calvin
V_/_
quod erat demonstrandum
|
|
From: Ivan R. <iv...@we...> - 2005-03-03 17:50:09
|
Spence, Ian (ELS-CAM) wrote: > Ivan, > > A colleague of mine has tried to build the dev1.9 source but is seeing the > following error. I know you have said other people have warned of > mod_security not building on Windows. Is getpwuid the wrong method call for > windows, can we simply replace this with an alternative method? Can you > suggest any solution? If that's the only problem then simply comment out the offending parts. The getpwuid call only makes sense on Unix platforms anyway. Or surround the code with #if !(defined(WIN32)) and #endif -- 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-03 17:06:35
|
Ivan, A colleague of mine has tried to build the dev1.9 source but is seeing the following error. I know you have said other people have warned of mod_security not building on Windows. Is getpwuid the wrong method call for windows, can we simply replace this with an alternative method? Can you suggest any solution? Regards, Ian Spence -----Original Message----- From: Graham, Phillip (ELS) Sent: 03 March 2005 15:58 To: Spence, Ian (ELS-CAM) Subject: mod_security Hi Ian after much trying and searching for an answer it would seem that 1.9 does not build on windows (it uses getpwuid - which is a function not provided on Win32). I've posted a question on the newsgroup - and then spotted a reply to a message from you - which says 1.9 does not compile on windows. Phill |
|
From: Ivan R. <iv...@we...> - 2005-03-02 19:41:03
|
I think people on this list will find my recent blog entry interesting: Where Do Web Application Firewalls Fit in the Overall Defense Strategy? http://www.modsecurity.org/blog/archives/000052.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-02 14:47:21
|
Spence, Ian (ELS-CAM) wrote: > Ivan, > > Yes, this sounds good. > > Is there any other apache module that will do token processing? No, not that I know. -- 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-02 14:46:47
|
Spence, Ian (ELS-CAM) wrote: > Ivan > > Our target platform is Windows server. > > Given the download page states testing has stopped for Windows would you > advise on deploying 1.9 codebase on Windows? I am very interesting in > deploying your suggested enhancement "SecFilterExternal". Well, "stopped testing" is not entirely accurate. The truth is I never test mod_security on Windows. I develop and test on Linux, but I only compile and run a set of automated tests on Windows. This does not mean mod_security does not run or runs badly on Windows. In fact, I have had many reports from people who are happily running it on Windows. I am merely stating the facts to let people to make their own minds. -- 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-02 12:02:54
|
Ivan, Yes, this sounds good. Is there any other apache module that will do token processing? I like the vast array of features in mod_security but all we need right now is some token processing - MD5 digest/undigest etc. Ian Spence -----Original Message----- From: mod...@li... [mailto:mod...@li...] On Behalf Of Ivan Ristic Sent: 02 March 2005 10:58 To: mod...@li... Subject: Re: [mod-security-users] 1.9 binary windows Spence, Ian (ELS-CAM) wrote: > Ivan, > > I am interested in obtaining a binary version of mod_security 1.9 for > Windows. I am aware this is a development release. I've been told recently it does not compile on Windows. (This happens sometimes because I only try to build mod_security on Windows for the release.) > I have downloaded the source zip from the download page but I do not > have a full build environment to create a DLL etc. > > I would like to test the enhancement SecFilterExternal as discussed > previously. I would love to help but I have recently reinstalled my workstation so I don't have a development environment either. But I've been planning to release a pretty solid 1.9dev2 next week and I'll make the effort to make it compile on Windows too. OK? -- 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-02 10:52:04
|
Spence, Ian (ELS-CAM) wrote: > Ivan, > > I am interested in obtaining a binary version of mod_security 1.9 for > Windows. I am aware this is a development release. I've been told recently it does not compile on Windows. (This happens sometimes because I only try to build mod_security on Windows for the release.) > I have downloaded the source zip from the download page but I do not > have a full build environment to create a DLL etc. > > I would like to test the enhancement SecFilterExternal as discussed > previously. I would love to help but I have recently reinstalled my workstation so I don't have a development environment either. But I've been planning to release a pretty solid 1.9dev2 next week and I'll make the effort to make it compile on Windows too. OK? -- 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-02 10:42:10
|
Ivan, I am interested in obtaining a binary version of mod_security 1.9 for Windows. I am aware this is a development release. I have downloaded the source zip from the download page but I do not have a full build environment to create a DLL etc. I would like to test the enhancement SecFilterExternal as discussed previously. ____________________________________ Ian Spence Developer, Clinical Decision Support Elsevier Health Sciences Division Elsevier 32 Jamestown Road London NW1 7BY UK [t] +44 (0)20 7424 4240 [m] +44 (0)7891 875735 [e] i.s...@el... ____________________________________ CONFIDENTIALITY NOTICE: This email message and any accompanying data are confidential and intended solely for use of the named recipient(s). If you are not the intended recipient(s), you are hereby notified that the dissemination, distribution, and or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at the email address above, delete this email from your computer, and destroy any copies in any form immediately. |
|
From: Spence, I. (ELS-CAM) <I.S...@El...> - 2005-03-01 16:39:30
|
Ivan Our target platform is Windows server. Given the download page states testing has stopped for Windows would you advise on deploying 1.9 codebase on Windows? I am very interesting in deploying your suggested enhancement "SecFilterExternal". Ian Spence -----Original Message----- From: Ivan Ristic [mailto:iv...@we...] Sent: 01 March 2005 15:04 To: Spence, Ian (ELS-CAM) Cc: mod...@li... Subject: Re: Mod_security question Spence, Ian (ELS-CAM) wrote: > Ivan > > Can mod_security check on a token parameter in the URL? > > E.g. _http://server/app?token=digestTokenValue_ > > I want the receiving web server to check the token value against an > agreed algorithm, for a start it will be MD5 digested. > > I notice with the mod_security rules you can trap on certain parameter > values i.e. regex, but given a match can you run a script and then > depending on the result of the script, either reject or accept the > http request. Yes, mod_security can do that. I've added that functionality to the 1.9.x branch, so far only in the Apache 1.x version of the module. The new directive is called SecFilterExternal and it takes only one parameter - the name of the script to execute. The script will get the path to the file containing request parameters (only that at the moment) as its first parameter. Here's an example of a script that uses this feature to interface to SpamAssassin: http://cvs.sourceforge.net/viewcvs.py/mod-security/mod_security/util/filter_ spamc.pl?rev=1.1&view=auto This functionality is still rough and I plan to change the data exchange format before the final 1.9.x. version (e.g. to include the request headers). But it works and you can play with it in the meantime. -- 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-01 14:58:52
|
Spence, Ian (ELS-CAM) wrote: > Ivan > > Can mod_security check on a token parameter in the URL? > > E.g. _http://server/app?token=digestTokenValue_ > > I want the receiving web server to check the token value against an > agreed algorithm, for a start it will be MD5 digested. > > I notice with the mod_security rules you can trap on certain parameter > values i.e. regex, but given a match can you run a script and then > depending on the result of the script, either reject or accept the http > request. Yes, mod_security can do that. I've added that functionality to the 1.9.x branch, so far only in the Apache 1.x version of the module. The new directive is called SecFilterExternal and it takes only one parameter - the name of the script to execute. The script will get the path to the file containing request parameters (only that at the moment) as its first parameter. Here's an example of a script that uses this feature to interface to SpamAssassin: http://cvs.sourceforge.net/viewcvs.py/mod-security/mod_security/util/filter_spamc.pl?rev=1.1&view=auto This functionality is still rough and I plan to change the data exchange format before the final 1.9.x. version (e.g. to include the request headers). But it works and you can play with it in the meantime. -- 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-02-23 22:38:27
|
Aditya wrote: > With: > > SecFilterCheckCookieFormat On > > we are seeing the following error: > > Cookie: DYN_CAL='fdow':null,'history':"2005/02/21/19/23",'hsize':9 > mod_security-message: Invalid cookie format: Cookie value is missing #1 > mod_security-action: 500 > > However, looking at the module code, it seems like the "=" isn't being > matched, but I can't really tell why: Your cookie is in v0 format, while the mod_security 1.8.6 parser expects v1 format. I originally thought the 1.8.6 parser will be able to handle both but I was mistaken. I realized this recently (when I was investigating Stefan's claims, see here http://www.modsecurity.org/documentation/known-issues.html ) so that's why 1.8.7 now has two cookie parsers. It will correctly parse your cookie (I just tried it with 1.8.7RC1). > Cookie: DYN_CAL='fdow':null,'history':"2005/02/21/19/23",'hsize':9 ^ In v1 the comma is used as cookie separator, so the parser was expecting two cookies there. -- Ivan Ristic (http://www.modsecurity.org) |
|
From: Aditya <ad...@gr...> - 2005-02-23 22:24:13
|
With:
SecFilterCheckCookieFormat On
we are seeing the following error:
Cookie: DYN_CAL='fdow':null,'history':"2005/02/21/19/23",'hsize':9
mod_security-message: Invalid cookie format: Cookie value is missing #1
mod_security-action: 500
However, looking at the module code, it seems like the "=" isn't being
matched, but I can't really tell why:
p = header_copy;
while(*p != 0) {
attr_name = NULL;
attr_value = NULL;
/* attribute name */
while(isspace(*p)) p++;
attr_name = p;
while((*p != 0)&&(*p != '=')) p++;
if (*p == 0) {
/* we've reached the end of the string,
* and the attribute value is missing
*/
*error_msg = ap_psprintf(r->pool, "Cookie value is missing #1");
return -1;
}
Any hints?
Thanks,
Adi
|
|
From: Ivan R. <iv...@we...> - 2005-02-23 15:13:18
|
Evgeniy wrote: > Can I make "apachectl restart" and "apachectl -k graceful" for apache > (2.0.53) with mod_securtiy (1.8.7rc1) without full copying apache & perl > &php files to chroot tree ? apachectl stop & star actions works normally, > but restart requires access to binary files & conf... No, not that I know of. -- Ivan Ristic (http://www.modsecurity.org) |
|
From: Evgeniy <evg...@ya...> - 2005-02-23 10:34:28
|
Can I make "apachectl restart" and "apachectl -k graceful" for apache (2.0.53) with mod_securtiy (1.8.7rc1) without full copying apache & perl &php files to chroot tree ? apachectl stop & star actions works normally, but restart requires access to binary files & conf... |
|
From: Troy A. <tr...@ze...> - 2005-02-23 02:28:09
|
On Tue, Feb 22, 2005 at 11:33:08PM +0000, Ivan Ristic wrote: > Jochen Kaechelin wrote: > > > >Now I wan't to allow only image-files to be uploaded. > >But the following does not work: > > > > <Location /var/www/noeinfo.noe.de/upload/upload.php> > > SecFilterInheritance Off > > SecFilterSelective POST_PAYLOAD "!image/(jpeg|bmp|gif)" > > </Location> > > > >What's wrong here? > > To restrict file uploads you have the following options: > > 1) Use an approver script > > 1a) If filtering using the extension is good enough for you > I am pretty sure the temporary file you get in the > approver script will have the same extension as the > original (sorry, I can't check at the moment). > > 1b) You don't have to rely on the extension -- you can have > a "smart" script figure out the actual content of the > file. Something like the "file" tool. This is slightly OT, but see the poorly named 'getimagesize()' php function: http://www.php.net/manual/en/function.getimagesize.php It returns an array of information about the given file, including its image type. It's safe to say that if it doesn't have a type and size, then it's not a valid image file. -troy |
|
From: Ivan R. <iv...@we...> - 2005-02-22 23:27:34
|
Jochen Kaechelin wrote: > I have a PHP-form running at > > http://127.0.0.1/xxx.xxx/upload/upload.php > > with a file-selection field. > > All the date ist transmitted to > > http://127.0.0.1/noeinfo.noe.de/upload/do_upload.php > > Now I wan't to allow only image-files to be uploaded. > But the following does not work: > > <Location /var/www/noeinfo.noe.de/upload/upload.php> > SecFilterInheritance Off > SecFilterSelective POST_PAYLOAD "!image/(jpeg|bmp|gif)" > </Location> > > What's wrong here? That cannot work for several reasons. First, the content type transported with the file is client-generated and can be faked. ModSecurity will not give you access to the raw request body when multipart/form-data is used, because it doesn't make sense. It is trivial to bypass any type of regular expression. Also, regular expressions would most likely not work because of the binary content. So what you actually get with POST_PAYLOAD and multipart/form-data is a simulated application/x-www-form-urlencoded body. To restrict file uploads you have the following options: 1) Use an approver script 1a) If filtering using the extension is good enough for you I am pretty sure the temporary file you get in the approver script will have the same extension as the original (sorry, I can't check at the moment). 1b) You don't have to rely on the extension -- you can have a "smart" script figure out the actual content of the file. Something like the "file" tool. 2) In 1.9.x there is the FILE_NAMES variable that allows filtering using the name of the file. -- Ivan Ristic (http://www.modsecurity.org) |