Serves as central instance where content required by PHP scripts stored
Headers, texts, meta tags, forms, customers, usernames admins, mods
Translates cmds internally into exec code/performs actions
Web app informs the user if an error occurs, which various SQLi can provoke
Error info confirms a web app interacts with a db in a way other than intended
Info can be data extracts from a table/records needed for processing, functions, etc.
Cmds can display, mod, add, delete rows
Can also change table structure, create, delete relationships, indexes, manage users
MariaDB: Often connected with MySQL, is a fork of original code
sudoaptinstallmysql-server-y# install mysql server cat/etc/mysql/mysql.conf.d/mysqld.cnf|grep-v"#"|sed-r'/^\s*$/d'# configs
Dangerous Settings
user# sets which user mysql will run aspassword# sets password admin_address# IP to listen for connections on admin network intdebug# debugging settings sql_warnings# controls if single-row INSERT statements produce info str on warnings secure_file_priv# used to limit effect of data import/export ops
user, password, admin_address plain text
debug, sql_warnings provide info, which could further attack surface
information schema metadata mainly retrieved from system schema db
ANSI/ISO standard is the reason both exist
System schema MS catalog for SQL servers
mysql-uuser-ppassword-hIP# connect to mysql server | no space bet -p and passshowdatabases; usedatabase; # select a databaseshowtables; showcolumnsfromtablee; # show all columns in selected databaseselect * from table; # show everything in tableselect * from table where column = "string"; # search for string in desired table
MSSQL
MS's SQL-based relational db mgmt system:
Closed source/initially written to run on Win MSSQL Clients
SMMS: SQL Server Management Studio: Feature that can be installed with MSSQL
We could come across a vuln sys with SSMS with saved creds that allow access
master# tracks all sys info for a SQL server instancemodel# template: structure for every new db: any changes flected in new db's msdb# sql server agent uses this db to schedule jobs & alertstempdb# temp objectsresource# read-only db: system objects included with sql server
Many clients can be used to access a db running MSSQL: