216 Commits

Author SHA1 Message Date
Felipe Zimmerle
4095ae7b52 Adds action accuracy to the parser 2015-09-09 22:26:35 -03:00
Felipe Zimmerle
1079b5ba54 Adds action maturity to the parser 2015-09-09 22:19:07 -03:00
Felipe Zimmerle
09651baf9a Adds action ver to the seclang parser 2015-09-09 22:10:45 -03:00
Felipe Zimmerle
254b29265e Adds action expirevar to the parser and fix the line counting 2015-09-09 18:31:37 -03:00
Felipe Zimmerle
ee8b886371 Adds parser support to ctl:[auditEngine|ruleEngine] 2015-09-09 17:51:53 -03:00
Felipe Zimmerle
ec6a5a0cd2 Adds support to t:sha1 and t:hexEncode at seclang parser 2015-09-09 17:13:07 -03:00
Felipe Zimmerle
d1fa2cfa7b Parser: Fix redirect action and adds SecRule first line-only comment syle 2015-09-09 15:10:38 -03:00
Felipe Zimmerle
5c3a4b608d Adds support to SecMarker and skipAfter 2015-09-08 10:06:37 -03:00
Felipe Zimmerle
b048794f4e Adds support to unconditional rules 2015-09-04 15:55:53 -03:00
Felipe Zimmerle
010c18f63f Adds support to SecDefaultAction configuration directive 2015-09-04 10:56:04 -03:00
Felipe Zimmerle
f2ed890ea6 Now accept SecRules regardless of the letter case 2015-09-03 11:09:40 -03:00
Felipe Zimmerle
ea4cd53221 Accepts phases with its name instead of a number 2015-09-02 18:31:02 -03:00
Felipe Zimmerle
035040cd13 Adds sanity check to confirm that the rule has an ID and it is not duplicated 2015-09-02 18:30:41 -03:00
Felipe Zimmerle
e89e395a32 Fix various minor issues on the auditlog schema 2015-08-27 17:50:42 -03:00
Felipe Zimmerle
1065e297b2 Fix several minor issues on the seclang grammar 2015-08-22 11:06:28 -03:00
Felipe Zimmerle
e78d7f5b91 Makes the parser understand some missing configuration directives
Directives:
 - SecPcreMatchLimitRecursion
 - SecPcreMatchLimit
 - SecResponseBodyMimeType
 - SecTmpDir
 - SecDataDir
 - SecArgumentSeparator
 - SecCookieFormat
 - SecStatusEngine

Those are not implemented yet, but the parser is now able to understand it.
2015-08-20 13:04:54 -03:00
Felipe Zimmerle
a453a656c3 Fix continuation line and VARIABLENOCOLON 2015-08-19 23:12:34 -03:00
Felipe Zimmerle
0b225f0239 Parser: adds support to SecRequestBodyInMemoryLimit 2015-08-19 22:42:46 -03:00
Felipe Zimmerle
2d56aa521b Cosmetics: fix actions on yy file
- added action for:
  ctl:requestBodyProcessor=XML
  ctl:requestBodyProcessor=JSON
- added CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT
2015-08-19 22:36:31 -03:00
Felipe Zimmerle
a230a4ff3c parser: Adds support for continuation lines 2015-08-19 17:20:43 -03:00
Felipe Zimmerle
ef99615401 parser: Understanding @pm if no operator is provided 2015-08-19 16:58:14 -03:00
Felipe Zimmerle
101fddfc9b Extends DICT_ELEMENT to support "-" 2015-08-18 22:19:32 -03:00
Felipe Zimmerle
d5bf955028 Using DetectionOnly instead of DetectOnly 2015-08-18 22:16:38 -03:00
Felipe Zimmerle
b7fb65fe65 seclanguage: ignore lines starting with "#" 2015-08-18 22:10:55 -03:00
Felipe Zimmerle
c06179f18e Adds support for Log and Rev actions 2015-08-07 14:27:43 -03:00
Felipe Zimmerle
ad9393a8c2 Adds support for the tag action 2015-08-07 14:27:43 -03:00
Felipe Zimmerle
f519717bdf Adds support to the msg action 2015-08-07 14:27:43 -03:00
Felipe Zimmerle
e12d95b10d Adds support to the TX collection and setvar action 2015-08-07 14:27:43 -03:00
Felipe Zimmerle
88c53575be Adds support to & (count) and ! (exclusion) as variables variations 2015-08-07 14:27:33 -03:00
Felipe Zimmerle
4f47651a6f Adds variable TX and action "capture". 2015-08-05 10:07:47 -03:00
Felipe Zimmerle
e016b72a8e Handles better the memory utilization
- Added reference counts to Rule and AuditLog;
- Some memory leaks were removed, including GeoLookup;
- Deal better with parser errors;
- Overriding the AutlogLogWritter destructor.
2015-07-26 22:51:57 -03:00
Felipe Zimmerle
0e7c13e3c0 Adds more regression tests to SecRemoteRules 2015-07-25 08:18:59 -03:00
Felipe Zimmerle
7ba5c76c78 Returns elegant errors if rules load operation failed 2015-07-25 03:04:57 -03:00
Felipe Zimmerle
b8f7fb441d Adds support to SecRemoteRules and Include directives
This commit includes a refactoring on important pieces of the parser
to allow it work in a stack fashion. Driver and Rules classes were
simplified and the RulesProperties class was created.
2015-07-24 22:57:29 -03:00
Felipe Zimmerle
70bc15cb73 Adds support to quoted ID action 2015-07-23 14:14:19 -03:00
Felipe Zimmerle
64543e3aa2 Using A-Z instead of A-z while parsing with ?i: to avoid warnings 2015-07-23 09:45:25 -03:00
Felipe Zimmerle
b5ca607e76 Places class Driver under the Parser namespace 2015-07-23 01:37:15 -03:00
Felipe Zimmerle
9c2158958e parser: Loads content straight from buffer. 2015-07-23 01:37:08 -03:00
Felipe Zimmerle
261ee9f115 Adds support to BodyLimitAction and support for parser errors 2015-07-22 21:31:58 -03:00
Felipe Zimmerle
667586c42e Adds UNIQUE_ID variable 2015-07-22 21:24:21 -03:00
Felipe Zimmerle
d20a47fb03 Adds support to the variables: REMOTE_HOST, SERVER_{ADDR,PORT} 2015-07-22 21:24:18 -03:00
Felipe Zimmerle
6f7d3fa67a Adds support to the TIME* variables 2015-07-22 01:07:42 -03:00
Felipe Zimmerle
dbbb2c526e Adds support to REMOTE_PORT variable 2015-07-21 23:21:15 -03:00
Felipe Zimmerle
e8476771e6 Adds support to REMOTE_HOST variable 2015-07-21 23:14:56 -03:00
Felipe Zimmerle
7f76bb6df1 Adds PATH_INFO variable 2015-07-21 22:29:52 -03:00
Felipe Zimmerle
62fece7823 Adds support to SecResponseBodyLimit directive and OUTBOUND_DATA_ERROR var 2015-07-21 19:46:15 -03:00
Felipe Zimmerle
a9147b76ad Adds support to the MULTIPART_STRICT_ERROR variable
Still missing to check:
  - MULTIPART_FILE_LIMIT_EXCEEDED
  - REQBODY_PROCESSOR_ERROR
  - MULTIPART_HEADER_FOLDING
  - MULTIPART_INVALID_HEADER_FOLDING
2015-07-21 17:47:00 -03:00
Felipe Zimmerle
09beb1a5c0 Adds support to MULTIPART_NAME variable 2015-07-21 15:54:49 -03:00
Felipe Zimmerle
954e275b32 Adds support to MULTIPART_FILENAME variable 2015-07-21 15:42:24 -03:00
Felipe Zimmerle
abec93263b Adds support to MULTIPART_CRLF_LF_LINES variable 2015-07-21 15:29:13 -03:00