diff options
author | khorben <khorben@pkgsrc.org> | 2014-12-09 14:37:06 +0000 |
---|---|---|
committer | khorben <khorben@pkgsrc.org> | 2014-12-09 14:37:06 +0000 |
commit | b5e2e9468dfb47ae33a481fbe53fbc77a7bdfccd (patch) | |
tree | 1803aae9b374791145fe89cabbd0972274fd244c /security | |
parent | 49bbdc79546a2d26f59847cdebea86c8e57e5913 (diff) | |
download | pkgsrc-b5e2e9468dfb47ae33a481fbe53fbc77a7bdfccd.tar.gz |
Updated security/pev to 0.70
Changelog for this version:
pev 0.70 - December 26, 2013
! Missing full/English documentation.
! Missing valid XML and HTML output formats.
! pestr: no support for --net option when parsing unicode strings.
! pestr: unable to handle too big strings.
* libpe: rewritten, now using mmap. (Jardel Weyrich).
* pestr: added countries domains suffixes.
* readpe and peres: output enhancements (Jardel Weyrich).
+ pehash: sections and headers hash calculation (Jardel Weyrich).
+ pehash: ssdeep fuzzy hash calculation.
+ pehash: support for new digest hashes like sha512, ripemd160 and more.
+ peres: added new tool to analyze/extract PE resources (Marcelo Fleury).
+ pescan: cpl malware detection.
+ pescan: undocumented anti-disassembly fpu trick detection.
+ pesec: show and extract cerfiticates from digitally signed binaries (Jardel Weyrich).
- readpe can't show functions exported by ID only.
- readpe: fixed subsystem types (Dmitry Mostovenko).
Diffstat (limited to 'security')
-rw-r--r-- | security/pev/Makefile | 15 | ||||
-rw-r--r-- | security/pev/PLIST | 22 | ||||
-rw-r--r-- | security/pev/distinfo | 15 | ||||
-rw-r--r-- | security/pev/patches/patch-Makefile | 24 | ||||
-rw-r--r-- | security/pev/patches/patch-lib_libpe_Makefile | 32 | ||||
-rw-r--r-- | security/pev/patches/patch-src_Makefile | 70 | ||||
-rw-r--r-- | security/pev/patches/patch-src_pepack.c | 20 |
7 files changed, 133 insertions, 65 deletions
diff --git a/security/pev/Makefile b/security/pev/Makefile index 5fe853b8bdc..9b09fe20b5d 100644 --- a/security/pev/Makefile +++ b/security/pev/Makefile @@ -1,11 +1,12 @@ -# $NetBSD: Makefile,v 1.2 2014/12/09 13:26:40 khorben Exp $ +# $NetBSD: Makefile,v 1.3 2014/12/09 14:37:06 khorben Exp $ # -DISTNAME= pev-0.60 -PKGREVISION= 1 +DISTNAME= pev-0.70 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pev/} +WRKSRC= ${WRKDIR}/pev + MAINTAINER= khorben@defora.org HOMEPAGE= http://pev.sourceforge.net/ COMMENT= The PE analysis toolkit @@ -14,13 +15,13 @@ LICENSE= gnu-gpl-v3 USE_TOOLS+= gmake +.include "../../mk/bsd.prefs.mk" + MAKE_FLAGS+= DESTDIR=${DESTDIR} -MAKE_FLAGS+= PREFIX=${PREFIX} +MAKE_FLAGS+= prefix=${PREFIX} +MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR} AUTO_MKDIRS= yes -#pre-install: -# ${MKDIR} ${DESTDIR}${PREFIX}/man/man1 - .include "../../security/openssl/buildlink3.mk" .include "../../devel/pcre/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/security/pev/PLIST b/security/pev/PLIST index 5491a0771f6..4cf8d546afa 100644 --- a/security/pev/PLIST +++ b/security/pev/PLIST @@ -1,8 +1,9 @@ -@comment $NetBSD: PLIST,v 1.1 2014/08/02 14:11:08 khorben Exp $ +@comment $NetBSD: PLIST,v 1.2 2014/12/09 14:37:06 khorben Exp $ bin/ofs2rva bin/pedis bin/pehash bin/pepack +bin/peres bin/pescan bin/pesec bin/pestr @@ -11,13 +12,14 @@ bin/rva2ofs lib/libpe.so lib/libpe.so.1 lib/libpe.so.1.0 -man/man1/ofs2rva.1 -man/man1/pedis.1 -man/man1/pehash.1 -man/man1/pepack.1 -man/man1/pescan.1 -man/man1/pesec.1 -man/man1/pestr.1 -man/man1/readpe.1 -man/man1/rva2ofs.1 +man/man1/ofs2rva.1.gz +man/man1/pedis.1.gz +man/man1/pehash.1.gz +man/man1/pepack.1.gz +man/man1/peres.1.gz +man/man1/pescan.1.gz +man/man1/pesec.1.gz +man/man1/pestr.1.gz +man/man1/readpe.1.gz +man/man1/rva2ofs.1.gz share/pev/userdb.txt diff --git a/security/pev/distinfo b/security/pev/distinfo index 5fa0d5ffdbc..a14f7a2f979 100644 --- a/security/pev/distinfo +++ b/security/pev/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.3 2014/12/09 13:26:40 khorben Exp $ +$NetBSD: distinfo,v 1.4 2014/12/09 14:37:06 khorben Exp $ -SHA1 (pev-0.60.tar.gz) = 8d5e0bafb6dd4da0dcda6837928ad4babb6c8a94 -RMD160 (pev-0.60.tar.gz) = f585355f5971e72f208b56ad0db1ca8ba603f3cd -Size (pev-0.60.tar.gz) = 212932 bytes -SHA1 (patch-lib_libpe_Makefile) = 5adf4a60f3320da9deddf74a740dd152b1810f0a -SHA1 (patch-src_Makefile) = 3a2aed9ed69b4ce0e6a297d39eb81010f24cab48 -SHA1 (patch-src_pepack.c) = 189b2c40a72453e3b1f3cc6efbbebda373bb37b0 +SHA1 (pev-0.70.tar.gz) = b2d1191c3b57049c78ef77b8f54f7f78838af129 +RMD160 (pev-0.70.tar.gz) = 9ffe6dccecdfbeba09e34f9a212c2abcf3861ef0 +Size (pev-0.70.tar.gz) = 254821 bytes +SHA1 (patch-Makefile) = 39b31541b2f51e82e9807aed36723105959aa26c +SHA1 (patch-lib_libpe_Makefile) = 11d1beba07b313a4baf2e95b5b56dfd7da4787f9 +SHA1 (patch-src_Makefile) = 2f04a23d40c1859ba1094a00822c0a0294fe3e5b +SHA1 (patch-src_pepack.c) = acb6dc0d1d9b20c13a61275b4f08f5903fec14f9 diff --git a/security/pev/patches/patch-Makefile b/security/pev/patches/patch-Makefile new file mode 100644 index 00000000000..060f2d5e145 --- /dev/null +++ b/security/pev/patches/patch-Makefile @@ -0,0 +1,24 @@ +$NetBSD: patch-Makefile,v 1.1 2014/12/09 14:37:06 khorben Exp $ + +No longer insist on a particular make(1) flavor + +--- Makefile.orig 2013-12-27 10:39:49.000000000 +0000 ++++ Makefile +@@ -1,14 +1,14 @@ + LIBPE_DIR = lib/libpe + PEV_DIR = src +-MAKE = make ++#MAKE = make + VERSION = 0.70 + ZIPFILE = pev-$(VERSION)-win32.zip + + # just call each separated Makefile + all: + %: +- cd $(LIBPE_DIR); $(MAKE) $@ +- cd $(PEV_DIR); $(MAKE) $@ ++ cd $(LIBPE_DIR) && $(MAKE) $@ ++ cd $(PEV_DIR) && $(MAKE) $@ + + # zip rule only Cygwin targets + zip: diff --git a/security/pev/patches/patch-lib_libpe_Makefile b/security/pev/patches/patch-lib_libpe_Makefile index f3e52b68d4f..a33b0d098c4 100644 --- a/security/pev/patches/patch-lib_libpe_Makefile +++ b/security/pev/patches/patch-lib_libpe_Makefile @@ -1,27 +1,35 @@ -$NetBSD: patch-lib_libpe_Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $ +$NetBSD: patch-lib_libpe_Makefile,v 1.2 2014/12/09 14:37:06 khorben Exp $ Fixed generation and installation of the libpe shared library on NetBSD ---- lib/libpe/Makefile.orig 2012-10-31 03:59:14.000000000 +0000 +--- lib/libpe/Makefile.orig 2013-12-27 10:39:52.000000000 +0000 +++ lib/libpe/Makefile -@@ -30,6 +30,8 @@ all: pe.c pe.h - $(CC) -o $(LIBNAME).o $(CFLAGS) $(SRC) +@@ -70,6 +70,8 @@ libpe: CPPFLAGS += -D_GNU_SOURCE + libpe: $(libpe_OBJS) ifeq ($(PLATFORM_OS), Linux) - $(CC) -shared -Wl,-soname,$(LIBNAME).so.1 -o $(LIBNAME).so $(LIBNAME).o + $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ +else ifeq ($(PLATFORM_OS), NetBSD) -+ $(CC) -shared -Wl,-soname,$(LIBNAME).so.1 -o $(LIBNAME).so $(LIBNAME).o ++ $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ else ifeq ($(PLATFORM_OS), Darwin) - $(CC) -headerpad_max_install_names -dynamiclib \ + $(LINK) -headerpad_max_install_names -dynamiclib \ -flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \ -@@ -46,6 +48,11 @@ ifeq ($(PLATFORM_OS), Linux) - $(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) +@@ -88,6 +90,10 @@ ifeq ($(PLATFORM_OS), Linux) + $(INSTALL_DATA) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 +else ifeq ($(PLATFORM_OS), NetBSD) -+ $(STRIP) $(LIBNAME).so -+ $(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) ++ $(INSTALL_DATA) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) + cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so + cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 else ifeq ($(PLATFORM_OS), Darwin) + $(INSTALL_DATA) $(LIBNAME).dylib $(DEST)/$(LIBNAME).$(VERSION).dylib + cd $(DEST); $(SYMLINK) $(LIBNAME).$(VERSION).dylib $(LIBNAME).dylib +@@ -102,6 +108,8 @@ installdirs: + strip-binaries: + ifeq ($(PLATFORM_OS), Linux) + $(STRIP) $(LIBNAME).so ++else ifeq ($(PLATFORM_OS), NetBSD) ++ $(STRIP) $(LIBNAME).so + else ifeq ($(PLATFORM_OS), Darwin) $(STRIP) $(LIBNAME).dylib - $(INSTALL) $(LIBNAME).dylib $(DEST)/$(LIBNAME).$(VERSION).dylib + else ifeq ($(PLATFORM_OS), CYGWIN) diff --git a/security/pev/patches/patch-src_Makefile b/security/pev/patches/patch-src_Makefile index 8a3ba27c960..4576ef72100 100644 --- a/security/pev/patches/patch-src_Makefile +++ b/security/pev/patches/patch-src_Makefile @@ -1,26 +1,58 @@ -$NetBSD: patch-src_Makefile,v 1.2 2014/12/09 13:26:40 khorben Exp $ +$NetBSD: patch-src_Makefile,v 1.3 2014/12/09 14:37:06 khorben Exp $ Fixed DESTDIR support ---- src/Makefile.orig 2013-01-23 12:37:31.000000000 +0000 +--- src/Makefile.orig 2013-12-27 10:39:49.000000000 +0000 +++ src/Makefile -@@ -20,15 +20,17 @@ RM = rm -f - SOURCES = output.c - PROGS = readpe pedis pepack pescan rva2ofs pesec ofs2rva pestr pehash pestr - INSTALL = install -m 0755 --SHAREDIR = /usr/share/pev -+SHAREDIR = $(DESTDIR)$(PREFIX)/share/pev - MAN = ../doc/manpages --MANDIR = /usr/share/man/man1 -+MANDIR = $(DESTDIR)$(PREFIX)/man/man1 - - ####### Build rules - - # 'make' will compile all binaries +@@ -56,7 +56,8 @@ ifeq ($(PLATFORM_OS), Darwin) + endif + + PROGS = readpe rva2ofs ofs2rva pehash pesec pescan pepack pestr pedis peres +-SHAREDIR = $(datadir)/pev ++MAN1DIR = $(DESTDIR)$(man1dir) ++SHAREDIR = $(DESTDIR)$(datadir)/pev + LIBPE = $(srcdir)/../lib/libpe + LIBUDIS86 = $(srcdir)/../lib/libudis86 + LIBFUZZY = $(srcdir)/../lib/libfuzzy +@@ -68,6 +69,8 @@ MANDIR = $(srcdir)/../doc/manpages + all: $(PROGS) -+pepack: CPPFLAGS += -DPREFIX=\"$(PREFIX)\" ++pepack: CPPFLAGS += -DPREFIX=\"$(prefix)\" + - pestr: CPPFLAGS += -D_GNU_SOURCE=1 - pestr: LDFLAGS += -lpcre - pestr: pestr.c + pesec: LDFLAGS += -lcrypto + pesec: compat/strlcat.c + +@@ -85,13 +88,13 @@ pescan: LDFLAGS += -lm + # Generic rule matching binary names and sources + + %: %.c +- $(CC) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(DFLAGS) output.c malloc_s.c $^ -o $@ $(LDFLAGS) + + install: installdirs + for prog in $(PROGS); do \ +- $(INSTALL_PROGRAM) -m 755 $$prog $(DEST); \ ++ $(INSTALL_PROGRAM) -m 755 $$prog $(DEST)/$$prog; \ + $(CHK_FILE_EXISTS) $(MANDIR)/$$prog$(man1ext) && \ +- gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(man1dir)/$$prog$(man1ext).gz || \ ++ gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(MAN1DIR)/$$prog$(man1ext).gz || \ + echo -n; \ + done + # TODO: Should we copy it anyway if it already exists? +@@ -99,13 +102,13 @@ install: installdirs + + installdirs: + @$(CHK_DIR_EXISTS) $(DEST) || $(MKDIR) $(DEST) +- @$(CHK_DIR_EXISTS) $(man1dir) || $(MKDIR) $(man1dir) ++ @$(CHK_DIR_EXISTS) $(MAN1DIR) || $(MKDIR) $(MAN1DIR) + @$(CHK_DIR_EXISTS) $(SHAREDIR) || $(MKDIR) $(SHAREDIR) + + uninstall: + for prog in $(PROGS); do \ + $(RM) $(DEST)/$$prog; \ +- $(RM) $(man1dir)/$$prog$(man1ext).gz; \ ++ $(RM) $(MAN1DIR)/$$prog$(man1ext).gz; \ + done + + clean: diff --git a/security/pev/patches/patch-src_pepack.c b/security/pev/patches/patch-src_pepack.c index b4fa3d3fd27..108570113c6 100644 --- a/security/pev/patches/patch-src_pepack.c +++ b/security/pev/patches/patch-src_pepack.c @@ -1,12 +1,12 @@ -$NetBSD: patch-src_pepack.c,v 1.1 2014/12/09 13:26:40 khorben Exp $ +$NetBSD: patch-src_pepack.c,v 1.2 2014/12/09 14:37:06 khorben Exp $ Fixed the path to userdb.txt (see pkg/49458) ---- src/pepack.c.orig 2012-10-31 03:59:14.000000000 +0000 +--- src/pepack.c.orig 2013-12-27 10:39:49.000000000 +0000 +++ src/pepack.c @@ -21,6 +21,13 @@ - #include "pepack.h" + #include "common.h" +#ifndef PREFIX +# define PREFIX "/usr" @@ -15,15 +15,15 @@ Fixed the path to userdb.txt (see pkg/49458) +# define DATADIR PREFIX "/share" +#endif + - struct options config; - static int ind; + #define PROGRAM "pepack" + #define MAX_SIG_SIZE 2048 -@@ -119,7 +126,7 @@ bool loaddb(FILE **fp) +@@ -133,7 +140,7 @@ static bool loaddb(FILE **fp, const opti *fp = fopen(dbfile, "r"); - - if (!*fp) + if (!*fp) { + // TODO(jweyrich): This might change - Should we use a config.h with a constant from $(SHAREDIR)? - *fp = fopen("/usr/share/pev/userdb.txt", "r"); + *fp = fopen(DATADIR "/pev/userdb.txt", "r"); + } - return (*fp != NULL); - } + return *fp != NULL; |