Anoop Saldanha
619414c59e
Add a /* fall through */ comment for all switch case fall throughs.
...
This should server as a message to coverity that the fall through is
intentional.
12 years ago
Anoop Saldanha
0d7159b525
App layer protocol detection updated and improved. We now use
...
confirmation from both directions and set events if there's a mismatch
between the 2 directions.
FPs from corrupt flows have disappeared with this.
12 years ago
Anoop Saldanha
6f8cfd999f
Allow detection ports for alproto to be specified via the conf file.
...
To understand the option have a look at the option
app-layer.protocols.tls.detection-ports
12 years ago
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
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
Victor Julien
9faa4b740d
Add --unittests-coverage option to list how many code modules have tests
12 years ago
Victor Julien
f59f90331d
Applayer: remove obsolete StateUpdateTransactionId
...
Also, update StateTransactionFree to take an u64 tx id, so it's
consistant with the rest of the engine.
To reflect these changes, AppLayerRegisterTransactionIdFuncs has
been renamed to AppLayerRegisterTxFreeFunc.
HTP, DNS, SMB, DCERPC parsers updated.
12 years ago
Anoop Saldanha
c6d50764e5
temporarily patched smb + dcerpc parsers for direction demaraction.
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
Victor Julien
a08a0e9161
Minor output cleanup
13 years ago
Victor Julien
2055b509a3
dcerpc/smb/smb2: more robust error checking, cosmetic code updates.
13 years ago
Anoop Saldanha
109662450d
Add new command line option --list-app-layer-protocols to list supported app layer protocols in sigs
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
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
4650bf7170
minor code cleanup. remove commented out code
14 years ago
Anoop Saldanha
78e6a7f713
enable toclient alproto detection. Detection all current alproto toclient PMP patterns
14 years ago
Anoop Saldanha
d3989e7cee
probing parser updated to always accept u32 buflens. Update all probing parser functions to accomodate this change
14 years ago
Anoop Saldanha
432c3317d2
app layer probing parser updates
14 years ago
Anoop Saldanha
4307ea2348
Replace all frees with SCFrees
14 years ago
Anoop Saldanha
be3996ac02
coverity fix - 1.1beta branch - add some comments to indicate false positives by coverity for future reference - mainly comments for switch statement fall through
14 years ago
Anoop Saldanha
6e0d98d9c4
fix valgrind issue for SMB test. Small restructuring. probing_parsers global variable now part of AlpProtoDetectCtx
14 years ago
Anoop Saldanha
7f8fb0f00d
fix bounds checking in smb probing parser
14 years ago
Anoop Saldanha
61635f302c
indentation changes in app-layer-smb.c
14 years ago
Anoop Saldanha
a40fdc794e
Added probing parser for nbss/smb on port 139
14 years ago
Anoop Saldanha
b7b7bbec37
code indentation changes in app-layer-smb.c
14 years ago
Anoop Saldanha
000ce98cd1
push all proto detection code into their respective app parser register functions for every alproto
14 years ago
Victor Julien
1859ed54c7
Add memcmp api with a plain memcmp function and a SSE3 accelerated memcmp.
15 years ago
Anoop Saldanha
ead29dc691
make detection engine use dce alstate(if present), on seeing smb traffic
15 years ago
Kirby Kuehl
18840bd96e
properly handle bytecount of 0
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
Kirby Kuehl
3a985a9f5f
fix smb leak
15 years ago
Pablo Rincon
8cc525c939
UDP support at AppLayer message handling
15 years ago
Victor Julien
52cdfb332e
Fix a compiler warning, add some comments, cleanup layout of smb parser.
15 years ago
root
73c6fb16ba
Return 0 instead of -1 when SMB and DCERPC encounter non fatal errors to clean up errors emitted in AppLayerParse.
15 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
15 years ago
Victor Julien
b7c089df42
Fix a couple of harmless compiler warnings.
15 years ago
Victor Julien
68576947e2
Small SMB cleanups.
16 years ago
Kirby Kuehl
f08d3e76ee
add maximum andx chain depth
16 years ago
Victor Julien
449205cfeb
Remove wrong copyright info, cleanup headers.
16 years ago
Kirby Kuehl
afb08d388d
make sure we have input_len
16 years ago
Pablo Rincon
25a3a5c6d8
Adding mem wrapper to debug runtime alloc()/free() functions. Fixing some memory leaks.
16 years ago
Kirby Kuehl
565eab1f54
fix bug88
16 years ago
Kirby Kuehl
a334a87109
smb safety checks
16 years ago
Kirby Kuehl
bea30a6db6
bug 88 validate dcerpc header
16 years ago
Kirby Kuehl
a8c3718b56
signed unsigned comparision fix for 64 bit
16 years ago
Victor Julien
b99e10236c
Fix a endless loop condition in the smb parser and make dcerpc parser more quiet.
16 years ago
Victor Julien
16aebe5add
Fixup smb tests.
16 years ago
Kirby Kuehl
957b43b3d6
signed unsigned comparision cleanup
16 years ago
Kirby Kuehl
40a0fd5e97
fix warning
16 years ago