Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2008 10:04:56 GMT
From:      Dax Labrador <semprix@bsdmail.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/125595: [UPDATE] security/rainbowcrack: patch
Message-ID:  <200807141004.m6EA4uj7007697@www.freebsd.org>
Resent-Message-ID: <200807141010.m6EAA5gr006690@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125595
>Category:       ports
>Synopsis:       [UPDATE] security/rainbowcrack: patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 14 10:10:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dax Labrador
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
FreeBSD cerrgglobal.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Taking maintainership

Updated the MASTER SITE

Changed the maintainer

Patch rainbowcrack to support NTLM, MD2, MD4 and RIPEMD160 algorithm.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	rainbowcrack/
#	rainbowcrack/Makefile
#	rainbowcrack/distinfo
#	rainbowcrack/pkg-descr
#	rainbowcrack/pkg-plist
#	rainbowcrack/files
#	rainbowcrack/files/patch-HashAlgorithm.cpp
#	rainbowcrack/files/patch-HashAlgorithm.h
#	rainbowcrack/files/patch-HashRoutine.cpp
#
echo c - rainbowcrack/
mkdir -p rainbowcrack/ > /dev/null 2>&1
echo x - rainbowcrack/Makefile
sed 's/^X//' >rainbowcrack/Makefile << 'END-of-rainbowcrack/Makefile'
X# New ports collection makefile for:   rainbowcrack
X# Date created:        8 May 2006
X# Whom:                bryan@freshdns.net
X#
X# $FreeBSD: ports/security/rainbowcrack/Makefile,v 1.4 2008/02/28 15:55:05 erwin Exp $
X#
X
XPORTNAME=	rainbowcrack
XPORTVERSION=	1.2
XCATEGORIES=	security
XMASTER_SITES=  	http://cerrg.com/dax/rainbowcrack/	
X
XMAINTAINER=     semprix@bsdmail.org	
XCOMMENT=	Hash cracker that precomputes plaintext - ciphertext pairs in advance
X
X.include <bsd.port.pre.mk>
X
X.if ${ARCH} == "ia64" || ${ARCH} == "sparc64"
XBROKEN=		does not compile on ia64 or sparc64
X.endif
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|g++|$$(CXX) $$(CXXFLAGS)|; s|\-O3||' \
X		${WRKSRC}/${MAKEFILE}
X
Xdo-install:
X.for f in rcrack rtgen rtdump rtsort
X	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
X.endfor
X	${MKDIR} ${EXAMPLESDIR}
X	${INSTALL_DATA} ${WRKSRC}/charset.txt ${EXAMPLESDIR}
X
X.include <bsd.port.post.mk>
END-of-rainbowcrack/Makefile
echo x - rainbowcrack/distinfo
sed 's/^X//' >rainbowcrack/distinfo << 'END-of-rainbowcrack/distinfo'
XMD5 (rainbowcrack-1.2.tar.gz) = bf806a618206147d83d26a7e162acfe1
XSHA256 (rainbowcrack-1.2.tar.gz) = d035cb12c0f762fac78f617dea246c5cf4b7503c3b173c3871663eaa3f02b6b4
XSIZE (rainbowcrack-1.2.tar.gz) = 16215
END-of-rainbowcrack/distinfo
echo x - rainbowcrack/pkg-descr
sed 's/^X//' >rainbowcrack/pkg-descr << 'END-of-rainbowcrack/pkg-descr'
XRainbowCrack is a general propose implementation of Philippe Oechslin's faster
Xtime-memory trade-off technique.
X
XIn short, the RainbowCrack tool is a hash cracker. A traditional brute force
Xcracker tries all possible plaintexts one by one in cracking time. It is time
Xconsuming to break complex passwords this way. The idea of time-memory trade-off
Xis to do all cracking time computation in advance and store the result in files
Xso called "rainbow table". It does take a long time to precompute the tables.
XBut once the one time precomputation is finished, a time-memory trade-off
Xcracker can be hundreds of times faster than a brute force cracker, with the
Xhelp of precomputed tables.
X
XWWW: http://www.antsight.com/zsl/rainbowcrack/
END-of-rainbowcrack/pkg-descr
echo x - rainbowcrack/pkg-plist
sed 's/^X//' >rainbowcrack/pkg-plist << 'END-of-rainbowcrack/pkg-plist'
Xbin/rcrack
Xbin/rtgen
Xbin/rtdump
Xbin/rtsort
X%%EXAMPLESDIR%%/charset.txt
X@dirrm %%EXAMPLESDIR%%
END-of-rainbowcrack/pkg-plist
echo c - rainbowcrack/files
mkdir -p rainbowcrack/files > /dev/null 2>&1
echo x - rainbowcrack/files/patch-HashAlgorithm.cpp
sed 's/^X//' >rainbowcrack/files/patch-HashAlgorithm.cpp << 'END-of-rainbowcrack/files/patch-HashAlgorithm.cpp'
X--- rainbowcrack-1.2/src/HashAlgorithm.cpp.orig	2003-11-23 00:33:22.000000000 -0500
X+++ rainbowcrack-1.2/src/HashAlgorithm.cpp	2008-07-14 09:51:30.000000000 -0400
X@@ -6,9 +6,14 @@
X 
X #include "HashAlgorithm.h"
X 
X+#include "Public.h"
X+
X #include <openssl/des.h>
X+#include <openssl/md2.h>
X+#include <openssl/md4.h>
X #include <openssl/md5.h>
X #include <openssl/sha.h>
X+#include <openssl/ripemd.h>
X #ifdef _WIN32
X 	#pragma comment(lib, "libeay32.lib")
X #endif
X@@ -48,6 +53,29 @@
X 	des_ecb_encrypt((des_cblock*)magic, (des_cblock*)pHash, ks, DES_ENCRYPT);
X }
X 
X+void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
X+{
X+	unsigned char UnicodePlain[MAX_PLAIN_LEN * 2];
X+	int i;
X+	for (i = 0; i < nPlainLen; i++)
X+	{
X+		UnicodePlain[i * 2] = pPlain[i];
X+		UnicodePlain[i * 2 + 1] = 0x00;
X+	}
X+
X+	MD4(UnicodePlain, nPlainLen * 2, pHash);
X+}
X+
X+void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
X+{
X+	MD2(pPlain, nPlainLen, pHash);
X+}
X+
X+void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
X+{
X+	MD4(pPlain, nPlainLen, pHash);
X+}
X+
X void HashMD5(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
X {
X 	MD5(pPlain, nPlainLen, pHash);
X@@ -57,3 +85,8 @@
X {
X 	SHA1(pPlain, nPlainLen, pHash);
X }
X+
X+void HashRIPEMD160(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
X+{
X+	RIPEMD160(pPlain, nPlainLen, pHash);
X+}
END-of-rainbowcrack/files/patch-HashAlgorithm.cpp
echo x - rainbowcrack/files/patch-HashAlgorithm.h
sed 's/^X//' >rainbowcrack/files/patch-HashAlgorithm.h << 'END-of-rainbowcrack/files/patch-HashAlgorithm.h'
X--- rainbowcrack-1.2/src/HashAlgorithm.h.orig	2003-11-23 00:33:18.000000000 -0500
X+++ rainbowcrack-1.2/src/HashAlgorithm.h	2008-07-14 09:51:44.000000000 -0400
X@@ -8,7 +8,13 @@
X #define _HASHALGORITHM_H
X 
X void HashLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X+void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X+
X+void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X+void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X void HashMD5(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X+
X void HashSHA1(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X+void HashRIPEMD160(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
X 
X #endif
END-of-rainbowcrack/files/patch-HashAlgorithm.h
echo x - rainbowcrack/files/patch-HashRoutine.cpp
sed 's/^X//' >rainbowcrack/files/patch-HashRoutine.cpp << 'END-of-rainbowcrack/files/patch-HashRoutine.cpp'
X--- rainbowcrack-1.2/src/HashRoutine.cpp.orig	2003-11-23 00:33:16.000000000 -0500
X+++ rainbowcrack-1.2/src/HashRoutine.cpp	2008-07-14 09:52:05.000000000 -0400
X@@ -18,8 +18,12 @@
X 	// Notice: MIN_HASH_LEN <= nHashLen <= MAX_HASH_LEN
X 
X 	AddHashRoutine("lm",   HashLM,   8);
X+	AddHashRoutine("ntlm", HashNTLM, 16);
X+	AddHashRoutine("md2",  HashMD2,  16);
X+	AddHashRoutine("md4",  HashMD4,  16);
X 	AddHashRoutine("md5",  HashMD5,  16);
X 	AddHashRoutine("sha1", HashSHA1, 20);
X+	AddHashRoutine("ripemd160", HashRIPEMD160, 20);
X }
X 
X CHashRoutine::~CHashRoutine()
END-of-rainbowcrack/files/patch-HashRoutine.cpp
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807141004.m6EA4uj7007697>