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 #675

Closed
VakarisZ opened this issue Jun 3, 2020 · 1 comment
Closed

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

VakarisZ opened this issue Jun 3, 2020 · 1 comment
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: Medium

Comments

@VakarisZ
Copy link
Contributor

VakarisZ commented Jun 3, 2020

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
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Complexity: Medium Impact: Medium
Projects
None yet
Development

No branches or pull requests

2 participants