Commit Graph

12947 Commits

Author SHA1 Message Date
Michael Tremer
5d04cfe7d5 suricata: Use highest bit to mark packets
We are using the netfilter MARK in IPsec & QoS and this
is causing conflicts.

Therefore, we use the highest bit in the IPS chain now
and clear it afterwards because we do not really care about
this after the packets have been passed through suricata.

Then, no other application has to worry about suricata.

Fixes: #12010
Signed-off-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:48 +01:00
Michael Tremer
c9ee3592f0 suricata: Fix syntax error
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
99d75ac72e suricata: Start capture first and then load rules
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
890f1bf295 suricata: Disable decoding for Teredo
This decoder is not very accurate and Teredo has been
disabled in Windows by default. Nobody will use this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
0b340f0938 suricata: Increase memory size for the stream engine
This change also ensures that suricata has a decent number
of streams preallocated to be able to handle any bursts in traffic.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
ab1444b4f4 suricata: Log to syslog like a normal process
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
47cb057145 suricata: Use up to 256MB of RAM for the flow cache
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:47 +01:00
Michael Tremer
7eed864c93 suricata: Use 64MB of RAM for defragmentation
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:46 +01:00
Michael Tremer
83b576c892 suricata: Use the correct path for the magic database
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:46 +01:00
Michael Tremer
0e28ea9f3e suricata: Log to syslog
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:46 +01:00
Michael Tremer
682f1fdaca suricata: We do not use any IP reputation lists
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:46 +01:00
Michael Tremer
cf976e93c4 suricata: Allow 32MB of RAM for DNS decoding
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:56:29 +01:00
Michael Tremer
fe5bd1862f suricata: Drop sections that require Rust
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:26 +01:00
Michael Tremer
bc2cb52953 suricata: Drop some commented stuff from configuration
The file is really large and we should not carry anything we will
never use.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:26 +01:00
Michael Tremer
75fba6cd24 suricata: Drop profiling section from configuration
This is not compiled in as it slows down detection and is
only really useful for debugging

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:26 +01:00
Michael Tremer
5196d8ddbb suricata: Set detection profile to high
This will merge rules more aggressively so that the engine
is only processing those that can actually match.

Memory is cheap. People with little memory should not run
suricata anyways.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:25 +01:00
Michael Tremer
9f726f8f53 suricata: Set default packet size to 1514
We usually use a MTU of 1500 + Ethernet header

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:25 +01:00
Michael Tremer
16446608cb suricata: Set max-pending-packets to 1024
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:55:25 +01:00
Peter Müller
1f3c61b66c Suricata: detect TLS traffic on port 444, too
This is the default port for IPFire's administrative web interface
and should be monitored by Suricata, too.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
c: Stefan Schantl <stefan.schantl@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-03-01 17:53:04 +01:00
Stefan Schantl
cc636c4741 convert-snort: Try to download ruleset if none is present.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-22 10:04:27 +01:00
Stefan Schantl
5d7d8749dc convert-snort: Set correct ownership after modify_sids_file has been generated.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-18 13:33:41 +01:00
Stefan Schantl
d0f9526beb ids.cgi: Add language string for ignored hosts section.
Fixes #12002.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-18 13:29:47 +01:00
Michael Tremer
06f57f7230 general-functions.pl: Only skip lines with a # at the beginning
This accidientially dropped all lines that include #. That resulted
in colour codes not being loaded from file any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-18 11:36:37 +01:00
Stefan Schantl
7c3b7cdcca ids-functions.pl: Tune rules to always monitor in both directions.
This will allow to scan the traffic from an EXTERNAL_NET to the HOME_NET and from
the HOME_NET to the EXTERNAL_NET.

Reference: 10273

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-18 10:55:27 +01:00
Stefan Schantl
20b4c4d863 suricata: Swith to "16" as repeat-mark and repeat-mask.
Marks "1-3" are used for marking source-natted packets on the
interfaces and 4 up to 6 for TOS and QOS. The mark "32" is used by IPsec.

