diff options
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/kismet/Makefile | 132 | ||||
-rw-r--r-- | net-mgmt/kismet/distinfo | 10 | ||||
-rw-r--r-- | net-mgmt/kismet/files/gpsmap-gmap-0.1.diff.patch | 11 | ||||
-rw-r--r-- | net-mgmt/kismet/files/patch-alertracker.cc | 10 | ||||
-rw-r--r-- | net-mgmt/kismet/files/patch-plugin-autowep-Makefile | 11 | ||||
-rw-r--r-- | net-mgmt/kismet/files/patch-plugin-ptw-Makefile | 12 | ||||
-rw-r--r-- | net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc | 10 | ||||
-rw-r--r-- | net-mgmt/kismet/files/pkg-message.in | 10 | ||||
-rw-r--r-- | net-mgmt/kismet/files/suid_pkg-message.in | 6 | ||||
-rw-r--r-- | net-mgmt/kismet/pkg-descr | 17 | ||||
-rw-r--r-- | net-mgmt/kismet/pkg-plist | 29 | ||||
-rw-r--r-- | net-mgmt/kismet/suid_pkg-deinstall | 51 | ||||
-rw-r--r-- | net-mgmt/kismet/suid_pkg-install | 22 |
13 files changed, 209 insertions, 122 deletions
diff --git a/net-mgmt/kismet/Makefile b/net-mgmt/kismet/Makefile index 844c835fcbbf..c784ee7f418d 100644 --- a/net-mgmt/kismet/Makefile +++ b/net-mgmt/kismet/Makefile @@ -6,102 +6,94 @@ # PORTNAME= kismet -PORTVERSION= 200805.r1 -PORTREVISION= 5 +DISTVERSION= 2010-07-R1 +PORTEPOCH= 1 CATEGORIES= net-mgmt -MASTER_SITES= http://www.kismetwireless.net/code/ -DISTNAME= kismet-2008-05-R1 +MASTER_SITES= http://www.kismetwireless.net/code/:1 \ + http://anonsvn.wireshark.org/wireshark/trunk/:2 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:1 +DIST_SUBDIR= ${PORTNAME} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= bf@FreeBSD.org COMMENT= 802.11 layer2 wireless network detector, sniffer, and IDS GNU_CONFIGURE= yes USE_GMAKE= yes -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \ - LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" -CONFIGURE_ARGS+= --enable-syspcap +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" -OPTIONS= CURSES "libcurses interface" on \ - PANEL "libpanels interface" on \ - SETUID "Install kismet with setuid" on \ - GPSMAP "Build gpsmap utility" off \ - GMAP "Build gpsmap with Google Maps patch *UNOFFICIAL*" off +MAN1= kismet.1 kismet_drone.1 +MAN5= kismet.conf.5 kismet_drone.conf.5 -RUN_DEPENDS= wget:${PORTSDIR}/ftp/wget +OPTIONS= PCRE "Build kismet with PCRE regex filters" on \ + PLUGINS "Build and install plugins" off \ + SETUID "Build kismet with privilege separation" on -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.ifdef(WITHOUT_CURSES) -CONFIGURE_ARGS+=--disable-curses +.ifndef(NOPORTDOCS) +PORTDOCS= README manuf +DISTFILES+= manuf:2 +IGNOREFILES= manuf .endif -.ifdef(WITHOUT_PANEL) -CONFIGURE_ARGS+=--disable-panel +.ifdef(WITH_PCRE) +CONFIGURE_ARGS+=--enable-pcre +LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre +.else +CONFIGURE_ARGS+=--disable-pcre .endif -.ifdef(WITHOUT_SETUID) -CONFIGURE_ARGS+=--disable-setuid -.endif +.ifdef(WITH_SETUID) +KISMET_GROUP?= kismet +CONFIGURE_ARGS+=--with-suidgroup=${KISMET_GROUP} +INSTALL_TARGET = suidinstall +PLIST_SUB+= SUID="" +PKGINSTALL= ${PKGDIR}/suid_pkg-install +PKGDEINSTALL = ${PKGDIR}/suid_pkg-deinstall +PKGMESSAGE= ${WRKDIR}/suid_pkg-message +SUB_FILES+= suid_pkg-message +SUB_LIST+= KISMET_GROUP=${KISMET_GROUP} + +pre-su-install: + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL -.ifdef(WITH_GPSMAP) -PLIST_SUB+= GPS="" -LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp \ - expat.6:${PORTSDIR}/textproc/expat2 \ - Magick++.4:${PORTSDIR}/graphics/ImageMagick -BUILD_DEPENDS+= wget:${PORTSDIR}/ftp/wget -MAN1= gpsmap.1 .else -CONFIGURE_ARGS+=--disable-gpsmap -PLIST_SUB+= GPS="@comment " +INSTALL_TARGET = install +CONFIGURE_ARGS+=--without-suidgroup +PLIST_SUB+= SUID="@comment " .endif -.ifdef(WITH_GMAP) && defined(WITH_GPSMAP) -PATCH_SITES= http://www.parknation.com/gmap/files/ -PATCHFILES= gpsmap-gmap-0.1.tgz -PLIST_SUB+= GMAP="" -.ifndef(NOPORTDOCS) -SUB_FILES+= pkg-message -.endif -GMAP= gpsmap-gmap -PORTDOCS= ${GMAP}/README.txt +.ifdef(WITH_PLUGINS) +ALL_TARGET= depend all-with-plugins +INSTALL_TARGET+= plugins-install +PLIST_SUB+= PLUGINS="" .else -PLIST_SUB+= GMAP="@comment " +PLIST_SUB+= PLUGINS="@comment " .endif -MAN1+= kismet.1 kismet_drone.1 -MAN5= kismet.conf.5 kismet_drone.conf.5 kismet_ui.conf.5 - -PORTDOCS+= README - -post-extract: -.ifdef(WITH_GMAP) && defined(WITH_GPSMAP) - @${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${PATCHFILES} - @${PATCH} -d ${WRKSRC}/${GMAP}-0.1 --forward --quiet < ${PKGDIR}/files/${GMAP}-0.1.diff.patch - @${PATCH} -d ${WRKSRC} --forward --quiet < ${WRKSRC}/${GMAP}-0.1/${GMAP}-0.1.diff -.endif - @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \ - ${WRKSRC}/configure +post-patch: + @${REINPLACE_CMD} -e "/gps=/s/true/false/" \ + -e "/ouifile=/{/wireshark/d;s|/etc|${DOCSDIR}|;}" \ + ${WRKSRC}/conf/kismet.conf.in \ + ${WRKSRC}/conf/kismet_drone.conf + ${REINPLACE_CMD} -e "s/plugin-/plugin-[aps]/" \ + -e "s/make/${GMAKE}/" \ + -e "s/\$$(MAKE)/${GMAKE}/" \ + ${WRKSRC}/Makefile.in post-install: .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/manuf ${DOCSDIR} .endif -.ifdef(WITH_GMAP) && defined(WITH_GPSMAP) - ${MKDIR} ${DATADIR}/${GMAP}/mapfiles - ${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/index.html ${DATADIR}/${GMAP}/index.html - ${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/shadow.png ${DATADIR}/${GMAP}/mapfiles/shadow.png - ${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/wep.png ${DATADIR}/${GMAP}/mapfiles/wep.png - ${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/open.png ${DATADIR}/${GMAP}/mapfiles/open.png - ${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/mapfiles/wpa.png ${DATADIR}/${GMAP}/mapfiles/wpa.png -.ifndef(NOPORTDOCS) - @${INSTALL_DATA} ${WRKSRC}/${GMAP}-0.1/README.txt ${DOCSDIR}/${GMAP} - @${CAT} ${PKGMESSAGE} -.endif -.endif - ${INSTALL_SCRIPT} ${WRKSRC}/extra/manuf_update.sh ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/conf/kismet.conf ${PREFIX}/etc/kismet.conf.sample - ${INSTALL_DATA} ${WRKSRC}/conf/kismet_drone.conf ${PREFIX}/etc/kismet_drone.conf.sample - ${INSTALL_DATA} ${WRKSRC}/conf/kismet_ui.conf ${PREFIX}/etc/kismet_ui.conf.sample + @${INSTALL_DATA} ${WRKSRC}/conf/kismet.conf \ + ${PREFIX}/etc/kismet.conf.sample + @${INSTALL_DATA} ${WRKSRC}/conf/kismet_drone.conf \ + ${PREFIX}/etc/kismet_drone.conf.sample -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/net-mgmt/kismet/distinfo b/net-mgmt/kismet/distinfo index 75033ed50214..4862d1532e09 100644 --- a/net-mgmt/kismet/distinfo +++ b/net-mgmt/kismet/distinfo @@ -1,5 +1,5 @@ -MD5 (kismet-2008-05-R1.tar.gz) = 6ee365d36354b4dee4945e67f8149294 -SHA256 (kismet-2008-05-R1.tar.gz) = a298d44f8a6ec977021cd492a720987ded81b5c4baf5f68b36f1282a23c9f7d3 -SIZE (kismet-2008-05-R1.tar.gz) = 655362 -SHA256 (gpsmap-gmap-0.1.tgz) = 66c5e9c4fed70e88d092754746014bb02071b742c23390f1ec795fd14b32317b -SIZE (gpsmap-gmap-0.1.tgz) = 13845 +MD5 (kismet/kismet-2010-07-R1.tar.gz) = 85e59186eb529889118b5635f35cf57d +SHA256 (kismet/kismet-2010-07-R1.tar.gz) = b1bae7a97e7a904bf620f285aa0d62ebc1fd3b54b671fbca125405036f949e80 +SIZE (kismet/kismet-2010-07-R1.tar.gz) = 896466 +MD5 (kismet/manuf) = IGNORE +SHA256 (kismet/manuf) = IGNORE diff --git a/net-mgmt/kismet/files/gpsmap-gmap-0.1.diff.patch b/net-mgmt/kismet/files/gpsmap-gmap-0.1.diff.patch deleted file mode 100644 index 5fbefbc8f2d9..000000000000 --- a/net-mgmt/kismet/files/gpsmap-gmap-0.1.diff.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gpsmap-gmap-0.1.diff.orig Thu Apr 6 17:36:37 2006 -+++ gpsmap-gmap-0.1.diff Thu Apr 6 17:36:44 2006 -@@ -430,7 +430,7 @@ - " -v, --verbose Verbose output while running\n" - " -g, --config-file <file> Alternate config file\n" - " -o, --output <filename> Image output file\n" --+ " -j, --googlemaps Create a javascript file (used for gogle maps\n" -++ " -j, --googlemaps Create a javascript file (used for google maps)\n" - " -f, --filter <MAC list> Comma-separated list of MACs to filter\n" - " -i, --invert-filter Invert filtering (ONLY draw filtered MACs)\n" - " -F, --typefilter <Type list> Comma-separated list of net types to filter\n" diff --git a/net-mgmt/kismet/files/patch-alertracker.cc b/net-mgmt/kismet/files/patch-alertracker.cc new file mode 100644 index 000000000000..4acea7569151 --- /dev/null +++ b/net-mgmt/kismet/files/patch-alertracker.cc @@ -0,0 +1,10 @@ +--- alertracker.cc.orig 2010-09-03 10:57:56.000000000 -0400 ++++ alertracker.cc 2010-09-03 11:36:42.000000000 -0400 +@@ -397,6 +397,7 @@ + &(rec->limit_burst)) < 0) { + _MSG("Invalid alert line in config file: " + clines[x], MSGFLAG_FATAL); + globalreg->fatal_condition = 1; ++ delete rec; + return -1; + } + diff --git a/net-mgmt/kismet/files/patch-plugin-autowep-Makefile b/net-mgmt/kismet/files/patch-plugin-autowep-Makefile new file mode 100644 index 000000000000..374fdd4d9968 --- /dev/null +++ b/net-mgmt/kismet/files/patch-plugin-autowep-Makefile @@ -0,0 +1,11 @@ +--- plugin-autowep/Makefile.orig 2010-09-04 12:31:22.000000000 -0400 ++++ plugin-autowep/Makefile 2010-09-04 12:32:10.000000000 -0400 +@@ -22,7 +22,7 @@ + + install: $(PLUGOUT) + mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(PLUGOUT) $(DESTDIR)$(prefix)/lib/kismet/$(PLUGOUT) + + userinstall: $(PLUGOUT) + mkdir -p ${HOME}/.kismet/plugins/ diff --git a/net-mgmt/kismet/files/patch-plugin-ptw-Makefile b/net-mgmt/kismet/files/patch-plugin-ptw-Makefile new file mode 100644 index 000000000000..401d89ecf95d --- /dev/null +++ b/net-mgmt/kismet/files/patch-plugin-ptw-Makefile @@ -0,0 +1,12 @@ +--- plugin-ptw/Makefile.orig 2010-05-24 19:53:16.000000000 +0200 ++++ plugin-ptw/Makefile 2010-05-24 19:53:19.000000000 +0200 +@@ -22,8 +22,7 @@ + + install: $(PLUGOUT) + mkdir -p $(DESTDIR)$(prefix)/lib/kismet/ +- +- install -o $(INSTUSR) -g $(INSTGRP) -m 644 $^ $(DESTDIR)$(prefix)/lib/kismet/$^ ++ install -o $(INSTUSR) -g $(INSTGRP) -m 644 $(PLUGOUT) $(DESTDIR)$(prefix)/lib/kismet/$(PLUGOUT) + + userinstall: $(PLUGOUT) + mkdir -p ${HOME}/.kismet/plugins/ diff --git a/net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc b/net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc new file mode 100644 index 000000000000..4eaf805d4c30 --- /dev/null +++ b/net-mgmt/kismet/files/patch-plugin-ptw-aircrack-crypto.cc @@ -0,0 +1,10 @@ +--- plugin-ptw/aircrack-crypto.cc.orig 2010-05-24 11:40:15.000000000 +0200 ++++ plugin-ptw/aircrack-crypto.cc 2010-05-24 11:39:34.000000000 +0200 +@@ -21,6 +21,7 @@ + #include <string.h> + #include <arpa/inet.h> + #include <assert.h> ++#include <stdint.h> + #include "aircrack-crypto.h" + #include "aircrack-crctable.h" + #include "aircrack-ptw2-lib.h" diff --git a/net-mgmt/kismet/files/pkg-message.in b/net-mgmt/kismet/files/pkg-message.in deleted file mode 100644 index f0e93df52498..000000000000 --- a/net-mgmt/kismet/files/pkg-message.in +++ /dev/null @@ -1,10 +0,0 @@ -=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= -* NOTE: - -You have built gpsmap with Google Maps functionality. -This is third-party patch allows you to plot wireless networks -using Google Maps engine. It's unsupported by Kismet authors, -please read %%DOCSDIR%%/gpsmap-gmap/README.txt from -step 10, or see http://www.parknation.com/gmap/ - -=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= diff --git a/net-mgmt/kismet/files/suid_pkg-message.in b/net-mgmt/kismet/files/suid_pkg-message.in new file mode 100644 index 000000000000..1deb307deb85 --- /dev/null +++ b/net-mgmt/kismet/files/suid_pkg-message.in @@ -0,0 +1,6 @@ +Kismet has been installed with a setuid-root capture helper binary, +%%LOCALBASE%%/bin/kismet_capture, which may be executed by users in the +group %%KISMET_GROUP%%. USERS IN THIS GROUP WILL BE ABLE TO ALTER NETWORK +INTERFACE STATES, but this is more secure than running all of Kismet +as root. ONLY users in this group will be able to run Kismet and capture +from physical network devices. diff --git a/net-mgmt/kismet/pkg-descr b/net-mgmt/kismet/pkg-descr index 26bb47643f17..529821b359ac 100644 --- a/net-mgmt/kismet/pkg-descr +++ b/net-mgmt/kismet/pkg-descr @@ -1,13 +1,14 @@ Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion -detection system. Kismet will work with any wireless card which supports raw -monitoring (rfmon) mode, and can sniff 802.11b, 802.11a, and 802.11g traffic. +detection system. Kismet will work with any wireless card which supports +raw monitoring (rfmon) mode, and can sniff 802.11a, 802.11b, and 802.11g +traffic. -Kismet identifies networks by passively collecting packets and detecting -standard named networks, detecting (and given time, decloaking) hidden -networks, and infering the presence of nonbeaconing networks via data traffic. +Kismet identifies networks by passively collecting packets. In addition +to standard networks, it can detect (and given time, decloak) hidden +networks, and infer the presence of nonbeaconing networks via data traffic. -Known supported cards: Atheros, Prism2, WSP100, Drone, wtapfile, pcapfile. -Kismet also supports the radiotap headers and should work with current FreeBSD -systems. +Capture sources that are known to be supported: Atheros, Prism2, WSP100, +Drone, wtapfile, pcapfile. Kismet also supports radiotap headers and +should work with current FreeBSD systems. WWW: http://www.kismetwireless.net/ diff --git a/net-mgmt/kismet/pkg-plist b/net-mgmt/kismet/pkg-plist index 7d237f4644c1..069a69ec97ac 100644 --- a/net-mgmt/kismet/pkg-plist +++ b/net-mgmt/kismet/pkg-plist @@ -1,29 +1,22 @@ bin/kismet +%%SUID%%bin/kismet_capture bin/kismet_client bin/kismet_drone bin/kismet_server -bin/manuf_update.sh -%%GPS%%bin/gpsmap -%%GPS%%bin/gpsmap-helper-earthamaps -etc/ap_manuf -etc/client_manuf @unexec if cmp -s %D/etc/kismet.conf %D/etc/kismet.conf.sample; then rm -f %D/etc/kismet.conf; fi etc/kismet.conf.sample @unexec if cmp -s %D/etc/kismet_drone.conf %D/etc/kismet_drone.conf.sample; then rm -f %D/etc/kismet_drone.conf; fi etc/kismet_drone.conf.sample -@unexec if cmp -s %D/etc/kismet_ui.conf %D/etc/kismet_ui.conf.sample; then rm -f %D/etc/kismet_ui.conf; fi -etc/kismet_ui.conf.sample +%%PLUGINS%%lib/kismet/aircrack-kismet.so +%%PLUGINS%%lib/kismet/autowep-kismet.so +%%PLUGINS%%lib/kismet/spectool_net.so +%%PLUGINS%%lib/kismet_client/spectools_ui.so %%DATADIR%%/wav/alert.wav -%%DATADIR%%/wav/junk_traffic.wav -%%DATADIR%%/wav/new_network.wav -%%DATADIR%%/wav/traffic.wav -%%GMAP%%%%DATADIR%%/gpsmap-gmap/README.txt -%%GMAP%%%%DATADIR%%/gpsmap-gmap/index.html -%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/open.png -%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/shadow.png -%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/wep.png -%%GMAP%%%%DATADIR%%/gpsmap-gmap/mapfiles/wpa.png -%%GMAP%%@dirrm %%DATADIR%%/gpsmap-gmap/mapfiles -%%GMAP%%@dirrm %%DATADIR%%/gpsmap-gmap +%%DATADIR%%/wav/gpslock.wav +%%DATADIR%%/wav/gpslost.wav +%%DATADIR%%/wav/new.wav +%%DATADIR%%/wav/packet.wav @dirrm %%DATADIR%%/wav @dirrm %%DATADIR%% +%%PLUGINS%%@dirrm lib/kismet +%%PLUGINS%%@dirrm lib/kismet_client diff --git a/net-mgmt/kismet/suid_pkg-deinstall b/net-mgmt/kismet/suid_pkg-deinstall new file mode 100644 index 000000000000..77a736b8092f --- /dev/null +++ b/net-mgmt/kismet/suid_pkg-deinstall @@ -0,0 +1,51 @@ +#! /bin/sh +# +# taken from net/cvsup-mirror + +PATH=/bin:/usr/sbin +KISMET_GROUP=${KISMET_GROUP:-kismet} + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then + read -p "${question} [${default}]? " answer + fi + if [ x${answer} = x ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local dflt question answer + + question=$1 + dflt=$2 + while :; do + answer=$(ask "${question}" "${dflt}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +delete_group() { + local g + + g=$1 + if yesno "Do you want me to remove group \"${g}\"" y; then + pw groupdel -n ${g} + echo "Done." + fi +} + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +delete_group ${KISMET_GROUP} diff --git a/net-mgmt/kismet/suid_pkg-install b/net-mgmt/kismet/suid_pkg-install new file mode 100644 index 000000000000..ebe3671e53df --- /dev/null +++ b/net-mgmt/kismet/suid_pkg-install @@ -0,0 +1,22 @@ +#! /bin/sh + +PATH=/bin:/usr/sbin +KISMET_GROUP=${KISMET_GROUP:-kismet} +KISMET_GID=${KISMET_GID:-229} + +case $2 in +PRE-INSTALL) + + if pw group show "${KISMET_GROUP}" 2>/dev/null; then + echo "You already have a group \"${KISMET_GROUP}\", so I will use it." + else + if pw groupadd ${KISMET_GROUP} -g ${KISMET_GID}; then + echo "Added group \"${KISMET_GROUP}\"." + else + echo "Adding group \"${KISMET_GROUP}\" failed..." + exit 1 + fi + fi + + ;; +esac |