[TOOL] dSQLSRVD, SQL Server SysComments Decryptor

From: support@securiteam.com
Date: 12/23/01


From: support@securiteam.com
To: list@securiteam.com
Date: Sun, 23 Dec 2001 05:14:45 +0100 (CET)

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -

  dSQLSRVD, SQL Server SysComments Decryptor
------------------------------------------------------------------------

DETAILS

 <http://www.geocities.com/d0mn4r/dSQLSRVD.html> dSQLSRVD - dOMNAR's SQL
Server SysComments Decryptor - has been designed to assist developers and
administrators of SQL Server 7 and 2000 with examining stored procedures,
triggers, views and user-defined functions, in order to gain better
insight into 3rd party applications and their database functionality. Such
a task is often necessary when integrating a new system with a company's
existing systems, or when optimizing a database server's performance.

Unfortunately, some companies insist on using the "With Encryption" clause
in their T-SQL-code, which prevents the use of sp_helptext, the stored
procedure normally used to extract the stored T-SQL-definition from the
syscomments system-table. Why they do this is a puzzle, since encrypting
something that can be decrypted without user interaction (i.e., entering
of a password) isn't anything else than the infamous security by
obscurity. Such "security" can always be broken in short time (speaking in
cryptological terms), and offers no real security, which this utility is a
proof of. It should be pointed out that Microsoft does not use the
encryption clause for any of its own code accompanying SQL Server.

SQL Server encryption notes:
For SQL Server 7 you will only need an account with read-access on the
syscomments table, which is the default. The encryption algorithm uses a
static key for all encrypted entries.

In SQL Server 2000, Microsoft improved the encryption somewhat, so that it
is now impossible for accounts that are not members of the SysAdmin role
to decrypt syscomments entries. This is because they changed the
encryption algorithm to use dynamically calculated keys based on certain
database specific information that can only be read by SysAdmins. Because
of the algorithms used, brute forcing would not be a feasible solution.

ADDITIONAL INFORMATION

The tool can be downloaded from:
 <http://www.geocities.com/d0mn4r/dSQLSRVD.html>
http://www.geocities.com/d0mn4r/dSQLSRVD.html

The information has been provided by dOMNAR.

========================================

This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

====================
====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • Re: SQL or Access DB
    ... As far as encryption goes though... ... with Sql Server you can use SQL DMO and encrypt your stored procedures ... installation - Security was absolutely critical and in most instances, ... > then we create a nice gui around this database and sell it to automotive ...
    (microsoft.public.dotnet.languages.vb)
  • CryptoSurvey -- Results ..
    ... Many same or similar behavioral barriers for the ... effective utilization of many security solutions still exist limiting ... applications of encryption technologies currently in commercial ... Many people do not care about cryptography and/or security products ...
    (sci.crypt)
  • CryptoSurvey -- Results ..
    ... Many same or similar behavioral barriers for the ... effective utilization of many security solutions still exist limiting ... applications of encryption technologies currently in commercial ... Many people do not care about cryptography and/or security products ...
    (sci.crypt)
  • Re: Cryptography in SQL Server 2000
    ... A company is vulnerable when its security ... > database encryption solution with protected key-management software ... > tested by the SQL Server Test Lab. ...
    (microsoft.public.sqlserver.security)
  • Re: Protecting database from administrators
    ... >> there is no encryption while at rest it must still be secure. ... >> All the security MS has offered is weak. ... If it is attached to SQL Server ...
    (microsoft.public.sqlserver.security)