]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
13 years agoFix a reload memleak in the duplicate sig detection hash.
Victor Julien [Mon, 2 Jul 2012 10:43:01 +0000 (12:43 +0200)] 
Fix a reload memleak in the duplicate sig detection hash.

13 years agoClean up packet pool at shut down.
Victor Julien [Mon, 2 Jul 2012 10:36:47 +0000 (12:36 +0200)] 
Clean up packet pool at shut down.

13 years agoUpdate Changelog for 1.3rc1 release suricata-1.3rc1
Victor Julien [Fri, 29 Jun 2012 15:41:21 +0000 (17:41 +0200)] 
Update Changelog for 1.3rc1 release

13 years agosc_atomic_cas replaced with sc_atomic_set
Anoop Saldanha [Fri, 29 Jun 2012 13:57:21 +0000 (19:27 +0530)] 
sc_atomic_cas replaced with sc_atomic_set

13 years agohttp: add unittest to test \r in header line.
Victor Julien [Thu, 31 May 2012 09:25:53 +0000 (11:25 +0200)] 
http: add unittest to test \r in header line.

13 years agohtp: keep track of header line terminators so http_raw_header can reconstruct exact...
Victor Julien [Thu, 31 May 2012 09:00:34 +0000 (11:00 +0200)] 
htp: keep track of header line terminators so http_raw_header can reconstruct exact headers.

13 years agohttp_raw_header: add some debug code.
Victor Julien [Thu, 31 May 2012 08:59:55 +0000 (10:59 +0200)] 
http_raw_header: add some debug code.

13 years agoicmpv6: for ICMPv6 info messages set payload ptr and length to right after 4 byte...
Victor Julien [Fri, 29 Jun 2012 12:38:19 +0000 (14:38 +0200)] 
icmpv6: for ICMPv6 info messages set payload ptr and length to right after 4 byte hdr.

13 years agoafpacket: fix compilation in debug mode.
Victor Julien [Fri, 29 Jun 2012 11:15:46 +0000 (13:15 +0200)] 
afpacket: fix compilation in debug mode.

13 years agoUpdate coccinelle script to match syntax evolution.
Eric Leblond [Wed, 6 Jun 2012 13:17:19 +0000 (15:17 +0200)] 
Update coccinelle script to match syntax evolution.

13 years agocleaning: fix warning when building with clang.
Eric Leblond [Tue, 12 Jun 2012 05:47:03 +0000 (07:47 +0200)] 
cleaning: fix warning when building with clang.

clang was issuing some warnings related to unused return in function.
This patch adds some needed error treatment and ignore the rest of the
warnings by adding a cast to void.

13 years agoaf-packet: use counter for drop and accept
Eric Leblond [Wed, 13 Jun 2012 18:42:04 +0000 (20:42 +0200)] 
af-packet: use counter for drop and accept

This patch adds counters for kernel drops and accepts to af-packet
capture module. This information are periodically displayed in
stats.log:
capture.kernel_packets    | RxAFP1                    | 1792
capture.kernel_drops      | RxAFP1                    | 0
The statistic is fetch via a setsockopt call every 255 packets.

13 years agoaf-packet: add support for BPF filter.
Eric Leblond [Mon, 11 Jun 2012 14:06:13 +0000 (16:06 +0200)] 
af-packet: add support for BPF filter.

This patch adds support for BPF in AF_PACKET running
mode. The command line syntax is the same as the one
used of PF_RING.
The method is the same too: The pcap_compile__nopcap()
function is used to build the BPF filter. It is then
injected into the kernel with a setsockopt() call. If
the adding of the BPF fail, suricata exit.

13 years agoaf-packet: get datalink for each socket creation.
Eric Leblond [Mon, 11 Jun 2012 21:23:32 +0000 (23:23 +0200)] 
af-packet: get datalink for each socket creation.

This patch will allow us to use the datalink when computing the filter.
It also fixes a potential issue where an interface data type change
after the interface if going down/up.

13 years agohttp body inspection: force body inspection on stream eof.
Victor Julien [Fri, 29 Jun 2012 11:02:34 +0000 (13:02 +0200)] 
http body inspection: force body inspection on stream eof.

