STARTING POINT TIER 1 Sequel
这一关简单了解了一下MySQL
通过nmap
扫描一下
└─$ sudo nmap -sV -A [ip-address]
Nmap scan report for aioCloud
Host is up (0.25s latency).
Not shown: 999 closed tcp ports (reset)
PORT STATE SERVICE VERSION
3306/tcp open mysql?
|_sslv2: ERROR: Script execution failed (use -d to debug)
| mysql-info:
| Protocol: 10
| Version: 5.5.5-10.3.27-MariaDB-0+deb10u1
| Thread ID: 114
| Capabilities flags: 63486
-A
使得例如-O
、-sV
、-sC
和--traceroute
选项展示更积极的信息。
MySQL通常运行在3306端口,root用户可以免密登录
└─$ mysql -u root -h [ip-address]
连接成功,show databases;
展示数据库
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| htb |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
use [database]
选择使用[database]
数据库
MariaDB [(none)]> use htb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
show tables
查看表
select * from [table]
查看[table]
表的数据
MariaDB [htb]> show tables;
+---------------+
| Tables_in_htb |
+---------------+
| config |
| users |
+---------------+
2 rows in set (0.269 sec)
MariaDB [htb]> select * from config;
+----+-----------------------+----------------------------------+
| id | name | value |
+----+-----------------------+----------------------------------+
| 1 | timeout | 60s |
| 2 | security | default |
| 3 | auto_logon | false |
| 4 | max_size | 2M |
| 5 | flag | 7b4bec00d1a39e3dd4e021ec3d915da8 |
| 6 | enable_uploads | false |
| 7 | authentication_method | radius |
+----+-----------------------+----------------------------------+