Anoop Saldanha
3749fc98fd
Modify handling of negated content.
...
The old behaviour of returning a failure if we found a pattern while
matching on negated content is now changed to continuing searching
for other combinations where we don't find the pattern for the
negated content.
Thanks to Will Metcalf for reporting this.
12 years ago
Eric Leblond
cd3e32ce19
unittests: some functions needs a flow lock.
...
In debug validation mode, it is required to call application layer
parsing and other functions with a lock on flow. This patch updates
the code to do so.
12 years ago
Anoop Saldanha
ab4b15c2e7
fix for #788 .
...
Now depth is kept in mind when we inspect chunks in client/server body.
This takes care of FPs originating from inspecting subsequent chunks that
match with depth, but shouldn't.
13 years ago
Anoop Saldanha
d4d18e3136
Transaction engine redesigned.
...
Improved accuracy, improved performance. Performance improvement
noticeable with http heavy traffic and ruleset.
A lot of other cosmetic changes carried out as well. Wrappers introduced
for a lot of app layer functions.
Failing dce unittests disabled. Will be reintroduced in the updated dce
engine.
Cross transaction matching taken care of. FPs emanating from these
matches have now disappeared. Double inspection of transactions taken
care of as well.
13 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
Victor Julien
dbdab0cb1c
Disable dce unittests that tick off clamav. #458 .
14 years ago
Eileen Donlon
9b2bd9280a
fix invalid unittests with mixed content modifiers
...
Fixed some unittests that were incorrectly mixing relative and non-relative content modifiers.
14 years ago
Anoop Saldanha
603d4a719a
remove det_ctx->payload_offset and use det_ctx->buffer_offset. Update hscd and hsmd to use the new generic content inspection engine
14 years ago
Anoop Saldanha
d1d5507679
remove all old content inspection engines and references to them. We have cleaned the entire content inspection phase and improved alert accuracy
14 years ago
Anoop Saldanha
35f1f7e8d9
unify payload detection engines + fix other bugs in pcre init
14 years ago
Anoop Saldanha
420befb180
Changed my email address to anoopsaldanha at gmail dot com from my current one
14 years ago
Anoop Saldanha
9a6aef459e
modify all relevant app layer API calls to accomodate passing parser local storage argument
14 years ago
Victor Julien
262a7300d7
flow: shrink Flow datatype
...
Introduce a separate FlowAddress structure for holding the ipv4 or ipv6 address
that doesn't have the family in it like the Address structure. Instead, the
family is stored in the flow as a flag: FLOW_IPV4 and FLOW_IPV6.
Add macro's to check the family, copy the address, etc.
Update many unittests to reflect these changes. Introduce unittest helper
functions for creating and initializing a flow and freeing it again.
On 64 bit this shrinks the flow with 8 bytes.
14 years ago
Victor Julien
06904c9024
App Layer cleanup
...
Removal of per flow 'aldata' array. It contained a ptr for each ALPROTO. Instead now we have 2 ptrs in the flow: alparser and alstate.
Various cleanups and dead code removal from the app layer API.
Should safe 100+ bytes memory per flow on 64 bit.
Updated lots of unittests to reflect these changes.
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
Anoop Saldanha
b4427e81ec
minor fixes in endianness handling in dcerpc and dce detection engine
15 years ago
Anoop Saldanha
35f3eafa5e
byte extract added to the engine. Detection support added for packet payload, uri and dce detection engines
15 years ago
Victor Julien
e16a566a96
Account for distance when checking within. Bug #285 .
15 years ago
Victor Julien
987ce57a02
Wrap a number of BUG_ON's in the detection engine in DEBUG ifdefs as the conditions they check for are not serious enough to abort the engine.
15 years ago
Victor Julien
1d971b53a6
Update all unittests
15 years ago
Victor Julien
014f62247a
Another batch of clang fixes. Nothing really serious. Includes a couple of fixes for broken fixes from yesterday.
15 years ago
Anoop Saldanha
3d2f81d978
replace all Signature->dmatch instances in the engine with Signature->sm_lists[DETECT_SM_LIST_DMATCH]
15 years ago
Anoop Saldanha
e54358a9e1
replace all Signature->pmatch instances in the engine with Signature->sm_lists[DETECT_SM_LIST_PMATCH]
15 years ago
Anoop Saldanha
bc99328ec8
define a new conf paramter detect-engine:inspection-recursion-limit; Defines a recursion limit for content inspection code
15 years ago
Victor Julien
fc248ca7a1
Many small performance updates.
15 years ago
Anoop Saldanha
fc37e9d6ee
add internal ids to uuids. Use these internal ids to match uuids from bind and bind_ack. Create a new uuid list to hold all accepted uuids. Modifications to dce-iface to accomodate these changes as well + unittests
15 years ago
Anoop Saldanha
60c770c434
make pcre respect discontinue_matching flag in content matching functions
15 years ago
Victor Julien
1071a53210
Fix unittests after ip_proto keyword change.
15 years ago
Anoop Saldanha
ead29dc691
make detection engine use dce alstate(if present), on seeing smb traffic
15 years ago
Anoop Saldanha
b94eaec7c2
implement relative pcre matching in detect-engine-(payload|uri|dcepayload).c. Also fix within/distance handling of RELATIVE_NEXT flag for uricontent
15 years ago
Anoop Saldanha
3a375aa43a
fix relative contents with a negated content for detect-engine-(uri|dcepayload).c like how we did for detect-engine-payload.c
15 years ago
Anoop Saldanha
42830d1c5b
fixes for dce_stub_data and content data sig parsing + more unittests
16 years ago
Anoop Saldanha
673322f01f
unittests for dce_stub_data content based singature parsing + fixes
16 years ago
Anoop Saldanha
ce8d27425d
fix signature parsing to how snort does it for content based keywords along with dce_stub_data
16 years ago
Anoop Saldanha
fa373516c5
fixes the offset case for content matches + a case not handled by the prevous fix for multiple relative content matches. fix for payload.c dcepayload.c and uri.c
16 years ago
Anoop Saldanha
92eb380594
multiple relative content matches changes for detect-engine-dcepayload.c and detect-engine-uri.c like how we did for detect-engine-payload.c
16 years ago
Anoop Saldanha
a059ff276e
byte test and byte jump update dce matching option
16 years ago
Victor Julien
b8fec77f37
Fix tcp connections that are reset (RST packet) not always inspecting the reassembled stream. Update transaction id code to make sure both directions of a transaction are inspected before incrementing the inspect_id.
16 years ago
Victor Julien
2f29b8a724
Improve detection of app layer, making sure we only handle app layer on 'established' packets. Should really fix #166 .
16 years ago
Anoop Saldanha
60668fd01d
Reset the flags used during stateful detection in ContinueDetection(). Made the tests more descriptive as well
16 years ago
Anoop Saldanha
bb8937477d
dce tests to check SigMatchSignatures()'s working against new dce transactions
16 years ago
Victor Julien
8cea3779fa
Move dce payload inspection to stateful detection engine.
16 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
16 years ago
Anoop Saldanha
45ea0d914e
dce stub content keywords support using dcepayload.c support for all dce related content keywords
16 years ago