Jason Ish
e2b04635a7
Bug 1281 - Accept rule content with lengths greater than 255.
10 years ago
Victor Julien
866b3a1c5d
content: reorder DetectContentData member, shrinking the struct from 64 to 48 bytes.
12 years ago
Victor Julien
6ba52230ed
Update DetectContentDataParse to reflect the actual data types content uses.
12 years ago
Anoop Saldanha
0b5d277254
code cleanup for all content based keywords.
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
Anoop Saldanha
51c9955c79
fix for bug #577 .
...
If a pattern has matched on mpm, don't re-inspect it later, subject to certain
conditions met by the pattern - namely, not negated, right chop, no replacet
attached to it.
13 years ago
Anoop Saldanha
988c92f71c
http user agent keyword + mpm + inspection + fast pattern support added
13 years ago
Victor Julien
cdba2f50d1
Various fixes and improvements based on feedback by Coverity analyzer.
14 years ago
Anoop Saldanha
ab35b98f76
code cleanup - remove DetectContentGetLastPattern. Replace it with SigMatchGetLastSMFromLists
14 years ago
Anoop Saldanha
d85ab5ab1f
code cleanup - remove DetectContentFindNextApplicableSM
14 years ago
Anoop Saldanha
802350f65a
code cleanup - remove DetectContentHasPrevSMPattern
14 years ago
Anoop Saldanha
9652c3672d
code cleanup - remove SigMatchGetLastPattern
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
89f83e714c
Introduce http_server_body keyword.
...
The http_server_body content modifier modifies the previous content to inspect
the normalized (dechunked, unzipped) http_server_body. The workings are similar
to http_client_body. Additionally, a new pcre flag was introduced "/S".
To facilitate this change the signature flags field was changed to be 64 bit.
14 years ago
Anoop Saldanha
ed3b44b3b5
fix parsing content keywords. We are more strict now. All content keywords need to be enclosed in double quotes. Better validation for sid, priority and rev keywords
14 years ago
Eric Leblond
a85dc9b0e2
Add support for replace keyword.
...
This patch adds support for the replace keyword. It is used with
content to change selected part of the payload. The major point
with this patch is that having a replace keyword made necessary
to avoid all stream level check because we need to access to the
could-be-modified packet payload.
One of the main difficulty is to handle complex signature. If there is
other content check, we must do the substitution when we're sure all
match are valid. The patch adds an attribute to the thread context
variable to be able to deal with recursivity of the match function.
Replace is only activated in IPS mode and apply only to raw match.
14 years ago
Anoop Saldanha
35f3eafa5e
byte extract added to the engine. Detection support added for packet payload, uri and dce detection engines
14 years ago
Anoop Saldanha
966119b6aa
support for http_raw_uri keyword + mpm engine
15 years ago
Anoop Saldanha
c9897a44a4
fast pattern support for http_cookie. Also support relative modifiers
15 years ago
Anoop Saldanha
bbbedaf963
fast pattern support for http_method. Also support relative modifiers
15 years ago
Anoop Saldanha
7ec0382774
support fast pattern for http raw header. Also support relative modifiers for http raw header
15 years ago
Anoop Saldanha
c61c68fd36
mpm and fast pattern support for http_header. Also support relative modifiers for http_header
15 years ago
Anoop Saldanha
0aa5cffb12
fast pattern support for http_client_body keyword added. Also mpm support for http_client_body added
15 years ago
Anoop Saldanha
68b78664fa
Add unittests for checking content flags. Fix indentation in PopulateMpmAddPatternToMpm(). Also fix DETECT_CONTENT_IS_SINGLE
15 years ago
Anoop Saldanha
eade60f0fd
make some name changes. break PopulateMpm(). Set the avoid mpm double check flags
15 years ago
Anoop Saldanha
4883efd0f6
unifying content structure - uricontent now uses DetectContentData
15 years ago
Anoop Saldanha
a85fa6b792
support for fast_pattern only and fast_pattern:offset,length. Also support the new option for engine-analysis
15 years ago
Victor Julien
fc248ca7a1
Many small performance updates.
15 years ago
Victor Julien
57b098e98c
Add padding to commonly used data structures.
15 years ago
Gurvinder Singh
07e10681d6
fixed a typo in the detect-content.h
15 years ago
Victor Julien
7a427ec7f4
Switch to pattern id based results checking in the mpm. Move app layer proto detection towards a more signature based approach.
15 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
15 years ago
Pablo Rincon
9209eaeaf6
Fix some error messages and coding style at uri/content modifiers
15 years ago
Pablo Rincon
86185ecd97
Enable spm inspection with precooked pattern contexts on content, uricontent and http_client_body (we will also add this to http_header when it gets commited)
16 years ago
Pablo Rincon
227fe516a0
Adding Boyer Moore context to content patterns, should speed up the search
16 years ago
Pablo Rincon
c7350a8ac6
Fixing some naming convention issues and incorrect error messages
16 years ago
Pablo Rincon
b708d7f65d
Adding Uricontent inspection with spm. Modifiers for uricontent are now supported
16 years ago
Victor Julien
80dc4f1dbe
Further simplify content api: merge flags that indicate a next relative match, remove chunks as they are unnecessary now, make negated a bitflag.
16 years ago
Victor Julien
dd846c9b0e
Remove all search code from the pattern matchers, cleanup mpm api, remove unused http code, more cleanups.
16 years ago
Victor Julien
bef70a04ce
First stage of detect engine redesign: equal patterns share id's, search phase no longer used, new match verification phase.
16 years ago
Victor Julien
50e41817a7
Share content id's between identical patterns.
16 years ago
Victor Julien
b7bac14040
Fixup code to compile with -Wall -Werror -Wextra -Wno-unused-parameter compiler options.
16 years ago
Gurvinder Singh
71a77bf8d6
removeh http_cookie flag
16 years ago
Gurvinder Singh
a0f184866c
http_cookie keywork support
16 years ago
Anoop Saldanha
6ca5dbc9e9
Support fast_pattern modifier keyword for content
16 years ago
Anoop Saldanha
1c7ac13c25
Support for negated content
16 years ago
Pablo Rincon
9a3c21fbf3
Updating real unittests. Small fix on TestWithinDistanceOffsetDepth to skip to the next DETECT_CONTENT SigMatch. Adding some checks on within/distance setups.
16 years ago
Pablo Rincon
f233f9fa31
Adding detect_content chunks handling for max_pattern_length and unittests. Updating modifiers to use it.
16 years ago
Pablo Rincon
bdf119ade3
Adding window and isdataat keyword and some unittests
16 years ago