From 28eb1cee77ee8771bc69606015fceef074243968 Mon Sep 17 00:00:00 2001 From: aanriot Date: Tue, 3 Apr 2007 15:19:52 +0000 Subject: [PATCH] update to 1.5b . from Rui Reis with a few changes; help and ok sturm@ --- net/honeyd/Makefile | 12 +++--- net/honeyd/distinfo | 9 ++-- net/honeyd/patches/patch-Makefile_in | 63 ++++++++++++++++++--------- net/honeyd/patches/patch-configure | 12 ++++++ net/honeyd/patches/patch-honeyd_8 | 8 ++-- net/honeyd/patches/patch-honeyd_c | 23 +++++++--- net/honeyd/patches/patch-ipfrag_c | 64 ---------------------------- net/honeyd/patches/patch-ipfrag_h | 11 ----- net/honeyd/patches/patch-nmap_prints | 41 ++++++++++++++++++ net/honeyd/patches/patch-pool_c | 8 ++-- net/honeyd/pkg/PLIST | 5 ++- 11 files changed, 138 insertions(+), 118 deletions(-) create mode 100644 net/honeyd/patches/patch-configure delete mode 100644 net/honeyd/patches/patch-ipfrag_c delete mode 100644 net/honeyd/patches/patch-ipfrag_h create mode 100644 net/honeyd/patches/patch-nmap_prints diff --git a/net/honeyd/Makefile b/net/honeyd/Makefile index df8bb334977..b1de91039df 100644 --- a/net/honeyd/Makefile +++ b/net/honeyd/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.16 2006/09/18 11:59:59 espie Exp $ +# $OpenBSD: Makefile,v 1.17 2007/04/03 15:19:52 aanriot Exp $ SHARED_ONLY= Yes COMMENT= "utility to create virtual hosts on a network" -DISTNAME= honeyd-1.0 -PKGNAME= ${DISTNAME}p4 +DISTNAME= honeyd-1.5b CATEGORIES= net MASTER_SITES= http://www.citi.umich.edu/u/provos/honeyd/ \ http://niels.xtdnet.nl/honeyd/ @@ -22,11 +21,14 @@ USE_LIBTOOL= Yes PYTHON_VER= 2.4 LIB_DEPENDS= dnet.>=1::net/libdnet \ - python${PYTHON_VER}:python-${PYTHON_VER}.*:lang/python/${PYTHON_VER} + python${PYTHON_VER}:python-${PYTHON_VER}.*:lang/python/${PYTHON_VER} \ + pcre.>=1::devel/pcre \ + dnsres.>=0::net/libdnsres RUN_DEPENDS= ::net/rrdtool CONFIGURE_STYLE=gnu -CONFIGURE_ENV= _PATH_PYTHON=${LOCALBASE}/bin/python${PYTHON_VER} +CONFIGURE_ENV= PATH_PYTHON=${LOCALBASE}/bin/python${PYTHON_VER} +CONFIGURE_ARGS= --with-python SCRIPTS= INSTALL.kuang2 README.cmdexe README.kuang2 \ README.mydoom cmdexe.pl kuang2.conf kuang2.pl \ diff --git a/net/honeyd/distinfo b/net/honeyd/distinfo index c89e27a0257..ef99e8ff358 100644 --- a/net/honeyd/distinfo +++ b/net/honeyd/distinfo @@ -1,4 +1,5 @@ -MD5 (honeyd-1.0.tar.gz) = 5c5c6cc62d135075d021a6c1bc5c9a5b -RMD160 (honeyd-1.0.tar.gz) = d5c28f8987dd22d266348cf908f008423a63fc49 -SHA1 (honeyd-1.0.tar.gz) = abff00cf7815b6448e5432be8b4710f39bf2119f -SIZE (honeyd-1.0.tar.gz) = 600339 +MD5 (honeyd-1.5b.tar.gz) = fe571133c9b65c5e1dca57515122ab62 +RMD160 (honeyd-1.5b.tar.gz) = 40ebe7d3a2915b5145c5a2eef04b9d1de18fbb09 +SHA1 (honeyd-1.5b.tar.gz) = a6cef01ddb0b649442ac60e2a08b226b1634e3f9 +SHA256 (honeyd-1.5b.tar.gz) = 2f00ebdac4c47b157b076e255bd757a6ef7b7f043cc499493d1c0f9e458527a5 +SIZE (honeyd-1.5b.tar.gz) = 881787 diff --git a/net/honeyd/patches/patch-Makefile_in b/net/honeyd/patches/patch-Makefile_in index 12065ddfb66..f9e906809f1 100644 --- a/net/honeyd/patches/patch-Makefile_in +++ b/net/honeyd/patches/patch-Makefile_in @@ -1,25 +1,48 @@ -$OpenBSD: patch-Makefile_in,v 1.3 2005/07/23 14:24:52 aanriot Exp $ ---- Makefile.in.orig Fri Dec 31 20:13:47 2004 -+++ Makefile.in Tue Jul 5 18:10:57 2005 -@@ -152,7 +152,7 @@ honeydctl_LDADD = @LIBOBJS@ @EDITLIB@ @L - honeydctl_INCLUDES = @EDITINC@ - honeydctl_CFLAGS = -O2 -Wall +$OpenBSD: patch-Makefile_in,v 1.4 2007/04/03 15:19:52 aanriot Exp $ +--- Makefile.in.orig Sat Aug 19 09:15:55 2006 ++++ Makefile.in Mon Apr 2 11:31:04 2007 +@@ -162,7 +162,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = -O2 -Wall -g \ ++CFLAGS += \ + -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" \ + -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" \ + -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" \ +@@ -358,7 +358,7 @@ honeydstats_LDADD = @LIBOBJS@ @DNETLIB@ @EVENTLIB@ @ZL + honeydstats_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \ + @EVENTINC@ @DNETINC@ @ZINC@ @DNSRESINC@ --CFLAGS = -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)" -DPATH_RRDTOOL="\"$(PATH_RRDTOOL)\"" -+CFLAGS += -Wall -DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" -DPATH_HONEYDDATA="\"$(honeyddatadir)\"" -DPATH_HONEYDLIB="\"$(honeydlibdir)\"" -DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" -DHONEYD_PLUGINS="$(honeydplugins)" -DPATH_RRDTOOL="\"$(PATH_RRDTOOL)\"" +-honeydstats_CFLAGS = -O0 -Wall ++honeydstats_CFLAGS = + # + # Honeyd control application +@@ -366,7 +366,7 @@ honeydstats_CFLAGS = -O0 -Wall + honeydctl_SOURCES = honeydctl.c + honeydctl_LDADD = @LIBOBJS@ @EDITLIB@ @LIBCURSES@ + honeydctl_CPPFLAGS = @EDITINC@ +-honeydctl_CFLAGS = -O2 -Wall ++honeydctl_CFLAGS = + INCLUDES = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \ + @PYTHONINC@ @EVENTINC@ @PCAPINC@ @DNETINC@ @ZINC@ - INCLUDES = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat @PYTHONINC@ @EVENTINC@ @PCAPINC@ @DNETINC@ @ZINC@ -@@ -664,9 +664,9 @@ libhoneyd.so: $(LIBHONEYDFILES) +@@ -381,7 +381,7 @@ smtp_LDADD = @LIBOBJS@ @EVENTLIB@ @DNETLIB@ @PCAPLIB@ + smtp_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \ + @EVENTINC@ @DNETINC@ @DNSRESINC@ @PCREINC@ - install-data-local: - (cd $(top_srcdir) && tar -cf - $(top_srcdir)/webserver) | \ -- (cd $(honeyddatadir) && tar -xf -) -- find $(honeyddatadir)/webserver -type f | xargs chmod a+r -- find $(honeyddatadir)/webserver -type d | xargs chmod a+xr -+ (cd $(DESTDIR)/$(honeyddatadir) && tar -xf -) -+ find $(DESTDIR)/$(honeyddatadir)/webserver -type f | xargs chmod a+r -+ find $(DESTDIR)/$(honeyddatadir)/webserver -type d | xargs chmod a+xr +-smtp_CFLAGS = -O2 -Wall ++smtp_CFLAGS = + proxy_SOURCES = subsystems/proxy.c subsystems/proxy.h subsystems/proxy_main.c \ + subsystems/proxy_messages.h subsystems/smtp.c subsystems/smtp.h \ + subsystems/smtp_messages.h atomicio.c \ +@@ -391,7 +391,7 @@ proxy_LDADD = @LIBOBJS@ @EVENTLIB@ @DNETLIB@ @PCAPLIB@ + proxy_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \ + @EVENTINC@ @DNETINC@ @DNSRESINC@ @PCREINC@ - dist-hook: - ./distribute.py $(distdir)/ +-proxy_CFLAGS = -O2 -Wall ++proxy_CFLAGS = + + ######################################################################## + ######################################################################## diff --git a/net/honeyd/patches/patch-configure b/net/honeyd/patches/patch-configure new file mode 100644 index 00000000000..1024ad7c429 --- /dev/null +++ b/net/honeyd/patches/patch-configure @@ -0,0 +1,12 @@ +$OpenBSD: patch-configure,v 1.1 2007/04/03 15:19:52 aanriot Exp $ +--- configure.orig Sat Feb 24 20:59:28 2007 ++++ configure Sat Feb 24 20:59:53 2007 +@@ -21930,7 +21930,7 @@ cat >>confdefs.h <<\_ACEOF + #define HAVE_PYTHON 1 + _ACEOF + +- PYEXTEND="pyextend.o pydataprocessing.o pydatahoneyd.o" ++ PYEXTEND="pyextend.o" + + # Figure out if we have our modules + echo "$as_me:$LINENO: checking for Python dnet module" >&5 diff --git a/net/honeyd/patches/patch-honeyd_8 b/net/honeyd/patches/patch-honeyd_8 index d46ea13c680..19460916e9a 100644 --- a/net/honeyd/patches/patch-honeyd_8 +++ b/net/honeyd/patches/patch-honeyd_8 @@ -1,7 +1,7 @@ -$OpenBSD: patch-honeyd_8,v 1.1 2005/10/23 08:16:18 aanriot Exp $ ---- honeyd.8.orig Thu Oct 20 11:23:59 2005 -+++ honeyd.8 Thu Oct 20 11:24:54 2005 -@@ -543,7 +543,7 @@ add template tcp port 80 "sh scripts/web +$OpenBSD: patch-honeyd_8,v 1.2 2007/04/03 15:19:52 aanriot Exp $ +--- honeyd.8.orig Mon Feb 27 01:27:54 2006 ++++ honeyd.8 Wed Mar 28 22:46:46 2007 +@@ -574,7 +574,7 @@ add template tcp port 80 "sh scripts/web.sh" add template tcp port 22 "sh scripts/test.sh $ipsrc $dport" add template udp port 53 proxy yournameserver:53 set template default tcp action reset diff --git a/net/honeyd/patches/patch-honeyd_c b/net/honeyd/patches/patch-honeyd_c index 49aab8fdfd8..901e6449685 100644 --- a/net/honeyd/patches/patch-honeyd_c +++ b/net/honeyd/patches/patch-honeyd_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-honeyd_c,v 1.2 2005/10/23 08:16:18 aanriot Exp $ ---- honeyd.c.orig Fri Dec 31 20:13:37 2004 -+++ honeyd.c Thu Oct 20 11:23:17 2005 -@@ -154,8 +154,8 @@ int honeyd_show_inc +$OpenBSD: patch-honeyd_c,v 1.3 2007/04/03 15:19:52 aanriot Exp $ +--- honeyd.c.orig Sat Aug 19 09:14:36 2006 ++++ honeyd.c Mon Apr 2 00:12:08 2007 +@@ -161,8 +161,8 @@ int honeyd_show_data_dir; int honeyd_show_version; int honeyd_show_usage; int honeyd_debug; @@ -12,7 +12,20 @@ $OpenBSD: patch-honeyd_c,v 1.2 2005/10/23 08:16:18 aanriot Exp $ int honeyd_needsroot; /* Need different IDs */ int honeyd_disable_webserver = 0; int honeyd_disable_update = 0; -@@ -3085,6 +3085,13 @@ main(int argc, char *argv[]) +@@ -432,12 +432,6 @@ honeyd_init(void) + /* Record our start time */ + gettimeofday(&honeyd_uptime, NULL); + +- /* Find the correct ids for nobody */ +- if ((pwd = getpwnam("nobody")) != NULL) { +- honeyd_uid = pwd->pw_uid; +- honeyd_gid = pwd->pw_gid; +- } +- + /* Initalize ongoing connection state */ + SPLAY_INIT(&tcpcons); + TAILQ_INIT(&tcplru); +@@ -3250,6 +3244,13 @@ main(int argc, char *argv[]) /* We need reproduceable random numbers for regression testing */ if (setrand) rand_set(honeyd_rand, &setrand, sizeof(setrand)); diff --git a/net/honeyd/patches/patch-ipfrag_c b/net/honeyd/patches/patch-ipfrag_c deleted file mode 100644 index 6e09238ea47..00000000000 --- a/net/honeyd/patches/patch-ipfrag_c +++ /dev/null @@ -1,64 +0,0 @@ -$OpenBSD: patch-ipfrag_c,v 1.1 2006/02/19 17:09:32 naddy Exp $ ---- ipfrag.c.orig Fri Dec 31 20:13:38 2004 -+++ ipfrag.c Sun Feb 19 17:54:36 2006 -@@ -81,6 +81,7 @@ fragcompare(struct fragment *a, struct f - DIFF(a->ip_src, b->ip_src); - DIFF(a->ip_dst, b->ip_dst); - DIFF(a->ip_id, b->ip_id); -+ DIFF(a->ip_proto, b->ip_proto); - - return (0); - } -@@ -105,13 +106,14 @@ ip_fragment_init(void) - } - - struct fragment * --ip_fragment_find(ip_addr_t src, ip_addr_t dst, u_short id) -+ip_fragment_find(ip_addr_t src, ip_addr_t dst, u_short id, u_char proto) - { - struct fragment tmp, *frag; - - tmp.ip_src = src; - tmp.ip_dst = dst; - tmp.ip_id = id; -+ tmp.ip_proto = proto; - - frag = SPLAY_FIND(fragtree, &fragments, &tmp); - -@@ -179,7 +181,8 @@ ip_fragment_reclaim(int count) - } - - struct fragment * --ip_fragment_new(ip_addr_t src, ip_addr_t dst, u_short id, enum fragpolicy pl) -+ip_fragment_new(ip_addr_t src, ip_addr_t dst, u_short id, u_char proto, -+ enum fragpolicy pl) - { - struct fragment *tmp = NULL; - struct timeval tv = { IPFRAG_TIMEOUT, 0}; -@@ -202,6 +205,7 @@ ip_fragment_new(ip_addr_t src, ip_addr_t - tmp->ip_src = src; - tmp->ip_dst = dst; - tmp->ip_id = id; -+ tmp->ip_proto = proto; - tmp->fragp = pl; - - TAILQ_INIT(&tmp->fraglist); -@@ -358,7 +362,7 @@ ip_fragment(struct template *tmpl, struc - if (fragp == FRAG_DROP) - goto drop; - -- fragq = ip_fragment_find(ip->ip_src, ip->ip_dst, ip->ip_id); -+ fragq = ip_fragment_find(ip->ip_src, ip->ip_dst, ip->ip_id, ip->ip_p); - - /* Nothing here for now */ - off = ntohs(ip->ip_off); -@@ -383,7 +387,8 @@ ip_fragment(struct template *tmpl, struc - goto freeall; - - if (fragq == NULL) { -- fragq = ip_fragment_new(ip->ip_src, ip->ip_dst, ip->ip_id, fragp); -+ fragq = ip_fragment_new(ip->ip_src, ip->ip_dst, ip->ip_id, -+ ip->ip_p, fragp); - if (fragq == NULL) - goto drop; - } diff --git a/net/honeyd/patches/patch-ipfrag_h b/net/honeyd/patches/patch-ipfrag_h deleted file mode 100644 index 3729dfc2c1f..00000000000 --- a/net/honeyd/patches/patch-ipfrag_h +++ /dev/null @@ -1,11 +0,0 @@ -$OpenBSD: patch-ipfrag_h,v 1.1 2006/02/19 17:09:32 naddy Exp $ ---- ipfrag.h.orig Fri Dec 31 20:13:43 2004 -+++ ipfrag.h Sun Feb 19 17:54:36 2006 -@@ -52,6 +52,7 @@ struct fragment { - ip_addr_t ip_src; /* Network order */ - ip_addr_t ip_dst; /* Network order */ - u_short ip_id; /* Network order */ -+ u_char ip_proto; - - u_short maxlen; - u_short hadlastpacket; diff --git a/net/honeyd/patches/patch-nmap_prints b/net/honeyd/patches/patch-nmap_prints new file mode 100644 index 00000000000..797c0bfa17a --- /dev/null +++ b/net/honeyd/patches/patch-nmap_prints @@ -0,0 +1,41 @@ +$OpenBSD: patch-nmap_prints,v 1.1 2007/04/03 15:19:52 aanriot Exp $ +--- nmap.prints.orig Sun Sep 25 00:49:05 2005 ++++ nmap.prints Wed Mar 28 22:47:29 2007 +@@ -662,18 +662,6 @@ T6(DF=N%W=0%ACK=O%Flags=R%Ops=) + T7(DF=N%W=0%ACK=S%Flags=AR%Ops=) + PU(DF=N%TOS=0%IPLEN=38%RIPTL=15C%RID=E%RIPCK=0%UCK=0%ULEN=134%DAT=E) + +-Fingerprint IBM OS/400 V4R2M0 +-Class IBM | OS/400 | V4 | general purpose +-TSeq(Class=TD|RI%gcd=<6%SI=<285DC&>206%IPID=I%TS=U) +-T1(DF=N%W=8000%ACK=S++%Flags=AS%Ops=M) +-T2(Resp=Y%DF=N%W=0%ACK=S%Flags=AR%Ops=) +-T3(Resp=Y%DF=N%W=8000%ACK=S++%Flags=AS%Ops=M) +-T4(DF=N%W=0%ACK=S%Flags=R%Ops=) +-T5(DF=N%W=0%ACK=S++%Flags=AR%Ops=) +-T6(DF=N%W=0%ACK=S%Flags=R%Ops=) +-T7(DF=N%W=0%ACK=S++%Flags=AR%Ops=) +-PU(DF=N%TOS=0%IPLEN=38%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134%DAT=E) +- + Fingerprint IBM OS/400 V4R5M0 + Class IBM | OS/400 | V4 | general purpose + T1(DF=N%W=2000%ACK=S++%Flags=AS%Ops=MNWNNT) +@@ -11082,18 +11070,6 @@ T5(DF=N%W=0%ACK=S++%Flags=AR%Ops=) + T6(DF=N%W=0%ACK=O%Flags=R%Ops=) + T7(DF=N%W=0%ACK=S++%Flags=AR%Ops=) + PU(DF=N%TOS=0%IPLEN=38%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134%DAT=E) +- +-Fingerprint Microsoft Windows NT 4.0 SP3 +-Class Microsoft | Windows | NT/2K/XP | general purpose +-TSeq(Class=TD|RI%gcd=<18%SI=<2A00DA&>6B73) +-T1(DF=Y%W=7FFF|2017%ACK=S++%Flags=AS%Ops=M|MNWNNT) +-T2(Resp=Y%DF=N%W=0%ACK=S%Flags=AR%Ops=) +-T3(Resp=Y%DF=Y%W=7FFF|2017%ACK=S++|O%Flags=AS|A%Ops=M|NNT) +-T4(DF=N%W=0%ACK=O|S%Flags=R%Ops=) +-T5(DF=N%W=0%ACK=S++%Flags=AR%Ops=) +-T6(DF=N%W=0%ACK=O|S++%Flags=R%Ops=) +-T7(DF=N%W=0%ACK=S++%Flags=AR%Ops=) +-PU(TOS=0%IPLEN=38%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134%DAT=E) + + Fingerprint Microsoft Windows NT 4.0 SP3 + Class Microsoft | Windows | NT/2K/XP | general purpose diff --git a/net/honeyd/patches/patch-pool_c b/net/honeyd/patches/patch-pool_c index 55437bd7aee..26a2d0bd7b5 100644 --- a/net/honeyd/patches/patch-pool_c +++ b/net/honeyd/patches/patch-pool_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-pool_c,v 1.1 2005/07/23 14:24:52 aanriot Exp $ ---- pool.c.orig Fri Jul 22 22:36:38 2005 -+++ pool.c Fri Jul 22 22:37:17 2005 -@@ -92,7 +92,7 @@ pool_alloc_size(struct pool *pool, size_ +$OpenBSD: patch-pool_c,v 1.2 2007/04/03 15:19:52 aanriot Exp $ +--- pool.c.orig Sat Aug 19 09:10:40 2006 ++++ pool.c Mon Apr 2 00:12:08 2007 +@@ -92,7 +92,7 @@ pool_alloc_size(struct pool *pool, size_t size) /* We want to use the last one as return */ if (i < max - 1) { SLIST_INSERT_HEAD(&pool->entries, entry, next); diff --git a/net/honeyd/pkg/PLIST b/net/honeyd/pkg/PLIST index 574646ec9ba..84ad17bf150 100644 --- a/net/honeyd/pkg/PLIST +++ b/net/honeyd/pkg/PLIST @@ -1,8 +1,9 @@ -@comment $OpenBSD: PLIST,v 1.6 2006/02/19 17:09:32 naddy Exp $ +@comment $OpenBSD: PLIST,v 1.7 2007/04/03 15:19:52 aanriot Exp $ @newgroup _honeyd:!546 @newuser _honeyd:!546:!_honeyd:daemon:honeyd user:/nonexistent:/sbin/nologin bin/honeyd bin/honeydctl +bin/honeydstats include/honeyd/ include/honeyd/debug.h include/honeyd/hooks.h @@ -20,6 +21,7 @@ share/honeyd/config.sample share/honeyd/nmap.assoc share/honeyd/nmap.prints share/honeyd/pf.os +share/honeyd/proxy share/honeyd/scripts/ share/honeyd/scripts/INSTALL.kuang2 share/honeyd/scripts/README.cmdexe @@ -41,6 +43,7 @@ share/honeyd/scripts/snmp/linux-2.4.snmp.tpl share/honeyd/scripts/snmp/windows2000.snmp.tpl share/honeyd/scripts/test.sh share/honeyd/scripts/web.sh +share/honeyd/smtp share/honeyd/webserver/ @owner _honeyd @group _honeyd