Victor Julien
158d72e7f3
file-inspection: inspect new files in same tx but opposite direction as well.
14 years ago
Victor Julien
4eda31df4d
file inspection: unset new file available flag when appropriate, prevents duplicate alerts.
14 years ago
Victor Julien
c2c539942b
Rework the way the http parser can tell the de_state to reset it's file section on arrival of new files in the same tx. Fixes a dead lock in the auto runmode.
14 years ago
Victor Julien
7db72bce75
Optimize detection engine prefiltering logic.
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
Victor Julien
b74c73309b
file handling: improve filestore keyword handling
...
In stateful detection only inspect the file portion of the rule after all
other conditions matched. This to prevent "filestore" from tagging files
for storage during a partial match.
Add a couple of unittests to test the behaviour change.
14 years ago
Victor Julien
96d20098b0
file inspect: stateful inspection split
...
Split stateful detection of the files in a HTTP state between toserver
and toclient inspection.
14 years ago
Victor Julien
d59ca75e46
file extract: split toserver and toclient tracking
...
Split toserver and toclient file tracking for the http state.
14 years ago
Victor Julien
04ea70ccf7
file extract: pruning
...
Add pruning of files in memory so we keep only memory what we really need.
Fix magic logic.
Reset file part of the de_state on receiving another file in the same tx.
14 years ago
Victor Julien
b402d97179
File carving -- enable reponse file extraction
...
- Enable response body tracking
- Enable file extraction for responses
- File store meta file includes magic, close reason.
- Option to force magic lookup for all stored files.
- Fix libmagic calls thead safety.
14 years ago
Victor Julien
e1022ee5ae
file-extraction: Disconnect file handling from flow and move into the app layer state.
14 years ago
Victor Julien
23e01d23d3
Implement filestore keyword, including a way for the stateful detection engine to conclude that a file will never have to be stored.
14 years ago
Anoop Saldanha
9a6aef459e
modify all relevant app layer API calls to accomodate passing parser local storage argument
14 years ago
Anoop Saldanha
3a856fed12
update detection engine to compare flow alproto with sig_alproto, rather than sm alproto.
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
Eric Leblond
b055a21d63
doc: create doxygen group for state detection.
14 years ago
Victor Julien
1bd1a62526
Rename profile macro's and variables to reflect that they are for rule profiling.
14 years ago
Victor Julien
f7f037c1d1
Make sure stateful detection engine inspecting HTTP streams works well for to_client rules as well.
14 years ago
Victor Julien
0ea883edf3
Fix broken stateful detection unittest.
14 years ago
Victor Julien
73efb4c70f
Add a app layer state and stateful detection engine counter that makes sure the stateful inspection is only done when the state changes.
14 years ago
Victor Julien
50aceb11eb
Clean up stateful detection code.
14 years ago
Anoop Saldanha
966119b6aa
support for http_raw_uri keyword + mpm engine
14 years ago
Victor Julien
e19f6ebaf4
Various fixes for issues reported by clang.
15 years ago
Victor Julien
1d971b53a6
Update all unittests
15 years ago
Victor Julien
f606621e8c
Fix the pseudo packet having the wrong proto set, causing massive fp's. Flag packets to be part of the established phase of a tcp session, so we won't prematurely inspect the app layer state.
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
302011dbca
fix compilation issues with debug enabled.
15 years ago
Anoop Saldanha
5c6a65dc58
support relative modifiers for http_client_body. Introduce body processing engine in detect-engine-hcbd.[ch]
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
a7353be20d
replace all Signature->amatch instances in the engine with Signature->sm_lists[DETECT_SM_LIST_AMATCH]
15 years ago
Anoop Saldanha
e0476242c6
replace all Signature->umatch instances in the engine with Signature->sm_lists[DETECT_SM_LIST_UMATCH]
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
Anoop Saldanha
ead29dc691
make detection engine use dce alstate(if present), on seeing smb traffic
15 years ago
Victor Julien
0d008c8135
Change stateful detection engine to be able to start the stateful detection separate from other sigs. Fixes bugs #213 , #214 , #215 .
15 years ago
Victor Julien
bfd167521e
Fix DCERPC over SMB/SMB2 detection issues. Fix not updating transaction id in a stream direction if there was no sgh.
15 years ago
Gurvinder Singh
154a8b1ed9
fixed the build failure with profiling enabled
15 years ago
Victor Julien
cff0a0bda2
Fix segv conditions caused by broken flow cleanup code.
15 years ago
Pablo Rincon
a8cb8d830b
Fix for bug 186 and thresholding issue handling ip versions
15 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.
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
60668fd01d
Reset the flags used during stateful detection in ContinueDetection(). Made the tests more descriptive as well
15 years ago
Victor Julien
8cea3779fa
Move dce payload inspection to stateful detection engine.
15 years ago
Victor Julien
9dd753b5f3
Scan uricontent mpm on demand.
15 years ago
Victor Julien
dd88e46f0c
Fix detect engine state unittest, add another.
15 years ago