pkgsrc/net/snort/Makefile

134 lines
4.6 KiB
Makefile
Raw Normal View History

2021-12-08 17:01:42 +01:00
# $NetBSD: Makefile,v 1.69 2021/12/08 16:06:07 adam Exp $
#
Updated net/snort to version 2.9.16.1. Upstream changelog from 2.9.15.1 to 2.9.16 : * src/preprocessors/Stream6/snort_stream_tcp.c : Addressed an issue when out-of-order FIN is received by dropping it. * src/output-plugins/spo_unified2.c, src/preprocessors/Stream6/snort_stream_tcp.c : Fixed an issue in which xtradata is not added to the alert in unified file. * src/reload.c, src/snort.c : Fixed potential race condition between reload and exit path (main thread). * etc/file_magic.conf : Updated the file magic to detect ALZ file types. * src/sfutil/sf_ip.h : Added support for gcc version 9.2.1. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : Fixed an issue in which APPID returns no match. * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, src/dynamic-preprocessors/dns/sf_dns.vcxproj, src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, src/dynamic-preprocessors/imap/sf_imap.vcxproj, src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, src/dynamic-preprocessors/pop/sf_pop.vcxproj, src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, src/dynamic-preprocessors/sip/sf_sip.vcxproj, src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, src/win32/WIN32-Prj/build_all.vcxproj, src/win32/WIN32-Prj/sf_engine.vcxproj, src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, src/win32/WIN32-Prj/snort.vcxproj, src/win32/WIN32-Prj/snort_initialize.vcxproj, src/win32/WIN32-Prj/snort_installer_x64.nsi, src/win32/WIN32-Prj/snort_x64.dsw, src/win64/WIN64-Libraries/Packet.lib, src/win64/WIN64-Libraries/libdnet/dnet.lib, src/win64/WIN64-Libraries/pcre.lib, src/win64/WIN64-Libraries/wpcap.lib, src/win64/WIN64-Libraries/zlib.lib, tools/u2spewfoo/u2spewfoo.vcxproj : Added 64-bit support for Windows 10 operating system. * src/dynamic-preprocessors/pop/snort_pop.c : Fixed an issue where POP preprocessor was not generating alert in some cases. * src/dynamic-preprocessors/gtp/gtp_parser.c : Fixed the alerting logic for GTP v2 with missing TEID. * src/preprocessors/HttpInspect/utils/hi_paf.c : Fixed file policy not working with character prefix in chunk size. * configure.in, src/reload.c, src/side-channel/sidechannel.c, src/snort.c, src/target-based/sftarget_reader.c, src/util.h : Added support for glibc version 2.30. * src/decode.h, src/dynamic-plugins/sf_engine/sf_snort_packet.h, src/preprocessors/HttpInspect/utils/hi_paf.c, src/preprocessors/Stream6/snort_stream_tcp.c, src/preprocessors/Stream6/stream_paf.c, src/preprocessors/snort_httpinspect.c, src/preprocessors/snort_httpinspect.h, src/preprocessors/stream_api.h : Added support for early inspection of HTTP payload before flushing in pre-ack mode. * src/file-process/file_api.h, src/file-process/file_service.c, src/preprocessors/HttpInspect/include/hi_norm.h, src/preprocessors/HttpInspect/include/hi_ui_config.h, src/preprocessors/HttpInspect/server/hi_server_norm.c, src/preprocessors/snort_httpinspect.c : Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. Upstream changelog from 2.9.16 to 2.9.16.1 : * src/dynamic-preprocessors/appid/appIdConfig.h, src/dynamic-preprocessors/appid/appInfoTable.c, src/dynamic-preprocessors/appid/flow.h, src/dynamic-preprocessors/appid/fw_appid.c : Added packet counters to make sure flows with one-way data don't pend forever. * src/detection-plugins/sp_flowbits.c, src/snort.c : Fixed potential race condition between reload and exit path. * src/detection-plugins/sp_session.c, src/preprocessors/Stream6/stream_paf.h, src/sfutil/util_jsnorm.c : Added support for GCC version 10.1.1. Pkgsrc changes : * added patch for NetBSD to get the definition for endrpcent(), which fixes compilation * snort now depends on bash since a bundled tool is a bash shell script * some pkglint compliance changes in Makefile and options.mk
2020-10-01 21:45:02 +02:00
DISTNAME= snort-2.9.16.1
2021-12-08 17:01:42 +01:00
PKGREVISION= 3
CATEGORIES= net security
MASTER_SITES= https://www.snort.org/downloads/archive/snort/
2009-07-17 20:00:13 +02:00
MAINTAINER= pkgsrc-users@NetBSD.org
2017-08-01 16:58:51 +02:00
HOMEPAGE= https://www.snort.org/
COMMENT= The Open Source Network Intrusion Detection System
LICENSE= gnu-gpl-v2
DEPENDS+= daq>=2.0.0:../../net/daq
CONFLICTS+= snort-mysql-[0-9]*
CONFLICTS+= snort-pgsql-[0-9]*
CONFLICTS+= snort-prelude-[0-9]*
.include "../../mk/bsd.prefs.mk"
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
Updated net/snort to version 2.9.16.1. Upstream changelog from 2.9.15.1 to 2.9.16 : * src/preprocessors/Stream6/snort_stream_tcp.c : Addressed an issue when out-of-order FIN is received by dropping it. * src/output-plugins/spo_unified2.c, src/preprocessors/Stream6/snort_stream_tcp.c : Fixed an issue in which xtradata is not added to the alert in unified file. * src/reload.c, src/snort.c : Fixed potential race condition between reload and exit path (main thread). * etc/file_magic.conf : Updated the file magic to detect ALZ file types. * src/sfutil/sf_ip.h : Added support for gcc version 9.2.1. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : Fixed an issue in which APPID returns no match. * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, src/dynamic-preprocessors/dns/sf_dns.vcxproj, src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, src/dynamic-preprocessors/imap/sf_imap.vcxproj, src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, src/dynamic-preprocessors/pop/sf_pop.vcxproj, src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, src/dynamic-preprocessors/sip/sf_sip.vcxproj, src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, src/win32/WIN32-Prj/build_all.vcxproj, src/win32/WIN32-Prj/sf_engine.vcxproj, src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, src/win32/WIN32-Prj/snort.vcxproj, src/win32/WIN32-Prj/snort_initialize.vcxproj, src/win32/WIN32-Prj/snort_installer_x64.nsi, src/win32/WIN32-Prj/snort_x64.dsw, src/win64/WIN64-Libraries/Packet.lib, src/win64/WIN64-Libraries/libdnet/dnet.lib, src/win64/WIN64-Libraries/pcre.lib, src/win64/WIN64-Libraries/wpcap.lib, src/win64/WIN64-Libraries/zlib.lib, tools/u2spewfoo/u2spewfoo.vcxproj : Added 64-bit support for Windows 10 operating system. * src/dynamic-preprocessors/pop/snort_pop.c : Fixed an issue where POP preprocessor was not generating alert in some cases. * src/dynamic-preprocessors/gtp/gtp_parser.c : Fixed the alerting logic for GTP v2 with missing TEID. * src/preprocessors/HttpInspect/utils/hi_paf.c : Fixed file policy not working with character prefix in chunk size. * configure.in, src/reload.c, src/side-channel/sidechannel.c, src/snort.c, src/target-based/sftarget_reader.c, src/util.h : Added support for glibc version 2.30. * src/decode.h, src/dynamic-plugins/sf_engine/sf_snort_packet.h, src/preprocessors/HttpInspect/utils/hi_paf.c, src/preprocessors/Stream6/snort_stream_tcp.c, src/preprocessors/Stream6/stream_paf.c, src/preprocessors/snort_httpinspect.c, src/preprocessors/snort_httpinspect.h, src/preprocessors/stream_api.h : Added support for early inspection of HTTP payload before flushing in pre-ack mode. * src/file-process/file_api.h, src/file-process/file_service.c, src/preprocessors/HttpInspect/include/hi_norm.h, src/preprocessors/HttpInspect/include/hi_ui_config.h, src/preprocessors/HttpInspect/server/hi_server_norm.c, src/preprocessors/snort_httpinspect.c : Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. Upstream changelog from 2.9.16 to 2.9.16.1 : * src/dynamic-preprocessors/appid/appIdConfig.h, src/dynamic-preprocessors/appid/appInfoTable.c, src/dynamic-preprocessors/appid/flow.h, src/dynamic-preprocessors/appid/fw_appid.c : Added packet counters to make sure flows with one-way data don't pend forever. * src/detection-plugins/sp_flowbits.c, src/snort.c : Fixed potential race condition between reload and exit path. * src/detection-plugins/sp_session.c, src/preprocessors/Stream6/stream_paf.h, src/sfutil/util_jsnorm.c : Added support for GCC version 10.1.1. Pkgsrc changes : * added patch for NetBSD to get the definition for endrpcent(), which fixes compilation * snort now depends on bash since a bundled tool is a bash shell script * some pkglint compliance changes in Makefile and options.mk
2020-10-01 21:45:02 +02:00
USE_TOOLS+= pkg-config
USE_TOOLS+= bash
PKG_SYSCONFSUBDIR= snort
RCD_SCRIPTS= snort
SNORT_USER?= snort
SNORT_GROUP?= snort
EGDIR= ${PREFIX}/share/examples/snort
PKG_GROUPS= ${SNORT_GROUP}
PKG_USERS= ${SNORT_USER}:${SNORT_GROUP}
PKG_GROUPS_VARS+= SNORT_GROUP
PKG_USERS_VARS= SNORT_USER
FILES_SUBST+= SNORT_USER=${SNORT_USER} SNORT_GROUP=${SNORT_GROUP}
BUILD_DEFS+= VARBASE
Updated net/snort to version 2.9.16.1. Upstream changelog from 2.9.15.1 to 2.9.16 : * src/preprocessors/Stream6/snort_stream_tcp.c : Addressed an issue when out-of-order FIN is received by dropping it. * src/output-plugins/spo_unified2.c, src/preprocessors/Stream6/snort_stream_tcp.c : Fixed an issue in which xtradata is not added to the alert in unified file. * src/reload.c, src/snort.c : Fixed potential race condition between reload and exit path (main thread). * etc/file_magic.conf : Updated the file magic to detect ALZ file types. * src/sfutil/sf_ip.h : Added support for gcc version 9.2.1. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : Fixed an issue in which APPID returns no match. * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, src/dynamic-preprocessors/dns/sf_dns.vcxproj, src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, src/dynamic-preprocessors/imap/sf_imap.vcxproj, src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, src/dynamic-preprocessors/pop/sf_pop.vcxproj, src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, src/dynamic-preprocessors/sip/sf_sip.vcxproj, src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, src/win32/WIN32-Prj/build_all.vcxproj, src/win32/WIN32-Prj/sf_engine.vcxproj, src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, src/win32/WIN32-Prj/snort.vcxproj, src/win32/WIN32-Prj/snort_initialize.vcxproj, src/win32/WIN32-Prj/snort_installer_x64.nsi, src/win32/WIN32-Prj/snort_x64.dsw, src/win64/WIN64-Libraries/Packet.lib, src/win64/WIN64-Libraries/libdnet/dnet.lib, src/win64/WIN64-Libraries/pcre.lib, src/win64/WIN64-Libraries/wpcap.lib, src/win64/WIN64-Libraries/zlib.lib, tools/u2spewfoo/u2spewfoo.vcxproj : Added 64-bit support for Windows 10 operating system. * src/dynamic-preprocessors/pop/snort_pop.c : Fixed an issue where POP preprocessor was not generating alert in some cases. * src/dynamic-preprocessors/gtp/gtp_parser.c : Fixed the alerting logic for GTP v2 with missing TEID. * src/preprocessors/HttpInspect/utils/hi_paf.c : Fixed file policy not working with character prefix in chunk size. * configure.in, src/reload.c, src/side-channel/sidechannel.c, src/snort.c, src/target-based/sftarget_reader.c, src/util.h : Added support for glibc version 2.30. * src/decode.h, src/dynamic-plugins/sf_engine/sf_snort_packet.h, src/preprocessors/HttpInspect/utils/hi_paf.c, src/preprocessors/Stream6/snort_stream_tcp.c, src/preprocessors/Stream6/stream_paf.c, src/preprocessors/snort_httpinspect.c, src/preprocessors/snort_httpinspect.h, src/preprocessors/stream_api.h : Added support for early inspection of HTTP payload before flushing in pre-ack mode. * src/file-process/file_api.h, src/file-process/file_service.c, src/preprocessors/HttpInspect/include/hi_norm.h, src/preprocessors/HttpInspect/include/hi_ui_config.h, src/preprocessors/HttpInspect/server/hi_server_norm.c, src/preprocessors/snort_httpinspect.c : Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. Upstream changelog from 2.9.16 to 2.9.16.1 : * src/dynamic-preprocessors/appid/appIdConfig.h, src/dynamic-preprocessors/appid/appInfoTable.c, src/dynamic-preprocessors/appid/flow.h, src/dynamic-preprocessors/appid/fw_appid.c : Added packet counters to make sure flows with one-way data don't pend forever. * src/detection-plugins/sp_flowbits.c, src/snort.c : Fixed potential race condition between reload and exit path. * src/detection-plugins/sp_session.c, src/preprocessors/Stream6/stream_paf.h, src/sfutil/util_jsnorm.c : Added support for GCC version 10.1.1. Pkgsrc changes : * added patch for NetBSD to get the definition for endrpcent(), which fixes compilation * snort now depends on bash since a bundled tool is a bash shell script * some pkglint compliance changes in Makefile and options.mk
2020-10-01 21:45:02 +02:00
MAKE_JOBS_SAFE= NO # could not compile it on a multi-core system
OWN_DIRS_PERMS= ${VARBASE}/log/snort ${SNORT_USER} ${SNORT_GROUP} 700
DOC_FILES= BUGS INSTALL NEWS PROBLEMS README TODO USAGE WISHLIST
OWN_DIRS= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/rules
OWN_DIRS+= ${PKG_SYSCONFDIR}/so_rules ${PKG_SYSCONFDIR}/preproc_rules
OWN_DIRS+= ${PREFIX}/lib ${PREFIX}/lib/snort_dynamicrules
Updated net/snort to version 2.9.16.1. Upstream changelog from 2.9.15.1 to 2.9.16 : * src/preprocessors/Stream6/snort_stream_tcp.c : Addressed an issue when out-of-order FIN is received by dropping it. * src/output-plugins/spo_unified2.c, src/preprocessors/Stream6/snort_stream_tcp.c : Fixed an issue in which xtradata is not added to the alert in unified file. * src/reload.c, src/snort.c : Fixed potential race condition between reload and exit path (main thread). * etc/file_magic.conf : Updated the file magic to detect ALZ file types. * src/sfutil/sf_ip.h : Added support for gcc version 9.2.1. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : Fixed an issue in which APPID returns no match. * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, src/dynamic-preprocessors/dns/sf_dns.vcxproj, src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, src/dynamic-preprocessors/imap/sf_imap.vcxproj, src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, src/dynamic-preprocessors/pop/sf_pop.vcxproj, src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, src/dynamic-preprocessors/sip/sf_sip.vcxproj, src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, src/win32/WIN32-Prj/build_all.vcxproj, src/win32/WIN32-Prj/sf_engine.vcxproj, src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, src/win32/WIN32-Prj/snort.vcxproj, src/win32/WIN32-Prj/snort_initialize.vcxproj, src/win32/WIN32-Prj/snort_installer_x64.nsi, src/win32/WIN32-Prj/snort_x64.dsw, src/win64/WIN64-Libraries/Packet.lib, src/win64/WIN64-Libraries/libdnet/dnet.lib, src/win64/WIN64-Libraries/pcre.lib, src/win64/WIN64-Libraries/wpcap.lib, src/win64/WIN64-Libraries/zlib.lib, tools/u2spewfoo/u2spewfoo.vcxproj : Added 64-bit support for Windows 10 operating system. * src/dynamic-preprocessors/pop/snort_pop.c : Fixed an issue where POP preprocessor was not generating alert in some cases. * src/dynamic-preprocessors/gtp/gtp_parser.c : Fixed the alerting logic for GTP v2 with missing TEID. * src/preprocessors/HttpInspect/utils/hi_paf.c : Fixed file policy not working with character prefix in chunk size. * configure.in, src/reload.c, src/side-channel/sidechannel.c, src/snort.c, src/target-based/sftarget_reader.c, src/util.h : Added support for glibc version 2.30. * src/decode.h, src/dynamic-plugins/sf_engine/sf_snort_packet.h, src/preprocessors/HttpInspect/utils/hi_paf.c, src/preprocessors/Stream6/snort_stream_tcp.c, src/preprocessors/Stream6/stream_paf.c, src/preprocessors/snort_httpinspect.c, src/preprocessors/snort_httpinspect.h, src/preprocessors/stream_api.h : Added support for early inspection of HTTP payload before flushing in pre-ack mode. * src/file-process/file_api.h, src/file-process/file_service.c, src/preprocessors/HttpInspect/include/hi_norm.h, src/preprocessors/HttpInspect/include/hi_ui_config.h, src/preprocessors/HttpInspect/server/hi_server_norm.c, src/preprocessors/snort_httpinspect.c : Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. Upstream changelog from 2.9.16 to 2.9.16.1 : * src/dynamic-preprocessors/appid/appIdConfig.h, src/dynamic-preprocessors/appid/appInfoTable.c, src/dynamic-preprocessors/appid/flow.h, src/dynamic-preprocessors/appid/fw_appid.c : Added packet counters to make sure flows with one-way data don't pend forever. * src/detection-plugins/sp_flowbits.c, src/snort.c : Fixed potential race condition between reload and exit path. * src/detection-plugins/sp_session.c, src/preprocessors/Stream6/stream_paf.h, src/sfutil/util_jsnorm.c : Added support for GCC version 10.1.1. Pkgsrc changes : * added patch for NetBSD to get the definition for endrpcent(), which fixes compilation * snort now depends on bash since a bundled tool is a bash shell script * some pkglint compliance changes in Makefile and options.mk
2020-10-01 21:45:02 +02:00
INSTALLATION_DIRS+= ${EGDIR}/rules
AUTO_MKDIRS= yes
CONF_FILES= ${EGDIR}/attribute_table.dtd \
${PKG_SYSCONFDIR}/attribute_table.dtd
CONF_FILES+= ${EGDIR}/classification.config \
${PKG_SYSCONFDIR}/classification.config
CONF_FILES+= ${EGDIR}/file_magic.conf \
${PKG_SYSCONFDIR}/file_magic.conf
CONF_FILES+= ${EGDIR}/gen-msg.map \
${PKG_SYSCONFDIR}/gen-msg.map
CONF_FILES+= ${EGDIR}/reference.config \
${PKG_SYSCONFDIR}/reference.config
CONF_FILES+= ${EGDIR}/snort.conf.default \
${PKG_SYSCONFDIR}/snort.conf
CONF_FILES+= ${EGDIR}/threshold.conf \
${PKG_SYSCONFDIR}/threshold.conf
CONF_FILES+= ${EGDIR}/generators \
${PKG_SYSCONFDIR}/generators
CONF_FILES+= ${EGDIR}/unicode.map \
${PKG_SYSCONFDIR}/unicode.map
CONF_FILES+= ${EGDIR}/rules/black_list.rules \
${PKG_SYSCONFDIR}/rules/black_list.rules
CONF_FILES+= ${EGDIR}/rules/white_list.rules \
${PKG_SYSCONFDIR}/rules/white_list.rules
Updated net/snort to version 2.9.16.1. Upstream changelog from 2.9.15.1 to 2.9.16 : * src/preprocessors/Stream6/snort_stream_tcp.c : Addressed an issue when out-of-order FIN is received by dropping it. * src/output-plugins/spo_unified2.c, src/preprocessors/Stream6/snort_stream_tcp.c : Fixed an issue in which xtradata is not added to the alert in unified file. * src/reload.c, src/snort.c : Fixed potential race condition between reload and exit path (main thread). * etc/file_magic.conf : Updated the file magic to detect ALZ file types. * src/sfutil/sf_ip.h : Added support for gcc version 9.2.1. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : Fixed an issue in which APPID returns no match. * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, src/dynamic-preprocessors/dns/sf_dns.vcxproj, src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, src/dynamic-preprocessors/imap/sf_imap.vcxproj, src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, src/dynamic-preprocessors/pop/sf_pop.vcxproj, src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, src/dynamic-preprocessors/sip/sf_sip.vcxproj, src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, src/win32/WIN32-Prj/build_all.vcxproj, src/win32/WIN32-Prj/sf_engine.vcxproj, src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, src/win32/WIN32-Prj/snort.vcxproj, src/win32/WIN32-Prj/snort_initialize.vcxproj, src/win32/WIN32-Prj/snort_installer_x64.nsi, src/win32/WIN32-Prj/snort_x64.dsw, src/win64/WIN64-Libraries/Packet.lib, src/win64/WIN64-Libraries/libdnet/dnet.lib, src/win64/WIN64-Libraries/pcre.lib, src/win64/WIN64-Libraries/wpcap.lib, src/win64/WIN64-Libraries/zlib.lib, tools/u2spewfoo/u2spewfoo.vcxproj : Added 64-bit support for Windows 10 operating system. * src/dynamic-preprocessors/pop/snort_pop.c : Fixed an issue where POP preprocessor was not generating alert in some cases. * src/dynamic-preprocessors/gtp/gtp_parser.c : Fixed the alerting logic for GTP v2 with missing TEID. * src/preprocessors/HttpInspect/utils/hi_paf.c : Fixed file policy not working with character prefix in chunk size. * configure.in, src/reload.c, src/side-channel/sidechannel.c, src/snort.c, src/target-based/sftarget_reader.c, src/util.h : Added support for glibc version 2.30. * src/decode.h, src/dynamic-plugins/sf_engine/sf_snort_packet.h, src/preprocessors/HttpInspect/utils/hi_paf.c, src/preprocessors/Stream6/snort_stream_tcp.c, src/preprocessors/Stream6/stream_paf.c, src/preprocessors/snort_httpinspect.c, src/preprocessors/snort_httpinspect.h, src/preprocessors/stream_api.h : Added support for early inspection of HTTP payload before flushing in pre-ack mode. * src/file-process/file_api.h, src/file-process/file_service.c, src/preprocessors/HttpInspect/include/hi_norm.h, src/preprocessors/HttpInspect/include/hi_ui_config.h, src/preprocessors/HttpInspect/server/hi_server_norm.c, src/preprocessors/snort_httpinspect.c : Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. Upstream changelog from 2.9.16 to 2.9.16.1 : * src/dynamic-preprocessors/appid/appIdConfig.h, src/dynamic-preprocessors/appid/appInfoTable.c, src/dynamic-preprocessors/appid/flow.h, src/dynamic-preprocessors/appid/fw_appid.c : Added packet counters to make sure flows with one-way data don't pend forever. * src/detection-plugins/sp_flowbits.c, src/snort.c : Fixed potential race condition between reload and exit path. * src/detection-plugins/sp_session.c, src/preprocessors/Stream6/stream_paf.h, src/sfutil/util_jsnorm.c : Added support for GCC version 10.1.1. Pkgsrc changes : * added patch for NetBSD to get the definition for endrpcent(), which fixes compilation * snort now depends on bash since a bundled tool is a bash shell script * some pkglint compliance changes in Makefile and options.mk
2020-10-01 21:45:02 +02:00
REPLACE_BASH+= tools/appid_detector_builder.sh
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_FILES.paths= etc/snort.conf
SUBST_SED.paths= -e "s|/usr/local|${PREFIX}|g"
SUBST_SED.paths+= -e "s|../rules|rules|g"
SUBST_SED.paths+= -e "s|../so_rules|so_rules|g"
SUBST_SED.paths+= -e "s|../preproc_rules|preproc_rules|g"
SUBST_MESSAGE.paths= Fixing paths.
SUBST_CLASSES+= installp
SUBST_STAGE.installp= post-extract
SUBST_FILES.installp= src/dynamic-preprocessors/Makefile.in
SUBST_SED.installp= -e "s|exec_prefix)|exec_prefix)/share/snort|g"
SUBST_MESSAGE.installp= Fixing preprocessors install path.
.include "options.mk"
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --disable-static-daq
CONFIGURE_ARGS+= --enable-sourcefire
CONFIGURE_ARGS+= --with-daq-includes=${BUILDLINK_PREFIX.daq}/include
CONFIGURE_ARGS+= --with-daq-libraries=${BUILDLINK_PREFIX.daq}/lib
CONFIGURE_ARGS+= --with-libpcap-includes=${BUILDLINK_PREFIX.libpcap}/include
CONFIGURE_ARGS+= --with-libpcap-libraries=${BUILDLINK_PREFIX.libpcap}/lib
CONFIGURE_ARGS+= --disable-so_with_static_lib
Update to Snort 2.9.15.1 2019-12-15 - Snort 2.9.15.1 New Additions Added support for glibc version 2.30. Improvements/Fix Fixed Snort core seen during SSL re-configuration. Fixed file access issues on files from SMB share. Snort 2.9.15.0 New Additions Added new debugs to print detection, file_processing and Preproc time consumption info and verdict. Added support to detect new Korean file formats .egg and .alg in the file preprocessor. Added support to detect new RAR file-type in the file preprocessor. Improvements / Fix Fix to generate ALERT if TEID value is zero in GTP v1 and v2 packets. Fix to whitelist FTP data sessions when no file policy exists. Fix RTF file magic to a more generic value to prevent evasions. Added debug logs during HTTP reload. Added rule SID check during validation. Fix an issue where HTTP was processing non-HTTP traffic on port 443. Added new debugs to print detection, file processing, and Prepro time consumption info and verdicts. Snort 2.9.14.1 [*] New Additions * Added support for wild card port numbers in host cache and overwriting port service AppId. * Added support for new STLS client patterns to help better detect POP3S over SSL. * Added support for detecting Mac based SMTP Microsoft Outlook client application. * Added a new preprocessor alert 120:27 to alert if there is no proper end of header. [*] Improvements / Fix * Improved appId detection for proxied traffic. * Fix for enabling flow profiling mode without restarting snort detection engine. * Fixed packet drop scenario. Snort 2.9.13.0 New Additions Snort now supports reload on snort rules update. Addition of a scenario to add a packet to blacklist verdict to ensure the new session will be allowed. Handled a new pre-processor alert in case of the improper end of t HTTP header. Improvements Modified the calculation of file hash for FTP/HTTP with offset values. Fixed portal authentication connection stuck in half closed state. Updated UDP global timeout for a non-standard port. This release also patched the following two vulnerabilities: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190501-frpwr-smb-snort Snort 2.9.12.0 New Additions Parsing HTTP CONNECT to extract the tunnel IP and port information. Alerting and dechunking for chunked encoding in HTTP1.0 request and response. Improvements Fixed an issue where, if we have a junk line before HTTP response header, the header was wrongly parsed. Fixed GZIP evasions where an HTTP response with content-encoding:gzip contains a body that has a GZIP-related anomaly. Fixed an issue in certain scenarios where a BitTorrent pattern is seen only on the third packet of the session, causing us to miss our client detection. SMB improvements for file detection and processing. 2017-12-06 - Snort 2.9.11.1 New Additions Added support to block portscan. In addition to tracking the scanning packets, action(drop/sdrop/reject) will be taken for all the packets, which means Snort will block the packet and generate logs. Added support to re-evaluate reputation after reputation update for all flows except those that have already been blacklisted. Improvements Fixed issue to detect RTP up to two SSRC switches in each traffic direction. Fixed issues related to HTTP POST header flushing, calling file processing directly if it is not a multipart header and changes to avoid expensive copy of segment data by not splitting them when flushing headers. Fixed issue of triggering protocol sweep alert when there are multiple destinations from single source ip protocol scan. Added changes to fix IP portscan for protocol other than ICMP and fixed issue of bad fragment size event not being generated for oversized packets. Added changes to use raw data in case of PDF and SWF files during file processing for SHA calculation and Malware Cloud Lookup. Fixed issue of correct session matching for TCP SYN packets without window scale option so that FTP data channels match the same rule as FTP control channels. Fixed issue of applying new configuration in file inspection after Snort reload. Snort 2.9.11 [*] New additions Changes to eliminate Snort restart when there are changes to the memory allocated for preprocessors, by releasing unused or least recently used memory when needed. Added support for storing filenames in Unicode for SMB protocol. Added implementation of hostPortCache versioning for unknown flows in AppID to detect and block BitTorrent. [*] Improvements Enhanced RTSP metadata parsing to match the user-agent field to detect RTSP traffic over Windows Media. Performance improvement when SYN rate limit has reached and drop is configured as next action Control-socket and side-channel support for FreeBSD platform. Fixed issue in file signature lookup for retransmitted FTP packet. Enhanced the processing of SIP/RTP future flows without ignoring them. Changes made in PDF/SWF decompression by adding boundary to the size of the decompressed data. Added a null check to prevent copy unless debugHostIp is configured in AppId. Fixed issue where FTP file type block doesn't work for retried download. Resolved issue where Snort is inappropriately handling traffic for which AppId was creating future flow. Performance improvements for SIP/RTP audio and video data flow in AppId. Performance and stability improvements in FTP preprocessor like incorrect referencing of ftp_data_session after its pruned. Stability improvement by resolving valgrind reported issues in AppId. Improved flushing mechanism for HTTP POST header. Added changes to display AppId for IPv6 unified events. Fixed issues with printing of messages for out-of-order packets. Fixed issue in increment of detection filter counter when rule is used in multiple configurations. Fixed dynamic preprocessor compilation failure in OpenBSD platform. Added changes to improve performance of ipvar list comparison. Enhanced SMTP client detection by allowing line folding and all authentication methods.
2020-02-19 00:00:26 +01:00
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
pre-build:
${CP} ${WRKSRC}/etc/snort.conf ${WRKSRC}/etc/snort.conf.default
2009-12-09 12:42:35 +01:00
INSTALLATION_DIRS+= ${EGDIR} share/doc/snort/schemas
2009-12-09 12:42:35 +01:00
post-install:
${INSTALL_DATA} ${WRKSRC}/etc/*.config \
${WRKSRC}/etc/*.map \
${WRKSRC}/etc/threshold.conf \
${WRKSRC}/etc/attribute_table.dtd \
${WRKSRC}/etc/file_magic.conf \
2009-12-09 12:42:35 +01:00
${WRKSRC}/etc/snort.conf.default ${DESTDIR}${EGDIR}/
${INSTALL_DATA} ${WRKSRC}/doc/generators ${DESTDIR}${EGDIR}
.for i in ${DOC_FILES}
${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DESTDIR}${PREFIX}/share/doc/snort/
.endfor
${INSTALL_DATA} ${WRKSRC}/doc/README.* \
${WRKSRC}/doc/*.tex \
${WRKSRC}/doc/*.pdf ${DESTDIR}${PREFIX}/share/doc/snort/
${INSTALL_DATA} ${FILESDIR}/black_list.rules \
${FILESDIR}/white_list.rules ${DESTDIR}${EGDIR}/rules/
2009-12-09 12:42:35 +01:00
${INSTALL_MAN} ${WRKSRC}/snort.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
Update to Snort 2.9.15.1 2019-12-15 - Snort 2.9.15.1 New Additions Added support for glibc version 2.30. Improvements/Fix Fixed Snort core seen during SSL re-configuration. Fixed file access issues on files from SMB share. Snort 2.9.15.0 New Additions Added new debugs to print detection, file_processing and Preproc time consumption info and verdict. Added support to detect new Korean file formats .egg and .alg in the file preprocessor. Added support to detect new RAR file-type in the file preprocessor. Improvements / Fix Fix to generate ALERT if TEID value is zero in GTP v1 and v2 packets. Fix to whitelist FTP data sessions when no file policy exists. Fix RTF file magic to a more generic value to prevent evasions. Added debug logs during HTTP reload. Added rule SID check during validation. Fix an issue where HTTP was processing non-HTTP traffic on port 443. Added new debugs to print detection, file processing, and Prepro time consumption info and verdicts. Snort 2.9.14.1 [*] New Additions * Added support for wild card port numbers in host cache and overwriting port service AppId. * Added support for new STLS client patterns to help better detect POP3S over SSL. * Added support for detecting Mac based SMTP Microsoft Outlook client application. * Added a new preprocessor alert 120:27 to alert if there is no proper end of header. [*] Improvements / Fix * Improved appId detection for proxied traffic. * Fix for enabling flow profiling mode without restarting snort detection engine. * Fixed packet drop scenario. Snort 2.9.13.0 New Additions Snort now supports reload on snort rules update. Addition of a scenario to add a packet to blacklist verdict to ensure the new session will be allowed. Handled a new pre-processor alert in case of the improper end of t HTTP header. Improvements Modified the calculation of file hash for FTP/HTTP with offset values. Fixed portal authentication connection stuck in half closed state. Updated UDP global timeout for a non-standard port. This release also patched the following two vulnerabilities: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190501-frpwr-smb-snort Snort 2.9.12.0 New Additions Parsing HTTP CONNECT to extract the tunnel IP and port information. Alerting and dechunking for chunked encoding in HTTP1.0 request and response. Improvements Fixed an issue where, if we have a junk line before HTTP response header, the header was wrongly parsed. Fixed GZIP evasions where an HTTP response with content-encoding:gzip contains a body that has a GZIP-related anomaly. Fixed an issue in certain scenarios where a BitTorrent pattern is seen only on the third packet of the session, causing us to miss our client detection. SMB improvements for file detection and processing. 2017-12-06 - Snort 2.9.11.1 New Additions Added support to block portscan. In addition to tracking the scanning packets, action(drop/sdrop/reject) will be taken for all the packets, which means Snort will block the packet and generate logs. Added support to re-evaluate reputation after reputation update for all flows except those that have already been blacklisted. Improvements Fixed issue to detect RTP up to two SSRC switches in each traffic direction. Fixed issues related to HTTP POST header flushing, calling file processing directly if it is not a multipart header and changes to avoid expensive copy of segment data by not splitting them when flushing headers. Fixed issue of triggering protocol sweep alert when there are multiple destinations from single source ip protocol scan. Added changes to fix IP portscan for protocol other than ICMP and fixed issue of bad fragment size event not being generated for oversized packets. Added changes to use raw data in case of PDF and SWF files during file processing for SHA calculation and Malware Cloud Lookup. Fixed issue of correct session matching for TCP SYN packets without window scale option so that FTP data channels match the same rule as FTP control channels. Fixed issue of applying new configuration in file inspection after Snort reload. Snort 2.9.11 [*] New additions Changes to eliminate Snort restart when there are changes to the memory allocated for preprocessors, by releasing unused or least recently used memory when needed. Added support for storing filenames in Unicode for SMB protocol. Added implementation of hostPortCache versioning for unknown flows in AppID to detect and block BitTorrent. [*] Improvements Enhanced RTSP metadata parsing to match the user-agent field to detect RTSP traffic over Windows Media. Performance improvement when SYN rate limit has reached and drop is configured as next action Control-socket and side-channel support for FreeBSD platform. Fixed issue in file signature lookup for retransmitted FTP packet. Enhanced the processing of SIP/RTP future flows without ignoring them. Changes made in PDF/SWF decompression by adding boundary to the size of the decompressed data. Added a null check to prevent copy unless debugHostIp is configured in AppId. Fixed issue where FTP file type block doesn't work for retried download. Resolved issue where Snort is inappropriately handling traffic for which AppId was creating future flow. Performance improvements for SIP/RTP audio and video data flow in AppId. Performance and stability improvements in FTP preprocessor like incorrect referencing of ftp_data_session after its pruned. Stability improvement by resolving valgrind reported issues in AppId. Improved flushing mechanism for HTTP POST header. Added changes to display AppId for IPv6 unified events. Fixed issues with printing of messages for out-of-order packets. Fixed issue in increment of detection filter counter when rule is used in multiple configurations. Fixed dynamic preprocessor compilation failure in OpenBSD platform. Added changes to improve performance of ipvar list comparison. Enhanced SMTP client detection by allowing line folding and all authentication methods.
2020-02-19 00:00:26 +01:00
.include "../../www/nghttp2/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../lang/LuaJIT2/buildlink3.mk"
.include "../../devel/flex/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../net/daq/buildlink3.mk"
.include "../../net/libdnet/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"