From 4e45f85fbbfd2dda8da663beae603308751a0b03 Mon Sep 17 00:00:00 2001 From: Karim Kanso Date: Wed, 8 Apr 2020 21:32:48 +0100 Subject: [PATCH] improved compatibility when null sessions fail --- hydra-smb2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hydra-smb2.c b/hydra-smb2.c index c603d63..a09490d 100644 --- a/hydra-smb2.c +++ b/hydra-smb2.c @@ -131,6 +131,14 @@ bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) { smbc_free_context(ctx, 1); return true; break; + case EPERM: + // Probably this means access denied inspite of mention above + // about being related to wrong workgroup. I have observed + // libsmbclient emitting this when connecting to a vanilla install + // of Windows 2019 server (non-domain) with wrong credentials. It + // appears related to a fallback null session being rejected after + // the library tries with provided credentials. If the null + // session is accepted, EACCES is returned. case EACCES: // 100% access denied break;