hackthebox
very easy
Linux
active
Redeemer
2 min read
5 points
๐ฏ Target Overview
- Service Identified: Redis
- Port: 6379
- Attack Type: Misconfigured Redis (Unauthenticated Access)
๐ TASK 1
Q: Which TCP port is open on the machine?
๐ง Approach:
- Performed an Nmap scan:
nmap -p0-10000 -sV <IP>
- Found only one open port.
โ Answer:
6379
๐ TASK 2
Q: Which service is running on the open port?
๐ง Approach:
- Used
-sVflag in Nmap to detect service version. - Identified service running on port 6379.
๐ Explanation:
- Redis (Remote Dictionary Server) is a fast, in-memory key-value store used for caching and databases.
โ Answer:
Redis
๐ TASK 3
Q: What type of database is Redis?
๐ง Approach:
- Researched Redis architecture.
โ Answer:
In-memory Database
๐ TASK 4
Q: Which command-line utility is used to interact with Redis?
๐ง Approach:
- Checked Redis documentation.
โ Answer:
redis-cli
๐ TASK 5
Q: Which flag specifies the hostname in Redis CLI?
๐ง Approach:
- Installed Redis tools:
sudo apt install redis-tools
- Checked manual page:
man redis-cli
โ Answer:
-h
๐ TASK 6
Q: Which command shows server information and statistics?
๐ง Approach:
- Referred to Redis CLI cheat sheet.
โ Answer:
info
๐ TASK 7
Q: What is the Redis server version?
๐ง Approach:
- Used:
info
- Located version in output.
โ Answer:
5.0.7
๐ TASK 8
Q: Which command selects a Redis database?
๐ง Approach:
- Referenced Redis commands documentation.
โ Answer:
select
๐ TASK 9
Q: How many keys exist in database index 0?
๐ง Approach:
select 0
keys *
โ Answer:
4
๐ TASK 10
Q: Which command lists all keys in a database?
๐ง Approach:
- Used wildcard listing.
โ Answer:
keys *
๐ TASK 11
Q: Submit root flag
๐ง Approach:
- Retrieved value of key:
get flag
โ Answer:
03e1d2b376c37ab3f5319922053953eb
๐งพ Summary
| Task | Concept |
|---|---|
| 1 | Port Scanning (Nmap) |
| 2 | Service Enumeration |
| 3 | Redis Fundamentals |
| 4โ5 | CLI Usage |
| 6โ7 | Information Gathering |
| 8โ10 | Redis Commands |
| 11 | Data Extraction |
๐ Key Takeaways
- Redis often runs without authentication โ major security risk.
- Misconfigured services can directly expose sensitive data.
- Always enumerate services thoroughly after port scanning.