Search code examples
sql-serverdelphiencryptionsql-server-2000decompiling

Access old SQL Server 2000 database locked for one user


I have an old Delphi application which uses SQL Server 2000 Developer edition, with no Windows authentication access and no sa user, only one user at the server, the appuser, only the application can access the server and the database using this user and password.

I've tried to add the local admin to the server using sqlcm (starting SQL Server in single user mode), but it's not supported in SQL Server 2000.

The connection string is encrypted in setting.ini file

I'm looking for anyway to decrypt the connection string or add the Windows admin user to SQL Server as admin

I want to attach another db to the same server without interrupting the delphi application


Solution

  • This article describes how to get a password of any active session in a windows 2000 instance by sifting though a dump file of the sqlservr.exe process.

    In general you:

    1. Download this process dump utility from Microsoft Sysinternals called ProcDump v9.0
    2. Log on as local admin and open a command prompt
    3. Execute this command: procdump -ma sqlservr.exe

    4. Download Strings

    5. Find the generated .dmp file in the procdump folder and rename it to file.dmp then Execute this command: strings file.dmp > dump.txt

    6. Open dump.txt with notepad and search for the hostname concatenated with the username. You should find the password immediately following that string.