See commit: f5ad510e3c

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-18 10:02:29 +01:00
Stefan Schantl
77c07352a5 Suricata: Start service on red.up event if requested
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-15 13:26:55 +01:00
Stefan Schantl
d215f6e980 collectd: Stop collecting process details for snort
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-15 12:39:56 +01:00
Stefan Schantl
0d8cc90f4d services.cgi: Show status of suricata instead of snort
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-15 12:18:45 +01:00
Stefan Schantl
1ef235f08d logrotate: Rotate suricata logs instead of snort ones
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-15 11:22:14 +01:00
Stefan Schantl
78690361ab convert-snort: Always create directory and filelayout
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-14 12:37:13 +01:00
Stefan Schantl
b09c13f1b6 convert-snort: Call subfunction to change ownership of rulestarball
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-14 12:15:41 +01:00
Stefan Schantl
99b2e30636 ids-ruleset-sources: Fix rootfile
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-14 11:43:31 +01:00
Stefan Schantl
c980ac7f2a Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2019-02-13 19:46:45 +01:00
Michael Tremer
5368ccb0fc core128: Ship kdig
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:32:00 +00:00
Erik Kapfer
2397e51335 knot: Reduced version of knot with kdig only
Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:31:37 +00:00
Michael Tremer
59d673ae44 core128: Ship libedit
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:31:24 +00:00
Erik Kapfer
17b3255b7f libedit: A command line editor library
Dependency for knot (kdig).

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:30:58 +00:00
Matthias Fischer
17d9d42571 powertop: Update to 2.10
Hi,

Triggered by:
https://forum.ipfire.org/viewtopic.php?f=69&t=22274

For details see:
https://01.org/powertop/downloads/powertop-v2.10

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:29:39 +00:00
Matthias Fischer
941a3dec4e dhcpcd: Update to 7.1.1
For details see:
https://roy.marples.name/blog/dhcpcd-7-1-1-released

"A minor update, highlights include:

 IPv4LL: Fixed build with this disabled
 IPv4LL: Remember last address between carrier resets
 BSD: Fixed initial link infos reported as LINK_STATE_UNKNOWN
 FreeBSD: Avoid panicing kernel when RTA_IFP is set for IPv6 prefix routes"

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:28:30 +00:00
Matthias Fischer
d5b7f82a40 curl: Update to 7.64.0
Hi,

For details see:
https://curl.haxx.se/changes.html

This came rather unexpected - if I'd known, I'd have waited with 7.63.0.

"Changes:
cookies: leave secure cookies alone
hostip: support wildcard hosts
http: Implement trailing headers for chunked transfers
http: added options for allowing HTTP/0.9 responses
timeval: Use high resolution timestamps on Windows

