From e34bcbaabacc2f789116ee7ad747d276c90ba4a0 Mon Sep 17 00:00:00 2001 From: margarida Date: Sun, 14 Dec 2003 16:35:49 +0000 Subject: [PATCH] Update hydra to version 2.5. -- From Michael Coulter --- security/hydra/Makefile | 4 +-- security/hydra/distinfo | 6 ++-- security/hydra/patches/patch-configure | 8 ++--- security/hydra/patches/patch-hydra-smbnt_c | 35 ++++++++++++++++++++++ security/hydra/patches/patch-hydra_c | 21 +++++++++++++ security/hydra/pkg/DESCR | 6 ++-- 6 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 security/hydra/patches/patch-hydra-smbnt_c create mode 100644 security/hydra/patches/patch-hydra_c diff --git a/security/hydra/Makefile b/security/hydra/Makefile index ea76d7b47f0..8a36580fb35 100644 --- a/security/hydra/Makefile +++ b/security/hydra/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.11 2003/11/12 23:54:09 margarida Exp $ +# $OpenBSD: Makefile,v 1.12 2003/12/14 16:35:49 margarida Exp $ COMMENT= "parallelized login hacker" -DISTNAME= hydra-2.4 +DISTNAME= hydra-2.5 CATEGORIES= security HOMEPAGE= http://www.thc.org/ diff --git a/security/hydra/distinfo b/security/hydra/distinfo index ca0ab7396c9..53d91d16d6b 100644 --- a/security/hydra/distinfo +++ b/security/hydra/distinfo @@ -1,3 +1,3 @@ -MD5 (hydra-2.4.tar.gz) = a680f7f386b25a57458a1abd41adae5b -RMD160 (hydra-2.4.tar.gz) = 33f1553783f6adcbc248d15d25e26cadcc7b4834 -SHA1 (hydra-2.4.tar.gz) = 9725ada32fb5bcf3dd4be9255b74056a6a6be8e6 +MD5 (hydra-2.5.tar.gz) = c1836c8d1194cb99a5ccf7cb63dc657a +RMD160 (hydra-2.5.tar.gz) = e655b6522f5ec889e7a8a02ee2f74c6ab9c480ba +SHA1 (hydra-2.5.tar.gz) = 0ad52f14f059323567840ca32b4026b8fd309bef diff --git a/security/hydra/patches/patch-configure b/security/hydra/patches/patch-configure index 36810f19e6f..e4cb6d6af91 100644 --- a/security/hydra/patches/patch-configure +++ b/security/hydra/patches/patch-configure @@ -1,7 +1,7 @@ -$OpenBSD: patch-configure,v 1.1 2003/11/11 17:26:11 margarida Exp $ ---- configure.orig 2003-08-14 16:35:08.000000000 +0100 -+++ configure 2003-11-03 22:21:50.000000000 +0000 -@@ -118,7 +118,7 @@ fi +$OpenBSD: patch-configure,v 1.2 2003/12/14 16:35:49 margarida Exp $ +--- configure.orig 2003-11-20 07:45:06.000000000 -0800 ++++ configure 2003-12-13 19:47:10.000000000 -0800 +@@ -142,7 +142,7 @@ fi echo XDEFINES="" diff --git a/security/hydra/patches/patch-hydra-smbnt_c b/security/hydra/patches/patch-hydra-smbnt_c new file mode 100644 index 00000000000..2a5e19d5d8c --- /dev/null +++ b/security/hydra/patches/patch-hydra-smbnt_c @@ -0,0 +1,35 @@ +$OpenBSD: patch-hydra-smbnt_c,v 1.1 2003/12/14 16:35:49 margarida Exp $ +--- hydra-smbnt.c.orig 2003-12-13 19:47:49.000000000 -0800 ++++ hydra-smbnt.c 2003-12-13 19:47:56.000000000 -0800 +@@ -84,6 +84,8 @@ void HashNTLM(u_char **ntlmhash, u_char + int i=0,j=0; + int mdlen = strlen(pass) * 2 * 8; + u_char *p; ++ char HexChar; ++ int HexValue; + + /* Use NTLM Hash instead of password */ + if ((miscptr != NULL) && (strcmp(miscptr, "HASH") == 0)) { +@@ -99,8 +101,6 @@ void HashNTLM(u_char **ntlmhash, u_char + exit(1); + } + +- char HexChar; +- int HexValue; + for (i=0; i<16; i++) { + HexValue = 0x0; + for (j=0; j<2; j++) { +@@ -303,11 +303,12 @@ int SMBSessionSetup(int s, char *user, c + int start_smbnt(int s, unsigned long int ip, int port, unsigned char options, char *miscptr, FILE *fp) { + char *empty = ""; + char *login, *pass; ++ int SMBerr; + + if (strlen(login = hydra_get_next_login()) == 0) login = empty; + if (strlen(pass = hydra_get_next_password()) == 0) pass = empty; + +- int SMBerr = SMBSessionSetup(s, login, pass, miscptr); ++ SMBerr = SMBSessionSetup(s, login, pass, miscptr); + + if ( 0x00 == SMBerr ) { // success + hydra_report_found_host(port, ip, "smb", fp); diff --git a/security/hydra/patches/patch-hydra_c b/security/hydra/patches/patch-hydra_c new file mode 100644 index 00000000000..faf3880aa2a --- /dev/null +++ b/security/hydra/patches/patch-hydra_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-hydra_c,v 1.1 2003/12/14 16:35:49 margarida Exp $ +--- hydra.c.orig 2003-12-13 19:47:41.000000000 -0800 ++++ hydra.c 2003-12-13 19:47:56.000000000 -0800 +@@ -227,6 +227,8 @@ int hydra_main(int soc, void *nessus, in + unsigned long int ip; + struct in_addr in; + int i, j, sID; ++ int a = 0, scans = 0, done = 0; ++ char rc; + + #ifdef NESSUS_PLUGIN + char *svc_kb_name; +@@ -1052,8 +1054,6 @@ int hydra_main(int soc, void *nessus, in + } + + /* feed the children with ip address data - be a good mom */ +- int a = 0, scans = 0, done = 0; +- char rc; + + while (done < servers) { + for (a = 0; a < servers; a++) { diff --git a/security/hydra/pkg/DESCR b/security/hydra/pkg/DESCR index 0856868414c..58489ddd9e1 100644 --- a/security/hydra/pkg/DESCR +++ b/security/hydra/pkg/DESCR @@ -10,5 +10,7 @@ the faster (but too high, and it disables the service). To prevent disabling you can now use the -g option for "slow-starts". The following protocols are supported: - Cisco[-enable], FTP, HTTP[S], ICQ, IMAP, LDAP, NNTP, PCNFS, POP3, - REXEC, SMB, SOCKS5, TELNET, and VNC. +Cisco[-enable] (including AAA), FTP, HTTP[S], ICQ, IMAP, LDAP, NNTP, +PCNFS, POP3, REXEC, SMB, SMBNT, SOCKS5, TELNET, MySQL, Socks5 and VNC. +A generic SSL wrapper can also be used in conjuction with the other +protocols.