13 years agodefault config: add engine-analysis.rules directive.
Victor Julien [Fri, 29 Jun 2012 09:37:51 +0000 (11:37 +0200)] 
default config: add engine-analysis.rules directive.

13 years agoinline: fix unified2 alert direction selection
Victor Julien [Thu, 28 Jun 2012 21:19:05 +0000 (23:19 +0200)] 
inline: fix unified2 alert direction selection

13 years agofilemd5: fix compilation if libnss isn't available
Victor Julien [Thu, 28 Jun 2012 21:14:21 +0000 (23:14 +0200)] 
filemd5: fix compilation if libnss isn't available

13 years agofilemd5: add support code for md5 handling for signatures.
Victor Julien [Thu, 7 Jun 2012 08:45:56 +0000 (10:45 +0200)] 
filemd5: add support code for md5 handling for signatures.

13 years agoDon't display a warning when log-pcap tries to remove an already removed file.
Victor Julien [Thu, 28 Jun 2012 17:37:02 +0000 (19:37 +0200)] 
Don't display a warning when log-pcap tries to remove an already removed file.

13 years agohttp header won't inspect set-cookie headers. Set-cookie part of cookie keyword now...
Anoop Saldanha [Tue, 26 Jun 2012 04:59:02 +0000 (10:29 +0530)] 
http header won't inspect set-cookie headers. Set-cookie part of cookie keyword now. Also update the http header inspection engine

13 years agoFree pcre study structs for classification, threshold and reference parsing.
Victor Julien [Thu, 28 Jun 2012 10:50:08 +0000 (12:50 +0200)] 
Free pcre study structs for classification, threshold and reference parsing.

13 years agocode cleanup for live swap
Anoop Saldanha [Tue, 26 Jun 2012 11:38:04 +0000 (17:08 +0530)] 
code cleanup for live swap

13 years agoFix compiler warning.
Victor Julien [Tue, 26 Jun 2012 08:42:45 +0000 (10:42 +0200)] 
Fix compiler warning.

13 years agoupdate clean up of old detection engine contexts for live rule swap
Anoop Saldanha [Mon, 25 Jun 2012 15:46:37 +0000 (21:16 +0530)] 
update clean up of old detection engine contexts for live rule swap

13 years agoDetectEngineCtxFree() cleanup, also in main
Anoop Saldanha [Fri, 22 Jun 2012 18:26:11 +0000 (23:56 +0530)] 
DetectEngineCtxFree() cleanup, also in main

13 years agoReplace the old atomic sets using cas with the new sc_atomic_set macro
Anoop Saldanha [Fri, 22 Jun 2012 18:19:44 +0000 (23:49 +0530)] 
Replace the old atomic sets using cas with the new sc_atomic_set macro

13 years agofree flowvar entries in flow after live rule swap. Sync flowbits entries into packet...
Anoop Saldanha [Fri, 22 Jun 2012 18:18:06 +0000 (23:48 +0530)] 
free flowvar entries in flow after live rule swap. Sync flowbits entries into packet struct to be used by alert debuglog when alert debuglog is enabled

13 years agodisable live rule swap when -s or -S option's used at startup
Anoop Saldanha [Fri, 22 Jun 2012 18:09:02 +0000 (23:39 +0530)] 
disable live rule swap when -s or -S option's used at startup

13 years agoIntroduce util-signal.[ch]. Move our signal setup functions here
Anoop Saldanha [Fri, 22 Jun 2012 18:03:11 +0000 (23:33 +0530)] 
Introduce util-signal.[ch]. Move our signal setup functions here

13 years agoSimplify flow resetting on de_ctx update. Detect ctx id starts at 1. So in a flow...
Victor Julien [Wed, 14 Mar 2012 10:18:43 +0000 (11:18 +0100)] 
Simplify flow resetting on de_ctx update. Detect ctx id starts at 1. So in a flow 0 means uninitialized (thus set) and if we detect flow is not equal to detect id, we reset the sgh storage and de_state.

13 years agoIf new ruleset requires any htp callbacks that aren't already set, don't load new...
Anoop Saldanha [Fri, 22 Jun 2012 16:21:32 +0000 (21:51 +0530)] 
If new ruleset requires any htp callbacks that aren't already set, don't load new ruleset; request user to restart suricata + disable setting fileinsepection flags unconditionally in main

