2023 Business CTF: Unveiled
Challenge Information
| Attribute | Details |
|---|---|
| Event | 2023 Business CTF |
| Category | Cloud |
| Challenge | Unveiled |
| Difficulty | Easy |
Summary
The challenge involves a web application running on port 80 that references an S3 bucket at s3.unveiled.htb. The application loads external JavaScript from http://s3.unveiled.htb/unveiled-backups/main.js. Your goal is to enumerate the S3 bucket and discover confidential information stored within.
Analysis
Initial reconnaissance shows:
- HTTP service on port 80 (Apache httpd 2.4.41)
- Reference to S3 endpoint:
s3.unveiled.htb - Bucket name:
unveiled-backups - Script tag:
<script src="http://s3.unveiled.htb/unveiled-backups/main.js"/>
The application suggests the presence of misconfigured S3 buckets with public or weakly protected access.
Solution
S3 enumeration steps:
-
Identify the S3 endpoint: The script references
s3.unveiled.htbhosting theunveiled-backupsbucket -
Check bucket accessibility:
Terminal window # Use aws-cli with endpoint URLaws s3api list-buckets --endpoint-url=http://s3.unveiled.htb --region eu-south-1aws s3api get-bucket-versioning --bucket unveiled-backups --endpoint-url=http://s3.unveiled.htb --region eu-south-1 -
Enumerate bucket contents:
Terminal window aws s3 ls s3://unveiled-backups/ --endpoint-url=http://s3.unveiled.htb --recursive -
Download exposed files: Extract any credentials, configuration files, or sensitive data from the bucket
Common AWS S3 security issues to look for:
- Public read access (ACL misconfiguration)
- Missing block public access settings
- Unencrypted sensitive data
- Exposed credentials or API keys
- Backup files with version history
Key Takeaways
- S3 bucket misconfiguration is a common source of data breaches
- Always check HTTP responses for cloud service references
- AWS CLI can interact with S3-compatible endpoints beyond AWS
- Bucket versioning can expose multiple versions of sensitive data
- Proper ACL and bucket policies are essential for security
- Regular audits of cloud storage permissions are critical