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

--disable-multi parameter #824

Closed
wants to merge 2 commits into from
Closed

--disable-multi parameter #824

wants to merge 2 commits into from

Conversation

Hackndo
Copy link
Contributor

@Hackndo Hackndo commented Apr 14, 2020

Context

As explained in issue #794, newer versions of Windows disable SMB guest authentication by default.

https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser

Since guest access is disabled by default, the server doesn't open an SMB session after authentication, and thus does not request a tree ID.
It means the first authentication (not relayed because of multi-target feature) will be discarded, and the STATUS_NETWORK_SESSION_EXPIRED will never be sent because the client never requested a Tree.

Older versions of impacket directly relayed the 1st authentication, so it worked because from the client's point of view, this was an authenticated access.

Fix

This PR adds a --disable-multi parameter to ntlmrelayx so that it relays the 1st received authentication, like it did before.

Example

Here's a simple example in my lab.

disable-multi

Note

As I said to @asolino already, I don't have the full picture. It may be incomplete, as it may break some existing features/constraints I'm not aware of.

@mohemiv
Copy link
Contributor

mohemiv commented Apr 17, 2020

I also have a problem with it, but I relay Unix Samba / smbclient.py. I might suggest not just relay the connection, but detect the SMB client version and use the implemented multi-relay only when applicable.

@Hackndo
Copy link
Contributor Author

Hackndo commented Apr 28, 2020

Fixed in 9f69ffa

@Hackndo Hackndo closed this Apr 28, 2020
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