Databases
Databases vary widely, each requiring specific commands, tools, and syntax. This chapter provides guidance on navigating these differences.
This chapter is in-progress.
Check the index on the right to navigate this page more easily.
Database Management Systems
MySQL
Connect to a MySQL server
# Local service
mysql -u acuity -pSuperStr00ng!
# Remote service
mysql -u acuity -p -h <IP> -P 3306List all databases
show databases;Select a database
use name_of_database;List all tables in the active database
show tables;List content of a table
Microsoft SQL
PostgreSQL
Tools
SQLMap
An open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. https://sqlmap.org/
Basic Data Enumeration
Table Enumeration
Search for columns, tables or databases
Switch --search needs to be used in conjunction with one of the following support options:
-Cfollowing a list of comma-separated column names to look for across the whole database management system.-Tfollowing a list of comma-separated table names to look for across the whole database management system.-Dfollowing a list of comma-separated database names to look for across the database management system.
Example:
Dumping database-specific credentials
Bypassing security measures
Last updated