]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
8 years agodetect: remove DMATCH list
Victor Julien [Thu, 22 Dec 2016 22:56:48 +0000 (23:56 +0100)] 
detect: remove DMATCH list

8 years agoflow: remove unused Flow::de_state
Victor Julien [Thu, 22 Dec 2016 19:49:32 +0000 (20:49 +0100)] 
flow: remove unused Flow::de_state

8 years agodetect: remove the AMATCH list
Victor Julien [Thu, 22 Dec 2016 19:31:38 +0000 (20:31 +0100)] 
detect: remove the AMATCH list

8 years agodetect: remove AppLayerMatch API call
Victor Julien [Thu, 22 Dec 2016 19:17:49 +0000 (20:17 +0100)] 
detect: remove AppLayerMatch API call

8 years agodce: dynamic lists
Victor Julien [Thu, 22 Dec 2016 19:05:17 +0000 (20:05 +0100)] 
dce: dynamic lists

8 years agosmb/dcerpc: use tx api
Victor Julien [Thu, 22 Dec 2016 18:03:44 +0000 (19:03 +0100)] 
smb/dcerpc: use tx api

8 years agodcerpc: simplify common detect code
Victor Julien [Thu, 22 Dec 2016 15:55:43 +0000 (16:55 +0100)] 
dcerpc: simplify common detect code

8 years agoftp: parser and ftpbounce update
Victor Julien [Thu, 22 Dec 2016 14:21:32 +0000 (15:21 +0100)] 
ftp: parser and ftpbounce update

Convert parser to TX API.

Convert ftpbounce keyword to use that.

8 years agodetect: move lua smtp support to dynamic list
Victor Julien [Thu, 22 Dec 2016 13:48:53 +0000 (14:48 +0100)] 
detect: move lua smtp support to dynamic list

8 years agolua: convert lua output to be tx aware
Victor Julien [Thu, 22 Dec 2016 12:29:07 +0000 (13:29 +0100)] 
lua: convert lua output to be tx aware

8 years agodetect: make ssh detection use dynamic list
Victor Julien [Thu, 22 Dec 2016 12:07:06 +0000 (13:07 +0100)] 
detect: make ssh detection use dynamic list

8 years agossh: remove single logger limit
Victor Julien [Thu, 22 Dec 2016 11:48:59 +0000 (12:48 +0100)] 
ssh: remove single logger limit

8 years agossh: convert app-layer parser to be tx aware
Victor Julien [Thu, 22 Dec 2016 11:45:17 +0000 (12:45 +0100)] 
ssh: convert app-layer parser to be tx aware

Like with SSL, there is only a single 'tx'.

8 years agolua: use tls_generic list for ssl/tls
Victor Julien [Thu, 22 Dec 2016 09:35:44 +0000 (10:35 +0100)] 
lua: use tls_generic list for ssl/tls

8 years agodetect ssl/tls: use dynamic lists
Victor Julien [Thu, 22 Dec 2016 09:32:00 +0000 (10:32 +0100)] 
detect ssl/tls: use dynamic lists

8 years agossl/tls: clean up keywords
Victor Julien [Thu, 22 Dec 2016 09:09:34 +0000 (10:09 +0100)] 
ssl/tls: clean up keywords

8 years agodetect: convert old tls keywords to dynamic list
Victor Julien [Wed, 21 Dec 2016 20:27:56 +0000 (21:27 +0100)] 
detect: convert old tls keywords to dynamic list

8 years agotls.store: convert to postmatch
Victor Julien [Wed, 21 Dec 2016 18:53:00 +0000 (19:53 +0100)] 
tls.store: convert to postmatch

8 years agotls.store: cleanup
Victor Julien [Wed, 21 Dec 2016 18:43:25 +0000 (19:43 +0100)] 
tls.store: cleanup

8 years agoapp-layer-events: remove unused API options
Victor Julien [Wed, 21 Dec 2016 16:58:26 +0000 (17:58 +0100)] 
app-layer-events: remove unused API options

8 years agodetect: http_start sticky buffer
Victor Julien [Tue, 20 Dec 2016 13:04:55 +0000 (14:04 +0100)] 
detect: http_start sticky buffer

Matches on the start of a HTTP request or response.

Uses a buffer constructed from the request line and normalized request
headers, including the Cookie header.

Or for the response side, it uses the response line plus the
normalized response headers, including the Set-Cookie header.

Both buffers are terminated by an extra \r\n.

8 years agodetect: add http_protocol sticky buffer
Victor Julien [Mon, 19 Dec 2016 22:41:40 +0000 (23:41 +0100)] 
detect: add http_protocol sticky buffer

Matches on protocol field in HTTP.

8 years agohttp_header: convert to use common code
Victor Julien [Mon, 19 Dec 2016 16:06:11 +0000 (17:06 +0100)] 
http_header: convert to use common code

8 years agohttp_header: common detection code
Victor Julien [Mon, 19 Dec 2016 14:45:12 +0000 (15:45 +0100)] 
http_header: common detection code

8 years agohttp_header: remove old files
Victor Julien [Mon, 19 Dec 2016 13:43:59 +0000 (14:43 +0100)] 
http_header: remove old files

8 years agohttp_header: move all code into keyword files
Victor Julien [Mon, 19 Dec 2016 13:38:27 +0000 (14:38 +0100)] 
http_header: move all code into keyword files

8 years agodetect: http_header_names sticky buffer keyword
Victor Julien [Mon, 19 Dec 2016 10:25:58 +0000 (11:25 +0100)] 
detect: http_header_names sticky buffer keyword

A sticky buffer that allows content inspection on a contructed buffer
of HTTP header names. The buffer starts with \r\n, the names are
separated by \r\n and the end of the buffer contains an extra \r\n.

E.g. \r\nHost\r\nUser-Agent\r\n\r\n

The leading \r\n is to make sure one can match on a full name in all
cases.

8 years agodetect: global registery for keyword thread data
Victor Julien [Mon, 19 Dec 2016 10:25:27 +0000 (11:25 +0100)] 
detect: global registery for keyword thread data

Some keywords need a scratch space where they can do store the results
of expensive operations that remain valid for the time of a packets
journey through the detection engine.

An example is the reconstructed 'http_header' field, that is needed
in MPM, and then for each rule that manually inspects it. Storing this
data in the flow is a waste, and reconstructing multiple times on
demand as well.

This API allows for registering a keyword with an init and free function.

It it mean to be used an initialization time, when the keyword is
registered.

8 years agoprofiling: output all sort options for rules
Victor Julien [Thu, 15 Dec 2016 10:18:44 +0000 (11:18 +0100)] 
profiling: output all sort options for rules

Limit the default number of sids to 10.

8 years agoprofiling: honor limit in json rule output
Victor Julien [Thu, 15 Dec 2016 10:17:13 +0000 (11:17 +0100)] 
profiling: honor limit in json rule output

8 years agoprofiling: fix keyword profiling
Victor Julien [Thu, 15 Dec 2016 09:12:21 +0000 (10:12 +0100)] 
profiling: fix keyword profiling

8 years agodetect-engine-mpm: api cleanup
Victor Julien [Wed, 14 Dec 2016 12:08:39 +0000 (13:08 +0100)] 
detect-engine-mpm: api cleanup

8 years agodetect: detect engine registration cleanup
Victor Julien [Mon, 12 Dec 2016 19:00:26 +0000 (20:00 +0100)] 
detect: detect engine registration cleanup

8 years agodetect: cleanup built-in list id's
Victor Julien [Mon, 12 Dec 2016 11:20:46 +0000 (12:20 +0100)] 
detect: cleanup built-in list id's

8 years agotemplate: dynamic buffer
Victor Julien [Mon, 12 Dec 2016 11:03:46 +0000 (12:03 +0100)] 
template: dynamic buffer

8 years agoapp-layer-events: dynamic list
Victor Julien [Sun, 11 Dec 2016 08:59:31 +0000 (09:59 +0100)] 
app-layer-events: dynamic list

8 years agofiles: use dynamic list
Victor Julien [Sat, 10 Dec 2016 21:03:46 +0000 (22:03 +0100)] 
files: use dynamic list

8 years agocip/enip: dynamic buffer
Victor Julien [Sat, 10 Dec 2016 20:55:51 +0000 (21:55 +0100)] 
cip/enip: dynamic buffer

8 years agomodbus: dynamic buffer
Victor Julien [Sat, 10 Dec 2016 13:36:06 +0000 (14:36 +0100)] 
modbus: dynamic buffer

8 years agodnp3: dynamic buffers/lists
Victor Julien [Sat, 10 Dec 2016 13:04:50 +0000 (14:04 +0100)] 
dnp3: dynamic buffers/lists

8 years agotls: dynamic buffers
Victor Julien [Sat, 10 Dec 2016 10:36:06 +0000 (11:36 +0100)] 
tls: dynamic buffers

8 years agodns: use dynamic buffers
Victor Julien [Sat, 10 Dec 2016 09:49:51 +0000 (10:49 +0100)] 
dns: use dynamic buffers

8 years agodetect-parse: content modifier cleanup
Victor Julien [Fri, 9 Dec 2016 18:01:01 +0000 (19:01 +0100)] 
detect-parse: content modifier cleanup

8 years agohttp_raw_uri: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 17:29:44 +0000 (18:29 +0100)] 
http_raw_uri: dynamic buffer

8 years agohttp_client_body: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 17:09:48 +0000 (18:09 +0100)] 
http_client_body: dynamic buffer

8 years agohttp_header / http_raw_header: dynamic buffers
Victor Julien [Fri, 9 Dec 2016 14:27:51 +0000 (15:27 +0100)] 
http_header / http_raw_header: dynamic buffers

8 years agohttp_stat_msg: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 13:46:05 +0000 (14:46 +0100)] 
http_stat_msg: dynamic buffer

8 years agohttp_stat_code: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 13:00:48 +0000 (14:00 +0100)] 
http_stat_code: dynamic buffer

8 years agohttp_raw_host: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 12:47:14 +0000 (13:47 +0100)] 
http_raw_host: dynamic buffer

8 years agohttp_host: dynamic buffer
Victor Julien [Fri, 9 Dec 2016 11:07:03 +0000 (12:07 +0100)] 
http_host: dynamic buffer

8 years agohttp_cookie: dynamic buffer
Victor Julien [Thu, 8 Dec 2016 10:40:08 +0000 (11:40 +0100)] 
http_cookie: dynamic buffer

8 years agohttp_user_agent: dynamic buffer
Victor Julien [Thu, 8 Dec 2016 10:05:51 +0000 (11:05 +0100)] 
http_user_agent: dynamic buffer

8 years agohttp_response_line: dynamic buffer
Victor Julien [Thu, 8 Dec 2016 09:33:15 +0000 (10:33 +0100)] 
http_response_line: dynamic buffer

8 years agohttp_uri: dynamic buffer
Victor Julien [Thu, 8 Dec 2016 08:19:34 +0000 (09:19 +0100)] 
http_uri: dynamic buffer

Clean up tests

8 years agohttp_method: make list dynamic
Victor Julien [Wed, 7 Dec 2016 17:02:37 +0000 (18:02 +0100)] 
http_method: make list dynamic

8 years agofile_data: dynamic buffer
Victor Julien [Wed, 14 Dec 2016 10:42:58 +0000 (11:42 +0100)] 
file_data: dynamic buffer

8 years agohttp_request_line: dynamic buffer
Victor Julien [Mon, 17 Oct 2016 22:50:26 +0000 (00:50 +0200)] 
http_request_line: dynamic buffer

8 years agodetect: remove hardcoded sm_list logic from setup
Victor Julien [Wed, 14 Dec 2016 11:39:13 +0000 (12:39 +0100)] 
detect: remove hardcoded sm_list logic from setup

Introduce utility functions to aid this.

8 years agodetect: buffer type API
Victor Julien [Wed, 14 Dec 2016 11:38:58 +0000 (12:38 +0100)] 
detect: buffer type API

To replace the hardcoded SigMatch list id's, use this API to register
and query lists by name.

Also allow for registering descriptions and whether mpm is supported.

Registration is only allowed at startup.

8 years agodetect: inspect engine setup cleanup
Victor Julien [Mon, 17 Oct 2016 22:42:26 +0000 (00:42 +0200)] 
detect: inspect engine setup cleanup

8 years agodetect: dce test fixes and improvements
Victor Julien [Sun, 16 Oct 2016 09:02:50 +0000 (11:02 +0200)] 
detect: dce test fixes and improvements

8 years agodetect-csum: redo tests
Victor Julien [Sun, 16 Oct 2016 08:44:33 +0000 (10:44 +0200)] 
detect-csum: redo tests

8 years agodetect: move init only Signature members to init_data
Victor Julien [Mon, 17 Oct 2016 14:54:40 +0000 (16:54 +0200)] 
detect: move init only Signature members to init_data

8 years agodetect: shrink Signature::sm_arrays
Victor Julien [Mon, 17 Oct 2016 14:08:02 +0000 (16:08 +0200)] 
detect: shrink Signature::sm_arrays

Signature::sm_arrays now only contains 'built-in' lists, and so is
sized appropriately.

8 years agodetect: reorganize id's in prep of dynamic lists
Victor Julien [Mon, 17 Oct 2016 12:17:55 +0000 (14:17 +0200)] 
detect: reorganize id's in prep of dynamic lists

8 years agothreshold: fix and redo tests
Victor Julien [Sun, 16 Oct 2016 19:12:32 +0000 (21:12 +0200)] 
threshold: fix and redo tests

8 years agodetect: improve memory handling & comments
Victor Julien [Sun, 16 Oct 2016 19:29:34 +0000 (21:29 +0200)] 
detect: improve memory handling & comments

8 years agodetect: get rid of Signature::sm_lists
Victor Julien [Sun, 16 Oct 2016 13:30:22 +0000 (15:30 +0200)] 
detect: get rid of Signature::sm_lists

Instead use the lists in init_data during setup and the SigMatchData
arrays during runtime.

8 years agodetect: use detect list passed to generic funcs
Victor Julien [Sat, 15 Oct 2016 22:07:48 +0000 (00:07 +0200)] 
detect: use detect list passed to generic funcs

Until now the GenericList users used hardcoded list id's.

8 years agodetect: pass SigMatchData to inspect functions
Victor Julien [Sat, 15 Oct 2016 20:37:07 +0000 (22:37 +0200)] 
detect: pass SigMatchData to inspect functions

8 years agodetect: template list in engine
Victor Julien [Sat, 15 Oct 2016 17:26:48 +0000 (19:26 +0200)] 
detect: template list in engine

8 years agodetect: enip/cip list in engine
Victor Julien [Sat, 15 Oct 2016 17:24:35 +0000 (19:24 +0200)] 
detect: enip/cip list in engine

8 years agodetect: modbus list in engine
Victor Julien [Sat, 15 Oct 2016 17:20:31 +0000 (19:20 +0200)] 
detect: modbus list in engine

8 years agodetect: file list in engine
Victor Julien [Sat, 15 Oct 2016 17:11:18 +0000 (19:11 +0200)] 
detect: file list in engine

8 years agodetect: app-event list in engine
Victor Julien [Sat, 15 Oct 2016 16:54:02 +0000 (18:54 +0200)] 
detect: app-event list in engine

8 years agodetect: dns & tls lists in engine
Victor Julien [Sat, 15 Oct 2016 16:47:42 +0000 (18:47 +0200)] 
detect: dns & tls lists in engine

8 years agodetect: http lists in engine
Victor Julien [Sat, 15 Oct 2016 12:57:39 +0000 (14:57 +0200)] 
detect: http lists in engine

8 years agodetect-engine: memory handling of sm_lists
Victor Julien [Sat, 15 Oct 2016 16:15:17 +0000 (18:15 +0200)] 
detect-engine: memory handling of sm_lists

For lists that are registered multiple times, like http_header and
http_cookie, making the engines owner of the lists is complicated.
Multiple engines in a sig may be pointing to the same list. To
address this the 'free' code needs to be extra careful about not
double freeing, so it takes an approach to first fill an array
of the to-free pointers before freeing them.

8 years agodetect: when freeing sig also see sm in inspect engine
Victor Julien [Sat, 15 Oct 2016 14:26:37 +0000 (16:26 +0200)] 
detect: when freeing sig also see sm in inspect engine

8 years agodetect: add SigMatch arg to inspect functions
Victor Julien [Sat, 15 Oct 2016 12:10:23 +0000 (14:10 +0200)] 
detect: add SigMatch arg to inspect functions

8 years agodetect: use InspectEngineFuncPtr in inspect engines
Victor Julien [Sat, 15 Oct 2016 10:09:47 +0000 (12:09 +0200)] 
detect: use InspectEngineFuncPtr in inspect engines

Replace explicit function pointer use by InspectEngineFuncPtr typedef