Bugfixes:
CVE-2018-16890: NTLM type-2 out-of-bounds buffer read
CVE-2019-3822: NTLMv2 type-3 header stack buffer overflow
CVE-2019-3823: SMTP end-of-response out-of-bounds read
FAQ: remove mention of sourceforge for github
OS400: handle memory error in list conversion
OS400: upgrade ILE/RPG binding.
README: add codacy code quality badge
Revert http_negotiate: do not close connection
THANKS: added several missing names from year <= 2000
build: make 'tidy' target work for metalink builds
cmake: added checks for variadic macros
cmake: updated check for HAVE_POLL_FINE to match autotools
cmake: use lowercase for function name like the rest of the code
configure: detect xlclang separately from clang
configure: fix recv/send/select detection on Android
configure: rewrite --enable-code-coverage
conncache_unlock: avoid indirection by changing input argument type
cookie: fix comment typo
cookies: allow secure override when done over HTTPS
cookies: extend domain checks to non psl builds
cookies: skip custom cookies when redirecting cross-site
curl --xattr: strip credentials from any URL that is stored
curl -J: refuse to append to the destination file
curl/urlapi.h: include "curl.h" first
curl_multi_remove_handle() don't block terminating c-ares requests
darwinssl: accept setting max-tls with default min-tls
disconnect: separate connections and easy handles better
disconnect: set conn->data for protocol disconnect
docs/version.d: mention MultiSSL
docs: fix the --tls-max description
docs: use $(INSTALL_DATA) to install man page
docs: use meaningless port number in CURLOPT_LOCALPORT example
gopher: always include the entire gopher-path in request
http2: clear pause stream id if it gets closed
if2ip: remove unused function Curl_if_is_interface_name
libssh: do not let libssh create socket
libssh: enable CURLOPT_SSH_KNOWNHOSTS and CURLOPT_SSH_KEYFUNCTION for libssh
libssh: free sftp_canonicalize_path() data correctly
libtest/stub_gssapi: use "real" snprintf
mbedtls: use VERIFYHOST
multi: multiplexing improvements
multi: set the EXPIRE_*TIMEOUT timers at TIMER_STARTSINGLE time
ntlm: fix NTMLv2 compliance
ntlm_sspi: add support for channel binding
openssl: adapt to 3.0.0, OpenSSL_version_num() is deprecated
openssl: fix the SSL_get_tlsext_status_ocsp_resp call
openvms: fix OpenSSL discovery on VAX
openvms: fix typos in documentation
os400: add a missing closing bracket
os400: fix extra parameter syntax error
pingpong: change default response timeout to 120 seconds
pingpong: ignore regular timeout in disconnect phase
printf: fix format specifiers
runtests.pl: Fix perl call to include srcdir
schannel: fix compiler warning
schannel: preserve original certificate path parameter
schannel: stop calling it "winssl"
sigpipe: if mbedTLS is used, ignore SIGPIPE
smb: fix incorrect path in request if connection reused
ssh: log the libssh2 error message when ssh session startup fails
test1558: verify CURLINFO_PROTOCOL on file:// transfer
test1561: improve test name
test1653: make it survive torture tests
tests: allow tests to pass by 2037-02-12
tests: move objnames-* from lib into tests
timediff: fix math for unsigned time_t
timeval: Disable MSVC Analyzer GetTickCount warning
tool_cb_prg: avoid integer overflow
travis: added cmake build for osx
urlapi: Fix port parsing of eol colon
urlapi: distinguish possibly empty query
urlapi: fix parsing ipv6 with zone index
urldata: rename easy_conn to just conn
winbuild: conditionally use /DZLIB_WINAPI
wolfssl: fix memory-leak in threaded use
spnego_sspi: add support for channel binding"

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-13 11:27:53 +00:00
Arne Fitzenreiter
39d43c5b99 kernel: update to 4.14.98
todo: check if RPi dwc dma patch still need to reverted before release

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-02-08 20:50:37 +01:00
Stefan Schantl
c1c754a121 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2019-02-08 09:59:31 +01:00
Stefan Schantl
f3cbcfeff9 libhtp: Update to 0.5.29
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-08 09:56:36 +01:00
Stefan Schantl
4434236e00 ruleset-sources: Update sourcefire rulesets to latest snapshot version
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-08 09:55:46 +01:00
Matthias Fischer
27a9f86ec4 borgbackup: Fix build on i586
Fixes

...
'/usr/src/config/rootfiles/packages//borgbackup' -> '/install/packages/package/ROOTFILES'
tar: usr/lib/python3.6/site-packages/borg/chunker.cpython-36m-i586-linux-gnu.so: Cannot stat: No such file or directory
tar: usr/lib/python3.6/site-packages/borg/compress.cpython-36m-i586-linux-gnu.so: Cannot stat: No such file or directory
tar: usr/lib/python3.6/site-packages/borg/crypto.cpython-36m-i586-linux-gnu.so: Cannot stat: No such file or directory
tar: usr/lib/python3.6/site-packages/borg/hashindex.cpython-36m-i586-linux-gnu.so: Cannot stat: No such file or directory
tar: usr/lib/python3.6/site-packages/borg/platform_linux.cpython-36m-i586-linux-gnu.so: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
make: *** [borgbackup:58: dist] Error 2
...

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-07 21:35:28 +00:00
Matthias Fischer
7a7c30e119 python3-llfuse: Fix build on i586
Fixes

"tar: usr/lib/python3.6/site-packages/llfuse.cpython-36m-i586-linux-gnu.so:
Cannot stat: No such file or directory"

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-07 21:35:23 +00:00
Peter Müller
ad99f959e2 Suricata: detect DNS events on port 853, too
As DNS over TLS popularity is increasing, port 853 becomes
more interesting for an attacker as a bypass method. Enabling
this port for DNS monitoring makes sense in order to avoid
unusual activity (non-DNS traffic) as well as "normal" DNS
attacks.

Partially fixes #11808

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-07 21:26:50 +01:00
Peter Müller
8723bb91ae Suricata: enable full detection for missing protocols
These are IMAP and MSN, which can be safely enabled.

Partially fixes #11808

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-07 21:26:46 +01:00
Peter Müller
05a635ec04 Suricata: detect TLS traffic on IMAPS/POP3S/SSMTP ports as, well
Partially fixes #11808

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-07 21:26:43 +01:00
Michael Tremer
02a8a241bb core128: Ship updated firewall initscript
Require reboot after the update

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-07 15:15:37 +00:00