Hack The Box-Starting Point-Sequel

发布时间 2023-06-28 14:49:20作者: 弟弟救我啊

答案

  1. 任务1:During our scan, which port do we find serving MySQL? 3306
    image

  2. 任务2:What community-developed MySQL version is the target running? MariaDB
    image

  3. 任务3: When using the MySQL command line client, what switch do we need to use in order to specify a login username? -u
    image

  4. 任务4: Which username allows us to log into this MariaDB instance without providing a password? root
    image

  5. 任务5: In SQL, what symbol can we use to specify within the query that we want to display everything inside a table? *
    image

  6. 任务6: In SQL, what symbol do we need to end each query with? ;
    image

  7. 任务7:There are three databases in this MySQL instance that are common across all MySQL instances. What is the name of the fourth that's unique to this host? htb
    image

曲折的路途

  1. 上Nmap扫描,执行命令nmap -sV 目标IP, 发现有点问题,
    image

  2. 修改扫描参数:nmap -p 3306 -sC 目标IP
    image

  3. 暴破一下mysql用户名和密码,执行命令: hydra -L /usr/share/brutespray/wordlist/mysql/user -P /usr/share/brutespray/wordlist/mysql/password -t 2 -e n -f -v 目标IP mysql ,发现目标使用的是空密码
    image

3.1 本来想使用Nmap内置的脚本进行测试,发现出错,nmap -p 3306 --script=mysql-brute 目标IP
image

  1. 使用mysql-client登入,mysql -h 目标IP -u root
    image

  2. 查看所有库,show databases;
    image

  3. 查看htb库中的表
    user htb; show tables;
    image

  4. 查看config表中的数据, select * from config;
    image

撒花

image