53 Commits

Author SHA1 Message Date
Felipe Zimmerle
0037a0732a Using RadixTree instead of list to storage IPs
Used by the operator @ipMatch and variants, this structure storage all the IPs
addresses for later comparison. Last version was using RadixTree only if the
set of IPs was specified from files. IPs specified as parameters, was using
a chained list. Chained lists may affect the performance, since lookups in
worst case will be O(n). RadixTrees could provide better results depending
on the amount of elements and its contents.
2014-03-31 16:22:10 -07:00
Felipe Zimmerle
b9fdc4fe3b Adds support to suspicious and whitelist to Read and Write limits
The operators @ipMatch, @ipMatchF and @ipMatchFromFile were
added to the functions: SecReadStateLimit and SecReadStateLimit,
by using them it is possible to declare a suspicious list. When
a suspicious list is given, the {Read|Write}StateLimit will be
applied just to the IPs that belongs to that restricted list.
Note that the negative of those operators (e.g. !@ipMatch) can be
used to place a whitelist. The {Read|Write}StateLimit
restrictions will not be applied to those in the whitelist.
This current version the Sec{Read|Write}StateLimit can be used
varios times to add elements to both lists, however, the
last informed limit will be applied for the entire group. This
feature is experimental, and suggestions on how to improve it
are very welcome. For further discussion use the issue: #353.
2014-03-31 16:22:10 -07:00
Felipe Zimmerle
bd0980f63d Reverts commit: a4202146b8d26b6615bbab986383fe0afae60d77
Testing inet_pton with the help of Steffen. Acording to Steffen we can use
!(NTDDI_VERSION >= NTDDI_VISTA) to identify that the specific Windows version
has this function defined or not, if so we can use the Windows version.
Reverting this commit to avoid to overwrite the Windows' function. And
see the original error that happened before this commit.
2014-03-31 16:22:10 -07:00
Felipe Zimmerle
d93ce9ceee Adds REQUEST_FULL and REQUEST_FULL_LENGTH variables
This variable is a combination from REQUEST_LINE, REQUEST_HEADERS and
REQUEST_BODY (if any). Expects for \n\n in between each of those values.
2014-03-31 07:14:55 -07:00
Felipe \\\"Zimmerle\\\" Costa
a4202146b8 iis: Fix inet_pton build problem
There is a function named inet_pton on windows API, with different
signature. This patch just override the windows function and point
the inet_pton to our implementation.
2013-11-07 17:15:52 -02:00
Breno Silva
aa18ec7f45 Updated copyright dates 2013-04-19 03:20:46 -04:00
Breno Silva
ce3cf00a2c Fixed byte conversion issue during logging under zlinux 2012-10-31 17:05:41 -04:00
brenosilva
781a506bc9 Added utf8toUnicode tfn 2012-08-24 17:02:13 +00:00
gregwroblewski
2dbe4ab4f0 Second part of IIS/nginx merge into M2 trunk. 2012-08-20 20:31:06 +00:00
brenosilva
8cec8c7e6d Make internal m_strcasestr default 2012-08-15 16:08:02 +00:00
brenosilva
592ec392d1 Remove ctl:ruleUpdateTarget* and add ctl:ruleRemovetarget* 2012-08-02 18:04:53 +00:00
brenosilva
543a7db8a7 Check for strcasestr 2012-07-27 01:10:33 +00:00
brenosilva
81b74ba633 Fix code for windows 2012-06-16 19:33:22 +00:00
brenosilva
35d97d5869 Fix code for windows 2012-06-16 16:31:09 +00:00
brenosilva
780db20398 Add inet_pton for windows 2012-06-15 20:44:10 +00:00
brenosilva
14156d831b Add ipmatchFromfile 2012-06-01 20:26:51 +00:00
brenosilva
866cb6d6b4 Update trunk for 2.7 2012-05-10 23:18:39 +00:00
brenosilva
8642120748 Code cleanups 2012-01-02 20:21:29 +00:00
brenosilva
a4f0957b0c Revert hexDecode and add new sqlHexDecode 2011-10-10 16:24:07 +00:00
brenosilva
6b7edc4d47 Fixes, code cleanups, improvements 2011-04-27 15:58:22 +00:00
brenosilva
d68731a38b APR-Ipmatch operator 2011-04-16 21:25:30 +00:00
brenosilva
cd41e93271 Fix typo issue 2011-04-03 13:30:50 +00:00
brenosilva
0d32c17c30 Memory pool fixes and code cleanup 2011-04-03 03:57:02 +00:00
brenosilva
6031e7fdae Improvements, bug fixes and cleanup from Tom Donavan 2011-04-02 23:10:16 +00:00
brenosilva
2ff42243fa Add escape option to rsub and rbl improvements 2011-03-31 17:15:37 +00:00
brenosilva
8642c01344 gsb now saves the base url in tx.1 when match a full url 2011-03-30 17:58:54 +00:00
brenosilva
0c81610818 add util remove escape function and apply it for gsb 2011-03-30 17:25:46 +00:00
brenosilva
104f0de46e New License 2011-03-30 14:12:44 +00:00
brenosilva
49732256f6 Improvements, fixes and new features 2011-03-25 13:51:13 +00:00
brenosilva
7bd27c4000 Gsb matched urls set into tx variable 2011-03-16 15:04:17 +00:00
brenosilva
56fc2ea714 MODSEC-148 fix issues 2010-12-22 13:57:44 +00:00
brenosilva
549f059480 move 2.5.13 into trunk 2010-12-08 18:58:18 +00:00
b1v1r
08edc0c26f Merge 2.5.x (2.5.12) changes into trunk. 2010-02-05 19:05:20 +00:00
ivanr
221af6f5c1 Add PERF_ALL, sepearate PERF_STORAGE into PERF_SREAD and PERF_SWRITE. 2010-02-01 12:10:28 +00:00
ivanr
a4d5d50be9 Integrate with mod_log_config (MODSEC-108). 2010-02-01 11:01:17 +00:00
ivanr
853b1f9fc8 Convert 'normalise' into 'normalize' throughout, but support the previous version for backward compatibility (MODSEC-103) 2009-12-04 23:15:44 +00:00
b1v1r
3b12989683 Merge 2.5.x changes into trunk. 2009-11-07 00:06:26 +00:00
b1v1r
21ecf99dab Merge 2.5.x changes into trunk. 2009-09-24 19:11:16 +00:00
b1v1r
826124b378 Merge 2.5.x changes to trunk. 2009-08-25 22:19:33 +00:00
b1v1r
dc0a2161ac Merge 2.5.9 changes into trunk. 2009-03-12 15:31:10 +00:00
brectanus
10713fbd37 Sync up branches/2.5.x and trunk. 2008-07-31 22:36:24 +00:00
ivanr
ae40b8c213 Implemented cssDecode. 2008-07-16 13:08:12 +00:00
brectanus
b5033e6e29 It is 2008 now :) 2008-01-11 00:00:31 +00:00
brectanus
6dd6156466 Fixed returns for urlDecodeUni, urlDecode, urlEncode and normalisePathWin. See #439. 2007-12-20 23:29:07 +00:00
ivanr
f64c7c39e8 Lua: Added support for scripting to @inspectFile. 2007-12-20 15:53:23 +00:00
brectanus
8aa31fd099 Change jsDecodeuni to jsDecode which also decodes all the other JS escapes. See #193. 2007-12-14 00:19:46 +00:00
brectanus
b0de659133 Added t:jsDecodeUni handling unicode similar to t:urlDecodeUni. See #193. 2007-12-13 00:58:02 +00:00
brectanus
8f6385f784 Added logdata action (still needs byte limit). See #40. 2007-08-10 00:22:15 +00:00
brectanus
fe8c564ed0 Added MODSEC_BUILD variable. See #38. 2007-08-08 18:25:03 +00:00
brectanus
81d0f84ad3 Update copyright text to Breach Security, Inc.
Merge in changes from branches/2.1.x
2007-06-14 16:05:45 +00:00