Lion Cipher Lab
Assess a MySQL server for weak accounts and remote exposure, then fix it
- Penetration Testing / Red Team
- Intermediate
- ~60 min
- Free · no account required
Why it matters
A database holds the data everything else protects, and one of the most common findings in real assessments is a database listening on the network with a default or empty administrator password. Two separate problems hide inside that sentence: who can reach it, and who is allowed in. A good assessor tests both, and a good fix closes both, because closing one still leaves the other for the next change to undo.
What you'll learn
- finding a database port from the network
- running mysql-info and mysql-empty-password
- testing an empty-password login with the client
- telling remote exposure from weak accounts
- running a MySQL container on loopback only
- removing anonymous users and remote root
- restricting a database server to local connections
- re-testing a fix with the same commands
Steps in this lab
- The rule, and the two things you are testing
- Find it and read its identity
- Check the accounts: the Nmap script, then the client
- Build your own weak database on loopback, to practise safely
- Rate what you found
- Fix the container: a real password and a least-privilege user
- Fix Metasploitable 2: take a snapshot, then close both problems
- Re-test from the network, with the same commands
- The defender's view
Open the full interactive lab →