To begin, we need to find the open port of the machine. From the task we know that the port should be 6379, the default port for Redis. Somehow the usual nmap search did not succeed and I fixed the prompt to be (exchange ip with the machines actual ip):
nmap -p T:6300-6400 -Pn -sV ip
The output should be something like
PORT STATE SERVICE VERSION 6379/tcp open redis Redis key-value store 5.0.7
Let's connect:
redis-cli -h ip
Let's select the database with index 0
select 0
And display all the available keys
keys *
"flag" looks good, let's display the value:
get flag
Copy and paste the string. Finished!