Skip to content

Databases

How to identify and crack an MSSQL (2012/2014) hash

Identify an MSSQL (2012/2014) hash and crack it with ready-to-run hashcat and John the Ripper commands. Fast on a GPU.

hashcat mode -m 1731John format mssql12

MSSQL (2012/2014) is an database hash type. It is fast and typically unsalted, which makes weak passwords recoverable quickly on consumer GPU hardware. This page shows how to recognise it and the exact commands to attack it.

All identification runs locally in WebAssembly. The commands below write the hash to a local file on your machine — nothing is sent to this site.

Identifying the hash

The hash identifier on the home page detects MSSQL (2012/2014) entirely in your browser — your hash is never uploaded. A typical example looks like this:

0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16

Cracking MSSQL (2012/2014) with hashcat

Save the hash to a file and run hashcat in mode -m 1731. Start with a wordlist such as rockyou.txt:

echo '0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16' > hash.txt && hashcat -m 1731 hash.txt /usr/share/wordlists/rockyou.txt

Add a rule set to mutate dictionary words (capitalisation, leetspeak, appended digits) and dramatically widen coverage:

echo '0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16' > hash.txt && hashcat -m 1731 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

Cracking MSSQL (2012/2014) with John the Ripper

John the Ripper can attack the same hash with the mssql12 format:

echo '0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16' > hash.txt && john --format=mssql12 --wordlist=/usr/share/wordlists/rockyou.txt hash.txt