8 years agodetect: shrink inspect engine by using 'id' as state flag
Victor Julien [Sat, 15 Oct 2016 09:54:34 +0000 (11:54 +0200)] 
detect: shrink inspect engine by using 'id' as state flag

8 years agodetect: remove unused SIG_FLAG_INIT_PAYLOAD init_flag
Victor Julien [Mon, 17 Oct 2016 15:30:23 +0000 (17:30 +0200)] 
detect: remove unused SIG_FLAG_INIT_PAYLOAD init_flag

8 years agodetect alert/threshold/tag: sm_list -> sm_array
Victor Julien [Sun, 16 Oct 2016 09:29:23 +0000 (11:29 +0200)] 
detect alert/threshold/tag: sm_list -> sm_array

8 years agodetect: fix file_data / http_server_body tests
Victor Julien [Wed, 7 Dec 2016 10:33:50 +0000 (11:33 +0100)] 
detect: fix file_data / http_server_body tests

8 years agodetect file_data: improve error messages
Victor Julien [Wed, 7 Dec 2016 10:33:10 +0000 (11:33 +0100)] 
detect file_data: improve error messages

8 years agodetect-parse: set ipprotos earlier
Victor Julien [Wed, 7 Dec 2016 10:14:20 +0000 (11:14 +0100)] 
detect-parse: set ipprotos earlier

A high level proto like HTTP implies TCP. However this wasn't set
until after all the parsing was complete which means that keywords
couldn't test if the ipproto matched.

This patch populates the ipprotos right when the higher level proto
is parsed.

8 years agodetect: remove unused flags
Victor Julien [Thu, 6 Oct 2016 10:58:19 +0000 (12:58 +0200)] 
detect: remove unused flags

8 years agodetect: make setup/free/match funcs static where possible
Victor Julien [Thu, 6 Oct 2016 10:17:04 +0000 (12:17 +0200)] 
detect: make setup/free/match funcs static where possible

8 years agodetect: constify Signature/SigMatch use at runtime
Victor Julien [Thu, 6 Oct 2016 08:49:14 +0000 (10:49 +0200)] 
detect: constify Signature/SigMatch use at runtime

8 years agodetect: simplify SIG_FLAG_STATE_MATCH set logic
Victor Julien [Mon, 17 Oct 2016 22:41:17 +0000 (00:41 +0200)] 
detect: simplify SIG_FLAG_STATE_MATCH set logic

8 years agodetect: remove alproto from keyword registration
Victor Julien [Fri, 23 Dec 2016 13:24:44 +0000 (14:24 +0100)] 
detect: remove alproto from keyword registration

It was already marked as depricated and no longer in use anywhere.

8 years agoOpen 4.0 development branch
Victor Julien [Thu, 16 Feb 2017 09:35:19 +0000 (10:35 +0100)] 
Open 4.0 development branch

8 years agochangelog: update for 3.2.1 release suricata-3.2.1
Victor Julien [Wed, 15 Feb 2017 07:49:07 +0000 (08:49 +0100)] 
changelog: update for 3.2.1 release

8 years agodns: fix outputs with 0-len A/AAAA records
Victor Julien [Mon, 13 Feb 2017 09:39:26 +0000 (10:39 +0100)] 
dns: fix outputs with 0-len A/AAAA records

8 years agodns: fix out of bounds read
Victor Julien [Thu, 9 Feb 2017 14:40:30 +0000 (15:40 +0100)] 
dns: fix out of bounds read

On a zero size A or AAAA record, 4 or 16 bytes would still be
read.

Found with AFL+ASAN.

8 years agodefrag - take protocol into account during re-assembly
Jason Ish [Sun, 5 Feb 2017 13:57:54 +0000 (07:57 -0600)] 
defrag - take protocol into account during re-assembly

The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host.

8 years agoafl: add ethernet and erspan entry points 2552/head
Victor Julien [Sun, 12 Feb 2017 06:52:04 +0000 (07:52 +0100)] 
afl: add ethernet and erspan entry points

8 years agoafl: clean up commandline parsing
Victor Julien [Sat, 11 Feb 2017 09:47:38 +0000 (10:47 +0100)] 
afl: clean up commandline parsing

8 years agoafl: pass a packet queue to decoder calls
Victor Julien [Fri, 10 Feb 2017 18:58:27 +0000 (19:58 +0100)] 
afl: pass a packet queue to decoder calls