summaryrefslogtreecommitdiff
path: root/security/p0f
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2003-10-01 23:13:13 +0000
committerrecht <recht@pkgsrc.org>2003-10-01 23:13:13 +0000
commit64f360938effa3aef887e5197f513baebcb6e630 (patch)
tree6d10cf8aba9fb83a383fd098efe88e8b1ec472d9 /security/p0f
parente2c937412eea45c2124dec06adc3467f6f6114f0 (diff)
downloadpkgsrc-64f360938effa3aef887e5197f513baebcb6e630.tar.gz
Update to 2.0.2
patch provided in PR 22939 by Adrian Portelli Version 2.0.2: -------------- Cleanup of the RST mess in p0fr.fp and p0f.c parser. Added isprint() text preview for -x mode. [BUG] Fixed packet size reporting and matching for packets over 255 bytes (_u8 -> _u16). Extended RST+ACK to also cover plain RST, added some sane explanations of the purpose of each mode. Clarification of the RST vs RST+ACK occurences; test/sendack.c added. Added -R option for RST+ACK fingerprinting. Created an empty database. Moved databases from /etc to /etc/p0f/ Windows memory leak mystery solved. No longer using pcap timeouts for anything. They suck. I first wanted to use SIGALRM with no SA_RESTART, but it's broken on Linux on this particular syscall. Fortunately, I spotted an mis-documented pcap_fileno and can now use select(). I just hope it won't break. Note to self: despite of the documentation saying pcap_open_live with timeout 0 will simply never timeout (which is irrelevant for pcap_loop anyway), it does not work on FreeBSD, inhibiting all packet processing instead. Works fine on Linux. Go figure. Some minor p0fq fixes to prevent warnings. Added some SYN+ACK signatures from rfp (p0fa.fp). Hooray! p0fa.fp is now official. Moved from test/ to ., etc. README updated. [BUG] Fixed the default TTL for IRIX and Tru64 (60), added a note to p0f.fp, fixed TTL checker to also support %30 values. [BUG] Fixed query mode lookup. The old code didn't handle reverse lookups properly. Masquerade scoring data is now available via the query interface. P0fq utility updated to handle this. Dropped /bin/bash from p0frep, /bin/sh would suffice. Added a new -c option for -M and -Q cache size scaling, packet ratio information on Ctrl-C to help estimate the right parameter. Extra masquerade detection flags: -T for threshold, -V for detailed flag breakdown; masquerade reporting now recognizes -r. The new -w option writes all matching packets to a pcap file (regardless of -K and -U settings). Added -M option (unix only until p0f-query.c gets ported). This option enables advanced masquerade detection based on the cyclic buffer used by -Q. Added - signature flag to the config file. Some documentation for the new functionality. [BUG] Cleaned up the -K and -U semantics with -Q. Replaced some single-character printfs with putchars in signature reporting code (should be a tad faster). Added signature check reporting, generic signature count and some other minor tweaks. The new -x option provides a hexadecimal TCP/IP packet dump. Useful when comparing two colliding fingerprints to find some differences not covered by the current quirks set. PPPoE interface is now handled correctly on NetBSD. Added a shoddy manpage and updated makefiles. Removed E quirk and added E to the regular options; removed needless EOL append code from the parser. Breaks the old signature format in some rare cases, but the old quirk is still recognized, and the user will be advised to change it. [BUG] Fixed ? option parsing bug that prevented RISC OS signature from working (and would prevent all ? signatures from working, should there be any other ;-). New signatures and other database additions, of course. [BUG] Fixed a very minor parser bug that could cause it to loop over an unknown option with a declared length of zero. This is not a DoS condition, because the parser would quit the loop after parsing max. 16 options anyway.
Diffstat (limited to 'security/p0f')
-rw-r--r--security/p0f/Makefile22
-rw-r--r--security/p0f/PLIST5
-rw-r--r--security/p0f/distinfo8
-rw-r--r--security/p0f/patches/patch-ab13
-rw-r--r--security/p0f/patches/patch-ac26
5 files changed, 67 insertions, 7 deletions
diff --git a/security/p0f/Makefile b/security/p0f/Makefile
index efcb97bb04b..916e6b4f8f7 100644
--- a/security/p0f/Makefile
+++ b/security/p0f/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2003/09/06 04:56:28 itojun Exp $
+# $NetBSD: Makefile,v 1.7 2003/10/01 23:13:13 recht Exp $
#
DISTNAME= p0f
-PKGNAME= p0f-2.0.1
+PKGNAME= p0f-2.0.2
CATEGORIES= security net
MASTER_SITES= http://lcamtuf.coredump.cx/
EXTRACT_SUFX= .tgz
@@ -14,14 +14,30 @@ HOMEPAGE= http://lcamtuf.coredump.cx/p0f.shtml
USE_BUILDLINK2= yes
USE_PKGINSTALL= yes
-CFLAGS+= -DSYSCONFDIR=\"\\\"${PKG_SYSCONFDIR}\\\"\"
CONF_FILES= ${PREFIX}/share/examples/p0f/p0f.fp ${PKG_SYSCONFDIR}/p0f.fp
+PKG_SYSCONFSUBDIR= p0f
+
+CONF_FILES= ${PREFIX}/share/examples/p0f/p0f.fp ${PKG_SYSCONFDIR}/p0f.fp
+CONF_FILES+= ${PREFIX}/share/examples/p0f/p0fa.fp ${PKG_SYSCONFDIR}/p0fa.fp
+CONF_FILES+= ${PREFIX}/share/examples/p0f/p0fr.fp ${PKG_SYSCONFDIR}/p0fr.fp
+
+pre-build:
+ @${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
+ < ${WRKSRC}/config.h > ${WRKSRC}/config.h.new
+ @${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
+ < ${WRKSRC}/p0f.1 > ${WRKSRC}/p0f.1.new
+ ${CP} ${WRKSRC}/config.h.new ${WRKSRC}/config.h
+ ${CP} ${WRKSRC}/p0f.1.new ${WRKSRC}/p0f.1
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/p0f ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/doc/README ${PREFIX}/share/doc/p0f.README
${INSTALL_DATA} ${WRKSRC}/p0frep ${PREFIX}/share/doc/p0frep
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/p0f
${INSTALL_DATA} ${WRKSRC}/p0f.fp ${PREFIX}/share/examples/p0f
+ ${INSTALL_DATA} ${WRKSRC}/p0fa.fp ${PREFIX}/share/examples/p0f
+ ${INSTALL_DATA} ${WRKSRC}/p0fr.fp ${PREFIX}/share/examples/p0f
+ ${INSTALL_MAN} ${WRKSRC}/p0f.1 ${PREFIX}/man/man1
.include "../../mk/bsd.pkg.mk"
diff --git a/security/p0f/PLIST b/security/p0f/PLIST
index 1c7b93a023f..2d51fe66d7e 100644
--- a/security/p0f/PLIST
+++ b/security/p0f/PLIST
@@ -1,6 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2003/07/12 01:10:59 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.5 2003/10/01 23:13:13 recht Exp $
bin/p0f
+man/man1/p0f.1
share/doc/p0f.README
share/doc/p0frep
share/examples/p0f/p0f.fp
+share/examples/p0f/p0fa.fp
+share/examples/p0f/p0fr.fp
@dirrm share/examples/p0f
diff --git a/security/p0f/distinfo b/security/p0f/distinfo
index 80d8562200e..2fe2d726cca 100644
--- a/security/p0f/distinfo
+++ b/security/p0f/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.6 2003/09/06 04:56:28 itojun Exp $
+$NetBSD: distinfo,v 1.7 2003/10/01 23:13:13 recht Exp $
-SHA1 (p0f.tgz) = 52e7e627dcf28e423eb5f85382f1d575cbbf95b4
-Size (p0f.tgz) = 53102 bytes
+SHA1 (p0f.tgz) = 3d863d7a669a3041af46ac4a9a84ec0ca6a30f1d
+Size (p0f.tgz) = 74524 bytes
SHA1 (patch-aa) = 370fa780873e606697acbc21c9fc9fdce81f6ab6
+SHA1 (patch-ab) = 6bf3c0997a303ec8de7f25a483c830d368d5c1a2
+SHA1 (patch-ac) = 4e7e07910c848a8e4505a202e7fee51e46e06078
diff --git a/security/p0f/patches/patch-ab b/security/p0f/patches/patch-ab
new file mode 100644
index 00000000000..abd8e1d8e8d
--- /dev/null
+++ b/security/p0f/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.3 2003/10/01 23:13:13 recht Exp $
+
+--- config.h.orig 2003-10-02 01:02:16.000000000 +0200
++++ config.h 2003-10-02 01:03:03.000000000 +0200
+@@ -19,7 +19,7 @@
+ #ifdef WIN32
+ # define CONFIG_DIR "."
+ #else
+-# define CONFIG_DIR "/etc/p0f"
++# define CONFIG_DIR "@PKG_SYSCONFDIR@"
+ #endif /* WIN32 */
+
+ #define SYN_DB "p0f.fp"
diff --git a/security/p0f/patches/patch-ac b/security/p0f/patches/patch-ac
new file mode 100644
index 00000000000..b5252b977ae
--- /dev/null
+++ b/security/p0f/patches/patch-ac
@@ -0,0 +1,26 @@
+$NetBSD: patch-ac,v 1.1 2003/10/01 23:13:13 recht Exp $
+
+--- p0f.1.orig Fri Sep 19 17:11:56 2003
++++ p0f.1 Wed Sep 24 21:25:51 2003
+@@ -32,9 +32,9 @@
+ .TP
+ \fB\-f\fR file
+ Read fingerprints from a specified file. By default, p0f reads signatures
+-from ./p0f.fp or /etc/p0f/p0f.fp for SYN (incoming connection) mode,
+-./p0fa.fp and /etc/p0f/p0fa.fp for SYN+ACK (outgoing connection) mode,
+-and ./p0fr.fp and /etc/p0f/p0fr.fp for RST+ mode.
++from ./p0f.fp or @PKG_SYSCONFDIR@/p0f.fp for SYN (incoming connection) mode,
++./p0fa.fp and @PKG_SYSCONFDIR@/p0fa.fp for SYN+ACK (outgoing connection) mode,
++and ./p0fr.fp and @PKG_SYSCONFDIR@/p0fr.fp for RST+ mode.
+ Specifying multiple -f values will NOT combine several signature files
+ together.
+ .TP
+@@ -190,7 +190,7 @@
+ You need to consult the documentation for an up-to-date list of issues.
+ .SH FILES
+ .TP
+-.BI /etc/p0f/p0f.fp\ /etc/p0f/p0fa.fp\ /etc/p0f/p0fr.fp
++.BI @PKG_SYSCONFDIR@/p0f.fp\ @PKG_SYSCONFDIR@/p0fa.fp\ @PKG_SYSCONFDIR@/p0fr.fp
+ default fingerprint database files
+ .SH AUTHOR
+ .B p0f