Friday, October 31, 2008

MS SQL Server Password Recovery

For database admins, it is not a nightmare to handle with lost sql server password, which can be easily retrieved from application source code or just reset it in Enterprise Manager.

But for a penetration tester, he should know where the passwords store, how to dump hashes, and crack them to gain more information. And it is necessary to audit the strength of sql server passwords, because weak sql passwords could cause system command execution remotely by a malicious hacker, compromising the application security.

David Litchfiled has written a good paper about cracking sql server passwords in 2002. You should read it to understand the mechanism of hashes, and after that, practice the following instructions and tools.

1. Dump hash locally

C:\>osql -E
1> select name, password from master..sysxlogins where name='sa'
2> go
name password

sa 0x0100EA1ED32230A0DC42EE75F0A8D98234E26DDFF9720590BB687641F98DE93C45E05E6406A0E1BE291FA4D8205C
1>


2. Crack it!

Split the hash as following:

0x0100
EA1ED322 (salt, 8 chars)
30A0DC42EE75F0A8D98234E26DDFF9720590BB68 (case sensitive hash, 40 chars)
7641F98DE93C45E05E6406A0E1BE291FA4D8205C (upper case hash, 40 chars)

Launch your favorite hash crackers, here I use PasswordsPro, add hash then crack.



Mention that it is not an instant recovery, it must use dictionary or brute force. But this demo password was cracked by a preliminary crack immediately!




3. Reset password

The sql server passwords are stored in master.mdf, located in C:\Program Files\Microsoft SQL Server\MSSQL\Data. The Russian company ElcomSoft released a tool named Advanced SQL Password Recovery, which provides instant recovery of sql passwords by modifying master.mdf.






Another choice is SQL Password by LastBit, which can both reset and crack sql password, while ElcomSoft can only reset password. But SQL Password cannot parse some master.mdf files through my test.


42 comments:

  1. For work with sql files advise use-recover mssql,also tool is free,it can help with this problem and retrieve the data, that was considered to be lost,mwill extract housekeeping data from the source database and preview the data, that can be recovered,this tool is a good solution to recover data from corrupted databases in MS SQL Server format,restore databases represent files, like any other documents, they can be easily corrupted by viruses, all sorts of malware, hard drive failures, file system errors, incorrect user actions, etc,supports both data extraction to your hard drive as scripts in SQL format and data export directly to a database in MS SQL Server format.

    ReplyDelete
  2. Some days ago I used this tool for sql files-repair your sql server,also program is free,it can help with this problem and retrieve the data, that was considered to be lost,mwill extract housekeeping data from the source database and preview the data, that can be recovered,this tool is a good solution to recover data from corrupted databases in MS SQL Server format,restore databases represent files, like any other documents, they can be easily corrupted by viruses, all sorts of malware, hard drive failures, file system errors, incorrect user actions, etc,supports both data extraction to your hard drive as scripts in SQL format and data export directly to a database in MS SQL Server format.

    ReplyDelete
  3. For realize this actions for solve the problems,I recommend next software-sql server repair,application helped me many times and has not one facility,software repair data from corrupted databases in the MS SQL Server format (files with the *.mdf extension),supports data extraction via the local area network,can save recovered data as SQL scripts, it is also possible to split data into files of any size,compatible with all supported versions of Microsoft Windows, such as Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 Server, Windows Vista,tool supports the following database formats: Microsoft SQL Server 7.0, 2000, 2005,also can repair .mdf files of Microsoft SQL Server 2005, repair mdf file of Microsoft SQL Server 2005 (64-bit).

    ReplyDelete
  4. All in all in this situation there are many ways of solution this task,and in my opinion one of the best-sql recovery,software has free status as far as I know,it can help with this problem and retrieve the data, that was considered to be lost,mwill extract housekeeping data from the source database and preview the data, that can be recovered,this tool is a good solution to recover data from corrupted databases in MS SQL Server format,restore databases represent files, like any other documents, they can be easily corrupted by viruses, all sorts of malware, hard drive failures, file system errors, incorrect user actions, etc,supports both data extraction to your hard drive as scripts in SQL format and data export directly to a database in MS SQL Server format.

    ReplyDelete
  5. Nice Post.
    SQL repair software is used repair corrupted .mdf files, tables, views, stored procedures, rules, defaults, user defined data types and triggers from Microsoft SQL server database

    ReplyDelete
  6. Thank you for your nice post.I really enjoy to visit your post.Good job keep posting..
    Split system repairs

    ReplyDelete
  7. A few days ago I forgot the SA password, later I use SQL Server Password Changer to successfully reset the SA password, it's worth a try.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. To reset forgotten SQL password is not an easy task as some days ago I forgot my SQL server password and I have used many SQL password recovery product to reset SQL server password but all are useless. Soon after I have utilize SQL password recovery software and successfully reset my SQL Server password. Get this SQL password recovery software here: http://www.systoolsgroup.com/sql-password-recovery.html

    ReplyDelete
  10. If you want to recover password from your SQL server then you try any third party SQL server password recovery tool, which recover password from your SQL server without damaged any .mdf files. Visit here for free download: http://www.softwaredatarecovery.net/sqlpasswordrecovery.html

    ReplyDelete
  11. chutiye pane ke software hain ye, madharchod free main kuch bhee nahi hai

    ReplyDelete
  12. SQL Password Recovery, which is a professional program enables you reset administrator or user password for Microsoft SQL Server instantly regardless of the length, complexity, language and encoding of the password set before.See more:- http://www.mannatsoftware.com/stellar-phoenix-sql-password-recovery.html

    ReplyDelete
  13. Recovery password
    Fast, high-quality recovery of your forgotten password. Inexpensive!
    communicate http://recoverywallet.com/

    ReplyDelete
  14. Mozocare in india's biggest medical tycoon are providing medical information about medical treatments.after getting huge sucesss in india mozocare is also entering now in arabia and turkey. to get get with us. find best doctors and hospitals around the globe at www.mozocare.com/hospitals for more details you may visit :

    Treattments In Turkey

    ReplyDelete
  15. if you are searching for the best services for bike rental in kolkata so you are exactly there here you can find the best services for bike rentals. for more details you may visit our webiste https://justbike.in/
    Bike rental in kolkata

    ReplyDelete
  16. if you are searching for the best services for bike rental in kolkata so you are exactly there here you can find the best services for bike rentals. for more details you may visit our webiste https://justbike.in/
    Bike rental in kolkata

    ReplyDelete
  17. Blood In Cat Urine

    Today we have brought another new post where we will talk about blood in cat urine and know about it in this post. We will try our best to give you every little angel information related to this topic, and we will be related to your topic.
    Read More : https://getcatcare.com/blood-in-cat-urine/

    ReplyDelete
  18. SysTools SQL Recovery Crack im very impressed with your post because this post is very beneficial for me and provide a new knowledge to me

    ReplyDelete
  19. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. wahabtech.net I hope to have many more entries or so from you.
    Very interesting blog.
    SysTools SQL Recovery Crack

    ReplyDelete
  20. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
    Very interesting blog.
    vstcrackpro.com
    Stardew Valley Crack

    ReplyDelete
  21. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
    Very interesting blog.
    softwarezpro.info
    Hide All IP Crack

    ReplyDelete

  22. Wow, amazing block structure! How long
    Have you written a blog before? Working on a blog seems easy.
    The overview of your website is pretty good, not to mention what it does.
    In the content!
    vstkey.com
    PUSH Video Wallpaper Crack
    FL Studio Crack
    LD Player Crack
    Enscape 3D Crack
    IDM Crack
    PhpStorm Crack
    Redshift Render Crack

    ReplyDelete
  23. Hi there! I just want to offer you a huge thumbs up for the great information you have here on this post. I’ll be coming back to your website for more soon.
    강릉출장샵
    춘천출장샵
    태백출장샵
    김천출장샵
    문경출장샵
    상주출장샵

    ReplyDelete
  24. Wow, amazing block structure! How long
    Have you written a blog before? Working on a blog seems easy.
    The overview of your website is pretty good, not to mention what it does.
    In the content!목포아로마
    순천아로마
    여수아로마
    익산아로마
    정읍아로마
    남원아로마
    군산아로마

    ReplyDelete
  25. Wow, amazing block structure! How long
    Have you written a blog before? Working on a blog seems easy.출장여대생
    출장여대생
    출장여대생
    출장여대생
    출장여대생
    출장여대생
    출장여대생
    The overview of your website is pretty good, not to mention what it does.
    In the content!

    ReplyDelete
  26. I understand I am the one explicitly who came here to share my own personal knowledge. Prepare to have your cerebrum blown. I'm including my PC for basically the past 3 years, yet I knew close to nothing about settling several chief issues I do not know how to solve Crack Softwares Free Download But thankfully, I recently visited a website named crackprofessional.com/
    PhpStorm Crack
    Atomic Mail Sender Crack

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete