Pablo Rincon
227fe516a0
Adding Boyer Moore context to content patterns, should speed up the search
15 years ago
Victor Julien
ced401b554
Update http_client_body code to recent changes.
16 years ago
Anoop Saldanha
97d49d8f5e
support for http_client_body keyword
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
Anoop Saldanha
c54b91ed94
fix for bug 113
16 years ago
Victor Julien
c1a19bcd6b
Fix compilation of new detect-filter code, fix ip-only compatibility of detect-filter code.
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
1e01fd613c
Remove all references to the scan phase from the pattern matchers and it's api.
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
8b30226914
Detection keyword cleanup
16 years ago
Victor Julien
b259e362cd
Convert uricontent to use new scanning methods as well. Move http_method and http_cookie keywords out of pmatch list for now.
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
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
16 years ago
Gerardo Iglesias Galvan
ba6d807a6e
Improve information about errors on signature failure
16 years ago
William Metcalf
811f2f605d
small fix for ! inside of content match
16 years ago
Victor Julien
0d34990d7f
Add OpenBSD's strlcpy and strlcat and replace all strcat/strcpy/strncat/strncpy by those calls.
16 years ago
Steve Grubb
60ad9d29c5
Memory leak cleanup in detectors
...
Hello,
I ran the code through an analysis program and found several leaks that
should be cleaned up.
*In src/detect-engine-address-ipv4.c at line 472, the test for ag == NULL
will never be true since that is the loop entry test.
*In src/detect-engine-port.c at line 1133, the test for p == NULL will
never be true since that is the loop entry test.
*In src/detect-engine-mpm.c at line 263 is a return without freeing
fast_pattern
*In src/detect-ack.c at line 80 and 85, data catches the return from malloc.
One of them should be deleted.
*In src/detect-seq.c at line 81 and 86, data catches the return from malloc.
One of them should be deleted.
*In src/detect-content.c at line 749, many of the paths that lead to the error
exit still has temp pointing to allocated memory. To clean this up, temp
should be set to NULL if not immediately assigning and new value.
*In src/detect-uricontent.c at line 319, both cd and str needto be freed. At
lines 344, str needs to be freed. And at line 347 str and temp need to be
freed.
*In src/detect-flowbits.c at line 231 and 235, str was not being freed. cd was
not being freed at line 235.
*In src/detect-flowvar.c at line 127, str was not being freed. At line 194, cd
and str were not being freed.
*In src/detect-flowint.c at line 277, sfd was not being freed. At line 315, str
was not being freed.
*In src/detect-pktvar.c at line 121, str was not being freed. At line 188, str
and cd was not being freed.
*In src/detect-pcre.c at line 389, there is an extra free of "re" that should
be deleted.
*In src/detect-depth.c at line 42 & 48, str has not been freed.
*In src/detect-distance.c at line 49 and 55, str has not been freed
*In src/detect-offset.c at line 45, str has not been freed.
The patch below fixes these issues.
-Steve
16 years ago
Victor Julien
4284276b11
Merge applayer detect function into normal match function. Should speed up detection.
16 years ago
Pablo Rincon
b6a3395c08
Adding unittest helper functions for building generic packets, checking arrays of expected match results, perform generic tests, etc. Look at util-unittest-helper.c and detect-ipproto.c for references
16 years ago
Victor Julien
fcabd1b2ba
Fix typo.
16 years ago
Victor Julien
b7bac14040
Fixup code to compile with -Wall -Werror -Wextra -Wno-unused-parameter compiler options.
16 years ago
Victor Julien
7b2610ba1f
Fix extra spaces confusing content and uricontent.
16 years ago
Victor Julien
35e884f303
Make sure offset modifies depth.
16 years ago
Victor Julien
1d12de9500
DetectContentChunkMatchTest11 is no longer expected to fail.
16 years ago
Victor Julien
53041eeb67
Small cleanups.
16 years ago
Pablo Rincon
6f76ed6804
Match content fail when two contents are specified in the same rule and the last of them has length = 1
16 years ago
Victor Julien
8490208ba1
Fix bug fix
16 years ago
Victor Julien
fa5dbaeb1d
Fix segv when testing for sid 2002181
16 years ago
Victor Julien
ecf86f9c23
Rename to Suricata.
16 years ago
Anoop Saldanha
cd0de89bd4
Fix for handling negated content "\!CONTENT"
16 years ago
Victor Julien
2213ff933f
Compile fix.
16 years ago
Brian Rectanus
44083b6505
Fixed warning in detect-content.
16 years ago
Victor Julien
50b2e381e0
Set the DETECT_CONTENT_WITHIN_NEXT and DETECT_CONTENT_DISTANCE_NEXT flags on content chunks if appropriate.
16 years ago
Victor Julien
a004724aea
Add some debugging code
16 years ago
Victor Julien
dd232fcd6e
Fix debug compilation
16 years ago
Anoop Saldanha
1c7ac13c25
Support for negated content
16 years ago
Victor Julien
0aaf603317
Fix another case where distance/within checks didn't fully work as expected.
16 years ago
Pablo Rincon
ce3abca399
Adding some unittests (one of them dodoesn't work but should)
16 years ago
Pablo Rincon
84411f73c3
Commeting out a unittest.
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
7e4377224a
Small fix at detect-parse.c, need to continue with MatchTest05
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
Victor Julien
981ca859cb
Fixes for distance and within content modifiers.
16 years ago
Victor Julien
951b4d5cf4
Fix within in some corner cases and add some more tests.
16 years ago
Gurvinder Singh
a991ab0a19
added sigmatch payload flag
16 years ago
Breno Silva
c43319c337
Regular expression for UnitTests
...
Signed-off-by: Brian Rectanus <brectanu@gmail.com>
16 years ago
Victor Julien
91bc83e5c6
More logging API usage changes.
16 years ago
Victor Julien
3a28171fbd
Another round of logging api usage updates.
16 years ago
Victor Julien
0d0ffb9963
Reorganize header inclusions.
16 years ago
Pablo Rincon
bdf119ade3
Adding window and isdataat keyword and some unittests
16 years ago
Victor Julien
1132ab635a
Rename all pmt->det_ctx.
16 years ago
Victor Julien
b9972a9d2c
Cleanups
16 years ago
Victor Julien
4369816cdd
Improvements to content keyword memory handling.
...
First version of a simple pattern based L7 proto detection engine. Currently just works by matching a single pattern in the initial data. Implemented HTTP, SSL, MSN, JABBER, SMTP and a few more.
Couple of pattern matcher cleanups.
16 years ago
Victor Julien
97854cf4bb
Fixup some rule parser memleaks
16 years ago
Brian Rectanus
fa5939ca91
64 bit cleanup part2
16 years ago
Victor Julien
b7ad199c97
Fix broken test. Fix content keyword parsing not escaping properly.
16 years ago
William Metcalf
ebd569ca4a
Added unit tests to detect-content.c to show problems with escaped chars ; " \ : in snort rule lang
16 years ago
Victor Julien
657be002d1
Big detection engine update: scan improvements, b2g/b3g updates, bloom fixes, iponly detection implementation, dsize/flow grouping.
16 years ago
Victor Julien
5df5b35e90
Put all globals in the detection engine ctx. Add HashList type, a hash that also stores the items ina list to it can be traversed. Many cleanups.
16 years ago
Victor Julien
dce2c12915
Add Scan before Search to the detection engine.
16 years ago
Victor Julien
54ffe2053e
Large detection engine update.
16 years ago
Victor Julien
eb1c4e4987
Large update to the detection engine. Greatly improve initialization speed and memory usage.
16 years ago
Victor Julien
dc224cb2d2
Large update containing the first step to making the detection engine use rule groups. Address based rule groups are now implemented.
16 years ago
Victor Julien
bab4b62376
Initial add of the files.
16 years ago