aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>2005-07-27 01:13:00 +0800
committerse <se@FreeBSD.org>2005-07-27 01:13:00 +0800
commite401724f1921e64495badb9ff444d375173c0abb (patch)
treecadd89a0a30d40b15f2b16d4704f0e045037f9b5 /security
parentb689c0618d1125bf5b254072c7df04ea2d43dae2 (diff)
downloadfreebsd-ports-gnome-e401724f1921e64495badb9ff444d375173c0abb.tar.gz
freebsd-ports-gnome-e401724f1921e64495badb9ff444d375173c0abb.tar.zst
freebsd-ports-gnome-e401724f1921e64495badb9ff444d375173c0abb.zip
New port: Yersinia
Yersinia is a layer 2 vulnerability scanner with support for the following protocols: - Cisco Discovery Protocol (CDP) - Dynamic Host Configuration Protocol (DHCP) - Dynamic Trunking Protocol (DTP) - Hot Standby Router Protocol (HSRP) - IEEE 802.1q - Spanning Tree Protocol (STP, RSTP) - Virtual Trunking Protocol (VTP)
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/yersinia/Makefile32
-rw-r--r--security/yersinia/distinfo2
-rw-r--r--security/yersinia/files/patch-Makefile_in35
-rw-r--r--security/yersinia/files/patch-add_getopt_h127
-rw-r--r--security/yersinia/files/patch-commands_c166
-rw-r--r--security/yersinia/files/patch-configure11
-rw-r--r--security/yersinia/pkg-descr12
8 files changed, 386 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 3aca6ae0134e..6a95bfa8a42c 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -540,6 +540,7 @@
SUBDIR += xmlsec1
SUBDIR += xspy
SUBDIR += yafic
+ SUBDIR += yersinia
SUBDIR += zebedee
SUBDIR += zombiezapper
diff --git a/security/yersinia/Makefile b/security/yersinia/Makefile
new file mode 100644
index 000000000000..0b2188342791
--- /dev/null
+++ b/security/yersinia/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: yersinia
+# Date created: Sun Jul 24 10:43:13 CEST 2005
+# Whom: se
+#
+# $FreeBSD$
+#
+
+PORTNAME= yersinia
+PORTVERSION= 0.5.4
+CATEGORIES= security
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= se@FreeBSD.org
+COMMENT= Layer 2 vulnerability scanner (switches, spanning tree, 802.1q ...)
+
+# Dependency on file that is not also installed by libnet (1.0.2) port!
+BUILD_DEPENDS= ${LOCALBASE}/share/examples/libnet/ip_raw.c:${PORTSDIR}/net/libnet-devel
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+MAN8= yersinia.8
+CFLAGS+= -DNEED_GETOPT_H
+PLIST_FILES= sbin/yersinia
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/yersinia ${PREFIX}/sbin/
+ ${INSTALL_MAN} ${WRKSRC}/yersinia.8 ${PREFIX}/man/man8/
+
+.include <bsd.port.mk>
diff --git a/security/yersinia/distinfo b/security/yersinia/distinfo
new file mode 100644
index 000000000000..7e3753ad2ded
--- /dev/null
+++ b/security/yersinia/distinfo
@@ -0,0 +1,2 @@
+MD5 (yersinia-0.5.4.tar.gz) = 3a4c8ee7c8fbc751152de423f624d994
+SIZE (yersinia-0.5.4.tar.gz) = 286435
diff --git a/security/yersinia/files/patch-Makefile_in b/security/yersinia/files/patch-Makefile_in
new file mode 100644
index 000000000000..d1225e260f21
--- /dev/null
+++ b/security/yersinia/files/patch-Makefile_in
@@ -0,0 +1,35 @@
+--- src/Makefile.in~ Sun Jul 24 12:22:05 2005
++++ src/Makefile.in Sun Jul 24 12:22:08 2005
+@@ -135,8 +135,8 @@
+
+ bin_PROGRAMS = yersinia
+
+-yersinia_SOURCES = xstp.c parser.c getopt.c getopt1.c dtp.c dtp.h\
+-getopt.h parser.h xstp.h global.h cdp.c cdp.h dhcp.c dhcp.h\
++yersinia_SOURCES = xstp.c parser.c dtp.c dtp.h\
++parser.h xstp.h global.h cdp.c cdp.h dhcp.c dhcp.h\
+ hsrp.h hsrp.c dot1q.h dot1q.c vtp.h vtp.c arp.h arp.c\
+ thread-util.h thread-util.c admin.c admin.h terminal.c\
+ terminal.h terminal-defs.h commands.c commands.h commands-struct.h\
+@@ -151,8 +151,8 @@
+ bin_PROGRAMS = yersinia$(EXEEXT)
+ PROGRAMS = $(bin_PROGRAMS)
+
+-am__yersinia_SOURCES_DIST = xstp.c parser.c getopt.c getopt1.c dtp.c \
+- dtp.h getopt.h parser.h xstp.h global.h cdp.c cdp.h dhcp.c \
++am__yersinia_SOURCES_DIST = xstp.c parser.c dtp.c \
++ dtp.h parser.h xstp.h global.h cdp.c cdp.h dhcp.c \
+ dhcp.h hsrp.h hsrp.c dot1q.h dot1q.c vtp.h vtp.c arp.h arp.c \
+ thread-util.h thread-util.c admin.c admin.h terminal.c \
+ terminal.h terminal-defs.h commands.c commands.h \
+@@ -160,8 +160,8 @@
+ yersinia.h yersinia.c md5.c md5.h md5_sum.c md5_sum.h \
+ protocols.h protocols.c ncurses-gui.c ncurses-gui.h
+ @HAS_CURSES_TRUE@am__objects_1 = ncurses-gui.$(OBJEXT)
+-am_yersinia_OBJECTS = xstp.$(OBJEXT) parser.$(OBJEXT) getopt.$(OBJEXT) \
+- getopt1.$(OBJEXT) dtp.$(OBJEXT) cdp.$(OBJEXT) dhcp.$(OBJEXT) \
++am_yersinia_OBJECTS = xstp.$(OBJEXT) parser.$(OBJEXT) \
++ dtp.$(OBJEXT) cdp.$(OBJEXT) dhcp.$(OBJEXT) \
+ hsrp.$(OBJEXT) dot1q.$(OBJEXT) vtp.$(OBJEXT) arp.$(OBJEXT) \
+ thread-util.$(OBJEXT) admin.$(OBJEXT) terminal.$(OBJEXT) \
+ commands.$(OBJEXT) interfaces.$(OBJEXT) attack.$(OBJEXT) \
diff --git a/security/yersinia/files/patch-add_getopt_h b/security/yersinia/files/patch-add_getopt_h
new file mode 100644
index 000000000000..e40b90ff92d0
--- /dev/null
+++ b/security/yersinia/files/patch-add_getopt_h
@@ -0,0 +1,127 @@
+--- src/cdp.c~ Tue May 24 21:28:31 2005
++++ src/cdp.c Sun Jul 24 11:14:34 2005
+@@ -57,6 +57,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/dhcp.c~ Tue May 24 21:28:31 2005
++++ src/dhcp.c Sun Jul 24 11:14:55 2005
+@@ -59,6 +59,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/dot1q.c~ Tue May 24 21:28:31 2005
++++ src/dot1q.c Sun Jul 24 11:15:02 2005
+@@ -58,6 +58,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/dtp.c~ Tue May 24 21:28:31 2005
++++ src/dtp.c Sun Jul 24 11:15:12 2005
+@@ -57,6 +57,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/hsrp.c~ Tue May 24 21:28:31 2005
++++ src/hsrp.c Sun Jul 24 11:15:34 2005
+@@ -59,6 +59,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/parser.c~ Mon Apr 11 23:15:24 2005
++++ src/parser.c Sun Jul 24 11:21:11 2005
+@@ -52,6 +52,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+@@ -70,12 +74,6 @@
+
+ #ifdef HAVE_PTHREAD_H
+ #include <pthread.h>
+-#endif
+-
+-#ifdef HAVE_GETOPT_LONG_ONLY
+-#include <getopt.h>
+-#else
+-#include "getopt.h"
+ #endif
+
+ #include <termios.h>
+
+--- src/vtp.c~ Tue May 24 21:28:32 2005
++++ src/vtp.c Sun Jul 24 11:17:02 2005
+@@ -57,6 +57,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
++#endif
++
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+
+--- src/xstp.c~ Tue May 24 21:28:32 2005
++++ src/xstp.c Sun Jul 24 11:21:23 2005
+@@ -53,8 +53,12 @@
+ #include <sys/time.h>
+ #endif
+
+-#ifdef HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H_x
+ #include <unistd.h>
++#endif
++
++#ifdef NEED_GETOPT_H
++#include <getopt.h>
+ #endif
+
+ #ifdef HAVE_STRING_H
diff --git a/security/yersinia/files/patch-commands_c b/security/yersinia/files/patch-commands_c
new file mode 100644
index 000000000000..be64d15a0973
--- /dev/null
+++ b/security/yersinia/files/patch-commands_c
@@ -0,0 +1,166 @@
+--- src/commands.c~ Mon Apr 11 23:15:23 2005
++++ src/commands.c Tue Jul 26 18:48:36 2005
+@@ -624,7 +624,8 @@
+ u_int8_t proto)
+ {
+ int8_t msg[128];
+- int8_t fail, params, aux;
++ int8_t fail, params;
++ int aux;
+ struct term_vty *vty = node->specific;
+
+ if (!(warray->word[warray->indx+1]))
+@@ -1971,7 +1972,7 @@
+ {
+ int8_t msg[128], *args, prova;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ char *punt;
+ struct stp_data *stp_data;
+ struct term_vty *vty = node->specific;
+@@ -2113,21 +2114,11 @@
+ if (!strcmp("flags", comm_set_stp[x].s))
+ {
+ parser_str_tolower(args);
+- if ( (*args == '0') && (*(args+1) == 'x') && (strlen(args) >= 2) )
+- {
+- punt = &prova;
+- aux = strtol(args, &punt, 16);
+- if ( *punt || (aux < 0) || (aux > 255) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->flags |= aux;
+- }
+- else
+- {
+- aux = atoi(args);
+- if ( (aux < 0) || (aux > 255) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->flags |= aux;
+- }
++ punt = &prova;
++ aux = strtol(args, &punt, 0);
++ if ( *punt || (aux < 0) || (aux > 255) )
++ return (command_bad_input(node,warray->indx+1));
++ stp_data->flags |= aux;
+
+ return 0;
+ }
+@@ -2146,21 +2137,11 @@
+ if (!strcmp("cost", comm_set_stp[x].s))
+ {
+ parser_str_tolower(args);
+- if ( (*args == '0') && (*(args+1) == 'x') && (strlen(args) >= 2) )
+- {
+- punt = &prova;
+- aux = strtol(args, &punt, 16);
+- if ( *punt || (aux < 0) || (strlen(args) > 10) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->root_pc = aux;
+- }
+- else
+- {
+- aux = atoi(args);
+- if ( (aux < 0) || (aux > 0xffffffff) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->root_pc = aux;
+- }
++ punt = &prova;
++ aux = strtol(args, &punt, 0);
++ if ( *punt || (aux < 0) || (strlen(args) > 10) )
++ return (command_bad_input(node,warray->indx+1));
++ stp_data->root_pc = aux;
+
+ return 0;
+ }
+@@ -2178,21 +2159,11 @@
+ if (!strcmp("portid", comm_set_stp[x].s))
+ {
+ parser_str_tolower(args);
+- if ( (*args == '0') && (*(args+1) == 'x') && (strlen(args) >= 2) )
+- {
+- punt = &prova;
+- aux = strtol(args, &punt, 16);
+- if ( *punt || (aux < 0) || (aux > 65535) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->port_id = aux;
+- }
+- else
+- {
+- aux = atoi(args);
+- if ( (aux < 0) || (aux > 65535) )
+- return (command_bad_input(node,warray->indx+1));
+- stp_data->port_id = aux;
+- }
++ punt = &prova;
++ aux = strtol(args, &punt, 0);
++ if ( *punt || (aux < 0) || (aux > 65535) )
++ return (command_bad_input(node,warray->indx+1));
++ stp_data->port_id = aux;
+
+ return 0;
+ }
+@@ -2458,7 +2429,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ struct dtp_data *dtp_data;
+ struct term_vty *vty = node->specific;
+
+@@ -2749,7 +2720,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ struct in_addr addr;
+ u_int32_t aux_long;
+ struct dhcp_data *dhcp_data;
+@@ -3073,7 +3044,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int32_t aux;
++ int aux;
+ u_int32_t aux_long;
+ struct in_addr addr;
+ struct vtp_data *vtp_data;
+@@ -3389,7 +3360,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ u_int32_t aux_long;
+ struct in_addr addr;
+ struct dot1q_data *dot1q_data;
+@@ -3725,7 +3696,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ struct in_addr addr;
+ u_int32_t aux_long;
+ struct hsrp_data *hsrp_data;
+@@ -4116,7 +4087,7 @@
+ {
+ int8_t msg[128], *args;
+ int8_t fail, i, params;
+- u_int8_t aux;
++ int aux;
+ struct cdp_data *cdp_data;
+ struct term_vty *vty = node->specific;
+
+@@ -4527,7 +4498,8 @@
+ u_int8_t proto)
+ {
+ int8_t msg[128];
+- int8_t i, fail, params, aux;
++ int8_t i, fail, params;
++ int aux;
+ struct attack *theattack = NULL;
+ struct term_vty *vty = node->specific;
+
diff --git a/security/yersinia/files/patch-configure b/security/yersinia/files/patch-configure
new file mode 100644
index 000000000000..54dc0bea8f0c
--- /dev/null
+++ b/security/yersinia/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure~ Tue May 24 21:38:11 2005
++++ configure Sun Jul 24 13:04:08 2005
+@@ -2908,7 +2908,7 @@
+
+
+ if test -n "$GCC"; then
+- CFLAGS="-O3 -Wall -g"
++# CFLAGS="-O3 -Wall -g"
+ else
+ { echo "$as_me:$LINENO: WARNING: Ouch!! Only gcc is supported..." >&5
+ echo "$as_me: WARNING: Ouch!! Only gcc is supported..." >&2;}
diff --git a/security/yersinia/pkg-descr b/security/yersinia/pkg-descr
new file mode 100644
index 000000000000..3ab9250c03fd
--- /dev/null
+++ b/security/yersinia/pkg-descr
@@ -0,0 +1,12 @@
+Yersinia is a layer 2 vulnerability scanner with support for the
+following protocols:
+
+Cisco Discovery Protocol (CDP)
+Dynamic Host Configuration Protocol (DHCP)
+Dynamic Trunking Protocol (DTP)
+Hot Standby Router Protocol (HSRP)
+IEEE 802.1q
+Spanning Tree Protocol (STP, RSTP)
+Virtual Trunking Protocol (VTP)
+
+WWW: http://yersignia.sourceforge.net/