Trickster

Recon

nmap_scan.log|h-50%_styled

HTTP (80)

Placeholder

Writeup.png

Shop

Writeup-1.png

Creds: test:test:test02@trickster.htb:Password123$Lmao

PrestaShop is a freemium, open source e-commerce platform.

Writeup-2.png

Git Dump

Feroxbuster found http://shop.trickster.htb/.git/index

Hidden Admin Panel

Inside we get bunch of default files and admin634ewutrx1jgitlooaj directory, which should be a path.

http://shop.trickster.htb/admin634ewutrx1jgitlooaj/arrow-up-right

Writeup-3.png

adam made changes:

Officially disclosed vulnerabilities: https://github.com/PrestaShop/PrestaShop/releases/tag/8.1.6arrow-up-right

Doesn't work: (CVE-2024-36680) Improper neutralization of SQL parameter in Promokit.eu - Facebook module for PrestaShoparrow-up-right

XSS -> RCE

XSS: CVE-2024-34716 – The Deceptive PNG Trap: Breaking Down the PNG-Driven Chain from XSS to Remote Code Execution on PrestaShop (<=8.1.5)arrow-up-right PoC: https://github.com/aelmokhtar/CVE-2024-34716arrow-up-right

As blog says make changes to your exploit.html:

Writeup-4.png

Some changes are needed in exploit.py too (proxies was added for debug).

Writeup-5.png

Also reverse shell in zip file with your IP! after getting request on zip shell should come in quickly.

MySQL

SSH

James is the user on box, so that's our target:

Creds: james:alwaysandforever

User.txt

Privilege Escalation

Cronjobs

pspy shows some cronjobs running as root:

--remote-debugging-port=0 is interesting...

https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/chrome-remote-debugger-pentesting/arrow-up-right

Doing port forwarding on this port doesn't yield any success.

PrusaSlicer

Next interesting line is:

Because in opt there's prusaslicer binary.

*.3mf file is some kind of 3D object...

Writeup-6.png

PrusaSlicer 2.6.1 - Arbitrary code executionarrow-up-right

Download the file

Edit post_process in Metadata/Slic3r_PE.config. output_filename_format was causing errors so I just left base filename there.

Payload is successful, but the problem is we ran it, not root... So no priv esc...

runc

Linpeas previously showed runc was runnable and to check HackTrickshttps://book.hacktricks.xyz/linux-hardening/privilege-escalation/runc-privilege-escalationarrow-up-righthttps://dev.to/codeninjausman/hackthebox-htb-writeup-vessel-hard-10bbarrow-up-right

Upon following the instructions we get

Docker

I wasn't able to find anything useful, and the Docker kept bugging me so I just decided to scan the whole network.

https://github.com/andrew-d/static-binaries/blob/master/binaries/linux/x86_64/nmaparrow-up-right

Note: Probably would have been to scan /8 network 💀

Note (from _cutearmadillo_): You don't actually need to scan the network at all. The process list shows the PID of the container (containerd-shim-runc-v2), then you go check /proc/PID/net/arp. With ps -efj you also find the process running in the container and its PID and then check the open port via /proc/PID/net/tcp (in hex)

changedetection

It asks for password and James's password works.

Writeup-7.png

Version is v0.45.20

changedetection < 0.45.20 - Remote Code Execution (RCE)arrow-up-rightCVE-2024-32651-changedetection-RCEarrow-up-right

Remove the password authentication, because script doesn't like it.

Writeup-8.png

Docker Shell

Note: Make sure to change reddit urls in PoC to internal URLs, can be simple http server.

Root (Unintended)

Creds: root:#YouC4ntCatchMe#

Root.txt

Root (Intended)

Creds: adam:adam_admin992

adam can run prusaslicer as root, so let's go back and use the previous malicious *.3mf file again for root.

Last updated