Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hydra for openSUSE:Factory checked in at 2026-12-01 16:59:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hydra (Old) and /work/SRC/openSUSE:Factory/.hydra.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hydra" Tue Dec 1 16:59:18 2026 rev:7 rq:1401775 version:9.9 Changes: -------- --- /work/SRC/openSUSE:Factory/hydra/hydra.changes 2026-08-31 15:57:09.026918159 +0200 +++ /work/SRC/openSUSE:Factory/.hydra.new.1340718/hydra.changes 2026-12-01 17:02:34.058141949 +0100 @@ -1,0 +2,24 @@ +Mon Nov 30 00:00:00 UTC 2026 - Eyad Issa <[email protected]> + +- Update to version 9.9: + * Many security fixes: hydra.restore deserialization validation, + output/restore files opened 0600 with O_NOFOLLOW, + async-signal-safe signal handlers, and numerous module buffer + overflow and NULL dereference fixes + * NTLM encoding vulnerability fixes + * http-form: clear cookies and drop Authorization header on + cross-host redirects, clearer error for malformed h=/H= headers + * ssh: warn at runtime if libssh is older than 0.10.6 + (CVE-2025-4877) + * ftp: report servers that require TLS + * dpl4hydra: switch to HTTPS and sanitize VENDOR + * hydra-wizard.sh: build a properly quoted argument array + * Full changelog at /usr/share/doc/packages/hydra/CHANGES +- Switch from a git snapshot to the upstream release tarball. +- Add explicit BuildRequires for openssl and pcre2, which configure + checks for directly. +- Drop the hardcoded -D_FORTIFY_SOURCE=2 from configure, to fix the + "_FORTIFY_SOURCE redefined" warnings and use the distribution + build flags. + +------------------------------------------------------------------- Old: ---- hydra-9.7+git20.gbccaea1.tar.gz New: ---- hydra-9.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hydra.spec ++++++ --- /var/tmp/diff_new_pack.8jLqe3/_old 2026-12-01 17:02:35.158189976 +0100 +++ /var/tmp/diff_new_pack.8jLqe3/_new 2026-12-01 17:02:35.160190063 +0100 @@ -15,16 +15,14 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%global git_rev bccaea140e3215aa9c9182da916ca9fb72696b63 - Name: hydra -Version: 9.7+git20.gbccaea1 +Version: 9.9 Release: 0 Summary: A network logon cracker with support for many different services License: AGPL-3.0-only Group: Productivity/Networking/Diagnostic URL: https://github.com/vanhauser-thc/thc-hydra -Source0: https://github.com/vanhauser-thc/thc-hydra/archive/%{git_rev}/%{name}-%{version}.tar.gz +Source0: https://github.com/vanhauser-thc/thc-hydra/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: desktop-file-utils @@ -38,10 +36,12 @@ BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libmariadb) BuildRequires: pkgconfig(libmemcached) +BuildRequires: pkgconfig(libpcre2-8) BuildRequires: pkgconfig(libpq) BuildRequires: pkgconfig(libssh) BuildRequires: pkgconfig(libsvn_client) BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(smbclient) %if 0%{?suse_version} > 1600 BuildRequires: bson-devel @@ -71,7 +71,11 @@ XHydra is a GTK graphical frontend for the Hydra network login cracker. %prep -%autosetup -n thc-%{name}-%{git_rev} -p1 +%autosetup -n thc-%{name}-%{version} -p1 + +# Drop the hardcoded _FORTIFY_SOURCE=2, it clashes with the value +# from the distribution build flags +sed -i 's/ -D_FORTIFY_SOURCE=2//' configure %build %configure --fhs DATADIR=/share/hydra ++++++ hydra-9.7+git20.gbccaea1.tar.gz -> hydra-9.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/CHANGES new/thc-hydra-9.9/CHANGES --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/CHANGES 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/CHANGES 2026-11-27 11:30:52.000000000 +0100 @@ -1,7 +1,7 @@ Changelog for hydra ------------------- -Release 9.8-dev +Release 9.9 * security fixes (some reported by Elpe Pinillo and TristanInSec): - hydra.restore deserialization: validate ownership, clamp length/count/ offset fields before driving malloc and loop bounds @@ -28,7 +28,10 @@ - HTTP-form: clear cookie jar and drop operator-supplied Authorization header on cross-host redirect; skip pair on hydra_strrep overflow rather than crash; cap urlpath_extracted strncpy - ; apply PCRE2 match_limit/depth_limit + ; apply PCRE2 match_limit/depth_limit + ; a malformed h=/H= header (missing "Name:Value" colon or an empty + name/value) now reports the real format error instead of the + misleading "Out of memory for HTTP headers" (issue #954) - NTLM: NDEBUG-disabled assertions replaced with runtime caps in unicodeToString/strToUnicode/toString; challenge-offset bounds in GetUnicodeString/GetString/DumpBuffer macros to refuse @@ -53,6 +56,8 @@ NUL-termination; strip-trailing-CRLF off-by-one in pop3/imap/smtp/nntp * more buffer overflow fixes +* fixed -o output file open flags +* ftp: report servers that require TLS ("530 ... must use encryption") Release 9.7 * GTK3 support for xhydra by elboulangero diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/configure new/thc-hydra-9.9/configure --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/configure 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/configure 2026-11-27 11:30:52.000000000 +0100 @@ -197,6 +197,46 @@ INCDIRS="$INCDIRS $PREFIX/include" fi fi + +# Drop library directories whose objects do not match the ELF class $CC builds +# for. /etc/ld.so.conf.d/ commonly lists the native multiarch directory next to +# a foreign one (on Debian: x86_64-linux-gnu and i386-linux-gnu). The module +# checks below match libraries by file name only, so a 32-bit libssl.so in a +# 32-bit directory satisfies the check in a 64-bit build, its directory ends up +# in XLIBPATHS, and the linker then reports "skipping incompatible" for every +# object it finds there. +# The class comes from a test binary, not uname -m: a 32-bit userland can run on +# a 64-bit kernel, and a cross compiler targets another machine than the host. +# Non-ELF targets (macOS, Windows) leave TARGET_ELF empty and skip the filter. +TARGET_ELF="" +FOREIGN_ELF="" +if command -v file > /dev/null 2>&1; then + TMPC=comptest$$ + echo 'int main(void) { return 0; }' > $TMPC.c + $CC -o $TMPC $TMPC.c > /dev/null 2>&1 + case `file -b $TMPC 2> /dev/null` in + "ELF 64-bit"*) TARGET_ELF=64; FOREIGN_ELF=32 ;; + "ELF 32-bit"*) TARGET_ELF=32; FOREIGN_ELF=64 ;; + esac + rm -f $TMPC $TMPC.c +fi +if [ -n "$TARGET_ELF" ]; then + ARCH_LIBDIRS= + for archdir in $LIBDIRS; do + test -d "$archdir" || continue + # -L so .so symlinks are described by their targets. + archdesc=`file -Lb $archdir/*.so* 2> /dev/null` + # A directory is dropped only if it holds objects of the other ELF class and + # none of the target class. Linker scripts ("ASCII text"), other formats or + # a failed file(1) prove nothing and keep the directory. + case "$archdesc" in + *"ELF $TARGET_ELF-bit"*) ARCH_LIBDIRS="$ARCH_LIBDIRS $archdir" ;; + *"ELF $FOREIGN_ELF-bit"*) ;; + *) ARCH_LIBDIRS="$ARCH_LIBDIRS $archdir" ;; + esac + done + LIBDIRS="$ARCH_LIBDIRS" +fi STRIP="strip" echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-ftp.c new/thc-hydra-9.9/hydra-ftp.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-ftp.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-ftp.c 2026-11-27 11:30:52.000000000 +0100 @@ -23,6 +23,12 @@ /* special hack to identify 530 user unknown msg. suggested by * [email protected] */ if (buf[0] == '5' && buf[1] == '3' && buf[2] == '0') { + /* e.g. vsftpd with force_local_logins_ssl: "530 Non-anonymous sessions must use encryption." */ + if (strstr(buf, "ncrypt") != NULL || strstr(buf, "TLS") != NULL || strstr(buf, "SSL") != NULL) { + hydra_report(stderr, "[ERROR] the server requires an encrypted connection, use the ftps module (AUTH TLS) or -S (implicit SSL): %s\n", buf); + free(buf); + return 3; + } if (verbose) printf("[INFO] user %s does not exist, skipping\n", login); hydra_completed_pair_skip(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-http-form.c new/thc-hydra-9.9/hydra-http-form.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-http-form.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-http-form.c 2026-11-27 11:30:52.000000000 +0100 @@ -377,12 +377,14 @@ } void cleanup(ptr_header_node *ptr_head) { - ptr_header_node cur_ptr = *ptr_head, next_ptr = cur_ptr; + ptr_header_node cur_ptr = *ptr_head, next_ptr; - while (next_ptr != NULL) { + while (cur_ptr != NULL) { + next_ptr = cur_ptr->next; free(cur_ptr->header); free(cur_ptr->value); - next_ptr = cur_ptr->next; + free(cur_ptr); /* Fix: also free the node itself to prevent memory leak */ + cur_ptr = next_ptr; } *ptr_head = NULL; @@ -534,6 +536,10 @@ ptr = miscptr + 2; while (*ptr != 0 && *ptr != ':') ptr++; + if (*ptr != ':') { + hydra_report(stderr, "[ERROR] invalid header 'h=%s': expected format \"Name:Value\" (escape a literal colon in the value as \\:)\n", miscptr + 2); + return 0; + } if (*(ptr - 1) == '\\') *(ptr - 1) = 0; if (*ptr != 0) { @@ -550,13 +556,17 @@ * - (optional1 + 2) contains the header's name * - ptr contains the header's value */ + if (*(miscptr + 2) == 0 || *ptr == 0) { + hydra_report(stderr, "[ERROR] invalid header 'h=...': header name and value must both be non-empty (use \"Name:Value\")\n"); + return 0; + } if (add_header(ptr_head, miscptr + 2, hydra_strrep(ptr, "\\:", ":"), HEADER_TYPE_USERHEADER)) { // Success: break the switch and go ahead miscptr = ptr2; break; } - // Error: abort execution - hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (h).\n"); + // Error: a genuine allocation failure inside add_header + hydra_report(stderr, "[ERROR] out of memory while adding HTTP header (h).\n"); return 0; case 'H': // add a new header, or replace an existing one's value @@ -564,6 +574,10 @@ while (*ptr != 0 && *ptr != ':') ptr++; + if (*ptr != ':') { + hydra_report(stderr, "[ERROR] invalid header 'H=%s': expected format \"Name:Value\" (escape a literal colon in the value as \\:)\n", miscptr + 2); + return 0; + } if (*(ptr - 1) == '\\') *(ptr - 1) = 0; @@ -581,13 +595,17 @@ * - (optional1 + 2) contains the header's name * - ptr contains the header's value */ + if (*(miscptr + 2) == 0 || *ptr == 0) { + hydra_report(stderr, "[ERROR] invalid header 'H=...': header name and value must both be non-empty (use \"Name:Value\")\n"); + return 0; + } if (add_header(ptr_head, miscptr + 2, hydra_strrep(ptr, "\\:", ":"), HEADER_TYPE_USERHEADER_REPL)) { // Success: break the switch and go ahead miscptr = ptr2; break; } - // Error: abort execution - hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (H).\n"); + // Error: a genuine allocation failure inside add_header + hydra_report(stderr, "[ERROR] out of memory while adding HTTP header (H).\n"); return 0; default: hydra_report(stderr, "[ERROR] no valid optional parameter type given: %c\n", miscptr[0]); @@ -821,7 +839,7 @@ strncpy(tmpname, startcookie, sizeof(tmpname) - 2); tmpname[sizeof(tmpname) - 2] = 0; ptr = strchr(tmpname, '='); - *(++ptr) = 0; + if (ptr) *(++ptr) = 0; // is the cookie already in the cookiejar? (so, does it have to be // replaced?) if ((ptr = hydra_strcasestr(cookie, tmpname)) != NULL) { @@ -829,8 +847,13 @@ // if the cookie is not in the beginning of the cookiejar, copy the // ones before if (ptr != cookie && *(ptr - 1) == ' ') { - strncpy(tmpcookie, cookie, ptr - cookie - 2); - tmpcookie[ptr - cookie - 2] = 0; + ssize_t off = ptr - cookie - 2; + if (off > 0) { + size_t n = (size_t)off; + if (n >= sizeof(tmpcookie)) n = sizeof(tmpcookie) - 1; + strncpy(tmpcookie, cookie, n); + tmpcookie[n] = 0; + } } ptr += strlen(tmpname); // if there are any cookies after this one in the cookiejar, copy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-http.c new/thc-hydra-9.9/hydra-http.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-http.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-http.c 2026-11-27 11:30:52.000000000 +0100 @@ -81,6 +81,8 @@ add_header(&ptr_head, "Content-Length", "0", HEADER_TYPE_DEFAULT); header = stringify_headers(&ptr_head); + if (header == NULL) + return 3; buffer_size = strlen(header) + 500; if (!(buffer = malloc(buffer_size))) { @@ -217,6 +219,10 @@ } } else { hydra_report(stderr, "[ERROR] It is not NTLM authentication type\n"); + free(buffer); + free(header); + free(http_buf); + http_buf = NULL; return 3; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-imap.c new/thc-hydra-9.9/hydra-imap.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-imap.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-imap.c 2026-11-27 11:30:52.000000000 +0100 @@ -96,7 +96,9 @@ return 3; } free(buf); - strcpy(buffer2, pass); + /* Fix buffer overflow: use strncpy to prevent overflow when password exceeds buffer size */ + strncpy(buffer2, pass, sizeof(buffer2) - 1); + buffer2[sizeof(buffer2) - 1] = '\0'; hydra_tobase64((unsigned char *)buffer2, strlen(buffer2), sizeof(buffer2)); sprintf(buffer, "%.250s\r\n", buffer2); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-memcached.c new/thc-hydra-9.9/hydra-memcached.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-memcached.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-memcached.c 2026-11-27 11:30:52.000000000 +0100 @@ -74,6 +74,8 @@ servers = memcached_server_list_append(servers, hydra_address2string(ip), port, &rc); rc = memcached_server_push(cache, servers); + // memcached_server_push() copies the list + memcached_server_list_free(servers); if (rc != MEMCACHED_SUCCESS) { if (verbose) hydra_report(stderr, "[ERROR] Couldn't add server: %s\n", memcached_strerror(cache, rc)); @@ -88,11 +90,13 @@ hydra_report(stderr, "[ERROR] Couldn't get server stats: %s\n", memcached_strerror(cache, rc)); memcached_destroy_sasl_auth_data(cache); memcached_free(cache); - hydra_completed_pair_skip(); + if (rc != MEMCACHED_AUTH_FAILURE) + return 3; + hydra_completed_pair(); if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) { return 3; } - return 2; + return 1; } memcached_destroy_sasl_auth_data(cache); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-mod.c new/thc-hydra-9.9/hydra-mod.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-mod.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-mod.c 2026-11-27 11:30:52.000000000 +0100 @@ -1427,7 +1427,7 @@ return NULL; if (substr == NULL || replacement == NULL) return strdup(string); - tok = strstr(string, substr); + tok = (char*)strstr(string, substr); if (tok == NULL) return strdup(string); newstr = malloc(strlen(string) - strlen(substr) + strlen(replacement) + 2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-rtsp.c new/thc-hydra-9.9/hydra-rtsp.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-rtsp.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-rtsp.c 2026-11-27 11:30:52.000000000 +0100 @@ -28,7 +28,8 @@ } int32_t is_NotFound(char *s) { - if (strcasestr(s, "404 Stream") != NULL || strcasestr(s, "404 Not") != NULL) { + if (strcasestr(s, "404 Stream") != NULL || strcasestr(s, "404 Not") != NULL || + strcasestr(s, "451") != NULL) { return 1; } else { return 0; @@ -59,19 +60,55 @@ } } -void create_core_packet(int32_t control, char *ip, int32_t port) { +void create_core_packet(int32_t control, char *ip, int32_t port, char *path) { char *target = hydra_address2string(ip); + int ret; if (control == 0) { if (strlen(packet) <= 0) { - sprintf(packet, "DESCRIBE rtsp://%.260s:%i RTSP/1.0\r\nCSeq: 2\r\n\r\n", target, port); + ret = snprintf(packet, sizeof(packet), + "DESCRIBE rtsp://%s:%i%s RTSP/1.0\r\nCSeq: 2\r\n\r\n", + target, port, path ? path : ""); + if (ret >= sizeof(packet)) + hydra_report(stderr, "[ERROR] hostname + path are too long, truncating DESCRIBE line!\n"); } } else { if (strlen(packet2) <= 0) { - sprintf(packet2, "DESCRIBE rtsp://%.260s:%i RTSP/1.0\r\nCSeq: 3\r\n", target, port); + ret = snprintf(packet2, sizeof(packet2), + "DESCRIBE rtsp://%s:%i%s RTSP/1.0\r\nCSeq: 3\r\n", + target, port, path ? path : ""); + if (ret >= sizeof(packet2)) + hydra_report(stderr, "[ERROR] hostname + path are too long, truncating DESCRIBE line!\n"); } } } + +void create_url_packet(char *ip, int32_t port, char *path, char *login, char *pass) { + char *target = hydra_address2string(ip); + char userpass_path[500]; + int ret; + + memset(userpass_path, 0, sizeof(userpass_path)); + strncpy(userpass_path, path, sizeof(userpass_path) - 1); + + if (strstr(path, "^USER^")) { + char *replaced = hydra_string_replace(userpass_path, "^USER^", login); + strncpy(userpass_path, replaced, sizeof(userpass_path) - 1); + free(replaced); + } + if (strstr(userpass_path, "^PASS^")) { + char *replaced = hydra_string_replace(userpass_path, "^PASS^", pass); + strncpy(userpass_path, replaced, sizeof(userpass_path) - 1); + free(replaced); + } + + ret = snprintf(packet, sizeof(packet), + "DESCRIBE rtsp://%s:%i%s RTSP/1.0\r\nCSeq: 2\r\n\r\n", + target, port, userpass_path); + if (ret >= sizeof(packet)) + hydra_report(stderr, "[ERROR] hostname + path too long\n"); +} + int32_t start_rtsp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE *fp) { char *empty = ""; char *login, *pass, buffer[1030], buffer2[500]; @@ -85,7 +122,7 @@ if (strlen(pass = hydra_get_next_password()) == 0) pass = empty; - create_core_packet(0, ip, port); + create_core_packet(0, ip, port, miscptr); if (hydra_send(s, packet, strlen(packet), 0) < 0) { return 1; @@ -106,7 +143,7 @@ } return 1; } else { - create_core_packet(1, ip, port); + create_core_packet(1, ip, port, miscptr); if (use_Digest_Auth(lresp) == 1) { char aux[500] = "", dbuf[500] = "", *result = NULL; @@ -136,6 +173,12 @@ sprintf(buffer, "%.500sAuthorization: : Basic %.500s\r\n\r\n", packet2, buffer2); if (debug) hydra_report(stderr, "C:%s\n", buffer); + } else if (miscptr && (strstr(miscptr, "^USER^") || strstr(miscptr, "^PASS^"))) { + free(lresp); + create_url_packet(ip, port, miscptr, login, pass); + if (debug) + hydra_report(stderr, "C:%s\n", packet); + strncpy(buffer, packet, sizeof(buffer) - 1); } else { hydra_report(stderr, "[ERROR] unknown authentication protocol\n"); return 1; @@ -235,5 +278,20 @@ // return codes: // 0 all OK // -1 error, hydra will exit, so print a good error message here + + if (miscptr && *miscptr != '/') { + hydra_report(stderr, "The path parameter shall start with '/'.\n"); + return -1; + } + return 0; } + +void usage_rtsp(const char *service) { + printf("Module %s optionally takes the path of the RTSP stream to authenticate against.\n" + "The path is specified with the -m option.\n" + "For example: -m /live/ch0 or -m /stream1\n" + "For URL-path based auth (e.g. DVR cameras), use ^USER^ and ^PASS^ placeholders:\n" + " -m \"/user=^USER^&pass=^PASS^&stream\"\n\n", + service); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-smb.c new/thc-hydra-9.9/hydra-smb.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-smb.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-smb.c 2026-11-27 11:30:52.000000000 +0100 @@ -1046,8 +1046,10 @@ /* We don't need to actually calculated a LM hash for this mode, only NTLM */ ret = HashNTLM(&NTLMhash, (unsigned char *)szPassword, (unsigned char *)challenge, miscptr); - if (ret == -1) + if (ret == -1) { + free(NTLMhash); /* Fix: prevent memory leak when HashNTLM fails */ return -1; + } memcpy(buf + iOffset + 24, NTLMhash, 24); /* Skip space for LM hash */ free(NTLMhash); @@ -1505,6 +1507,7 @@ if (send(sock, buf, sizeof(buf), 0) < 0) { fprintf(stderr, "[ERROR] unable to send to target smb://%s:%d/\n", hostname, port); + close(sock); return -1; } @@ -1515,11 +1518,13 @@ if (ready <= 0) { fprintf(stderr, "[ERROR] no reply from target smb://%s:%d/\n", hostname, port); + close(sock); return -1; } if ((ready = recv(sock, buf, sizeof(buf), 0)) < 40) { fprintf(stderr, "[ERROR] invalid reply from target smb://%s:%d/\n", hostname, port); + close(sock); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-snmp.c new/thc-hydra-9.9/hydra-snmp.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-snmp.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-snmp.c 2026-11-27 11:30:52.000000000 +0100 @@ -224,13 +224,30 @@ size = sizeof(snmpv1_w); } - snmpv1_a.comlen = (char)strlen(pass); - snmpv1_a.len = snmpv1_a.comlen + size + sizeof(snmpv1_a) - 3; + /* Fix buffer overflow: limit password length to available buffer space. + * The SNMP packet structure references comlen, so we must truncate the + * password itself rather than only the copy, to keep i consistent with + * the actual bytes written and avoid later memcpy overrunning buffer. */ + { + size_t pass_len = strlen(pass); + size_t max_pass = sizeof(buffer) - sizeof(snmpv1_a) - size; + size_t max_pass_ber = 0; - i = sizeof(snmpv1_a); - memcpy(buffer, &snmpv1_a, i); - strcpy(buffer + i, pass); - i += strlen(pass); + if (pass_len > max_pass) + pass_len = max_pass; + if (size + sizeof(snmpv1_a) - 3 < 0x80) { + max_pass_ber = 0x7f - (size + sizeof(snmpv1_a) - 3); + if (pass_len > max_pass_ber) + pass_len = max_pass_ber; + } + snmpv1_a.comlen = (char)pass_len; + snmpv1_a.len = snmpv1_a.comlen + size + sizeof(snmpv1_a) - 3; + + i = sizeof(snmpv1_a); + memcpy(buffer, &snmpv1_a, i); + memcpy(buffer + i, pass, pass_len); + i += pass_len; + } if (snmpread) { memcpy(buffer + i, &snmpv1_r, size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-vnc.c new/thc-hydra-9.9/hydra-vnc.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra-vnc.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra-vnc.c 2026-11-27 11:30:52.000000000 +0100 @@ -47,13 +47,16 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE *fp) { char *empty = ""; char *pass; - unsigned char buf2[CHALLENGESIZE + 4]; + unsigned char buf2[CHALLENGESIZE + 5]; + int32_t got; if (strlen(pass = hydra_get_next_password()) == 0) pass = empty; memset(buf2, 0, sizeof(buf2)); - if (recv(s, buf2, CHALLENGESIZE + 4, 0) < CHALLENGESIZE + 4) { + // RFB 3.7+ sends only the security type list here, RFB 3.3 at least 4 bytes + got = (int32_t)recv(s, buf2, CHALLENGESIZE + 4, 0); + if (got < (vnc_client_version == RFB37 ? 1 : 4)) { hydra_report(stderr, "[ERROR] VNC server connection failed (short read)\n"); hydra_child_exit(0); } @@ -66,8 +69,18 @@ hydra_report(stderr, "[ERROR] VNC server connection failed\n"); hydra_child_exit(0); } + // the type list may arrive in more than one segment + while (got < 1 + buf2[0]) { + int32_t r = hydra_recv_nb(s, (char *)buf2 + got, 1 + buf2[0] - got); - for (i = 1; i < buf2[0] && i < (int32_t)sizeof(buf2); i++) { + if (r <= 0) { + hydra_report(stderr, "[ERROR] VNC server connection failed (short read)\n"); + hydra_child_exit(0); + } + got += r; + } + + for (i = 1; i <= buf2[0]; i++) { // fprintf(stderr,"sec type %u\n",buf2[i]); // check if weak security types are available if (buf2[i] <= 0x2) { @@ -107,6 +120,16 @@ } } else { // in old proto, challenge is following the security type + // the challenge may arrive in a separate segment + while (got < CHALLENGESIZE + 4) { + int32_t r = hydra_recv_nb(s, (char *)buf2 + got, CHALLENGESIZE + 4 - got); + + if (r <= 0) { + hydra_report(stderr, "[ERROR] VNC server connection failed (short read)\n"); + hydra_child_exit(0); + } + got += r; + } vncEncryptBytes((unsigned char *)buf2 + 4, pass); if (hydra_send(s, (char *)buf2 + 4, CHALLENGESIZE, 0) < 0) { return 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra.c new/thc-hydra-9.9/hydra.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/hydra.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/hydra.c 2026-11-27 11:30:52.000000000 +0100 @@ -49,6 +49,7 @@ void usage_snmp(const char *service); void usage_http(const char *service); void usage_smb2(const char *service); +void usage_rtsp(const char *service); extern void service_asterisk(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE *fp, int32_t port, char *hostname); extern void service_telnet(char *ip, int32_t sp, unsigned char options, char *miscptr, FILE *fp, int32_t port, char *hostname); @@ -228,7 +229,7 @@ #define RESTOREFILE "./hydra.restore" #define PROGRAM "Hydra" -#define VERSION "v9.8dev" +#define VERSION "v9.9" #define AUTHOR "van Hauser/THC" #define EMAIL "<[email protected]>" #define AUTHOR2 "David Maciejak" @@ -438,7 +439,7 @@ #endif SERVICE(rlogin), SERVICE(rsh), - SERVICE(rtsp), + SERVICE3("rtsp", rtsp), SERVICE(rpcap), SERVICE3("s7-300", s7_300), #ifdef LIBSAPR3 @@ -755,12 +756,14 @@ fprintf(f, "%s\n", hydra_options.outfile_ptr); fprintf(f, "%s\n%s\n", hydra_options.miscptr == NULL ? "" : hydra_options.miscptr, hydra_options.service); fck = fwrite(login_ptr, hydra_brains.sizelogin + hydra_brains.countlogin + 8, 1, f); - if (hydra_options.colonfile == NULL || hydra_options.colonfile == empty_login) + if (hydra_options.bfg) // -x: pass_ptr is one generated password, not a password list + fprintf(f, "%s\n", pass_ptr == NULL ? "" : pass_ptr); + else if (hydra_options.colonfile == NULL || hydra_options.colonfile == empty_login) fck = fwrite(pass_ptr, hydra_brains.sizepass + hydra_brains.countpass + 8, 1, f); for (j = 0; j < hydra_brains.targets; j++) if (hydra_targets[j]->done != TARGET_FINISHED) { fck = fwrite(hydra_targets[j], sizeof(hydra_target), 1, f); - fprintf(f, "%s\n%d\n%d\n", hydra_targets[j]->target == NULL ? "" : hydra_targets[j]->target, (int32_t)(hydra_targets[j]->login_ptr - login_ptr), (int32_t)(hydra_targets[j]->pass_ptr - pass_ptr)); + fprintf(f, "%s\n%d\n%d\n", hydra_targets[j]->target == NULL ? "" : hydra_targets[j]->target, (int32_t)(hydra_targets[j]->login_ptr - login_ptr), hydra_options.bfg ? 0 : (int32_t)(hydra_targets[j]->pass_ptr - pass_ptr)); fprintf(f, "%s\n%s\n", hydra_targets[j]->login_ptr, hydra_targets[j]->pass_ptr); if (hydra_targets[j]->redo) for (i = 0; i < hydra_targets[j]->redo; i++) @@ -879,7 +882,7 @@ fprintf(stderr, "[ERROR] restore file targets count out of range (%d)\n", hydra_brains.targets); exit(-1); } - if (hydra_brains.countlogin > MAX_LINES || hydra_brains.countpass > MAX_LINES) { + if (hydra_brains.countlogin > MAX_LINES || (hydra_brains.countpass > MAX_LINES && !hydra_options.bfg)) { fprintf(stderr, "[ERROR] restore file login/password count out of range\n"); exit(-1); } @@ -949,7 +952,13 @@ fck = (int32_t)fread(login_ptr, hydra_brains.sizelogin + hydra_brains.countlogin + 8, 1, f); if (debug) printf("[DEBUG] reading restore file: Step 9 complete\n"); - if (!check_flag(hydra_options.mode, MODE_COLON_FILE)) { // NOT colonfile mode + if (hydra_options.bfg) { // -x: pass_ptr was saved as one string, see hydra_restore_write() + sck = fgets(out, sizeof(out), f); + if (out[0] != 0 && out[strlen(out) - 1] == '\n') + out[strlen(out) - 1] = 0; + pass_ptr = malloc(strlen(out) + 1); + strcpy(pass_ptr, out); + } else if (!check_flag(hydra_options.mode, MODE_COLON_FILE)) { // NOT colonfile mode pass_ptr = malloc(hydra_brains.sizepass + hydra_brains.countpass + 8); if (!pass_ptr) { fprintf(stderr, "Error: malloc(%llu) failed\n", (unsigned long long)(hydra_brains.sizepass + hydra_brains.countpass + 8)); @@ -1013,7 +1022,9 @@ sck = fgets(out, sizeof(out), f); { long off = atol(out); - if (off < 0 || (uint64_t)off >= hydra_brains.sizepass + hydra_brains.countpass + 8) { + if (hydra_options.bfg) // -x: pass_ptr is restored from the string below + off = 0; + else if (off < 0 || (uint64_t)off >= hydra_brains.sizepass + hydra_brains.countpass + 8) { fprintf(stderr, "[ERROR] restore file target %d pass_ptr offset out of range (%ld)\n", j, off); exit(-1); } @@ -1506,20 +1517,37 @@ // killit = 1 : kill(pid); fail = 1 : redo, fail = 2/3 : disable void hydra_kill_head(int32_t head_no, int32_t killit, int32_t fail) { + sigset_t chldmask, prevmask; + int32_t was_active; + if (debug) printf("[DEBUG] head_no %d, kill %d, fail %d\n", head_no, killit, fail); if (head_no < 0) return; - if (hydra_heads[head_no]->active == HEAD_ACTIVE || (hydra_heads[head_no]->sp[0] > 2 && hydra_heads[head_no]->sp[1] > 2)) { + // This runs both from the main loop and from the SIGCHLD handler + // killed_childs(), which can interrupt the main loop anywhere in here. Block + // SIGCHLD so a head is torn down exactly once: otherwise both contexts see + // HEAD_ACTIVE, hydra_brains.active is decremented twice for the single + // increment in hydra_spawn_head(), and once it drops below the number of + // running heads hydra_check_for_exit_condition() ends the attack while + // children are still alive. + sigemptyset(&chldmask); + sigaddset(&chldmask, SIGCHLD); + sigprocmask(SIG_BLOCK, &chldmask, &prevmask); + // take the state once and use it for every decision below, so the counter + // update and the HEAD_ACTIVE -> HEAD_UNUSED transition cannot disagree + was_active = hydra_heads[head_no]->active == HEAD_ACTIVE; + if (was_active || (hydra_heads[head_no]->sp[0] > 2 && hydra_heads[head_no]->sp[1] > 2)) { close(hydra_heads[head_no]->sp[0]); close(hydra_heads[head_no]->sp[1]); } if (killit) { if (hydra_heads[head_no]->pid > 0) kill(hydra_heads[head_no]->pid, SIGTERM); - hydra_brains.active--; + if (was_active) + hydra_brains.active--; } - if (hydra_heads[head_no]->active == HEAD_ACTIVE) { + if (was_active) { hydra_heads[head_no]->active = HEAD_UNUSED; hydra_targets[hydra_heads[head_no]->target_no]->use_count--; } @@ -1547,6 +1575,7 @@ // NULL; } (void)waitpid(-1, NULL, WNOHANG); + sigprocmask(SIG_SETMASK, &prevmask, NULL); } void hydra_increase_fail_count(int32_t target_no, int32_t head_no) { @@ -2338,8 +2367,9 @@ size_t countinfile = 1, sizeinfile = 0; uint64_t math2; int32_t i = 0, j = 0, k, error = 0, modusage = 0, ignore_restore = 0, do_switch; - int32_t head_no = 0, target_no = 0, exit_condition = 0, readres; + int32_t head_no = 0, target_no = 0, exit_condition = 0, readres, active_heads = 0; time_t starttime, elapsed_status, elapsed_restore, status_print = 59, tmp_time; + uint64_t sent_before = 0, cur_sent = 0; // tries already done when this run started (>0 on -R resume) and tries done in the current run; see issue #824 char *tmpptr, *tmpptr2, *tmpptr3; char rc, buf[MAXBUF]; time_t last_attempt = 0; @@ -2629,6 +2659,10 @@ break; case 's': hydra_options.port = port = atoi(optarg); + if (port < 1 || port > 65535) { + fprintf(stderr, "[ERROR] Option -s needs to be a port number between 1 and 65535\n"); + exit(-1); + } break; case 'c': #ifdef MSG_PEEK @@ -3624,6 +3658,7 @@ bail("Could not allocate enough memory for login file data"); memset(login_ptr, 0, hydra_brains.sizelogin + hydra_brains.countlogin + 8); fill_mem(login_ptr, lfp, 0); + lfp = NULL; } else { login_ptr = hydra_options.login; hydra_brains.sizelogin = strlen(hydra_options.login) + 1; @@ -3663,6 +3698,7 @@ bail("Could not allocate enough memory for password file data"); memset(pass_ptr, 0, hydra_brains.sizepass + hydra_brains.countpass + 8); fill_mem(pass_ptr, pfp, 0); + pfp = NULL; } else { if (hydra_options.pass != NULL) { pass_ptr = hydra_options.pass; @@ -3721,6 +3757,7 @@ bail("Could not allocate enough memory for colon file data"); memset(csv_ptr, 0, hydra_brains.sizelogin + 2 * hydra_brains.countlogin + 8); fill_mem(csv_ptr, cfp, 1); + cfp = NULL; // printf("count: %d, size: %d\n", hydra_brains.countlogin, // hydra_brains.sizelogin); hydra_dump_data(csv_ptr, // hydra_brains.sizelogin @@ -3785,6 +3822,7 @@ bail("Could not allocate enough memory for target file data"); memset(servers_ptr, 0, sizeinfile + countservers + 8); fill_mem(servers_ptr, ifp, 0); + ifp = NULL; sizeservers = sizeinfile; tmpptr = servers_ptr; for (i = 0; i < countinfile; i++) { @@ -3948,6 +3986,11 @@ } if (proxy_count == 0) bail("proxy defined but not valid, exiting"); + // HYDRA_PROXY_HTTP is a forward proxy: it expects a request line. With a + // TLS target hydra would instead start a handshake on the proxy link. + if (use_proxy == 1 && hydra_options.ssl) + bail("HYDRA_PROXY_HTTP cannot be used with a TLS target, it is a plain " + "HTTP forward proxy. Use HYDRA_PROXY=connect://proxy:port instead."); } if (hydra_options.restore == 0) { @@ -4042,9 +4085,9 @@ char outfile_open_type[] = "a+"; if (hydra_options.outfile_format == FORMAT_JSONV1 && hydra_options.restore != 1) { outfile_open_type[0] = 'w'; - oflags = O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW; + oflags = O_RDWR | O_CREAT | O_TRUNC | O_NOFOLLOW; } else { - oflags = O_WRONLY | O_CREAT | O_APPEND | O_NOFOLLOW; + oflags = O_RDWR | O_CREAT | O_APPEND | O_NOFOLLOW; } ofd = open(hydra_options.outfile_ptr, oflags, 0600); if (ofd < 0 || (hydra_brains.ofp = fdopen(ofd, outfile_open_type)) == NULL) { @@ -4208,6 +4251,7 @@ hydra_service_init(i); starttime = elapsed_status = elapsed_restore = time(NULL); + sent_before = hydra_brains.sent; // baseline: tries carried over from a resumed (-R) session, so rate/ETA reflect the current run only (issue #824) fflush(stdout); fflush(stderr); fflush(hydra_brains.ofp); @@ -4490,10 +4534,11 @@ if (time(NULL) - elapsed_status > status_print) { elapsed_status = time(NULL); + cur_sent = hydra_brains.sent - sent_before; // tries done in the current run; on a resumed session the restored count (sent_before) must not inflate the rate (issue #824) tmp_time = elapsed_status - starttime; if (tmp_time < 1) tmp_time = 1; - tmp_time = hydra_brains.sent / tmp_time; + tmp_time = cur_sent / tmp_time; if (tmp_time < 1) tmp_time = 1; if (debug == 0) { @@ -4508,15 +4553,31 @@ for (j = 0; j < hydra_options.max_use; j++) if (hydra_heads[j]->active >= HEAD_UNUSED) k++; - printf("[STATUS] %.2f tries/min, %" hPRIu64 " tries in %02" hPRIu64 ":%02" hPRIu64 "h, %" hPRIu64 " to do in %02" hPRIu64 ":%02" hPRIu64 "h, %d active\n", - (1.0 * hydra_brains.sent) / (((elapsed_status - starttime) * 1.0) / 60), // tries/min - hydra_brains.sent, // tries - (uint64_t)((elapsed_status - starttime) / 3600), // hours - (uint64_t)(((elapsed_status - starttime) % 3600) / 60), // minutes - (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent != 0 ? (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent : 1, // left todo - (uint64_t)(((double)(hydra_brains.todo_all + total_redo_count) - hydra_brains.sent) / ((double)hydra_brains.sent / (elapsed_status - starttime))) / 3600, // hours - (((uint64_t)(((double)(hydra_brains.todo_all + total_redo_count) - hydra_brains.sent) / ((double)hydra_brains.sent / (elapsed_status - starttime))) % 3600) / 60) + 1, // min - k); + { + uint64_t todo_left = (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent; + char eta_buf[32]; + + if (todo_left == 0) + todo_left = 1; + + // without a completed attempt in this run there is no rate to base an ETA on + if (cur_sent > 0) { + double eta_secs = (double)todo_left / ((double)cur_sent / (elapsed_status - starttime)); + + snprintf(eta_buf, sizeof(eta_buf), "%02" hPRIu64 ":%02" hPRIu64 "h", (uint64_t)(eta_secs / 3600), ((uint64_t)eta_secs % 3600) / 60 + 1); + } else { + snprintf(eta_buf, sizeof(eta_buf), "--:--h"); + } + + printf("[STATUS] %.2f tries/min, %" hPRIu64 " tries in %02" hPRIu64 ":%02" hPRIu64 "h, %" hPRIu64 " to do in %s, %d active\n", + (1.0 * cur_sent) / (((elapsed_status - starttime) * 1.0) / 60), // tries/min (current run) + cur_sent, // tries (current run) + (uint64_t)((elapsed_status - starttime) / 3600), // hours + (uint64_t)(((elapsed_status - starttime) % 3600) / 60), // minutes + todo_left, // left todo (absolute, incl. resumed tries) + eta_buf, // eta + k); + } hydra_debug(0, "STATUS"); } @@ -4557,25 +4618,28 @@ printf(" found\n"); error += j; - k = 0; + // keep k as the target-derived count computed above: it is reported as a + // target count further down. The still-running worker heads are a separate + // quantity and get their own variable. + active_heads = 0; for (i = 0; i < hydra_options.max_use; i++) if (hydra_heads[i]->active == HEAD_ACTIVE) - k++; + active_heads++; - if (error == 0 && k == 0) { + if (error == 0 && active_heads == 0) { process_restore = 0; unlink(RESTOREFILE); } else { process_restore = 1; - if (hydra_options.cidr == 0 && k == 0) { + if (hydra_options.cidr == 0 && active_heads == 0) { printf("[INFO] Writing restore file because %d server scan%s could not " "be completed\n", j + error, j + error == 1 ? "" : "s"); hydra_restore_write(1); - } else if (k > 0) { + } else if (active_heads > 0) { printf("[WARNING] Writing restore file because %d final worker threads " "did not complete until end.\n", - k); + active_heads); hydra_restore_write(1); } process_restore = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/pw-inspector.c new/thc-hydra-9.9/pw-inspector.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/pw-inspector.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/pw-inspector.c 2026-11-27 11:30:52.000000000 +0100 @@ -139,28 +139,22 @@ buf[--l] = 0; } if (strlen(buf) >= minlen && strlen(buf) <= maxlen) { - i = 0; - j = 1; - for (i = 0; i < strlen(buf) && j; i++) { - j = 0; - if (set_low && islower(buf[i])) { - j = 1; + /* A set counts when the password contains at least one character from + * it. Characters outside the requested sets are allowed. */ + for (i = 0; i < strlen(buf); i++) { + if (islower(buf[i])) is_low = 1; - } else if (set_up && isupper(buf[i])) { - j = 1; + else if (isupper(buf[i])) is_up = 1; - } else if (set_no && isdigit(buf[i])) { - j = 1; + else if (isdigit(buf[i])) is_no = 1; - } else if (set_print && isprint(buf[i]) && !isalnum(buf[i])) { - j = 1; + else if (isprint(buf[i])) is_print = 1; - } else if (set_other && !isprint(buf[i])) { - j = 1; + else is_other = 1; - } } - if (j && countsets <= is_low + is_up + is_no + is_print + is_other) { + j = set_low * is_low + set_up * is_up + set_no * is_no + set_print * is_print + set_other * is_other; + if (j >= countsets) { fprintf(out, "%s\n", buf); count++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/sasl.c new/thc-hydra-9.9/sasl.c --- old/thc-hydra-bccaea140e3215aa9c9182da916ca9fb72696b63/sasl.c 2026-06-25 18:47:00.000000000 +0200 +++ new/thc-hydra-9.9/sasl.c 2026-11-27 11:30:52.000000000 +0100 @@ -491,7 +491,7 @@ else // others if (strstr(type, "rtsp") != NULL) - snprintf(buffer, 500, "DESCRIBE:%s://%s:%i", type, webtarget, port); + snprintf(buffer, 500, "DESCRIBE:%s://%s:%i%s", type, webtarget, port, miscptr ? miscptr : ""); else // others snprintf(buffer, 500, "AUTHENTICATE:%s/%s", type, realm); @@ -543,8 +543,8 @@ if (strstr(type, "rtsp") != NULL) { snprintf(result, 500, "username=\"%s\", realm=\"%s\", nonce=\"%s\", " - "uri=\"%s://%s:%i\", response=\"%s\"\r\n", - preplogin, realm, nonce, type, webtarget, port, buffer); + "uri=\"%s://%s:%i%s\", response=\"%s\"\r\n", + preplogin, realm, nonce, type, webtarget, port, miscptr ? miscptr : "", buffer); } else { if (use_proxy == 1 && proxy_authentication[selected_proxy] != NULL) snprintf(result, 500,
