Crane Writeup - Proving Grounds
Created October 6, 2026 • Last updated October 6, 2026 • 2 min read
Crane runs SuiteCRM with default credentials. The version is vulnerable to CVE-2022-23940, an authenticated remote code execution, and a public exploit returns a shell as www-data. From there www-data can run service through sudo, and a GTFOBins path trick spawns a root shell.
Reconnaissance
Nmap
Scan all TCP ports and fingerprint the services.
PORT STATE SERVICE VERSION 80/tcp open http Apache httpd
Explain command
| -p- | Scan all 65535 TCP ports. |
| -sCV | Run the default scripts and probe service versions. |
A web server is running on the target. Browsing to it shows a SuiteCRM login page.
SuiteCRM
SuiteCRM is an open-source Customer Relationship Management application for servers, written in PHP. Note the version from the login page for the next step.
Exploitation
Remote code execution
The application is using the default credentials admin:admin, which log straight into the admin panel. Searching for the SuiteCRM version turns up CVE-2022-23940, an authenticated remote code execution, with a public exploit at github.com/manuelz120/CVE-2022-23940. The exploit authenticates and triggers code execution, so start a listener and fire it with a reverse shell payload.
Explain command
| -nvlp | Listen, verbose, no DNS resolution, on the given port. |
Explain command
| -u | SuiteCRM username. |
| -p | SuiteCRM password. |
| --payload | Command to execute on the target. |
The listener catches a shell as www-data.
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Privilege Escalation
Check the sudo rights for www-data.
Matching Defaults entries for www-data on localhost:
env_reset, mail_badpass, secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
User www-data may run the following commands on localhost:
(ALL) NOPASSWD: /usr/sbin/service
www-data can run /usr/sbin/service as root with no password. The GTFOBins technique for service passes a relative path that resolves to a shell, which service then executes as root.
root@crane:/# id uid=0(root) gid=0(root) groups=0(root)
The path traversal makes service run /bin/bash as root, giving a root shell.
Related
References
-
manuelz120/CVE-2022-23940CVE: manuelz120/CVE-2022-23940, github.com/manuelz120/CVE-2022-23940 (opens in new tab)
SuiteCRM authenticated remote code execution exploit.
-
Authenticated remote code execution in SuiteCRM.
-
Sudo abuse of service via a relative path to a shell.