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

evil-winrm and socks proxy wont work #728

Open
githubee opened this issue Jun 27, 2022 · 9 comments
Open

evil-winrm and socks proxy wont work #728

githubee opened this issue Jun 27, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@githubee
Copy link

githubee commented Jun 27, 2022

Describe the bug
Using sliver socks5 proxy and evil-winrm causes errors making it not usable. Using mtls transport

To Reproduce
Steps to reproduce the behavior:

  1. socks5 add
  2. proxychains evil-winrm
  3. HTTP/NTLM/... errors

Sample error message:

Error: An error of type WinRM::WinRMHTTPTransportError happened, message is Bad HTTP response returned from server. Body(if present): (400).
Error: Exiting with code 1

Expected behavior
Should work. Workaround is to use portfwd

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Win10
  • Version unknown

Additional context
Wireguard didnt work, so I dont know if mtls is the best transport option here.

When you say "⚠️ In-band SOCKS proxies can be a little unstable depending on protocol" - which protocol works best?

@moloch-- moloch-- added the bug Something isn't working label Jun 27, 2022
@moloch--
Copy link
Member

I think this is due to improper handling of packet fragmentation in our socks5 implementation but it's very tricky to troubleshoot.

@githubee
Copy link
Author

githubee commented Jun 27, 2022

portfwd works flawlessly, no idea if this information is useful to you

@moloch--
Copy link
Member

Yea the portfwd code we wrote from scratch, the socks5 is provided by a library (that we modified a little bit), suffice to say we just don't know the socks5 internal code as well.

@mrThe
Copy link
Contributor

mrThe commented Jun 28, 2022

Hi there, can confirm that rdp wont work over socks. I'll try to investigate it in a few days, hope will find something.

upd: unfortunately don't have any time to do investigate, but ill keeping this in mind

@githubee
Copy link
Author

maybe there is some managed code that could serve as a workaround? (running it using execute-assembly and portfwd)

@moloch--
Copy link
Member

Yea for that i think we need to get around to implementing rportfwd (which honestly shouldn't be too hard) first.

@realalexandergeorgiev
Copy link
Contributor

realalexandergeorgiev commented Jan 8, 2023

would be so good to have this.
bloodhound-python not working as well :(

@realalexandergeorgiev
Copy link
Contributor

Found this, maybe its useful https://github.com/Acebond/ReverseSocks5

@Lcys
Copy link

Lcys commented Jun 27, 2023

When the data packet is too large, it will be split into multiple data packets, and when they arrive at the implant end, the order is inconsistent, causing some protocol interactions to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants