Starting Point: Login failed for user 'ARCHETYPE\Guest'.

Hello everyone
I'can't connect to sqlserver with mssqlserver.py , when i try with password M3g4c0rp123 and username ARCHETYPE\sql_svc i obtain : Login failed for user 'ARCHETYPE\Guest'.

Pls Help me :smile:

Tagged:

Comments

  • Sounds like you must not be specifying the username correctly if it is trying to authenticate you as Guest. Can you post the full command you're running?

  • Type your comment> @VbScrub said:

    Sounds like you must not be specifying the username correctly if it is trying to authenticate you as Guest. Can you post the full command you're running?

    mssqlclient.py ARCHETYPE\[email protected] -windows-auth

  • Looks like maybe there's some issue with specifying the domain/machine name at the start from Linux: https://github.com/SecureAuthCorp/impacket/issues/613

    Try just mssqlclient.py [email protected] -windows-auth instead and see if that works for you

  • Type your comment> @VbScrub said:

    Looks like maybe there's some issue with specifying the domain/machine name at the start from Linux: https://github.com/SecureAuthCorp/impacket/issues/613

    Try just mssqlclient.py [email protected] -windows-auth instead and see if that works for you

    Thanks that works !!

  • Glad to hear that :)

    FYI all I did was google "impacket mssqlclient windows auth" or something like that, and that was the second result. You'll have to get used to googling stuff like this if you want to get far on here :wink:

  • Type your comment> @VbScrub said:

    Glad to hear that :)

    FYI all I did was google "impacket mssqlclient windows auth" or something like that, and that was the second result. You'll have to get used to googling stuff like this if you want to get far on here :wink:

    Okay I note !! :smiley:

  • Type your comment> @VbScrub said:

    Looks like maybe there's some issue with specifying the domain/machine name at the start from Linux: https://github.com/SecureAuthCorp/impacket/issues/613

    Try just mssqlclient.py [email protected] -windows-auth instead and see if that works for you

    i tried this and the original command but im getting this once i login

    [*] Encryption required, switching to TLS
    [-] [('SSL routines', 'state_machine', 'internal error')]

    Please help

  • solo tiene que cambiar \ por /
    mssqlclient.py ARCHETYPE/[email protected] -windows-auth

  • @squirrelcop said:

    [*] Encryption required, switching to TLS
    [-] [('SSL routines', 'state_machine', 'internal error')]

    You're probably not trying to do this anymore but I found a solution and wanted to share in case it helps anybody else:

    According to https://github.com/SecureAuthCorp/impacket/issues/856 it's an impacket error on certain versions. You'll have to modify impacket/tds.py

    diff --git a/impacket/tds.py b/impacket/tds.py
    index a24333d4..675ef822 100644
    --- a/impacket/tds.py
    +++ b/impacket/tds.py
    @ class MSSQL:
    LOG.info("Encryption required, switching to TLS")

             # Switching to TLS now
    
    • ctx = SSL.Context(SSL.TLSv1_METHOD)
    • ctx = SSL.Context(SSL.TLSv1_2_METHOD)
      ctx.set_cipher_list('RC4, AES256')
      tls = SSL.Connection(ctx,None)
      tls.set_connect_state()
    •      while True:
               try:
                   tls.do_handshake()
      

      @ class MSSQL:
      LOG.info("Encryption required, switching to TLS")

           # Switching to TLS now
      
    •      ctx = SSL.Context(SSL.TLSv1_METHOD)
      
    • ctx = SSL.Context(SSL.TLSv1_2_METHOD)
      ctx.set_cipher_list('RC4, AES256')
      tls = SSL.Connection(ctx,None)
Sign In to comment.