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

Incorporate Pennyw0rth/NetExec Impacket changes into Fortra Impacket (reloaded) #1721

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

mpgn
Copy link
Contributor

@mpgn mpgn commented Mar 21, 2024

Fixing all the issues with PR #1715

NetExec is attempting to get added to Kali Linux as a default package, but we currently have several changes in our Impacket fork that are required to be merged into upstream.

The GKDI stuff has been used for almost a year now with no problems, and @XiaoliChan recently had some other changes merged related to NetExec changes. I just filed #1714 as well to revert some breaking changes that we require.

This is necessary because we do not want to have another impacket Kali package deployed, as that causes confusion, and we're not even sure if Kali would want that. The easiest way is to have our changes merged into upstream.

Please let me know if there are any issues testing these changes.

@NeffIsBack
Copy link
Contributor

Cleanly cherry-picked the commits that matter, nice work👌🏼
If these are merged we should be ready to go for kali packaging.

@Marshall-Hallenbeck
Copy link
Contributor

@mpgn can you remove f90196b from this PR? @XiaoliChan and I spoke and we think it should be removed since it's hardcoding a timeout and using a global variable. He has let me know it won't break anything (we can test, of course).

@mpgn
Copy link
Contributor Author

mpgn commented Mar 22, 2024

set_connect_timeout is used a lot on nxc with a custom timeout, example: https://github.com/Pennyw0rth/NetExec/blob/main/nxc/connection.py#L71

Removing the commit will break nxc from what I see

@XiaoliChan
Copy link
Contributor

XiaoliChan commented Mar 23, 2024

set_connect_timeout is used a lot on nxc with a custom timeout, example: https://github.com/Pennyw0rth/NetExec/blob/main/nxc/connection.py#L71

Removing the commit will break nxc from what I see

Oh, that is rpctransport, the set_connect_timeout I added is like dcom.set_connect_timeout, not rpctransport

I can confirm it didn’t used in NXC currently (because it is not pretty much stable as dcom_firewallChecker)

@mpgn
Copy link
Contributor Author

mpgn commented Mar 23, 2024

Should be good @Marshall-Hallenbeck :)

@anadrianmanrique
Copy link
Contributor

Hello, I'll be reviewing/testing this PR changes.
Some comments/questions:

@mpgn
Copy link
Contributor Author

mpgn commented Mar 26, 2024

Hello @anadrianmanrique if you fix the problem of LM computing hash in another PR, i will remove the commit on this PR 😉

@anadrianmanrique anadrianmanrique self-assigned this Mar 26, 2024
@anadrianmanrique anadrianmanrique added the medium Medium priority item label Mar 26, 2024
@anadrianmanrique
Copy link
Contributor

Hello @anadrianmanrique if you fix the problem of LM computing hash in another PR, i will remove the commit on this PR 😉

created at #1723

@Marshall-Hallenbeck
Copy link
Contributor

So from my understanding of the spec, impacket defaults to NULL, which is just the localhost, but we need to define a DNS/NetBios name per: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-srvs/5f8329ee-1965-4ea1-ad35-3b29fbb63232

I'm surprised this hasn't caused more issues, actually, since I would think it would only allow connecting to the localhost.

@anadrianmanrique
Copy link
Contributor

So from my understanding of the spec, impacket defaults to NULL, which is just the localhost, but we need to define a DNS/NetBios name per: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-srvs/5f8329ee-1965-4ea1-ad35-3b29fbb63232

I'm surprised this hasn't caused more issues, actually, since I would think it would only allow connecting to the localhost.

Ok, what I'm trying to do is to replicate and trigger the bug condition. I haven't been able to do it yet. That's why I asked for any tip/help with that. In the worst case I'll merge that after sucessfully regresioning the changes

@Marshall-Hallenbeck
Copy link
Contributor

Hmm yeah sorry I don't have a specific retestable scenario. @NeffIsBack did you?

@anadrianmanrique
Copy link
Contributor

Hello @anadrianmanrique if you fix the problem of LM computing hash in another PR, i will remove the commit on this PR 😉

wether the problem gets fixed or not, this PR will not be approved/merged, as long as it contains changes from #1626, so please remove that commit. In this moment #1723 it's being tested and problably merged today/tomorrow ;)

@mpgn
Copy link
Contributor Author

mpgn commented Mar 27, 2024

Hello @anadrianmanrique if you fix the problem of LM computing hash in another PR, i will remove the commit on this PR 😉

wether the problem gets fixed or not, this PR will not be approved/merged, as long as it contains changes from #1626, so please remove that commit. In this moment #1723 it's being tested and problably merged today/tomorrow ;)

I will do it tonight 👍

@mpgn
Copy link
Contributor Author

mpgn commented Mar 27, 2024

done @anadrianmanrique :)

@anadrianmanrique
Copy link
Contributor

Ok, thanks, PR is ready to merge then!

@anadrianmanrique anadrianmanrique merged commit cc2c2e1 into fortra:master Mar 27, 2024
9 checks passed
@anadrianmanrique
Copy link
Contributor

Merged changes from #947 here, as the original PR needs to be rebased.

@anadrianmanrique
Copy link
Contributor

Thank you guys! Let us now in comments if you find in the future PRs that you'll need integrated, in order to allow us to improve our prioritization.

@mpgn
Copy link
Contributor Author

mpgn commented Mar 27, 2024

Thank you @anadrianmanrique !

@anadrianmanrique
Copy link
Contributor

FYI #1723 was merged as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Medium priority item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants