mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 16:59:21 +02:00
add snort-wireless package (thanks to Florian Fainelli)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2354 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7e66ceed58
commit
1a7c5d7335
@ -111,6 +111,7 @@ source "package/shat/Config.in"
|
|||||||
source "package/siproxd/Config.in"
|
source "package/siproxd/Config.in"
|
||||||
source "package/sipsak/Config.in"
|
source "package/sipsak/Config.in"
|
||||||
source "package/snort/Config.in"
|
source "package/snort/Config.in"
|
||||||
|
source "package/snort-wireless/Config.in"
|
||||||
source "package/socat/Config.in"
|
source "package/socat/Config.in"
|
||||||
source "package/ssmtp/Config.in"
|
source "package/ssmtp/Config.in"
|
||||||
source "package/srelay/Config.in"
|
source "package/srelay/Config.in"
|
||||||
|
@ -176,6 +176,7 @@ package-$(BR2_COMPILE_SHFS) += shfs
|
|||||||
package-$(BR2_PACKAGE_SIPROXD) += siproxd
|
package-$(BR2_PACKAGE_SIPROXD) += siproxd
|
||||||
package-$(BR2_PACKAGE_SIPSAK) += sipsak
|
package-$(BR2_PACKAGE_SIPSAK) += sipsak
|
||||||
package-$(BR2_COMPILE_SNORT) += snort
|
package-$(BR2_COMPILE_SNORT) += snort
|
||||||
|
package-$(BR2_COMPILE_SNORT_WIRELESS) += snort-wireless
|
||||||
package-$(BR2_PACKAGE_SOCAT) += socat
|
package-$(BR2_PACKAGE_SOCAT) += socat
|
||||||
package-$(BR2_COMPILE_SPEEX) += speex
|
package-$(BR2_COMPILE_SPEEX) += speex
|
||||||
package-$(BR2_COMPILE_SQLITE) += sqlite
|
package-$(BR2_COMPILE_SQLITE) += sqlite
|
||||||
@ -426,6 +427,17 @@ ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE),y)
|
|||||||
snort-compile: iptables-compile
|
snort-compile: iptables-compile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
snort-wireless-compile: libnet-compile libpcap-compile pcre-compile
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL),y)
|
||||||
|
snort-wireless-compile: mysql-compile
|
||||||
|
endif
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL),y)
|
||||||
|
snort-wireless-compile: postgresql-compile
|
||||||
|
endif
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE),y)
|
||||||
|
snort-wireless-compile: iptables-compile
|
||||||
|
endif
|
||||||
|
|
||||||
ulogd-compile: iptables-compile
|
ulogd-compile: iptables-compile
|
||||||
ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),)
|
ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),)
|
||||||
ulogd-compile: mysql-compile
|
ulogd-compile: mysql-compile
|
||||||
|
89
openwrt/package/snort-wireless/Config.in
Normal file
89
openwrt/package/snort-wireless/Config.in
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
menu "snort-wireless.................... Ligthweight Wireless Network Intrusion Detection System (NIDS)"
|
||||||
|
|
||||||
|
config BR2_COMPILE_SNORT_WIRELESS
|
||||||
|
bool
|
||||||
|
default BR2_PACKAGE_SNORT_WIRELESS_BASIC || BR2_PACKAGE_SNORT_WIRELESS_MYSQL || BR2_PACKAGE_SNORT_WIRELESS_PGSQL || BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
default n
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "snort-wireless.................... Ligthweight Wireless Network Intrusion Detection System (NIDS)"
|
||||||
|
tristate
|
||||||
|
optional
|
||||||
|
help
|
||||||
|
|
||||||
|
A ligthweight Wireless Network Intrusion Detection System (NIDS)
|
||||||
|
|
||||||
|
http://www.snort-wireless.org/
|
||||||
|
|
||||||
|
Depends:
|
||||||
|
- libmysqlclient (for MySQL database logging support)
|
||||||
|
- libnet
|
||||||
|
- libpcap
|
||||||
|
- libpcre
|
||||||
|
- libpq (for PostgreSQL database logging support)
|
||||||
|
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_BASIC
|
||||||
|
prompt "snort-wireless.................. without database support"
|
||||||
|
tristate
|
||||||
|
select BR2_PACKAGE_SNORT_WIRELESS
|
||||||
|
select BR2_PACKAGE_LIBNET
|
||||||
|
select BR2_PACKAGE_LIBPCAP
|
||||||
|
select BR2_PACKAGE_LIBPCRE
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_MYSQL
|
||||||
|
prompt "snort-wireless-mysql............ with MySQL database support"
|
||||||
|
tristate
|
||||||
|
select BR2_PACKAGE_SNORT_WIRELESS
|
||||||
|
select BR2_PACKAGE_LIBNET
|
||||||
|
select BR2_PACKAGE_LIBPCAP
|
||||||
|
select BR2_PACKAGE_LIBPCRE
|
||||||
|
select BR2_PACKAGE_LIBMYSQLCLIENT
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_PGSQL
|
||||||
|
prompt "snort-wireless-pgsql............ with PostgreSQL database support"
|
||||||
|
tristate
|
||||||
|
select BR2_PACKAGE_SNORT_WIRELESS
|
||||||
|
select BR2_PACKAGE_LIBNET
|
||||||
|
select BR2_PACKAGE_LIBPCAP
|
||||||
|
select BR2_PACKAGE_LIBPCRE
|
||||||
|
select BR2_PACKAGE_LIBPQ
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
prompt "snort-wireless-custom........... customized to your needs"
|
||||||
|
tristate
|
||||||
|
select BR2_PACKAGE_SNORT_WIRELESS
|
||||||
|
select BR2_PACKAGE_LIBNET
|
||||||
|
select BR2_PACKAGE_LIBPCAP
|
||||||
|
select BR2_PACKAGE_LIBPCRE
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_ENABLE_DEBUG
|
||||||
|
prompt "enable debug (enable debugging options, useful for bugreports)"
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE
|
||||||
|
prompt "enable inline mode (read packets from iptables instead of libpcap)"
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
select BR2_PACKAGE_IPTABLES
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL
|
||||||
|
prompt "with MySQL database support"
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
select BR2_PACKAGE_LIBMYSQLCLIENT
|
||||||
|
|
||||||
|
config BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL
|
||||||
|
prompt "with PostgreSQL database support"
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
depends BR2_PACKAGE_SNORT_WIRELESS_CUSTOM
|
||||||
|
select BR2_PACKAGE_LIBPQ
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endmenu
|
155
openwrt/package/snort-wireless/Makefile
Normal file
155
openwrt/package/snort-wireless/Makefile
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=snort-wireless
|
||||||
|
PKG_VERSION:=2.4.3-alpha04
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_MD5SUM:=1aa699ae279bf7a1140cf6cca02f9999
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=http://www.snort-wireless.org/files/
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_CAT:=zcat
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
|
include $(TOPDIR)/package/rules.mk
|
||||||
|
|
||||||
|
PKG_CONFIGURE_OPTS := \
|
||||||
|
--target=$(GNU_TARGET_NAME) \
|
||||||
|
--host=$(GNU_TARGET_NAME) \
|
||||||
|
--build=$(GNU_HOST_NAME) \
|
||||||
|
--program-prefix="" \
|
||||||
|
--program-suffix="" \
|
||||||
|
--prefix=/usr \
|
||||||
|
--exec-prefix=/usr \
|
||||||
|
--bindir=/usr/sbin \
|
||||||
|
--datadir=/usr/share \
|
||||||
|
--includedir=/usr/include \
|
||||||
|
--infodir=/usr/share/info \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--libexecdir=/usr/lib/locate \
|
||||||
|
--localstatedir=/var/lib \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--sbindir=/usr/sbin \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
$(DISABLE_LARGEFILE) \
|
||||||
|
$(DISABLE_NLS) \
|
||||||
|
--enable-shared \
|
||||||
|
--disable-static \
|
||||||
|
--enable-flexresp \
|
||||||
|
--with-libnet-includes="$(STAGING_DIR)/usr/include" \
|
||||||
|
--with-libnet-libraries="$(STAGING_DIR)/usr/lib" \
|
||||||
|
--with-libpcap-includes="$(STAGING_DIR)/usr/include" \
|
||||||
|
--with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
|
||||||
|
--with-libpcre-includes="$(STAGING_DIR)/usr/include" \
|
||||||
|
--with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \
|
||||||
|
|
||||||
|
SNORT_WIRELESS_BASIC_CONFIGURE_OPTS := \
|
||||||
|
--without-mysql \
|
||||||
|
--without-postgresql \
|
||||||
|
|
||||||
|
SNORT_WIRELESS_MYSQL_CONFIGURE_OPTS := \
|
||||||
|
--with-mysql=$(STAGING_DIR)/usr \
|
||||||
|
--without-postgresql \
|
||||||
|
|
||||||
|
SNORT_WIRELESS_PGSQL_CONFIGURE_OPTS := \
|
||||||
|
--without-mysql \
|
||||||
|
--with-postgresql=$(STAGING_DIR)/usr \
|
||||||
|
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS := \
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_DEBUG),y)
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --enable-debug
|
||||||
|
else
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --disable-debug
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE),y)
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --enable-inline
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-libipq-includes="$(STAGING_DIR)/include/libipq"
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-libipq-libraries="$(STAGING_DIR)/lib"
|
||||||
|
else
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --disable-inline
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL),y)
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-mysql="$(STAGING_DIR)/usr"
|
||||||
|
else
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --without-mysql
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL),y)
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --with-postgresql="$(STAGING_DIR)/usr"
|
||||||
|
else
|
||||||
|
SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS += --without-postgresql
|
||||||
|
endif
|
||||||
|
|
||||||
|
define PKG_build
|
||||||
|
|
||||||
|
ifneq ($(BR2_PACKAGE_$(1)),)
|
||||||
|
BUILD_TARGETS += $(PKG_BUILD_DIR)/$(2)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(PKG_BUILD_DIR)/$(2): $(PKG_BUILD_DIR)/.prepared
|
||||||
|
touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in
|
||||||
|
touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure
|
||||||
|
-$(MAKE) -C $(PKG_BUILD_DIR) distclean
|
||||||
|
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||||
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \
|
||||||
|
LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
|
||||||
|
./configure \
|
||||||
|
$(PKG_CONFIGURE_OPTS) \
|
||||||
|
$$($(1)_CONFIGURE_OPTS) \
|
||||||
|
);
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||||
|
mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/$(2)
|
||||||
|
|
||||||
|
$$(IPKG_$(1)): $(PKG_BUILD_DIR)/.installed $(PKG_BUILD_DIR)/$(2)
|
||||||
|
rm -rf $$(IDIR_$(1))
|
||||||
|
$(SCRIPT_DIR)/make-ipkg-dir.sh $$(IDIR_$(1)) ./ipkg/$(2).control $(3) $(4)
|
||||||
|
install -m0644 ./ipkg/snort-wireless.conffiles $$(IDIR_$(1))/CONTROL/conffiles
|
||||||
|
install -d -m0755 $$(IDIR_$(1))/etc/default
|
||||||
|
install -m0644 ./ipkg/snort-wireless.default $$(IDIR_$(1))/etc/default/snort
|
||||||
|
install -d -m0755 $$(IDIR_$(1))/etc/init.d
|
||||||
|
install -m0755 ./ipkg/snort-wireless.init $$(IDIR_$(1))/etc/init.d/snort
|
||||||
|
install -d -m0755 $$(IDIR_$(1))/etc/snort
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/snort.conf $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/classification.config $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/gen-msg.map $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/reference.config $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/sid-msg.map $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/threshold.conf $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -m0644 $(PKG_BUILD_DIR)/etc/unicode.map $$(IDIR_$(1))/etc/snort/
|
||||||
|
install -d -m0755 $$(IDIR_$(1))/usr/sbin
|
||||||
|
install -m0755 $(PKG_BUILD_DIR)/$(2) $$(IDIR_$(1))/usr/sbin/snort
|
||||||
|
$(RSTRIP) $$(IDIR_$(1))
|
||||||
|
mkdir -p $(PACKAGE_DIR)
|
||||||
|
$(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call PKG_template,SNORT_WIRELESS_BASIC,snort-wireless,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_template,SNORT_WIRELESS_MYSQL,snort-wireless-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_template,SNORT_WIRELESS_PGSQL,snort-wireless-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_template,SNORT_WIRELESS_CUSTOM,snort-wireless-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
|
||||||
|
$(eval $(call PKG_build,SNORT_WIRELESS_BASIC,snort-wireless,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_build,SNORT_WIRELESS_MYSQL,snort-wireless-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_build,SNORT_WIRELESS_PGSQL,snort-wireless-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
$(eval $(call PKG_build,SNORT_WIRELESS_CUSTOM,snort-wireless-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
|
|
||||||
|
$(PKG_BUILD_DIR)/.configured:
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built
|
||||||
|
mkdir -p $(PKG_INSTALL_DIR)
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
|
install
|
||||||
|
touch $(PKG_BUILD_DIR)/.installed
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
Package: snort-wireless-custom
|
||||||
|
Priority: optional
|
||||||
|
Section: net
|
||||||
|
Description: a flexible Wireless Network Intrusion Detection System (NIDS),
|
||||||
|
built with custom options
|
||||||
|
Depends: libnet, libpcap, libpcre
|
@ -0,0 +1,6 @@
|
|||||||
|
Package: snort-wireless-mysql
|
||||||
|
Priority: optional
|
||||||
|
Section: net
|
||||||
|
Description: a flexible Wireless Network Intrusion Detection System (NIDS),
|
||||||
|
built with MySQL database logging support
|
||||||
|
Depends: libnet, libpcap, libpcre, libmysqlclient
|
@ -0,0 +1,6 @@
|
|||||||
|
Package: snort-wireless-pgsql
|
||||||
|
Priority: optional
|
||||||
|
Section: net
|
||||||
|
Description: a flexible Wireless Network Intrusion Detection System (NIDS),
|
||||||
|
built with PostgreSQL database logging support
|
||||||
|
Depends: libnet, libpcap, libpcre, libpq
|
@ -0,0 +1,3 @@
|
|||||||
|
/etc/default/snort
|
||||||
|
/etc/snort/snort.conf
|
||||||
|
/etc/snort/threshold.conf
|
@ -0,0 +1,6 @@
|
|||||||
|
Package: snort-wireless
|
||||||
|
Priority: optional
|
||||||
|
Section: net
|
||||||
|
Description: a flexible Wireless Network Intrusion Detection System (NIDS),
|
||||||
|
built without database logging support
|
||||||
|
Depends: libnet, libpcap, libpcre
|
@ -0,0 +1,2 @@
|
|||||||
|
INTERFACE="vlan1" # WAN
|
||||||
|
OPTIONS="-i $INTERFACE -c /etc/snort/snort.conf -D -N -q -s"
|
23
openwrt/package/snort-wireless/ipkg/snort-wireless.init
Normal file
23
openwrt/package/snort-wireless/ipkg/snort-wireless.init
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
DEFAULT=/etc/default/snort
|
||||||
|
LOG_D=/var/log/snort
|
||||||
|
RUN_D=/var/run
|
||||||
|
[ -f $DEFAULT ] && . $DEFAULT
|
||||||
|
PID_F=$RUN_D/snort_$INTERFACE.pid
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
start)
|
||||||
|
[ -d $LOG_D ] || mkdir -p $LOG_D
|
||||||
|
[ -d $RUN_D ] || mkdir -p $RUN_D
|
||||||
|
snort $OPTIONS
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "usage: $0 (start|stop)"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
@ -0,0 +1,35 @@
|
|||||||
|
--- snort-2.3.2-orig/src/snort.c 2005-01-13 21:36:20.000000000 +0100
|
||||||
|
+++ snort-2.3.2-1/src/snort.c 2005-04-04 20:03:34.000000000 +0200
|
||||||
|
@@ -1949,7 +1949,7 @@
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
int i;
|
||||||
|
- char *conf_files[]={"/etc/snort.conf", "./snort.conf", NULL};
|
||||||
|
+ char *conf_files[]={"/etc/snort/snort.conf", NULL};
|
||||||
|
char *fname = NULL;
|
||||||
|
char *home_dir = NULL;
|
||||||
|
char *rval = NULL;
|
||||||
|
@@ -1970,23 +1970,6 @@
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* search for .snortrc in the HOMEDIR */
|
||||||
|
- if(!rval)
|
||||||
|
- {
|
||||||
|
- if((home_dir = getenv("HOME")))
|
||||||
|
- {
|
||||||
|
- /* create the full path */
|
||||||
|
- fname = (char *)malloc(strlen(home_dir) + strlen("/.snortrc") + 1);
|
||||||
|
- if(!fname)
|
||||||
|
- FatalError("Out of memory searching for config file\n");
|
||||||
|
-
|
||||||
|
- if(stat(fname, &st) != -1)
|
||||||
|
- rval = fname;
|
||||||
|
- else
|
||||||
|
- free(fname);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,178 @@
|
|||||||
|
--- snort-wireless-2.4.3-alpha04/etc/snort.conf 2005-10-21 09:41:01.000000000 +0200
|
||||||
|
+++ /Users/florian/telechargements/snort.conf 2005-10-30 13:20:17.000000000 +0100
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
#
|
||||||
|
###################################################
|
||||||
|
# This file contains a sample snort configuration.
|
||||||
|
+# Most preprocessors and rules were disabled to save memory.
|
||||||
|
# You can take the following steps to create your own custom configuration:
|
||||||
|
#
|
||||||
|
# 1) Set the variables for your network
|
||||||
|
@@ -42,10 +43,10 @@
|
||||||
|
# or you can specify the variable to be any IP address
|
||||||
|
# like this:
|
||||||
|
|
||||||
|
-var HOME_NET any
|
||||||
|
+var HOME_NET 192.168.1.0/24
|
||||||
|
|
||||||
|
# Set up the external network addresses as well. A good start may be "any"
|
||||||
|
-var EXTERNAL_NET any
|
||||||
|
+var EXTERNAL_NET !$HOME_NET
|
||||||
|
|
||||||
|
# Configure your wireless AP lists. This allows snort to look for attacks
|
||||||
|
# against your wireless network, such as rogue access points or adhoc wireless
|
||||||
|
@@ -137,7 +138,7 @@
|
||||||
|
# Path to your rules files (this can be a relative path)
|
||||||
|
# Note for Windows users: You are advised to make this an absolute path,
|
||||||
|
# such as: c:\snort\rules
|
||||||
|
-var RULE_PATH ../rules
|
||||||
|
+var RULE_PATH /etc/snort/rules
|
||||||
|
|
||||||
|
# Configure the snort decoder
|
||||||
|
# ============================
|
||||||
|
@@ -413,11 +414,11 @@
|
||||||
|
# lots of options available here. See doc/README.http_inspect.
|
||||||
|
# unicode.map should be wherever your snort.conf lives, or given
|
||||||
|
# a full path to where snort can find it.
|
||||||
|
-preprocessor http_inspect: global \
|
||||||
|
- iis_unicode_map unicode.map 1252
|
||||||
|
+#preprocessor http_inspect: global \
|
||||||
|
+# iis_unicode_map unicode.map 1252
|
||||||
|
|
||||||
|
-preprocessor http_inspect_server: server default \
|
||||||
|
- profile all ports { 80 8080 8180 } oversize_dir_length 500
|
||||||
|
+#preprocessor http_inspect_server: server default \
|
||||||
|
+# profile all ports { 80 8080 8180 } oversize_dir_length 500
|
||||||
|
|
||||||
|
#
|
||||||
|
# Example unique server configuration
|
||||||
|
@@ -451,7 +452,7 @@
|
||||||
|
# no_alert_incomplete - don't alert when a single segment
|
||||||
|
# exceeds the current packet size
|
||||||
|
|
||||||
|
-preprocessor rpc_decode: 111 32771
|
||||||
|
+#preprocessor rpc_decode: 111 32771
|
||||||
|
|
||||||
|
# bo: Back Orifice detector
|
||||||
|
# -------------------------
|
||||||
|
@@ -474,7 +475,7 @@
|
||||||
|
# 3 Back Orifice Server Traffic Detected
|
||||||
|
# 4 Back Orifice Snort Buffer Attack
|
||||||
|
|
||||||
|
-preprocessor bo
|
||||||
|
+#preprocessor bo
|
||||||
|
|
||||||
|
# telnet_decode: Telnet negotiation string normalizer
|
||||||
|
# ---------------------------------------------------
|
||||||
|
@@ -486,7 +487,7 @@
|
||||||
|
# This preprocessor requires no arguments.
|
||||||
|
# Portscan uses Generator ID 109 and does not generate any SID currently.
|
||||||
|
|
||||||
|
-preprocessor telnet_decode
|
||||||
|
+#preprocessor telnet_decode
|
||||||
|
|
||||||
|
# sfPortscan
|
||||||
|
# ----------
|
||||||
|
@@ -537,9 +538,9 @@
|
||||||
|
# are still watched as scanner hosts. The 'ignore_scanned' option is
|
||||||
|
# used to tune alerts from very active hosts such as syslog servers, etc.
|
||||||
|
#
|
||||||
|
-preprocessor sfportscan: proto { all } \
|
||||||
|
- memcap { 10000000 } \
|
||||||
|
- sense_level { low }
|
||||||
|
+#preprocessor sfportscan: proto { all } \
|
||||||
|
+# memcap { 10000000 } \
|
||||||
|
+# sense_level { low }
|
||||||
|
|
||||||
|
# arpspoof
|
||||||
|
#----------------------------------------
|
||||||
|
@@ -814,41 +815,41 @@
|
||||||
|
include $RULE_PATH/bad-traffic.rules
|
||||||
|
include $RULE_PATH/exploit.rules
|
||||||
|
include $RULE_PATH/scan.rules
|
||||||
|
-include $RULE_PATH/finger.rules
|
||||||
|
-include $RULE_PATH/ftp.rules
|
||||||
|
-include $RULE_PATH/telnet.rules
|
||||||
|
-include $RULE_PATH/rpc.rules
|
||||||
|
-include $RULE_PATH/rservices.rules
|
||||||
|
-include $RULE_PATH/dos.rules
|
||||||
|
-include $RULE_PATH/ddos.rules
|
||||||
|
-include $RULE_PATH/dns.rules
|
||||||
|
-include $RULE_PATH/tftp.rules
|
||||||
|
-
|
||||||
|
-include $RULE_PATH/web-cgi.rules
|
||||||
|
-include $RULE_PATH/web-coldfusion.rules
|
||||||
|
-include $RULE_PATH/web-iis.rules
|
||||||
|
-include $RULE_PATH/web-frontpage.rules
|
||||||
|
-include $RULE_PATH/web-misc.rules
|
||||||
|
-include $RULE_PATH/web-client.rules
|
||||||
|
-include $RULE_PATH/web-php.rules
|
||||||
|
-
|
||||||
|
-include $RULE_PATH/sql.rules
|
||||||
|
-include $RULE_PATH/x11.rules
|
||||||
|
-include $RULE_PATH/icmp.rules
|
||||||
|
-include $RULE_PATH/netbios.rules
|
||||||
|
-include $RULE_PATH/misc.rules
|
||||||
|
-include $RULE_PATH/attack-responses.rules
|
||||||
|
-include $RULE_PATH/oracle.rules
|
||||||
|
-include $RULE_PATH/mysql.rules
|
||||||
|
-include $RULE_PATH/snmp.rules
|
||||||
|
-
|
||||||
|
-include $RULE_PATH/smtp.rules
|
||||||
|
-include $RULE_PATH/imap.rules
|
||||||
|
-include $RULE_PATH/pop2.rules
|
||||||
|
-include $RULE_PATH/pop3.rules
|
||||||
|
+#include $RULE_PATH/finger.rules
|
||||||
|
+#include $RULE_PATH/ftp.rules
|
||||||
|
+#include $RULE_PATH/telnet.rules
|
||||||
|
+#include $RULE_PATH/rpc.rules
|
||||||
|
+#include $RULE_PATH/rservices.rules
|
||||||
|
+#include $RULE_PATH/dos.rules
|
||||||
|
+#include $RULE_PATH/ddos.rules
|
||||||
|
+#include $RULE_PATH/dns.rules
|
||||||
|
+#include $RULE_PATH/tftp.rules
|
||||||
|
+
|
||||||
|
+#include $RULE_PATH/web-cgi.rules
|
||||||
|
+#include $RULE_PATH/web-coldfusion.rules
|
||||||
|
+#include $RULE_PATH/web-iis.rules
|
||||||
|
+#include $RULE_PATH/web-frontpage.rules
|
||||||
|
+#include $RULE_PATH/web-misc.rules
|
||||||
|
+#include $RULE_PATH/web-client.rules
|
||||||
|
+#include $RULE_PATH/web-php.rules
|
||||||
|
+
|
||||||
|
+#include $RULE_PATH/sql.rules
|
||||||
|
+#include $RULE_PATH/x11.rules
|
||||||
|
+#include $RULE_PATH/icmp.rules
|
||||||
|
+#include $RULE_PATH/netbios.rules
|
||||||
|
+#include $RULE_PATH/misc.rules
|
||||||
|
+#include $RULE_PATH/attack-responses.rules
|
||||||
|
+#include $RULE_PATH/oracle.rules
|
||||||
|
+#include $RULE_PATH/mysql.rules
|
||||||
|
+#include $RULE_PATH/snmp.rules
|
||||||
|
+
|
||||||
|
+#include $RULE_PATH/smtp.rules
|
||||||
|
+#include $RULE_PATH/imap.rules
|
||||||
|
+#include $RULE_PATH/pop2.rules
|
||||||
|
+#include $RULE_PATH/pop3.rules
|
||||||
|
|
||||||
|
-include $RULE_PATH/nntp.rules
|
||||||
|
-include $RULE_PATH/other-ids.rules
|
||||||
|
+#include $RULE_PATH/nntp.rules
|
||||||
|
+#include $RULE_PATH/other-ids.rules
|
||||||
|
# include $RULE_PATH/web-attacks.rules
|
||||||
|
# include $RULE_PATH/backdoor.rules
|
||||||
|
# include $RULE_PATH/shellcode.rules
|
||||||
|
@@ -856,11 +857,11 @@
|
||||||
|
# include $RULE_PATH/porn.rules
|
||||||
|
# include $RULE_PATH/info.rules
|
||||||
|
# include $RULE_PATH/icmp-info.rules
|
||||||
|
- include $RULE_PATH/virus.rules
|
||||||
|
+# include $RULE_PATH/virus.rules
|
||||||
|
# include $RULE_PATH/chat.rules
|
||||||
|
# include $RULE_PATH/multimedia.rules
|
||||||
|
# include $RULE_PATH/p2p.rules
|
||||||
|
-include $RULE_PATH/experimental.rules
|
||||||
|
+#include $RULE_PATH/experimental.rules
|
||||||
|
#include $RULE_PATH/wifi.rules
|
||||||
|
|
||||||
|
# Include any thresholding or suppression commands. See threshold.conf in the
|
Loading…
Reference in New Issue
Block a user