13 years agoadd unittest for atomic operation with void *
Anoop Saldanha [Fri, 22 Jun 2012 16:12:57 +0000 (21:42 +0530)] 
add unittest for atomic operation with void *

13 years agolive rule support added
Anoop Saldanha [Fri, 22 Jun 2012 15:38:26 +0000 (21:08 +0530)] 
live rule support added

To reload ruleset during engine runtime, send the USR2 signal to the engine, and the ruleset would be reloaded from the same yaml file supplied at engine startup

13 years agocleanup threshold config de-init
Anoop Saldanha [Fri, 22 Jun 2012 13:12:35 +0000 (18:42 +0530)] 
cleanup threshold config de-init

13 years agoslot_data updated as an atomic var no
Anoop Saldanha [Fri, 22 Jun 2012 13:07:51 +0000 (18:37 +0530)] 
slot_data updated as an atomic var no

13 years agobyte_extract_id var now a non-global de_ctx specific var
Anoop Saldanha [Fri, 22 Jun 2012 12:33:12 +0000 (18:03 +0530)] 
byte_extract_id var now a non-global de_ctx specific var

13 years agomake mpm ctx container de_ctx specific. Also introduce global variable in mpm_ctx...
Anoop Saldanha [Fri, 22 Jun 2012 12:20:15 +0000 (17:50 +0530)] 
make mpm ctx container de_ctx specific. Also introduce global variable in mpm_ctx. this is a workaround for cleaning non global mpm_ctx's since we now don't supply the de_ctx around the detection engine API

13 years agoclean reference config API
Anoop Saldanha [Fri, 22 Jun 2012 10:28:03 +0000 (15:58 +0530)] 
clean reference config API

13 years agoclean classification config API
Anoop Saldanha [Fri, 22 Jun 2012 10:20:13 +0000 (15:50 +0530)] 
clean classification config API

13 years agoutil action api returns error code if it encounters wrong values parsing wrong action...
Anoop Saldanha [Fri, 22 Jun 2012 09:36:55 +0000 (15:06 +0530)] 
util action api returns error code if it encounters wrong values parsing wrong action conf

13 years agovariable names global vars, global no more. Moved to detection engine ctx, a place...
Anoop Saldanha [Fri, 22 Jun 2012 09:25:38 +0000 (14:55 +0530)] 
variable names global vars, global no more. Moved to detection engine ctx, a place it belongs

13 years agofix replace unittets. Re-set modified global_var to orignial value when the test...
Anoop Saldanha [Fri, 22 Jun 2012 09:09:08 +0000 (14:39 +0530)] 
fix replace unittets. Re-set modified global_var to orignial value when the test completes

13 years agoKill engine during init stage if it fails to load valid value for sgh-mpm-context
Anoop Saldanha [Fri, 22 Jun 2012 09:01:10 +0000 (14:31 +0530)] 
Kill engine during init stage if it fails to load valid value for sgh-mpm-context

13 years agoclear root node during conf de-init. also create root_backup when the root is restore...
Anoop Saldanha [Fri, 22 Jun 2012 08:53:28 +0000 (14:23 +0530)] 
clear root node during conf de-init. also create root_backup when the root is restored back using it

13 years agohttp: decode double decoded path and query string characters. Bug #464.
Victor Julien [Sun, 24 Jun 2012 16:17:48 +0000 (18:17 +0200)] 
http: decode double decoded path and query string characters. Bug #464.

13 years agobuild: Use expanded sysconfdir to pass as CONFIG_DIR to the code.
Victor Julien [Sun, 24 Jun 2012 15:31:05 +0000 (17:31 +0200)] 
build: Use expanded sysconfdir to pass as CONFIG_DIR to the code.

13 years agohttp: make client and server body inspection more robust in cases where realloc fails
Victor Julien [Sun, 24 Jun 2012 08:22:41 +0000 (10:22 +0200)] 
http: make client and server body inspection more robust in cases where realloc fails

13 years agodetect: Only run mpm on HTTP buffers in the proper direction. Fixes a file_data FN.
Victor Julien [Fri, 22 Jun 2012 08:59:55 +0000 (10:59 +0200)] 
detect: Only run mpm on HTTP buffers in the proper direction. Fixes a file_data FN.

