diff options
author | foxfair <foxfair@FreeBSD.org> | 2003-05-08 13:07:22 +0800 |
---|---|---|
committer | foxfair <foxfair@FreeBSD.org> | 2003-05-08 13:07:22 +0800 |
commit | 65b4d6aab8682033c1bb0beafa8ae4e14f3c3671 (patch) | |
tree | c4428aff693aebb54bc093e220eb96bc5ab0e6db /security | |
parent | 58ee4d4c194b956928835fa0bc23d32c5a98817e (diff) | |
download | freebsd-ports-gnome-65b4d6aab8682033c1bb0beafa8ae4e14f3c3671.tar.gz freebsd-ports-gnome-65b4d6aab8682033c1bb0beafa8ae4e14f3c3671.tar.zst freebsd-ports-gnome-65b4d6aab8682033c1bb0beafa8ae4e14f3c3671.zip |
Add ADMsnmp 0.1, SNMP audit scanner.
PR: 50642
Submitted by: Yonatan@xpert.com
Diffstat (limited to 'security')
-rw-r--r-- | security/ADMsnmp/Makefile | 33 | ||||
-rw-r--r-- | security/ADMsnmp/distinfo | 1 | ||||
-rw-r--r-- | security/ADMsnmp/files/patch-snmp.c | 64 | ||||
-rw-r--r-- | security/ADMsnmp/pkg-descr | 7 | ||||
-rw-r--r-- | security/ADMsnmp/pkg-plist | 6 | ||||
-rw-r--r-- | security/Makefile | 1 |
6 files changed, 112 insertions, 0 deletions
diff --git a/security/ADMsnmp/Makefile b/security/ADMsnmp/Makefile new file mode 100644 index 000000000000..7a3164355667 --- /dev/null +++ b/security/ADMsnmp/Makefile @@ -0,0 +1,33 @@ +# Ports collection makefile for: ADMsnmp +# Date created: 16 Apr 2003 +# Whom: Yonatan@xpert.com +# +# $FreeBSD$ +# + +PORTNAME= ADMsnmp +PORTVERSION= 0.1 +CATEGORIES= security +MASTER_SITES= ftp://adm.freelsd.net/pub/ADM/ \ + http://adm.freelsd.net/ADM/ \ + ${MASTER_SITE_PACKETSTORM:=groups/ADM/} +DISTNAME= ${PORTNAME}.${PORTVERSION} +EXTRACT_SUFX= .tgz + +MAINTAINER= Yonatan@xpert.com +COMMENT= SNMP audit scanner + +WRKSRC= ${WRKDIR}/ADMsnmp + +do-build: + ${CC} ${CFLAGS} -DPORTSHAREDIR="${PREFIX}/share/ADMsnmp" \ + -o ${WRKSRC}/ADMsnmp ${WRKSRC}/snmp.c + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/ADMsnmp ${PREFIX}/bin + ${MKDIR} ${PREFIX}/share/ADMsnmp + ${MKDIR} ${PREFIX}/share/doc/ADMsnmp + ${INSTALL_DATA} ${WRKSRC}/snmp.passwd ${PREFIX}/share/ADMsnmp + ${INSTALL_DATA} ${WRKSRC}/ADMsnmp.README ${PREFIX}/share/doc/ADMsnmp + +.include <bsd.port.mk> diff --git a/security/ADMsnmp/distinfo b/security/ADMsnmp/distinfo new file mode 100644 index 000000000000..c86d39ac7c2c --- /dev/null +++ b/security/ADMsnmp/distinfo @@ -0,0 +1 @@ +MD5 (ADMsnmp.0.1.tgz) = 1b6909ab6ebaaaec49444f51d3162de2 diff --git a/security/ADMsnmp/files/patch-snmp.c b/security/ADMsnmp/files/patch-snmp.c new file mode 100644 index 000000000000..21e9bc44305b --- /dev/null +++ b/security/ADMsnmp/files/patch-snmp.c @@ -0,0 +1,64 @@ +--- snmp.c.orig Wed Feb 17 07:20:05 1999 ++++ snmp.c Sun Apr 6 16:31:38 2003 +@@ -33,6 +33,8 @@ + #include <sys/stat.h> + #include <netdb.h> + #include <netinet/in.h> ++#include <sys/types.h> ++#include <sys/socket.h> + + + struct snmpchex +@@ -231,7 +233,7 @@ + /** get the ID **/ + sn->id = buf[i + 2]; + for (i = i + (buf[i + 1] + 2); i < size && i + 2 < size; i++) +- if (buf[i] == '\x02') ++ if (buf[i] == '\x02') { + if (buf[i + 1] == '\x01') + { + /** return code **/ +@@ -241,6 +243,7 @@ + } + else + return (-1); ++ } + } + } + } +@@ -300,7 +303,7 @@ + memset (buf, 0, sizeofbuf); + i = getreq (buf, namez, GETREQ_SYSDEC, id, set_req); + memcpy ((buf + i), sysdec, GETREQ_SYSDEC); +- return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, sin, sizeof (struct sockaddr_in))); ++ return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, (const struct sockaddr *)sin, sizeof (struct sockaddr_in))); + } + + /** getreq paket **/ +@@ -460,7 +463,7 @@ + i = 0; + /** we get an answer !!!! */ + +- if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, &sin, &x)) > 0) ++ if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, (struct sockaddr *) &sin, &x)) > 0) + { + nd = 0; + /** extract the ID the return code and the community name **/ +@@ -544,7 +547,7 @@ + "[-waitfor] <mili> : time in milisecond in each send of snmprequest\n" + "[-sleep] <second> : time in second of the scan process life\n" + "[-manysend] <number>: how many paket to send by request \n" +- "[-inter] <mili> : time to wait in milisecond after each request"); ++ "[-inter] <mili> : time to wait in milisecond after each request\n"); + } + + int +@@ -581,7 +584,7 @@ + printf ("cant resolve hostname!\n"); + exit (-1); + } +- opz.wordfile = strdup ("snmp.passwd"); ++ opz.wordfile = strdup ("PORTSHAREDIR/snmp.passwd"); + opz.outputfile = NULL; + opz.guess = -1; + opz.manysend = 2; diff --git a/security/ADMsnmp/pkg-descr b/security/ADMsnmp/pkg-descr new file mode 100644 index 000000000000..d045a20ec3fa --- /dev/null +++ b/security/ADMsnmp/pkg-descr @@ -0,0 +1,7 @@ +ADMsnmp is an snmpd audit scanner. +ADMsnmp can brute force the snmp community name (with a wordfile) or +make a wordfile list derived the hostname. +ADMsnmp can report to you all valid community +names found and inform you if writable access to the MIB has been attained. + +ADMsnmp is very easy to use and designed with speed in mind! diff --git a/security/ADMsnmp/pkg-plist b/security/ADMsnmp/pkg-plist new file mode 100644 index 000000000000..782cbaa6ad57 --- /dev/null +++ b/security/ADMsnmp/pkg-plist @@ -0,0 +1,6 @@ +@comment $FreeBSD$ +bin/ADMsnmp +share/ADMsnmp/snmp.passwd +share/doc/ADMsnmp/ADMsnmp.README +@dirrm share/doc/ADMsnmp +@dirrm share/ADMsnmp diff --git a/security/Makefile b/security/Makefile index d5765f333ecf..4803ddec3fbe 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ # + SUBDIR += ADMsnmp SUBDIR += aafid2 SUBDIR += acid SUBDIR += aescrypt |