Commit Graph

130 Commits

Author SHA1 Message Date
Matthias Fischer
e79c4372ce suricata 6.0.8 - suggested change in 'suricata.yaml': set app-layer mqtt: enabled: yes
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-10-03 16:51:38 +00:00
Stefan Schantl
b77b41a579 ruleset-sources: Update download URL for Talos rulesets.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-23 13:24:10 +00:00
Stefan Schantl
91a8664b66 Revert "ruleset-sources: Remove support for PT Attack Team Detection rules."
The ruleset provider has recovered his github presence.

This reverts commit c8adaee195.
2022-04-25 21:15:23 +02:00
Stefan Schantl
249d796b4b convert-ids-backend-files: Wait until suricata has stopped sucessfully.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-25 20:12:19 +02:00
Stefan Schantl
adce5b1c8f convert-ids-backend-files: Stop and start suricata during runtime.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-22 13:31:51 +02:00
Stefan Schantl
615fd78f92 convert-ids-backend-files: Set correct ownership for suricata used
rulefiles file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-22 09:13:41 +02:00
Stefan Schantl
c8adaee195 ruleset-sources: Remove support for PT Attack Team Detection rules.
All of a sudden this ruleset provider has dissapeared from Github.

I was not able to find any further details or web page or the ruleset
anymore.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-22 05:47:21 +02:00
Stefan Schantl
f7eedacb43 convert-ids-backend-files: Restart suricata if the IDS is running.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 15:51:06 +02:00
Stefan Schantl
b75baeff28 suricata: Do not longer install YAML file for default rules.
This file got obsolete, because it's content will be generated
dynamically by the backend code.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 14:42:22 +02:00
Stefan Schantl
2e558477da convert-ids-backend-files: Convert MONITOR_TRAFFIC_ONLY settings.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 14:39:09 +02:00
Stefan Schantl
c2eac6fcd4 convert-ids-backend-files: Move already downloaded files to new
location.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-15 05:52:01 +02:00
Stefan Schantl
c215cfd887 convert-ids-backend-files: Remove old backend related files.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-15 05:13:23 +02:00
Stefan Schantl
70b1672d94 convert-ids-backend-files: Remove converted files.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-15 05:12:56 +02:00
Stefan Schantl
9f7702544a convert-ids-backend-files: Regenerate ruleset and used rulesets file.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-15 05:10:45 +02:00
Stefan Schantl
c00609ce56 convert-ids-backend-files: Successor of the
convert-ids-modifications-files converter.

This converter also will convert the used rulesfiles file for the
providers.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-14 06:18:56 +02:00
Stefan Schantl
8d6714edc8 ids-functions.pl: Change backend to use one file to load the used
rulefiles.

Suricata seems to struggle when using multiple and/or nested includes in
the same config section. This results in a only partially loaded
confguration where not all rulefiles are loaded and used.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-09 14:10:13 +02:00
Stefan Schantl
8114440752 convert-ids-modification-files: New converter.
This converter is responsible to convert the old oinkmaster modification
files into the new files and format.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 12:12:55 +01:00
Matthias Fischer
34a7a97dcd ids: Fixed typo in ruleset-sources
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:15:57 +00:00
Arne Fitzenreiter
6e2c8f4818 suricata: drop unsupported JA3 rule provider
our current suricata version not support JA3 based rules so
this drop the providers from the list.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-26 14:19:45 +00:00
Stefan Schantl
9b53f65107 convert-ids-multiple-providers: Set correct ownership for default rules
file.

Otherwise the file would belong to root and is not write-able by the
WUI.

Fixes #12759.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-01-08 16:16:47 +01:00
Stefan Schantl
9cfcc7e546 convert-ids-multiple-providers: Do not try to set ownership for file
which is not longer used.

Fixes #12758.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-01-08 16:00:28 +01:00
Stefan Schantl
acbbcde422 ruleset-sources: Update download URL for Talos rulesets.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-01-02 10:34:44 +01:00
Stefan Schantl
636a79650b suricata.yaml: Set collection of stat to off.
Suricata will print a warning on startup if the collection of stats
is enabled but no stats logger, which will print them out is enabled.

Acctually we do not use any stats so this safely can be disabled.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 15:55:45 +01:00
Stefan Schantl
ec03b64e9f suricata.yaml: Set default log level to Info.
This will prevent suricata from displaying a warning on startup and
anyway would be the log level which suricata switches in such a case.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 15:53:55 +01:00
Stefan Schantl
ee87c2e33a suricata.yaml: Add config options for modbus, dnp3 and enip protocols.
All of them are disabled by default, but may be needed in some
environments and so easily can be enabled there.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 15:51:58 +01:00
Michael Tremer
5a3e97b8d3 suricata: Load *.config files from default location
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-19 13:31:13 +01:00
Stefan Schantl
302420ad4a convert-ids-multiple-providers: Fix setting ownership for the main
oinkmaster provider includes file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
a2964e14f8 convert-ids-multiple-providers: Proper open the oinkmaster providers
sids file for writing.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
c0727f8b45 convert-ids-multiple-providers: Fix typo which tried to load the wrong
lib.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
cd13dbc544 convert-ids-multiple-providers: Remove old used rulefiles file.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
f901c7401c convert-ids-multiple-providers: Always remove old enabled / disabled
sids files.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
17b9a1581c convert-ids-multiple-providers: Restart suricata afterwards.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
77b373d620 IDS: Add convert-ids-multiple-provider script.
This converter does all the magic to convert any suricata
based IPFire version to work with the new multiple providers
IDS.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
58d368d11c convert-snort: Adjust converter to work with new IDS.
Only in case if somebody tries to import such an old backup.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
1aa3dbf56d ruleset-sources: Update download URL for Talos rulesets.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
6cbed0c213 ruleset-sources: Add additional providers.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Stefan Schantl
ddaf8ae1a8 IDS: Redesign backend for used provider rulesfiles.
The selected rulesfiles of a provider now will be written to an own
provider exclusive yaml file, which will be included dynamically when
the provider is enabled or not.

This allows very easy handling to enable or disable a provider, in this
case the file which keeps the enabled providers rulesets only needs to
be included in the main file or even not.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:32 +01:00
Stefan Schantl
caae0cf5e3 ruleset-sources: Rename file to plain.
This is used if a provider offers a plain rulefile instead an archive.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:22:59 +01:00
Stefan Schantl
b5350c4d6e ruleset-sources: Fix website url for community ruleset.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:22:59 +01:00
Stefan Schantl
923a644107 ruleset-sources: Replace subscription code placeholder.
Replace the <oinkcode> placeholder by the more generic
<subscription_code>.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:22:59 +01:00
Stefan Schantl
a49a30d1ba ruleset-sources: Fix website details for emergingthreats provider.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:22:58 +01:00
Stefan Schantl
5e891296f0 ruleset-sources: Rework file format and data.
The file now contains a lot more of data and easily can be extended
to provide more and new providers.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:21:51 +01:00
Stefan Schantl
d088562406 suricata: Do not load rules for dnp3 and modbus.
The parsers for those are disabled in the suricata config so
the rules are not needed, on the contrary they massively will spam
warnings when launching suricate because of the disabled parsers.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-16 20:04:41 +01:00
Stefan Schantl
f23e0e5a7f suricata: Cleanup default loaded rules file.
There are no such rules file available and therefore cannot be loaded.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-12-11 09:49:41 +00:00
Stefan Schantl
74070fe153 suricata: Move default loaded rulefiles to own included file.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-12-11 09:49:22 +00:00
Michael Tremer
30f411694c suricata: Include all default rules
These rules do not drop anything, but only alert when internal parts of
the engine trigger an event. This will allow us more insight on what is
happening.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-11-24 09:06:14 +00:00
Michael Tremer
9deccd1cba suricata: Enable bypassing unhandled streams
If a stream cannot be identified or if suricata has decided that it
cannot do anything useful any more (e.g. TLS sessions after the
handshake), we will allow suricata to bypass any following packets in
that flow

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:19 +00:00
Michael Tremer
11f7218f9c suricata: Define bypass mark
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:10 +00:00
Michael Tremer
761fadbdde suricata: Set most significant bit as repeat marker
I have no idea why some odd value was chosen here, but one bit should be
enough.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:33:47 +00:00
Leo-Andres Hofmann
abffcc99ad Refactor "get_available_network_zones", move to network-functions.pl
This function nicely translates the ethernet/settings "CONFIG_TYPE"
into a list of available zones. Therefore it should be more accessible!

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-25 19:32:38 +00:00