Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntlmrelayx: support upn format + oem encoding #1833

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rtpt-alexanderneumann
Copy link
Contributor

@rtpt-alexanderneumann rtpt-alexanderneumann commented Oct 11, 2024

This is a followup PR for #1316 (since @rtpt-lucasvater leaves the company) and I'm taking over for him. Original text:

As described in #1315, ntlmrelayx.py in SOCKS-mode currently does not work together with usernames in UPN format.

This pull request converts usernames in UPN formats (user1@domain) to a format compatible with Impacket (domain/user1), before they are added to the active SOCKS connections.

While implementing this, I noticed that if NTLM is negotiated using OEM encoding instead of Unicode (NTLMSSP_NEGOTIATE_OEM), the username is currently encoded wrongfully using ASCII-encoding. This fails when certain characters are used in usernames (umlauts like ä,ü,ö for example). I changed the encoding to use the most used Windows codepage in this case.

Fixes #1315

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.

ntlmrelayx.py UPN usernames support
1 participant