Victor Julien
842dfbc3f8
detect: enforce isdataat:!1,relative earlier
...
The expression 'isdataat:!1,relative' is used to make sure a match
is at the end of a buffer quite often. This patch optimizes this case
for 'content' followed by the expression. It enforces it by setting
and 'ends with' flag on the content and then taking that flag into
account while doing the pattern match.
8 years ago
Victor Julien
dfac5276b8
detect: remove unused SIGMATCH_PAYLOAD flag
9 years ago
Victor Julien
fe415ae518
detect: remove DMATCH list
9 years ago
Victor Julien
d9b3ae6cd6
dns: use dynamic buffers
9 years ago
Victor Julien
ee55aefa1c
http_client_body: dynamic buffer
9 years ago
Victor Julien
e7d5e845c7
http_header / http_raw_header: dynamic buffers
9 years ago
Victor Julien
67b7d9734e
http_cookie: dynamic buffer
9 years ago
Victor Julien
6346a074a7
http_uri: dynamic buffer
...
Clean up tests
9 years ago
Victor Julien
e34102d67a
http_method: make list dynamic
9 years ago
Victor Julien
6bd37611ee
file_data: dynamic buffer
9 years ago
Victor Julien
779d40cedf
detect: remove hardcoded sm_list logic from setup
...
Introduce utility functions to aid this.
9 years ago
Victor Julien
f370e88135
detect: move init only Signature members to init_data
9 years ago
Victor Julien
8edc954e82
detect: get rid of Signature::sm_lists
...
Instead use the lists in init_data during setup and the SigMatchData
arrays during runtime.
9 years ago
Eric Leblond
a2e2f50fb9
documentation: fix list keywords URLs
...
Update URLs in keyword definition to point to sphinx documentation.
9 years ago
Victor Julien
5e7f617b7b
isdataat: remove unused code
9 years ago
Victor Julien
e67ae0f174
detect keywords: use parse regex util func
9 years ago
Jason Ish
796dd5223b
tests: no longer necessary to provide successful return code
...
1 pass, 0 is fail.
9 years ago
Victor Julien
2c8e8c2516
dns: rename type so it's purpose is more clear
10 years ago
Giuseppe Longo
41a1a9f4af
find and replace HSBDMATCH by FILEDATA
...
This commit do a find and replace of the following:
- DETECT_SM_LIST_HSBDMATCH by DETECT_SM_LIST_FILEDATA
sed -i 's/DETECT_SM_LIST_HSBDMATCH/DETECT_SM_LIST_FILEDATA/g' src/*
- HSBD by FILEDATA:
sed -i 's/HSBDMATCH/FILEDATA/g' src/*
10 years ago
Ken Steele
923a77e952
Change Match() function to take const SigMatchCtx*
...
The Match functions don't need a pointer to the SigMatch object, just the
context pointer contained inside, so pass the Context to the Match function
rather than the SigMatch object. This allows for further optimization.
Change SigMatch->ctx to have type SigMatchCtx* rather than void* for better
type checking. This requires adding type casts when using or assigning it.
The SigMatch contex should not be changed by the Match() funciton, so pass it
as a const SigMatchCtx*.
11 years ago
Jason Ish
a18e2ef402
Bug 1230: Check all SigMatch lists for a named byte_extract variable.
11 years ago
Ken Steele
8f1d75039a
Enforce function coding standard
...
Functions should be defined as:
int foo(void)
{
}
Rather than:
int food(void) {
}
All functions where changed by a script to match this standard.
11 years ago
Victor Julien
3c9a135c0f
isdataat: fix coverity issue
...
During keyword setup there was a path that in theory could lead to
indexing an array with a negative int.
Coverity 400608
12 years ago
Victor Julien
f353fb630c
DNS: convert dns_query to sticky buffer
12 years ago
Victor Julien
7292998a58
Content: set up sticky buffers like file_data and dce_stub_data w/o flags, but with a list variable
12 years ago
Anoop Saldanha
0b5d277254
code cleanup for all content based keywords.
13 years ago
Anoop Saldanha
51dcf19817
turn dce_stub_data into a sticky buffer.
13 years ago
Anoop Saldanha
a308d718ae
Allow the use of relative without the presence of a related previous keyword.
13 years ago
Anoop Saldanha
3511f91bba
Add support for the new keyword - http_raw_host header.
...
The corresponding pcre modifier would be 'Z'.
13 years ago
Anoop Saldanha
c4ce19a1be
Add support for a new keyword to inspect http_host header.
...
The corresponding content keyword would now be - http_host.
The corresponding pcre modifier would be W.
13 years ago
Last G
8ae11f73b2
Added parentheses to fix Eclipse static code analysis
...
Fixed bug in action priority (REJECT_DST had lowest prio)
13 years ago
Eric Leblond
6842545331
Add documentation url in list-keyword output.
...
The output of the list-keyword is modified to include the url to
the keyword documentation when this is available. All documented
keywords should have their link set.
list-keyword can be used with an optional value:
no option or short: display list of keywords
csv: display a csv output on info an all keywords
all: display a human readable output of keywords info
$KWD: display the info about one keyword.
13 years ago
Victor Julien
84bad6db77
Silence compiler warnings found by clang
13 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Anoop Saldanha
988c92f71c
http user agent keyword + mpm + inspection + fast pattern support added
13 years ago
Anoop Saldanha
35435f3284
All http_http_stat_code modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_STAT_CODE. Also remove dummy match/free functions for stat code and stat msg
14 years ago
Anoop Saldanha
507e1b66e0
All http_http_stat_msg modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_STAT_MSG
14 years ago
Anoop Saldanha
059ee217ff
All http_http_raw_uri modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_RAW_URI
14 years ago
Anoop Saldanha
b1a0d35106
All http_http_cookie modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_COOKIE
14 years ago
Anoop Saldanha
49bdad9345
All http_http_method modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_METHOD
14 years ago
Anoop Saldanha
97d8fc9cba
All http_http_raw_header modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_RAW_HEADER
14 years ago
Anoop Saldanha
97308674ee
All http_http_header modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_HEADER
14 years ago
Anoop Saldanha
1acb7cdc7d
All http_server_body modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_SERVER_BODY
14 years ago
Anoop Saldanha
a5b46e727c
All http_client_body modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_CLIENT_BODY
14 years ago
Anoop Saldanha
4810ee9c5f
All uricontent modified patterns now are DETECT_CONTENT and not DETECT_URICONTENT. Step towards unifying all content based patterns. Makes way for easier management of patterns
14 years ago
Anoop Saldanha
ac68c3f893
code cleanup - replace SigMatchAppendDcePayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
6cab663bf0
code cleanup - replace SigMatchAppendPayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
09313cf9bd
Support http stat code detection engine, fast pattern(mpm engine included). Fix http stat code setup function. Fix pcre option for stat msg keyword. With this the pcre options for server_body is Q, for stat_msg is Y and for stat_code is S
14 years ago
Anoop Saldanha
2007c2711c
Support http stat msg detection engine, fast pattern(mpm engine included). Fix http stat msg setup function. Fix pcre option for stat msg keyword
14 years ago
Victor Julien
02e1229565
Enforce flow direction for http_raw_header sigs. Fix unittests that missed the flow direction.
14 years ago