starting point-mssql

when i put my passwors i get the following error…any solution to it?

root@kali:~/impacket# mssqlclient.py ARCHETYPE/sql_svc@10.10.10.27 -windows-auth
Impacket v0.9.22.dev1+20200416.91838.62162e0a - Copyright 2020 SecureAuth Corporation

Password:
Traceback (most recent call last):
File “/usr/local/bin/mssqlclient.py”, line 4, in
import(‘pkg_resources’).run_script(‘impacket==0.9.22.dev1+20200416.91838.62162e0a’, ‘mssqlclient.py’)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python2.7/dist-packages/pkg_resources/init.py”, line 1453, in run_script
exec(code, namespace, namespace)
File “/usr/local/lib/python2.7/dist-packages/impacket-0.9.22.dev1+20200416.91838.62162e0a-py2.7.egg/EGG-INFO/scripts/mssqlclient.py”, line 173, in
ms_sql.connect()
File “/usr/local/lib/python2.7/dist-packages/impacket-0.9.22.dev1+20200416.91838.62162e0a-py2.7.egg/impacket/tds.py”, line 532, in connect
sock.connect(sa)
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 113] No route to host

You probably made the same mistake I did. You downloaded Impacket, but did not install it. I was talking to @gnothiseauton in a separate thread, and this is what he mentioned to me. I did everything step by step as detailed below, and everything started to work.

I’ll leave you my installation notes of impacket on kali 2020.1b (if you already did parts of them, then just skip them):

** IMPACKET**
A collection of python classes for working with network protocols

INSTALL
• Needs: python pip
• “sudo apt install python3-venv python3-pip” - installs pip for python3
• go to ‘/opt’ folder
• (get git clone url from GitHub - fortra/impacket: Impacket is a collection of Python classes for working with network protocols.)
• “sudo git clone GitHub - fortra/impacket: Impacket is a collection of Python classes for working with network protocols.” - to clone
• “cd impacket” - to go into the directory
• “pip3 install .”

afterwards, go to the examples folder and run the command “python3 mssqlclient.py ARCHETYPE/sql_svc@10.10.10.27 -windows-auth”

Also: keep in mind, you just want to connect to an mssql server, and mssqlclient is just one of many ways, if this tool doesn’t work, challenge yourself to find another tool that doesn’t work. Always good to have alternate tools for the same job.

Either way, follow the exact descriptions I left you and you should be good to go. If it doesn’t work, let me know and I’ll see what I can do. Best of luck!

thank you so much it worked:)