Class Notes
Mysql Interaction And Enumeration
mysql -u root -p'root' -h 192.168.50.16 -P 3306
select version(); ##show mysql version
select system_user(); ##show user run by mysql
show databases; ##List all database
show tables from mysql; ##show all table inside mysql
show columns from mysql.user; ##show all columns inside user table
SELECT user, authentication_string FROM mysql.user WHERE user = 'offsec'; ##Dump creds of 'offsec' user impacket-mssqlclient Administrator:[email protected] -windows-auth
-- show version
SELECT @@version;
-- List all Databases-
select name from sys.databases;
-- List non-default databases-
select name from sys.Databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb');
-- List all the tables from database accounts-
USE accounts; -- Switch to the 'accounts' database
SELECT table_name FROM INFORMATION_SCHEMA.TABLES; -- list all tables
-- Dump columns from table users-
Select column_name from information_schema.columns where table_name='table_name';
-- Dump the data from the column users-
select * from users;
-- Dump specific columns-
select * from users where name='offsec'; Last updated