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

WMI exploiter doesn't work on machines behind NAT #1

Open
cakekoa opened this issue Aug 1, 2024 · 0 comments
Open

WMI exploiter doesn't work on machines behind NAT #1

cakekoa opened this issue Aug 1, 2024 · 0 comments

Comments

@cakekoa
Copy link
Contributor

cakekoa commented Aug 1, 2024

Migrated from guardicore/monkey#675

Describe the bug

WMI exploiter doesn't exploit machines behind NAT

To Reproduce

  1. Try to exploit WMI machine on GCP from local machine
  2. WMI exploiter throws an error

Expected behavior

WMI should exploit the machine behind NAT. This can be achieved in the following way:

  1. Fork impacket repository
  2. In file \impacket\dcerpc\v5\dcomrt.py:1266 change the code
if stringBinding is None:
    # Something wen't wrong, let's just report it
    raise Exception('Can\'t find a valid stringBinding to connect')

to

if stringBinding is None:
    stringBinding = 'ncacn_ip_tcp:%s%s' % (self.get_target(), bindingPort)

as outlined here

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

No branches or pull requests

1 participant