13 years agodcerpc/smb/smb2: more robust error checking, cosmetic code updates.
Victor Julien [Thu, 21 Jun 2012 18:35:51 +0000 (20:35 +0200)] 
dcerpc/smb/smb2: more robust error checking, cosmetic code updates.

13 years agosome more mpm engine cleanup
Anoop Saldanha [Wed, 20 Jun 2012 18:40:38 +0000 (00:10 +0530)] 
some more mpm engine cleanup

13 years agompm engine cleanup. Remove unnecessary flags
Anoop Saldanha [Wed, 20 Jun 2012 17:56:44 +0000 (23:26 +0530)] 
mpm engine cleanup. Remove unnecessary flags

13 years agocookie header now inspects Set-Cookie headers as well
Anoop Saldanha [Sat, 16 Jun 2012 08:46:10 +0000 (14:16 +0530)] 
cookie header now inspects Set-Cookie headers as well

13 years agounittests that fail, displaying the issue that we don't inspect set-cookie headers...
Anoop Saldanha [Sat, 16 Jun 2012 08:44:23 +0000 (14:14 +0530)] 
unittests that fail, displaying the issue that we don't inspect set-cookie headers against cookie keywords

The next patch in the series will fix the issue and let the unittests pass as well.

13 years agopcap: make sure thread count is 1 if config is missing for a device.
Victor Julien [Wed, 20 Jun 2012 15:19:08 +0000 (17:19 +0200)] 
pcap: make sure thread count is 1 if config is missing for a device.

13 years ago#482 - use decode_flag for all decode TMs. Use the flag as a way to retrieve decode...
Anoop Saldanha [Sat, 16 Jun 2012 05:17:30 +0000 (10:47 +0530)] 
#482 - use decode_flag for all decode TMs. Use the flag as a way to retrieve decode TMs from ThreadVars

13 years agowe now support offset, depth inspection against all packet payloads and stream messages
Anoop Saldanha [Thu, 14 Jun 2012 08:48:23 +0000 (14:18 +0530)] 
we now support offset, depth inspection against all packet payloads and stream messages

13 years agotests to highlight that
Anoop Saldanha [Fri, 15 Jun 2012 12:36:13 +0000 (18:06 +0530)] 
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 agostream raw reassembly fix
Anoop Saldanha [Mon, 28 May 2012 06:27:12 +0000 (11:57 +0530)] 
stream raw reassembly fix

13 years agofast pattern cleanup - Remove FastPatternSupportEnabledForSigMatchList() and all...
Anoop Saldanha [Sat, 16 Jun 2012 12:22:55 +0000 (17:52 +0530)] 
fast pattern cleanup - Remove FastPatternSupportEnabledForSigMatchList() and all it's associated structures

13 years agohttp user agent keyword + mpm + inspection + fast pattern support added
Anoop Saldanha [Tue, 12 Jun 2012 14:21:12 +0000 (19:51 +0530)] 
http user agent keyword + mpm + inspection + fast pattern support added

13 years agoAdd pcap workers mode.
Victor Julien [Sun, 20 May 2012 10:12:42 +0000 (12:12 +0200)] 
Add pcap workers mode.

Some cards like Napatech or Myricom support libpcap wrappers that allow for
multiple streams, queues, ringbuffers. The workers mode can be of use in
those cases.

13 years agobug #471 - file_data fast pattern unittests added
Anoop Saldanha [Mon, 28 May 2012 08:50:02 +0000 (14:20 +0530)] 
bug #471 - file_data fast pattern unittests added

13 years agobug #471 - http server body fast pattern unittests added
Anoop Saldanha [Mon, 28 May 2012 07:16:27 +0000 (12:46 +0530)] 
bug #471 - http server body fast pattern unittests added

13 years agorule analyzer: minor cleanups. Fix warning-only setting, allow true/yes/enabled for...
Victor Julien [Mon, 11 Jun 2012 20:47:24 +0000 (22:47 +0200)] 
rule analyzer: minor cleanups. Fix warning-only setting, allow true/yes/enabled for yaml option.

13 years agoFix commandline supplied yaml path being ignored.
Victor Julien [Mon, 11 Jun 2012 20:46:25 +0000 (22:46 +0200)] 
Fix commandline supplied yaml path being ignored.

13 years agofeature 349 rule analyzer v1
Eileen Donlon [Mon, 30 Apr 2012 23:23:23 +0000 (19:23 -0400)] 
feature 349 rule analyzer v1

13 years agoOpenBSD: fix tar command.
Eric Leblond [Sun, 10 Jun 2012 18:23:56 +0000 (20:23 +0200)] 
OpenBSD: fix tar command.

13 years agoconfig: use config file in sysconfdir by default.
Eric Leblond [Sun, 10 Jun 2012 18:23:55 +0000 (20:23 +0200)] 
config: use config file in sysconfdir by default.

13 years agoAdded -T switch to suricata output.
marcos [Thu, 7 Jun 2012 17:58:31 +0000 (13:58 -0400)] 
Added -T switch to suricata output.

Simply added the -T to be printed out when suricata is run without any
arguments.  The capability to test a configuration file has been in
suricata for some time, just doesn't show up as an option right now.

13 years agofilemd5: implement negated matching.
Victor Julien [Sun, 10 Jun 2012 13:27:08 +0000 (15:27 +0200)] 
filemd5: implement negated matching.

13 years agoUpdate changelog to reflect 1.3beta2 changes. suricata-1.3beta2
Victor Julien [Fri, 8 Jun 2012 13:38:57 +0000 (15:38 +0200)] 
Update changelog to reflect 1.3beta2 changes.

13 years agoDisable dce unittests that tick off clamav. #458.
Victor Julien [Fri, 8 Jun 2012 14:07:55 +0000 (16:07 +0200)] 
Disable dce unittests that tick off clamav. #458.

13 years agobug #458 - unittest that uses clamav FPing payload disabled for now. Needs to be...
Anoop Saldanha [Thu, 7 Jun 2012 20:34:15 +0000 (02:04 +0530)] 
bug #458 - unittest that uses clamav FPing payload disabled for now. Needs to be rewritten though with new payloads

13 years agoFix compilation warning.
Victor Julien [Fri, 8 Jun 2012 07:44:30 +0000 (09:44 +0200)] 
Fix compilation warning.

13 years agotls: debug compilation fixes, new tls decoder rule for tls.error_message_encountered...
Victor Julien [Thu, 7 Jun 2012 15:33:49 +0000 (17:33 +0200)] 
tls: debug compilation fixes, new tls decoder rule for tls.error_message_encountered event.

13 years agossl connection error message event added. Remove warning log for the same error alert
Anoop Saldanha [Thu, 7 Jun 2012 13:59:04 +0000 (19:29 +0530)] 
ssl connection error message event added. Remove warning log for the same error alert

13 years agossl parser fix/updates
Anoop Saldanha [Fri, 18 May 2012 15:48:30 +0000 (21:18 +0530)] 
ssl parser fix/updates

13 years agoWe have a new probing parser to detect sslv2 records. todos to be covered later
Anoop Saldanha [Thu, 26 Apr 2012 11:54:39 +0000 (17:24 +0530)] 
We have a new probing parser to detect sslv2 records. todos to be covered later

13 years agofilemd5: handle case where no md5 support is compiled it.
Victor Julien [Thu, 7 Jun 2012 09:44:39 +0000 (11:44 +0200)] 
filemd5: handle case where no md5 support is compiled it.

13 years agoAdd filemd5 keyword that loads a list of md5's to match a file's md5 against.
Victor Julien [Wed, 6 Jun 2012 15:47:26 +0000 (17:47 +0200)] 
Add filemd5 keyword that loads a list of md5's to match a file's md5 against.

13 years agoAdd a new hash datatype to do speedy lookups of read only uniform data, like md5's.
Victor Julien [Wed, 6 Jun 2012 10:11:32 +0000 (12:11 +0200)] 
Add a new hash datatype to do speedy lookups of read only uniform data, like md5's.

13 years agopfring: protect pfring_set_bpf_filter with a lock as it's not thread safe.
Victor Julien [Mon, 4 Jun 2012 11:28:07 +0000 (13:28 +0200)] 
pfring: protect pfring_set_bpf_filter with a lock as it's not thread safe.

