Starting Point mssqlserver

Type your comment> @q8cloud said:

i am stuck at this point

python3 mssqlclient.py ARCHETYPE\sql_svc@10.10.10.27 -windows-auth
Impacket v0.9.22.dev1 - Copyright 2020 SecureAuth Corporation

Password:
[*] Encryption required, switching to TLS
[-] ERROR(ARCHETYPE): Line 1: Login failed for user ‘ARCHETYPE\Guest’.

solved using following
python3 mssqlclient.py ARCHETYPE/sql_svc:M3g4c0rp123@10.10.10.27 -windows-auth -debug

Type your comment> @tasidonya said:

If you clone the git repo, the mssqlclient.py is in impacket/examples/, so you may need to tweak the command to reflect the correct path, e.g. instead of mssqlclient.py you write impacket/examples/mssqlclient.py. A helpful linux command could be

 locate mssqlclient.py

and copying the full path from there.

Also, you may need to run it with python3, i.e.

python3 mssqlclient.py ARCHETYPE/sql_svc@10.10.10.27 -windows-auth

Which has worked for me

@tasidonya
i tried using Python3 & this is the result. may be the alternatives didn’t worked for me, i switched frm 2.7 to 3.7. Please help!
Traceback (most recent call last):
File “mssqlclient.py”, line 25, in
from impacket import version, tds
File “/usr/lib/python3/dist-packages/impacket/tds.py”, line 35, in
from OpenSSL import SSL
File “/usr/lib/python3/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/crypto.py”, line 12, in
from cryptography import x509
File “/usr/lib/python3/dist-packages/cryptography/x509/init.py”, line 8, in
from cryptography.x509.base import (
File “/usr/lib/python3/dist-packages/cryptography/x509/base.py”, line 18, in
from cryptography.x509.extensions import Extension, ExtensionType
File “/usr/lib/python3/dist-packages/cryptography/x509/extensions.py”, line 20, in
from cryptography.hazmat.primitives import constant_time, serialization
File “/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/constant_time.py”, line 11, in
from cryptography.hazmat.bindings._constant_time import lib
ModuleNotFoundError: No module named ‘_cffi_backend’

Type your comment> @deepakmunda26 said:

@tasidonya
i tried using Python3 & this is the result. may be the alternatives didn’t worked for me, i switched frm 2.7 to 3.7. Please help!
Traceback (most recent call last):
File “mssqlclient.py”, line 25, in
from impacket import version, tds
File “/usr/lib/python3/dist-packages/impacket/tds.py”, line 35, in
from OpenSSL import SSL
File “/usr/lib/python3/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/crypto.py”, line 12, in
from cryptography import x509
File “/usr/lib/python3/dist-packages/cryptography/x509/init.py”, line 8, in
from cryptography.x509.base import (
File “/usr/lib/python3/dist-packages/cryptography/x509/base.py”, line 18, in
from cryptography.x509.extensions import Extension, ExtensionType
File “/usr/lib/python3/dist-packages/cryptography/x509/extensions.py”, line 20, in
from cryptography.hazmat.primitives import constant_time, serialization
File “/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/constant_time.py”, line 11, in
from cryptography.hazmat.bindings._constant_time import lib
ModuleNotFoundError: No module named ‘_cffi_backend’

Try running the following command:

python3 -m pip install cffi

And then run your thing again. Post here how it goes!

done with the python3 & guess what i got 2 flag. I can’t even imagine that i did this…but really happy with it. One more thing, is it necessary to vote the machine after collecting flag in order to reset it.

@deepakmunda26 said:
done with the python3 & guess what i got 2 flag. I can’t even imagine that i did this…but really happy with it. One more thing, is it necessary to vote the machine after collecting flag in order to reset it.

@tasidonya said:
Type your comment> @deepakmunda26 said:

@tasidonya
i tried using Python3 & this is the result. may be the alternatives didn’t worked for me, i switched frm 2.7 to 3.7. Please help!
Traceback (most recent call last):
File “mssqlclient.py”, line 25, in
from impacket import version, tds
File “/usr/lib/python3/dist-packages/impacket/tds.py”, line 35, in
from OpenSSL import SSL
File “/usr/lib/python3/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/crypto.py”, line 12, in
from cryptography import x509
File “/usr/lib/python3/dist-packages/cryptography/x509/init.py”, line 8, in
from cryptography.x509.base import (
File “/usr/lib/python3/dist-packages/cryptography/x509/base.py”, line 18, in
from cryptography.x509.extensions import Extension, ExtensionType
File “/usr/lib/python3/dist-packages/cryptography/x509/extensions.py”, line 20, in
from cryptography.hazmat.primitives import constant_time, serialization
File “/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/constant_time.py”, line 11, in
from cryptography.hazmat.bindings._constant_time import lib
ModuleNotFoundError: No module named ‘_cffi_backend’

Try running the following command:

python3 -m pip install cffi

And then run your thing again. Post here how it goes!

@tasidonya said:
Type your comment> @deepakmunda26 said:

@tasidonya
i tried using Python3 & this is the result. may be the alternatives didn’t worked for me, i switched frm 2.7 to 3.7. Please help!
Traceback (most recent call last):
File “mssqlclient.py”, line 25, in
from impacket import version, tds
File “/usr/lib/python3/dist-packages/impacket/tds.py”, line 35, in
from OpenSSL import SSL
File “/usr/lib/python3/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/crypto.py”, line 12, in
from cryptography import x509
File “/usr/lib/python3/dist-packages/cryptography/x509/init.py”, line 8, in
from cryptography.x509.base import (
File “/usr/lib/python3/dist-packages/cryptography/x509/base.py”, line 18, in
from cryptography.x509.extensions import Extension, ExtensionType
File “/usr/lib/python3/dist-packages/cryptography/x509/extensions.py”, line 20, in
from cryptography.hazmat.primitives import constant_time, serialization
File “/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/constant_time.py”, line 11, in
from cryptography.hazmat.bindings._constant_time import lib
ModuleNotFoundError: No module named ‘_cffi_backend’

Try running the following command:

python3 -m pip install cffi

And then run your thing again. Post here how it goes!

@deepakmunda26 said:
done with the python3 & guess what i got 2 flag. I can’t even imagine that i did this…but really happy with it.

Well done! :smiley:

@deepakmunda26 said:
One more thing, is it necessary to vote the machine after collecting flag in order to reset it.

This is the first time I hear about voting reset after you’re done, I thought it’s just for the cases when the machine is behaving oddly. I would be curious to know too if this is etiquette to vote reset after you’re done?

I ran the below command and the said path but getting error. can you please help me with that
Command-
python3 mssqlclient.py ARCHETYPE/sql_svc@10.10.10.27 -windows-auth

Error-
Traceback (most recent call last):
File “mssqlclient.py”, line 24, in
from impacket.examples import logger
ModuleNotFoundError: No module named ‘impacket’

Type your comment> @Tunes90 said:

I had the same issue with with it asking for a password. Can i get some help?

What was the password cause I also don’t know it.

Does anyone have the password to
“python3 mssqlclient.py ARCHETYPE/sql_svc@10.10.10.27 -windows-auth”

the pasword is found in previous step you did

can somebody help me i have problem when i run command sudo nc -lvnp 443 it types listening on any 443 port

@GHOSTanonymus said:

can somebody help me i have problem when i run command sudo nc -lvnp 443 it types listening on any 443 port

That is literally the output you get when it works.

Your netcat listener is working.

I have a question on this step. It is my first time I have to use mssql client. At the beginning I installed mssql-cli via pip3. But the credential didn’t work. crackmapexec confirm they were ok. At the end I switch to impacket version and it works. But I wonder what’s wrong on my first choice. Maybe did I miss a parameter?

thank you

No dont install mss just run it with python3