BACK TO PORTFOLIO
Principal is a medium difficulty machine that is themed around misplaced cryptographic trust. The foothold exploits [CVE-2026-29000](https://nvd.nist.gov/vuln/detail/CVE-2026-29000), an authentication bypass in pac4j-jwt's JwtAuthenticator where a PlainJWT wrapped inside a valid JWE envelope bypasses signature verification entirely. After forging an admin token and extracting SSH credentials from the corporate dashboard, privilege escalation abuses an SSH CA configuration that trusts any certificate signed by the CA without validating the principal (username) claim, allowing us to forge a certificate for root. Both attack stages exploit the same class of flaw: a system that verifies the cryptographic envelope but never validates the identity claim inside it. Let's start by performing an nmap scan over the target `10.129.40.176` ``` ❯ nmap -sC -sV -p- -O --min-rate 5000 10.129.40.176 Starting Nmap 7.95 ( https://nmap.org ) at 2026-04-19 11:10 CEST Nmap scan report for 10.129.40.176 Host is up (0.042s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.14 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 256 b0:a0:ca:46:bc:c2:cd:7e:10:05:05:2a:b8:c9:48:91 (ECDSA) |_ 256 e8:a4:9d:bf:c1:b6:2a:37:93:40:d0:78:00:f5:5f:d9 (ED25519) 8080/tcp open http-proxy Jetty |_http-server-header: Jetty | http-title: Principal Internal Platform - Login |_Requested resource was /login | fingerprint-strings: | FourOhFourRequest: | HTTP/1.1 404 Not Found | Date: Sun, 19 Apr 2026 09:11:05 GMT | Server: Jetty | X-Powered-By: pac4j-jwt/6.0.3 | Cache-Control: must-revalidate,no-cache,no-store | Content-Type: application/json | {"timestamp":"2026-04-19T09:11:05.647+00:00","status":404,"error":"Not Found","path":"/nice%20ports%2C/Tri%6Eity.txt%2ebak"} | GetRequest: | HTTP/1.1 302 Found | Date: Sun, 19 Apr 2026 09:11:05 GMT | Server: Jetty | X-Powered-By: pac4j-jwt/6.0.3 | Content-Language: en | Location: /login | Content-Length: 0 | HTTPOptions: | HTTP/1.1 200 OK | Date: Sun, 19 Apr 2026 09:11:05 GMT | Server: Jetty | X-Powered-By: pac4j-jwt/6.0.3 | Allow: GET,HEAD,OPTIONS | Accept-Patch: | Content-Length: 0 | RTSPRequest: | HTTP/1.1 505 HTTP Version Not Supported | Date: Sun, 19 Apr 2026 09:11:05 GMT | Cache-Control: must-revalidate,no-cache,no-store | Content-Type: text/html;charset=iso-8859-1 | Content-Length: 349 | | |
|
Error 505 Unknown Version
| | |
HTTP ERROR 505 Unknown Version
|
|
URI:
/badMessage
|
STATUS:
505
|
MESSAGE:
Unknown Version
|
| | | Socks5: | HTTP/1.1 400 Bad Request | Date: Sun, 19 Apr 2026 09:11:05 GMT | Cache-Control: must-revalidate,no-cache,no-store | Content-Type: text/html;charset=iso-8859-1 | Content-Length: 382 | | |
|
Error 400 Illegal character CNTL=0x5
| | |
HTTP ERROR 400 Illegal character CNTL=0x5
|
|
URI:
/badMessage
|
STATUS:
400
|
MESSAGE:
Illegal character CNTL=0x5
|
| |_ |_http-open-proxy: Proxy might be redirecting requests 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port8080-TCP:V=7.95%I=7%D=4/19%Time=69E49C28%P=x86_64-pc-linux-gnu%r(Ge SF:tRequest,A4,"HTTP/1\.1\x20302\x20Found\r\nDate:\x20Sun,\x2019\x20Apr\x2 SF:02026\x2009:11:05\x20GMT\r\nServer:\x20Jetty\r\nX-Powered-By:\x20pac4j- SF:jwt/6\.0\.3\r\nContent-Language:\x20en\r\nLocation:\x20/login\r\nConten SF:t-Length:\x200\r\n\r\n")%r(HTTPOptions,A2,"HTTP/1\.1\x20200\x20OK\r\nDa SF:te:\x20Sun,\x2019\x20Apr\x202026\x2009:11:05\x20GMT\r\nServer:\x20Jetty SF:\r\nX-Powered-By:\x20pac4j-jwt/6\.0\.3\r\nAllow:\x20GET,HEAD,OPTIONS\r\ SF:nAccept-Patch:\x20\r\nContent-Length:\x200\r\n\r\n")%r(RTSPRequest,220, SF:"HTTP/1\.1\x20505\x20HTTP\x20Version\x20Not\x20Supported\r\nDate:\x20Su SF:n,\x2019\x20Apr\x202026\x2009:11:05\x20GMT\r\nCache-Control:\x20must-re SF:validate,no-cache,no-store\r\nContent-Type:\x20text/html;charset=iso-88 SF:59-1\r\nContent-Length:\x20349\r\n\r\n\n\n
\n
Error\x20505\x20Unknown\x20Version\n\n\n
HTT SF:P\x20ERROR\x20505\x20Unknown\x20Version
\n
\n
URI:
/badMessage
\n
STATUS:
505
\n
SF:
MESSAGE:
Unknown\x20Version
\n
\n\n\ SF:n\n")%r(FourOhFourRequest,13B,"HTTP/1\.1\x20404\x20Not\x20Found\ SF:r\nDate:\x20Sun,\x2019\x20Apr\x202026\x2009:11:05\x20GMT\r\nServer:\x20 SF:Jetty\r\nX-Powered-By:\x20pac4j-jwt/6\.0\.3\r\nCache-Control:\x20must-r SF:evalidate,no-cache,no-store\r\nContent-Type:\x20application/json\r\n\r\ SF:n{\"timestamp\":\"2026-04-19T09:11:05\.647\+00:00\",\"status\":404,\"er SF:ror\":\"Not\x20Found\",\"path\":\"/nice%20ports%2C/Tri%6Eity\.txt%2ebak SF:\"}")%r(Socks5,232,"HTTP/1\.1\x20400\x20Bad\x20Request\r\nDate:\x20Sun, SF:\x2019\x20Apr\x202026\x2009:11:05\x20GMT\r\nCache-Control:\x20must-reva SF:lidate,no-cache,no-store\r\nContent-Type:\x20text/html;charset=iso-8859 SF:-1\r\nContent-Length:\x20382\r\n\r\n\n\n
\n
Error\x20400\x20Illegal\x20character\x20CNTL=0x5
\n\n
\n
HTTP\x20ERROR\x20400\x20Illegal\x20character\x20CNTL=0x5
\ SF:n
\n
URI:
/badMessage
\n
STATUS: SF:th>
400
\n
MESSAGE:
Illegal\x20character\x20 SF:CNTL=0x5
\n
\n\n\n