13 years agoAutotools: make 'install-full' now run 'install' too.
Eric Leblond [Sun, 3 Jun 2012 08:54:56 +0000 (10:54 +0200)] 
Autotools: make 'install-full' now run 'install' too.

13 years agounified2: minor cleanups
Victor Julien [Fri, 1 Jun 2012 07:04:07 +0000 (09:04 +0200)] 
unified2: minor cleanups

13 years agoImprove error reporting in case of syntax errors in the address and port vars.
Victor Julien [Thu, 31 May 2012 17:56:07 +0000 (19:56 +0200)] 
Improve error reporting in case of syntax errors in the address and port vars.

13 years agofile: fix file length and md5 tracking when file storing is disabled
Victor Julien [Thu, 31 May 2012 17:09:47 +0000 (19:09 +0200)] 
file: fix file length and md5 tracking when file storing is disabled

13 years ago#449: fix md5 calculation in daemon mode.
Victor Julien [Thu, 31 May 2012 17:08:46 +0000 (19:08 +0200)] 
#449: fix md5 calculation in daemon mode.

13 years agopfring: move missing timestamp handling code to PfringProcessPacket.
Victor Julien [Thu, 31 May 2012 09:33:44 +0000 (11:33 +0200)] 
pfring: move missing timestamp handling code to PfringProcessPacket.

13 years agoFix missing timestamps in some flavours of PF_RING
Chris Wakelin [Wed, 30 May 2012 20:53:21 +0000 (21:53 +0100)] 
Fix missing timestamps in some flavours of PF_RING

13 years agohttp: add test to make sure a missing space between header name and value is not...
Victor Julien [Wed, 30 May 2012 14:43:26 +0000 (16:43 +0200)] 
http: add test to make sure a missing space between header name and value is not a problem (ref #474).

13 years agounified2: big rewrite to clean up code that deals with tcp segment logging.
Victor Julien [Wed, 30 May 2012 13:27:16 +0000 (15:27 +0200)] 
unified2: big rewrite to clean up code that deals with tcp segment logging.

13 years agoOpenBSD: introduce SCLocalTime function.
Eric Leblond [Sun, 20 May 2012 15:12:19 +0000 (17:12 +0200)] 
OpenBSD: introduce SCLocalTime function.

This function is a wrapper to localtime_r. It is needed to avoid
a compilation warning on OpenBSD. I'm forced to type the function
to a non pointer first parameter. If not we will have to use two
differents functions in OpenBSD where tv->tv_sec is a long
(different from time_t).

13 years agoAdd debug messages to HTTP error/warning handling.
Victor Julien [Fri, 10 Feb 2012 13:29:16 +0000 (14:29 +0100)] 
Add debug messages to HTTP error/warning handling.

13 years agoSupport FNAME and FCOMMENT extensions in gzip'd http content.
Victor Julien [Fri, 10 Feb 2012 13:28:50 +0000 (14:28 +0100)] 
Support FNAME and FCOMMENT extensions in gzip'd http content.

13 years agostream: improve error checking.
Victor Julien [Fri, 25 May 2012 12:54:46 +0000 (14:54 +0200)] 
stream: improve error checking.

13 years agoreplace: add missing malloc return value check.
Victor Julien [Fri, 25 May 2012 10:47:57 +0000 (12:47 +0200)] 
replace: add missing malloc return value check.

13 years agopfring: follow API change
Eric Leblond [Thu, 24 May 2012 16:38:36 +0000 (18:38 +0200)] 
pfring: follow API change

As pointed out in issue #459, pf_ring API has changed. Since
5.4.0 release pf_ring_open has one less argument.

13 years agoMake sure all fake packets have datalink type DLT_RAW. Make sure stream end packets...
Victor Julien [Fri, 25 May 2012 08:21:39 +0000 (10:21 +0200)] 
Make sure all fake packets have datalink type DLT_RAW. Make sure stream end packets set pkt size.

13 years agoOpenBSD: setup specific place for magic file.
Eric Leblond [Tue, 22 May 2012 20:23:10 +0000 (22:23 +0200)] 
OpenBSD: setup specific place for magic file.

This patch fixes the path to the default magic file on OpenBSD.