mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-14 02:27:31 -07:00
smb req signing check
This commit is contained in:
parent
15e534fbbf
commit
cea00533ea
2 changed files with 9 additions and 2 deletions
2
CHANGES
2
CHANGES
|
@ -2,7 +2,7 @@ Changelog for hydra
|
|||
-------------------
|
||||
|
||||
Release 8.6-dev
|
||||
* smb module now checks if SMBv1 is supported by the server
|
||||
* smb module now checks if SMBv1 is supported by the server and now signing is required
|
||||
* http-form module now supports URLs up to 6000 bytes (thanks to petrock6@github for the patch)
|
||||
* Fix for SSL connections that failed with error:00000000:lib(0):func(0):reason(0) (thanks gaia@github for reporting)
|
||||
* Added new command line option:
|
||||
|
|
|
@ -1480,7 +1480,7 @@ int32_t service_smb_init(char *ip, int32_t sp, unsigned char options, char *misc
|
|||
ctime = time(NULL);
|
||||
do {
|
||||
usleepn(300);
|
||||
} while ((ready = hydra_data_ready(sock)) <= 0 && ctime + 5 < time(NULL));
|
||||
} while ((ready = hydra_data_ready(sock)) <= 0 && ctime + 5 <= time(NULL));
|
||||
|
||||
if (ready <= 0) {
|
||||
fprintf(stderr, "[ERROR] no reply from target smb://%s:%d/\n", hostname, port);
|
||||
|
@ -1491,12 +1491,19 @@ int32_t service_smb_init(char *ip, int32_t sp, unsigned char options, char *misc
|
|||
fprintf(stderr, "[ERROR] invalid reply from target smb://%s:%d/\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(sock);
|
||||
|
||||
if (buf[37] == buf[38] && buf[38] == 0xff) {
|
||||
fprintf(stderr, "[ERROR] target smb://%s:%d/ does not support SMBv1\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (buf[15] & 16 == 16) {
|
||||
fprintf(stderr, "[ERROR] target smb://%s:%d/ requires signing which we do not support\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue