Anoop Saldanha
ddde572fba
Introduce new options into the conf file to enable/disable -
...
1. Proto detection
2. Parsers
For app layer protocols.
libhtp has now been moved to the section under app-layer.protocols.http,
but we still provide backward compatibility with older conf files.
12 years ago
Anoop Saldanha
d9686fae57
Now supports accepting port addresses as strings, like the ones accepted in our rules. As a consequence we now accept port range, and other such combination. Support PP for ports based on ipproto as well.
12 years ago
Victor Julien
4827a4dcef
Coverity 400477: pcre_get_substring retval
...
Add missing return code check to pcre_get_substring call.
12 years ago
Eric Leblond
c5bd04f102
unittest: recycle packet before exit
...
To avoid an issue with flow validation, we need to recycle the packet
before cleaning the flow.
12 years ago
Anoop Saldanha
48cf0585fb
Suricata upgrade to libhtp 0.5.x.
...
Remove the support for now unsupported personalities from libhtp -
TOMCAT_6_0, APACHE and APACHE_2_2. We instead use the APACHE_2
personality.
12 years ago
Victor Julien
73e27c1fb7
Generate proper errors if sid,gid,rev values are out of range. Bug #779 .
12 years ago
Victor Julien
7292998a58
Content: set up sticky buffers like file_data and dce_stub_data w/o flags, but with a list variable
12 years ago
Victor Julien
f10dd603ff
DNS: adding dns_request content modifier
12 years ago
Victor Julien
59780ca770
Hacks to enable alert dns even though we have dnstcp and dnsudp parsers. Needs proper solution later.
12 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.
12 years ago
Victor Julien
19511cda97
Remove obsolete DetectParseContentString function, it has been replaced by DetectContentDataParse
12 years ago
Victor Julien
4165de4771
Minor SigValidate cleanup
12 years ago
Anoop Saldanha
0d7305dfc7
Update the way we handle http_host keywords.
...
Previously we would have forced all users to use nocase with http_host
keywords(since the hostname buffer is lowercase).
We now error out on sigs that has nocase set with http_host set. Also if
the http_host pattern or http_host pcre has an uppercase character set, we
invalidate such sigs. Unittests also updated to reflect the above change.
12 years ago
Anoop Saldanha
4c6efa2d40
Update content id assignment.
...
All fp id assignment now happens in one go.
Also noticing a slight perf increase, probably emanating from improved cache
perf.
Removed irrelevant unittests as well.
12 years ago
Anoop Saldanha
60be1751d5
Figure out sig fp during validation stage, instead of staging stage.
12 years ago
Anoop Saldanha
f8ae53ac02
Further customize content modifier buffer registration.
...
Allow modifier setups functions to have CustomCallbacks to enable their
internal conditions.
12 years ago
Anoop Saldanha
a304a98d1d
http_* setup unified.
12 years ago
Anoop Saldanha
0b5d277254
code cleanup for all content based keywords.
12 years ago
Anoop Saldanha
a308d718ae
Allow the use of relative without the presence of a related previous keyword.
12 years ago
Anoop Saldanha
3511f91bba
Add support for the new keyword - http_raw_host header.
...
The corresponding pcre modifier would be 'Z'.
13 years ago
Anoop Saldanha
c4ce19a1be
Add support for a new keyword to inspect http_host header.
...
The corresponding content keyword would now be - http_host.
The corresponding pcre modifier would be W.
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
Victor Julien
84bad6db77
Silence compiler warnings found by clang
13 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
pi-rho
0df4c5838d
spelling corrections documented in redmine bug#533
13 years ago
Victor Julien
e0bfcb7dde
Only set SIG_FLAG_REQUIRE_STREAM if signature inspects TCP.
13 years ago
Anoop Saldanha
bf6cd48259
if a sig's set as stream sig only, don't updated it as both stream and pkt sig if offset/depth's present
...
bug #495 - update rule analyzer to not warn on offset_depth-tcp_pkt update if sig is stream only
bug #497 - rule_warnings fixed
13 years ago
Anoop Saldanha
960d421f9d
Update SigValidate() to allow http keywords to be specified in the right flow direction
13 years ago
Victor Julien
ab421978f0
Free all sig match structs when freeing a signature.
13 years ago
Victor Julien
af97c36c08
Properly clean signature's ip only data.
13 years ago
Victor Julien
19e3348cae
Fix a reload memleak in the duplicate sig detection hash.
13 years ago
Anoop Saldanha
0d602d9cde
we now support offset, depth inspection against all packet payloads and stream messages
13 years ago
Anoop Saldanha
a34f91358d
tests to highlight that
...
- suricata treates sigs with offset/depth without any packet keywords as stream sigs
- as a consequence suricata will FN on such sigs
The tests introduced here will fail, displaying the issues. The
next patch in the series would fix the said issues.
13 years ago
Anoop Saldanha
988c92f71c
http user agent keyword + mpm + inspection + fast pattern support added
13 years ago
Victor Julien
073ce64786
Fix parsing of tcp-pkt and tcp-stream sigs, add unittest.
13 years ago
Eileen Donlon
da633d490b
fix misleading comment
13 years ago
Victor Julien
da3c5bf84d
Minor error message cleanups
13 years ago
Victor Julien
cdba2f50d1
Various fixes and improvements based on feedback by Coverity analyzer.
14 years ago
Anoop Saldanha
4810ee9c5f
All uricontent modified patterns now are DETECT_CONTENT and not DETECT_URICONTENT. Step towards unifying all content based patterns. Makes way for easier management of patterns
14 years ago
Anoop Saldanha
93d7a6e671
code cleanup. Remove unused functions
14 years ago
Anoop Saldanha
eb07c345b8
code cleanup - replace SigMatchAppendThreshold with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
dd7e710f35
code cleanup - replace SigMatchAppendPostMatch with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
a4638fb0ad
code cleanup - replace SigMatchAppendPacket with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
ff38d42bf1
code cleanup - replace SigMatchAppendTag with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
ac68c3f893
code cleanup - replace SigMatchAppendDcePayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
6cab663bf0
code cleanup - replace SigMatchAppendPayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
c4cb37b8da
code cleanup - replace SigMatchAppendUricontent with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
c9af50ea0c
code cleanup - replace SigMatchAppendAppLayer with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
bbb9f35f26
code cleanup - replace SigMatchGetLastSM with SigMatchGetLastSMFromLists
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