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

[dcomrt.py] RPC connect timeout shouldn't be hard-coding #1600

Open
XiaoliChan opened this issue Aug 16, 2023 · 9 comments
Open

[dcomrt.py] RPC connect timeout shouldn't be hard-coding #1600

XiaoliChan opened this issue Aug 16, 2023 · 9 comments
Assignees
Labels
in review This issue or pull request is being analyzed

Comments

@XiaoliChan
Copy link
Contributor

XiaoliChan commented Aug 16, 2023

Configuration

impacket version: latest
Python version: 3.11.4
Target OS: Kali Linux latest

Debug Output With Command String

The timeout shouldn't be hard-coding

dcomInterface.set_connect_timeout(300)

If the stringbinding address is inaccessible, then it will be hanging a long time in wmiexec.py.

@anadrianmanrique
Copy link
Contributor

Hi, this doesn't seem to be an issue per se. I think it might be better to have some kind of PR in order to review/understand your necessities. Could you please send a PR instead? so we can explore which option would be the best? Thanks

@XiaoliChan
Copy link
Contributor Author

XiaoliChan commented Aug 31, 2023

@anadrianmanrique Thanks for your reply, I tried to make a PR about that, But it is really hard for me.

l can tell you why, because in some cases if the firewall blocks the port of stringbinding like ncacn_ip_tcp:192.168.1.1[49666], it will be hanging until timeout (takes a long time).

Shouldn't hard-coding that timeout threshold, need something like dcom.set_timeout()

@XiaoliChan
Copy link
Contributor Author

It always happens in wmiexec.py dcomexec.py if the target has enabled firewall.

@XiaoliChan
Copy link
Contributor Author

Reference:

@XiaoliChan
Copy link
Contributor Author

@anadrianmanrique Maybe the PR like this mpgn#1

@ilija-lazoroski
Copy link

I can confirm that this is an issue if the firewall doesn't allow DCOM connection. I can make the PR if @XiaoliChan doesn't mind.

@XiaoliChan
Copy link
Contributor Author

@ilija-lazoroski Sure!

@gabrielg5
Copy link
Collaborator

Duplicated with #1454 ?

@XiaoliChan
Copy link
Contributor Author

Duplicated with #1454 ?

Seems to be yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review This issue or pull request is being analyzed
Projects
None yet
Development

No branches or pull requests

5 participants