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

socket.gaierror: [Errno -2] Name or service not known #2

Closed
mpgn opened this issue Sep 15, 2020 · 2 comments
Closed

socket.gaierror: [Errno -2] Name or service not known #2

mpgn opened this issue Sep 15, 2020 · 2 comments

Comments

@mpgn
Copy link

mpgn commented Sep 15, 2020

When running the restorepassword.py script I have this error socket.gaierror: [Errno -2] Name or service not known

⋊> ~/T/CVE-2020-1472 on master ⨯ python3 cve-2020-1472-exploit.py WIN-NP8JD7IHCC5 192.168.0.104                                                  10:12:29
Performing authentication attempts...
==========================================================================================================================
Target vulnerable, changing account password to empty string

Result: 0

Exploit complete!



⋊> ~/T/CVE-2020-1472 on master ⨯ python3 restorepassword.py poudlard.wizard/WIN-NP8JD7IHCC5@WIN-NP8JD7IHCC5 -hexpass xxxxxx
Impacket v0.9.22.dev1+20200914.162022.81d44893 - Copyright 2020 SecureAuth Corporation
 
Impacket v0.9.22.dev1+20200914.162022.81d44893 - Copyright 2020 SecureAuth Corporation

 

Traceback (most recent call last):
  File "restorepassword.py", line 150, in <module>
    action.dump(remoteName, options.target_ip)
  File "restorepassword.py", line 48, in dump
    stringbinding = epm.hept_map(remoteName, nrpc.MSRPC_UUID_NRPC, protocol = 'ncacn_ip_tcp')
  File "/usr/local/lib/python3.8/dist-packages/impacket/dcerpc/v5/epm.py", line 1256, in hept_map
    dce.connect()
  File "/usr/local/lib/python3.8/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 801, in connect
    return self._transport.connect()
  File "/usr/local/lib/python3.8/dist-packages/impacket/dcerpc/v5/transport.py", line 342, in connect
    af, socktype, proto, canonname, sa = socket.getaddrinfo(self.getRemoteHost(), self.get_dport(), 0, socket.SOCK_STREAM)[0]
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
mpgn added a commit to mpgn/CVE-2020-1472 that referenced this issue Sep 15, 2020
little fix
@mpgn mpgn changed the title NRPC SessionError: code: 0xc0000122 - STATUS_INVALID_COMPUTER_NAME socket.gaierror: [Errno -2] Name or service not known Sep 15, 2020
@dirkjanm
Copy link
Owner

i think this was fixed in 207197b (I hadn't seen your issue/PR yet at that point)

@mpgn
Copy link
Author

mpgn commented Sep 15, 2020

ah ok :)

@mpgn mpgn closed this as completed Sep 15, 2020
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

2 participants