前言:
这个靶场就是叫我们熟悉redis数据库,还有一些他的操作的。
过程:
TASK 1
Which TCP port is open on the machine?
机器上打开了哪个TCP端口?
答案:6379
-p- (扫描所有端口) 也可: -p0-65535
使用nmap扫描全端口:
扫半天了,扫的太慢了,直接看攻略,是6379端口,直接扫6379:
我这是因为扫了太久了不想等了,就直接看了攻略是那个端口,你们应该扫的比我快,因为博主的虚拟机有问题,很多时候扫描了显示超时,不知道是什么问题,有知道的说一声,感谢。
TASK 2
Which service is running on the port that is open on the machine?
在机器上打开的端口上运行哪个服务?
答案:redis
TASK 3
What type of database is Redis? Choose from the following options: (i) In-memory Database, (ii) Traditional Database。
Redis是什么类型的数据库?从下列选项中选择:(i)内存数据库;(ii)传统数据库
答案:In-memory Database
Redis数据库是内存数据库,同时也是非关系型数据库。
TASK 4
Which command-line utility is used to interact with the Redis server? Enter the program name you would enter into the terminal without any arguments.
哪个命令行工具是用来与Redis服务器交互的?
答案:redis-cli
要是kali里面没有这个工具,直接安装就好了,apt install redis-cli,我这是root权限下的命令,不是前面就加一个sudo。再用-h加上目标机器IP,这就是redis-cli用来连接目标主机的命令,这里没有密码,直接连接即可:
redis-cli -h 10.129.229.177 -p 6379 //-h后加ip,-p后加端口。这里不需要加端口。
TASK 5
Which flag is used with the Redis command-line utility to specify the hostname?
Redis命令行工具使用哪个标志来指定主机名?
答案:-h
TASK 6
Once connected to a Redis server, which command is used to obtain the information and statistics about the Redis server?
连接Redis服务器后,使用哪条命令获取Redis服务器的信息和统计信息?
答案:info
TASK 7
What is the version of the Redis server being used on the target machine?
目标机器上使用的Redis服务器的版本是什么?
答案:5.0.7
TASK 8
Which command is used to select the desired database in Redis?
在Redis中哪个命令是用来选择所需的数据库?
答案:select
使用select关键字加上数据库索引号,可以选择数据库。
TASK 9
How many keys are present inside the database with index 0?
在索引为0的数据库中有多少个键?
答案:4
redis 默认有16个数据库,编号为0~15。
Redis服务器中每个数据库都由 redisDB 结构表示(默认16个库)。其中,redisDB 结构的 dict 字典保存了数据库中所有的键值对,这个字典被称为键空间(keyspace)。16个数据库,独立在各自的键空间即key space中。
这里的keyspace可以看作是数据库(类似于mysql中的database),通过 info 命令可以查看redis具体信息,从而也可以看到keyspace信息模块。
使用select关键字加上数据库索引号,可以选择数据库,使用 keys * 命令可以列出所有的键,最后使用 get 命令可以获取键对应的值。 --引自百度
TASK 10
Which command is used to obtain all the keys in a database?
哪个命令用于获取数据库中的所有键?
答案:keys *
这个东西应该都知道吧。
SUBMIT FLAG
Submit root flag
提交flag
答案:03e1d2b376c37ab3f5319922053953eb
直接get就可以了: