Skip to content

Instantly share code, notes, and snippets.

@Reelix
Created March 4, 2026 17:40
Show Gist options
  • Select an option

  • Save Reelix/a878a9e649bddb829732c179eef98b3d to your computer and use it in GitHub Desktop.

Select an option

Save Reelix/a878a9e649bddb829732c179eef98b3d to your computer and use it in GitHub Desktop.
Cracking mysql.User caching_sha2_password hash
1.) Convert to crackable hash format
SELECT user, CONCAT('$mysql', LEFT(authentication_string, 6), '*', INSERT(HEX(SUBSTR(authentication_string, 8)), 41, 0, '*')) AS hash
FROM user
WHERE plugin = 'caching_sha2_password' AND authentication_string NOT LIKE '%INVALIDSALTANDPASSWORD%';
2.) Extract each hash entry as is
3.) hashcat.bin hashes.txt ~/wordlists/rockyou.txt -O -m7401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment