Skip to content

Brakertech

 
  • Pentesting
  • Our Services
  • About

Howto: Fix Login failed for user ‘td’

Steve Stonebraker
July 20, 2010

[Mercury][SQLServer JDBC Driver][SQLServer]Login failed for user ‘td’

Basically this error means that the password that quality center is trying to use for user ‘td’ in your MSSQL database doesn’t match whatever is in the database.

How did I fix this?

I installed Wireshark and captured the traffic on the server that Quality Center was installed on.

  • Use filter tcp.port eq 1433
  • Find the packet with description TDS7/8 Login Packet
  • Scroll down in packet details until you see login and password

How does it all work?
From: http://www.securiteam.com/tools/6Q00I0UEUM.html

Microsoft SQL Server supports two kinds of authentication:
1) Windows Authentication
2) SQL Server Authentication

SQL Server Authentication is still supported for backward compatibility. SQL Server Authentication is the weaker among the two. In SQL Server Authentication, usernames are sent in the clear, whereas passwords are encrypted using a very simple algorithm. The username and password used for this example is sa/password.

The algorithm to encrypt the password is simply to expand every byte of the password to 2 bytes, swap the higher and lower 4 bits within each byte, xor each byte with A5. For example to encrypt the character "p":

(ASCII is 70 hex):
70 is expanded to 70 00
After the swap the result is: 07 00
XOR with A5: A2 A5

Hence to decrypt it, we will take the odd bytes, XOR with A5, and swap the higher and lower 4 bits.
Take A2
XOR with A5: A2 XOR A5 = 07
Swap: 7 becomes 70.

Hex to ascii converter: http://www.dolcevie.com/js/converter.html

Tags: 9.0, failed, failed for user 'td', failed for user 'td' qc, failed for user 'td' quality center, hack sql password, Howto, login, quality center, SQL Server Authentication, SQL Server Authentication hacking, SQL Server Authentication sniffing, td, TDS7/8 Login Packet

Post navigation

IPSEC Packets vs Regular packets, the hard facts
Howto: Sync time with Active Directory Domain Controller

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Category

  • AWS
  • games
  • Hardware
  • Malware
  • O/S
    • C
    • FreeBSD
    • Linux
      • Kali
      • nginx
      • Redhat Centos
      • Server Setup
      • Ubuntu
    • Mac
      • Howto
    • Windows
      • Active Directory
      • Applications
      • IIS
      • powershell
  • OSCP
  • Other
    • Apache
    • neo4j
    • Teamsite
    • Tomcat
    • Websphere
  • Papers
  • Pentesting
    • Discovery
  • php
  • Podcast
  • Scripts
    • bash
    • c#
    • Mongo
    • MSSQL
    • MYSQL
    • Oracle
    • perl
    • powershell
    • python
  • Security
    • Defense
      • Blue Team
      • IDS
    • Forensics
    • Hacking
      • Tools
    • Offense
  • Software
    • Jenkins-Hudson
  • Uncategorized
  • Wordpress
    • Admin
    • Plugins

Archives

  • May 2022
  • March 2022
  • December 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • February 2021
  • December 2020
  • November 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • June 2018
  • May 2018
  • January 2018
  • February 2017
  • August 2015
  • March 2015
  • January 2015
  • August 2014
  • June 2014
  • March 2014
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010

Meta

  • Log in
Brakertech LLC

Contact Us