Anoop Saldanha
e54358a9e1
replace all Signature->pmatch instances in the engine with Signature->sm_lists[DETECT_SM_LIST_PMATCH]
15 years ago
Anoop Saldanha
82fd581b64
replace all sm lists (match, pmatch, dmatch, umatch, amatch, tmatch) with an array Signature->sm_lists[]. Replace all Signature->match instances in the engine with Signature->sm_lists[DETECT_SM_LIST_MATCH]
15 years ago
Anoop Saldanha
0c5b82d891
provide separate ids for content, uricontent, http_(client_body_data|cookie|header|method|uri), when they share the same pattern
15 years ago
Anoop Saldanha
b8f5a6a4fc
throw out contents/uricnotents with invalid hex assembly
15 years ago
Anoop Saldanha
850f44022f
invalidate sigs with content/uricontent strings ", "boo, boo" + fix parsing content strings of the format content: !\"boom\";"
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
1071a53210
Fix unittests after ip_proto keyword change.
15 years ago
Pablo Rincon
34bb107f2c
Fix for bug 207 (depth/offset not correctly updated on certain cases)
15 years ago
Victor Julien
f07997fd4a
Don't set negated uricontent signature flag twice.
15 years ago
Pablo Rincon
b7076a8ea0
Don't avoid inspecting uricontents if we get no match. It can be negated uricontents (and urilens/pcre..). But at least skip the search if we get no match
15 years ago
Victor Julien
393acd77d2
Detection improvements: uricontent escaping now working, better negated pattern (content) handling.
15 years ago
Victor Julien
a3ff0e7210
Don't scan TCP packet payload if it was added to the stream. Inspect the tcp stream with the correct packet. Should fix #184 and #185 .
15 years ago
Pablo Rincon
eed0ef6e69
Adding tag keyword support
15 years ago
William Metcalf
0e4235cc94
FLOW_DESTROY added to clean-up UT's that init flow
15 years ago
Victor Julien
2f29b8a724
Improve detection of app layer, making sure we only handle app layer on 'established' packets. Should really fix #166 .
15 years ago
Anoop Saldanha
015385c6bd
changes to the dce parser stub data processed var. changed to stub data fresh var to indicate if the stub is fresh or not
15 years ago
Anoop Saldanha
45ea0d914e
dce stub content keywords support using dcepayload.c support for all dce related content keywords
15 years ago
Victor Julien
83b2c8abdb
Improve stateful uri detection code.
15 years ago
Victor Julien
9dd753b5f3
Scan uricontent mpm on demand.
15 years ago
Victor Julien
e8fce5f7fa
Convert uricontent scanning to use the detect engine state.
15 years ago
Pablo Rincon
8cc525c939
UDP support at AppLayer message handling
15 years ago
William Metcalf
cc76aa4bc6
properly init flows inside of unit-tests caused lock-up when falling back to using mutex locks
15 years ago
Victor Julien
a24f288074
Moving the stream content scanning to have it's own mpm ctx.
15 years ago
Gurvinder Singh
cda664a8c4
memroy leaks fixes in detection module, app layer and counters
15 years ago
William Metcalf
2eef905c07
GPL and Copyright header updates.
15 years ago
Victor Julien
70b32f7380
First stab at creating a stateful detection engine.
...
Stateful detection for app layer detection keywords, except uricontent. Stores it's partial results in the flow structure. Other modifications:
- Generalize transaction tracking, logging and inspection.
- Adapt http and dcerpc to use the new transaction handling.
- Stream engine now always notifies app layer of a stream eof.
This commit fixes bug #124 .
15 years ago
Gerardo Iglesias Galvan
9f4fae5b1a
Fix inconsistent use of dynamic memory allocation
15 years ago
Victor Julien
a8dd484aba
Fix small potential bug in debug mode found by clang.
15 years ago
William Metcalf
8d66323f62
clang fixes for null derefrences
15 years ago
Victor Julien
e27cefa6f7
Complete conversion of pattern id mpm storage vs sig id storage.
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
Victor Julien
26ef58342d
Fix typo in uricontent within handling causing within to be wrong.
15 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
15 years ago
Victor Julien
294b39bb3a
Properly set content and uricontent depth. Fixes #134 .
15 years ago
Pablo Rincon
9209eaeaf6
Fix some error messages and coding style at uri/content modifiers
15 years ago
Gurvinder Singh
69a4fee757
fixed the API and logic error reported by clang tool
16 years ago
Victor Julien
78e15ea7fa
Explicitly test for ipv6 in the htp personalities code. Update all affected unittests to set addr family to the flow.
16 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
Victor Julien
4129146a71
Because the HTP personalities code changes how the htp state's connp is initialized, we need to check for it in more places.
16 years ago
Victor Julien
08600df6b1
Small uri cleanups.
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
297001c6d9
Only process a app layer sig if it has the proper state. Make sure a sig can't have conflicting sigmatches, such as ftpbouce and uricontent.
16 years ago
Victor Julien
ec47f840f3
Remove more scan references.
16 years ago
Victor Julien
bee4e04664
More scan/search related cleanups.
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
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
16 years ago
Victor Julien
dc11247511
Change the way we replace contents by http_method and http_cookie, fixing #90 .
16 years ago
Gurvinder Singh
50f7d0a887
app layer htp logging and better htp request handling. removed recent_in_tx.
16 years ago
Victor Julien
187949b9ad
Make urilen inspect the normalized uri, cleanup uri (error) handling.
16 years ago
Victor Julien
6a53ab9c5a
Stream engine memory handling update
...
The stream engine memory handling needed updating as it didn't scale. Changes:
- pools can now be initialized to size 0, meaning unlimited
- stream engine uses a memcap setting. Sessions, segments and aldata is part
of this, app layer state isn't.
- memory is accounted using a global int that is spinlocked.
- a counter for sessions that have not been picked up because of memcap was
added.
- all reassembly errors are converted to debug msgs.
16 years ago
Victor Julien
b3bcba077f
Only inspect http flows against uri sigs, clean up uri scanning code.
16 years ago
Gurvinder Singh
0cb43d27e9
uricontent new design
16 years ago
Gurvinder Singh
356a8bf385
applayer uri match and modified http handling
16 years ago
Victor Julien
0d3da34f64
remove unused variables
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
Victor Julien
fcabd1b2ba
Fix typo.
16 years ago
Victor Julien
040e62f3ec
Fixup noisy debug statement
16 years ago
Victor Julien
7b2610ba1f
Fix extra spaces confusing content and uricontent.
16 years ago
Victor Julien
ecf86f9c23
Rename to Suricata.
16 years ago
Gurvinder Singh
a991ab0a19
added sigmatch payload flag
16 years ago
Victor Julien
91bc83e5c6
More logging API usage changes.
16 years ago
Victor Julien
0d0ffb9963
Reorganize header inclusions.
16 years ago
Victor Julien
85abc3ef62
Complete removal of global de_ctx. UtRuntests now returns the number of failed tests or 0 on none. Program exits with code 1 on failed tests, code 0 otherwise. Removal of broken http uri test.
16 years ago
Victor Julien
1132ab635a
Rename all pmt->det_ctx.
16 years ago
Victor Julien
b9972a9d2c
Cleanups
16 years ago
Brian Rectanus
fa5939ca91
64 bit cleanup part2
16 years ago
Victor Julien
8397413942
Comment updates.
16 years ago
Victor Julien
a0b390c541
Fix pktvar and http uri memory leaks.
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
1c0ad1d415
Add implementation of the Simple BNDM 2gram pattern matcher algorithm.
16 years ago
Victor Julien
efb10fc0d6
big update
16 years ago
Victor Julien
21364b34dc
Fix uricontent scan for copied siggroupheads.
16 years ago
Victor Julien
69e056e33f
Add the scanning to uricontent as well.
16 years ago
Victor Julien
54ffe2053e
Large detection engine update.
16 years ago
Victor Julien
171c8c777d
Group signatures by protocol.
16 years ago
Victor Julien
eb1c4e4987
Large update to the detection engine. Greatly improve initialization speed and memory usage.
16 years ago
Victor Julien
69162f9cd0
Fix issue with log-httplog where it logged uri's of previous packets because of a broken uri check.
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
cd19ee8bf2
Fix crash when to_client traffic was scanned for uricontent when there was no uri available...
16 years ago
Victor Julien
bab4b62376
Initial add of the files.
16 years ago