Skip to content

Support Kerberos authentication over SSL#70

Merged
OscarAkaElvis merged 1 commit intoHackplayers:devfrom
birk0:feature/ssl-kerberos-support
Sep 26, 2025
Merged

Support Kerberos authentication over SSL#70
OscarAkaElvis merged 1 commit intoHackplayers:devfrom
birk0:feature/ssl-kerberos-support

Conversation

@birk0
Copy link
Copy Markdown
Contributor

@birk0 birk0 commented Sep 26, 2025

Currently v3.7 of evil-winrm does not support authentication over kerberos when using the -S (ssl) switch when the domain disallows NTLM authentication and forces SSL over port 5986.

evil-winrm -i dc.hades.htb -r hades.htb -u administrator -p 'Password1' -S

2025-09-26 13:02:37 +1000: Warning: User is not needed for Kerberos auth. Ticket will be used
2025-09-26 13:02:37 +1000: Warning: Password is not needed for Kerberos auth. Ticket will be used
2025-09-26 13:02:37 +1000: Error: An error of type ArgumentError happened, message is unknown type: 2916725146
2025-09-26 13:02:37 +1000: Error: Exiting with code 1

In addition omitting password & username, using only the ticket:
evil-winrm -i dc.hades.htb -r hades.htb -S

/var/lib/gems/3.0.0/gems/winrm-2.3.9/lib/winrm/connection_opts.rb:73:in `validate_required_fields': user is a required option (RuntimeError)

My solution when the -S switch is used:

  • If $pub_key and $priv_key are provided, certificate authentication is used (no change to existing behavior).
  • elseif $realm is specified and no certificate keys are provided, Kerberos authentication is attempted.
  • else the connection falls back to NTLM.

example using a valid kerberos ticket over SSL:

klist

Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: administrator@HADES.HTB

Valid starting Expires Service principal
26/09/25 12:40:34 26/09/25 22:40:34 krbtgt/HADES.HTB@HADES.HTB
renew until 27/09/25 12:40:29
26/09/25 12:40:37 26/09/25 22:40:34 HTTP/dc.hades.htb@HADES.HTB
renew until 27/09/25 12:40:29

evil-winrm -i dc.hades.htb -r hades.htb -S

image

@OscarAkaElvis OscarAkaElvis merged commit 69f1c86 into Hackplayers:dev Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants