Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««12345»»

How to recover a SQL Server login password. Expand / Collapse
Author
Message
Posted Wednesday, March 06, 2013 4:19 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 7:41 AM
Points: 363, Visits: 624
Michael Meierruth (3/6/2013)
paul.knibbs (3/6/2013)
SQLCharger (3/6/2013)
Guys,

Would this also work with Windows hashes as well?
That would be even more scary (if someone manages to get your Windows hash from a server).


There's no reason why it wouldn't, but getting the Windows hash of your password from the server isn't a trivial thing--you usually need admin access in order to read the SAM database, and if you already have that level of access, why do you care about hacking somebody else's password?

It's for finding those people who use the same password everywhere else...


And naughty people who want to steal/sell sensitive data, but do it with someone else's name in the audit log so some poor innocent bloke gets fired instead of the real criminal.


Ben

^ Thats me!


----------------------------------------
01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
----------------------------------------
Post #1427296
Posted Wednesday, March 06, 2013 5:04 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 3:07 AM
Points: 522, Visits: 2,012
And what's the point of what you're saying in your binary signature?
Post #1427319
Posted Wednesday, March 06, 2013 6:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 5:17 AM
Points: 170, Visits: 1,399
Michael Meierruth (3/6/2013)
And what's the point of what you're saying in your binary signature?


A yes/no answer will suffice


Cheers,

JohnA

MCM: SQL2008
Post #1427360
Posted Wednesday, March 06, 2013 6:59 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 7:41 AM
Points: 363, Visits: 624
Michael Meierruth (3/6/2013)
And what's the point of what you're saying in your binary signature?


It's self-referential.


Ben

^ Thats me!


----------------------------------------
01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
----------------------------------------
Post #1427364
Posted Wednesday, March 06, 2013 7:32 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Thursday, April 03, 2014 10:06 PM
Points: 6,621, Visits: 1,851
Michael Meierruth (3/6/2013)
paul.knibbs (3/6/2013)
SQLCharger (3/6/2013)
Guys,

Would this also work with Windows hashes as well?
That would be even more scary (if someone manages to get your Windows hash from a server).


There's no reason why it wouldn't, but getting the Windows hash of your password from the server isn't a trivial thing--you usually need admin access in order to read the SAM database, and if you already have that level of access, why do you care about hacking somebody else's password?

It's for finding those people who use the same password everywhere else...


Or for escalating privileges, especially in a domain. Standard attack pattern:

1. Gain admin rights to a workstation or server.
2. Dump LSA Secrets. This gives you the password in plaintext for any services.
3. See what rights/group memberships those accounts have. They are now in your set of accounts to use for further compromise.
4. Dump the hashes from that system.
5. Use rainbow tables to gain the password from said hashes.
6. See what rights/group memberships those accounts have. They are also now in your set of accounts to use for further compromise.
7. If you've got a Domain Admin level at this point, you're set. You own the domain (and technically, the forest, meaning also every domain in said forest).
8. If you don't have an account with the level of privs that you want, spiderweb to other systems, trying the accounts you've captured and repeating steps 1-7.

3.


K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #1427396
Posted Wednesday, March 06, 2013 8:06 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 8:46 AM
Points: 845, Visits: 2,331
paul.knibbs (3/6/2013)
SQLCharger (3/6/2013)
Guys,

Would this also work with Windows hashes as well?
That would be even more scary (if someone manages to get your Windows hash from a server).


There's no reason why it wouldn't, but getting the Windows hash of your password from the server isn't a trivial thing--you usually need admin access in order to read the SAM database...


And this is why SQL Server Service accounts should be minimally privileged (i.e. NEVER ADMIN, either local or domain) - so someone breaking one sysadmin-level account on the SQL Server instance has a harder time getting into other machines.

Yes, oclHashcat-lite and/or oclHashcat-plus have settings for various forms of Windows and Active Directory passwords (as well as Oracle, Mac, Cisco, and other modes).
Post #1427435
Posted Monday, June 24, 2013 5:01 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 11:50 PM
Points: 1,867, Visits: 2,275
This is not working on my pc....
It got this and SQL_passwords.txt gets generated:

Enter YES in uppercase if you accept this EULA:
YES
Initializing hashcat v0.45 by atom with 8 threads and 32mb segment-size...

output-format=0: No such file or directory



_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1466684
Posted Thursday, June 27, 2013 5:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 08, 2014 5:57 AM
Points: 9, Visits: 344
Very interesting topic.

I tried but I am getting only password.which have normal character like a to Z

If i add any special character I am not getting proper output and it's take too long time .

one more is I am getting output in ppt format.I don't where I did mistake

I am not getting EULA: option in Command Prompt..

I used below script :

hashcat-cli32.exe -a 3 --pw-min=4 --pw-max=12 -m 132 -p : -o "C:\hashcat-0.46\SQL_passwords.txt" -output-format=0 -n 2 "C:\hashcat-0.46\Hashes.txt" -1 ?l?u?d?s ?1?1?1?1?1?1?1?1?1?1?1?1

If i used below scipt I am getting error :

hashcat-cli32.exe -a 3 --pw-min=4 --pw-max=12 -m 131 -p : -o "C:\hashcat-0.46\SQL_passwords.txt" -output-format=0 -n 2 "C:\hashcat-0.46\Hashes.txt" -1 ?l?u?d?s ?1?1?1?1?1?1?1?1?1?1?1?1

Skipping line : (Line length exception)
No hashes Found.

OS Version : Windows Xp
SQL Server 2008




Thanks
Atchi





Post #1468396
Posted Tuesday, July 09, 2013 11:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 07, 2013 10:39 AM
Points: 1, Visits: 14
I tried to use this but I keep getting an error saying Skipping Line: #0 ( line length exception) .. I can not figure out how to get around this. any help?
Post #1471757
Posted Thursday, January 09, 2014 5:45 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, April 11, 2014 1:02 PM
Points: 64, Visits: 360
I'm frustrated trying to recover a sa password from a legacy database that no one knows. I've tried using Hashcat and oclHashcat following this article and the HashcatGUI. I keep getting the same error message "Line-length exception". Here's my command: oclHashcat64.exe -a 0 -m 100 -p : --session=09163410 --force -o "D:\Applications\HashCat\UnHashed_sa.txt" --outfile-format=3 -n 32 -u 250 --gpu-temp-abort=90 -r "D:\Applications\HashCat\oclHashcat\oclHashcat-1.01\rules\best64.rule" "D:\Applications\HashCat\Hashed\Hashed_sa.txt" "D:\Applications\HashCat\WordLists\dic-0294.txt" "D:\Applications\HashCat\WordLists\ALLUP&R.DIC"

Any suggestions on how to resolve this would be appreciated.

Brandon_Forest@calquake.com
SQL DBA
CEA-IT
Post #1529616
« Prev Topic | Next Topic »

Add to briefcase «««12345»»

Permissions Expand / Collapse