HTB: Help
← Back to the log
November 25, 2026·Johnytiger

HTB: Help

An exposed GraphQL endpoint hands over a user hash, which unlocks an authenticated HelpDeskZ SQL injection that leaks the admin hash. A password spray turns that into SSH, and a kernel exploit (CVE-2017-16995) finishes it off with root.

securityctfwriteuphacktheboxlinuxgraphqlhelpdeskzsql injectionpassword sprayingkernel exploitprivilege escalation

Help is a Linux box from HackTheBox. The foothold chains an exposed GraphQL endpoint into a HelpDeskZ SQL injection, and the privesc is a kernel exploit. The initial foothold took a while, so let's walk through it.

Recon

Looking at the nmap scan we see SSH on 22, Apache on 80 redirecting to help.htb, and a Node.js Express app on 3000. Let's add help.htb to our hosts file and visit the site.

nmap scan of Help showing OpenSSH on 22, Apache redirecting to help.htb on 80, and Node.js Express on 3000.

It's an Apache default page, so let's run a dir buster and see if we can find anything else.

The site on port 80 is the Apache2 Ubuntu default page.

gobuster dir -u http://help.htb/ -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt

gobuster finds the support and javascript directories on help.htb.

There's a /support page, let's head over to that.

HelpDeskZ and the GraphQL endpoint

It's some sort of help desk running HelpDeskZ.

The support directory hosts a HelpDeskZ Support Center with a login box and knowledgebase.

Looking at the URL on the Knowledgebase tab we can see there's a ?v= parameter. Maybe we can abuse this somehow.

The Knowledgebase tab URL uses a v parameter to pick the page.

Checking out that other port (3000), we see that it's a GraphQL endpoint.

Browsing to help.htb on port 3000 at the graphql path returns GET query missing.

It's exposed, so let's see what we can do with it. GraphQL introspection lets us ask the endpoint to describe its own schema:

curl -s -X POST http://help.htb:3000/graphql -H "Content-Type: application/json" -d '{"query":"{__schema{types{name fields{name}}}}"}'

GraphQL introspection returns the schema, including a User type with username and password fields.

We get the schema. There's a user query, and the User type has username and password fields. Let's pull those.

curl -s -X POST http://help.htb:3000/graphql -H "Content-Type: application/json" -d '{"query":"{user{username password}}"}'

Querying the user object returns the helpme account email and an MD5 password hash.

Nice, we have a username and a password hash! Let's save those to our notes and crack that password. It's 32 hex characters, so MD5:

hashcat -m 0 '5d3c93182bb20f07b994a7f617e99cff' /usr/share/wordlists/rockyou.txt

hashcat cracks the MD5 hash from rockyou to godhelpmeplz.

We got it: godhelpmeplz. Let's log back into the help desk app and enumerate the software.

HelpDeskZ SQL injection

After a little research I found that this HelpDeskZ version has an authenticated SQL injection: Exploit-DB 41200.

Exploit-DB entry 41200, HelpDeskZ before 1.0.2 Authenticated SQL Injection and Unauthorized File Download.

Let's pull that over to our box and check it out. It's a blind injection through the ticket attachment download, so it needs a ticket with an attachment to work against (ticket 4 in the output below). We run it with the creds we just cracked:

python3 41200.py http://help.htb/support/ helpme@helpme.com godhelpmeplz

The 41200 script leaks the staff table, the admin username and its password hash.

We were able to pull the admin hash, so now let's crack it with hashcat. The script labeled it as SHA-256, but it's only 40 hex characters, so this is actually SHA-1. Let's adjust the hash mode:

hashcat -m 100 admin.hash /usr/share/wordlists/rockyou.txt

hashcat cracks the SHA-1 admin hash to Welcome1.

Success, Welcome1. We're in business!

Password spray to SSH

Let's save this to our notes and look for a user to spray that password at. Looking back at my research, there's also an arbitrary file upload exploit for HelpDeskZ that could get us a shell. But spraying a couple of usernames over SSH first, we get a hit on the username help.

Spraying the cracked password over SSH gets a hit as the help user while root, www-data, helpdeskz and helpme are denied.

Great, let's log in via SSH:

ssh help@help.htb

Logging in and checking the home directory, we find user.txt.

SSH session as help on Ubuntu 16.04.5 with kernel 4.4.0-116, reading user.txt with the flag blurred.

Privesc: kernel exploit

Looking at the login banner we're on Ubuntu 16.04.5 with kernel 4.4.0-116-generic, which is vulnerable to a local privesc: Exploit-DB 44298, CVE-2017-16995. It abuses a bug in the kernel's eBPF verifier to get root from a normal user.

Let's pull it over, build it in /tmp and run it.

The kernel exploit drops a root shell in tmp and root.txt is read with the flag blurred.

It worked and we grabbed the root.txt flag.

Closing thoughts

We were stuck on this one for a bit, and the initial foothold was the hardest part. This box was a good way to learn more about endpoints and how they can be vulnerable, especially an exposed GraphQL endpoint that hands over its whole schema. Another lesson: don't trust an exploit's label on a hash, check the length yourself. The privesc was the easiest part of it all.

End of transmissionAll posts
Drive
Johnytiger
HTB: Help · Johnytiger