πŸ“ Final Report & Lessons Learned

1. Executive Summary

Sequel is a Tier 1 machine that demonstrates the security risks of exposing database services directly to the public internet, especially without authentication. It highlights how a simple misconfiguration in MariaDB/MySQL can lead to total data leakage.


2. Key Takeaways

  • Technical takeaways: MySQL/MariaDB services should never be exposed to external networks without strict firewall rules and strong authentication. Use --skip-ssl if a remote database connection fails due to certificate errors.
  • Strategic takeaways: Databases often hold the most sensitive β€œcrown jewels” of an application (users, config, flags). Securing this layer is critical.

3. Remediation

  1. Bind to Localhost: Ensure that the database service is only listening on 127.0.0.1 unless remote access is absolutely necessary.
  2. Enforce Password Policy: Never allow the root user (or any user) to connect without a strong, unique password.
  3. Firewalling: Use a firewall (like iptables or ufw) to restrict access to port 3306 to known, safe IP addresses.
  4. Principle of Least Privilege: If remote access is needed, create a dedicated user with limited access to specific databases rather than using root.

4. Skills Gained

  • MySQL/MariaDB remote enumeration
  • Basic SQL queries for data extraction
  • Identifying unauthenticated root access
  • Troubleshooting connection issues using client flags

Operations