<?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 3th0_o on Medium]]></title>
        <description><![CDATA[Stories by 3th0_o on Medium]]></description>
        <link>https://medium.com/@hishamhossam105?source=rss-34ccc30941a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_raGj5a74KI7I6-P</url>
            <title>Stories by 3th0_o on Medium</title>
            <link>https://medium.com/@hishamhossam105?source=rss-34ccc30941a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:38:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hishamhossam105/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[CAT CTF | Entry level 26]]></title>
            <link>https://medium.com/@hishamhossam105/cat-ctf-entry-level-26-ad72cb22d7ab?source=rss-34ccc30941a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad72cb22d7ab</guid>
            <dc:creator><![CDATA[3th0_o]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 03:24:48 GMT</pubDate>
            <atom:updated>2026-03-25T03:24:48.060Z</atom:updated>
            <content:encoded><![CDATA[<h3>CAT CTF | Entry level 26 : web write-up</h3><p>Hello Hackers ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqZIgnmxkvSFf7SGD25A6g.jpeg" /></figure><p>I enjoyed participating in the CAT CTF Entry Level 26 competition. Today, I’ll be presenting a write-up for two of the challenges I enjoyed the most while solving. I was able to achieve first blood on both of them and solved 5 out of 10 challenges in total.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mdaHOaHJDSusFMOfYyzg2g.png" /><figcaption>solved challenge</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*tuArbuGvmMCz8nL1k1VDWw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*ypdKmf_XWlKV6u9E_Z0J0g.jpeg" /><figcaption>first blood</figcaption></figure><h3>Web : “Headache”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*exokCs1988w45LD44JXuRw.png" /></figure><blockquote><strong>URL : </strong><a href="http://167.99.34.2:5000/"><strong>http://167.99.34.2:5000/</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*LANwtZL9KV9irYO9Ht6-Ww.jpeg" /></figure><ul><li><strong>Hint:</strong> “Try again with less body.”</li></ul><p>We have to options : <strong>Get Flag</strong> | <strong>Admin Portal</strong></p><h3>Let’s explore!</h3><ol><li><strong>Admin Portal</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*d4WEcmK0xcKKe7HpF_Co0Q.jpeg" /></figure><p>When I tried to access the admin page, it always returned an <strong>“invalid session context”</strong> error.</p><p>After inspecting the page source using Ctrl + U, I found the following code:</p><pre>&lt;script&gt;<br>document.getElementById(&#39;loginForm&#39;).addEventListener(&#39;submit&#39;, function(e) {<br>    e.preventDefault();<br>    document.getElementById(&#39;error&#39;).style.display = &#39;block&#39;;<br>});<br>&lt;/script&gt;</pre><p>This indicates that the page is actually <strong>fake</strong>. The form submission is being intercepted using preventDefault(), which means no request is sent to the server. Instead, it simply displays an error message on the client side.</p><p>So technically, the page does not perform any real authentication or send any data — it’s just a front-end trap.</p><p><strong>2. Get Flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*-zC5w95hdHuIix4qmMH-JQ.png" /></figure><p>I intercepted a request to the /api/flag endpoint using Burp Suite to analyze how the server handles it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IOnnEIMoAMbspw9pye0nA.jpeg" /><figcaption>Request | Response</figcaption></figure><pre>Request:<br>GET /api/flag HTTP/1.1<br>Host: 167.99.34.2:5000</pre><pre>Response: <br>HTTP/1.1 403 FORBIDDEN<br>{<br>  &quot;error&quot;: &quot;admin_only&quot;,<br>  &quot;message&quot;: &quot;Missing elevated authorization context.&quot;<br>}</pre><blockquote>After considering the challenge name <strong>“headache”</strong> and revisiting the provided hint, I came up with the idea of changing the HTTP method from <strong>GET</strong> to <strong>HEAD</strong>.</blockquote><p>This approach was based on the assumption that the server might handle different HTTP methods differently, and that using the <strong>HEAD</strong> method could potentially bypass certain access restrictions or reveal useful information without triggering the usual response behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjFLWptGE0DRZlrdYR9CTg.jpeg" /></figure><pre>Request:<br>HEAD /api/flag HTTP/1.1<br>Host: 167.99.34.2:5000</pre><pre>Response: <br>HTTP/1.1 200 OK<br>Server: Werkzeug/2.3.0 Python/3.11.15<br>Date: Tue, 24 Mar 2026 03:14:35 GMT<br>Content-Type: application/json<br>X-Flag: CATF{M4Yb3_Us1ng_y0ur_H34D_1S_us3full}<br>Cache-Control: no-store<br>Content-Length: 0<br>Connection: close</pre><blockquote>Congrats, I got the flag 🚩<br>CATF{M4Yb3_Us1ng_y0ur_H34D_1S_us3full}</blockquote><h3>Web : “Forest Secrets”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*jnf-BEv7PSo_i2HGb_aEjg.jpeg" /></figure><p><strong><em>Now let’s move on to my favorite challenge.</em></strong></p><blockquote><strong>URL : </strong><a href="http://167.99.34.2:5050/"><strong>http://167.99.34.2:5050/</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvv2SxxZVx3mGJKPrDMvqQ.jpeg" /></figure><p>Oh, this looks like a game! Let’s play and hit start.</p><ol><li>At the beginning, once you press start, you’re given four choices — only one of them is correct, while the others lead to a game over, forcing you to restart the game.</li></ol><h4><strong>So now, we need to inspect the page source using </strong><strong>Ctrl + U.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*jyCtVeVVdcU6l_JttOWK8Q.png" /></figure><p>By navigating to /static/main.js, I examined the main logic behind the game. The script is responsible for rendering the terminal interface, handling audio effects, and managing communication with the backend.</p><p>It interacts with several API endpoints:</p><ul><li>GET /api/options to retrieve the available choices for each stage</li><li>POST /api/monitor to send the selected command for validation</li><li>POST /api/reset to restart the game</li></ul><p>2. When I sent a request to /api/options, it returned the available paths to choose from. Among them, only one path is correct and leads to the final stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgj5JjAjE-EFI_PZAKoJXg.jpeg" /></figure><p>After experimenting with the available choices, I found that the correct path to reach the second-to-last stage is:</p><blockquote><strong>“HEAD TOWARD THE LANTERN LIGHT” → “ENTER THE ABANDONED SHRINE” → “READ THE CARVED TABLET” → “OPEN THE IRON GATE”</strong></blockquote><p>At this point, I thought I had completed the challenge and was about to open the gate and retrieve the flag. However, there was still one final step remaining — adding an extra layer of difficulty and making the challenge even more enjoyable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8J_TR5XJbG3g61_5YLbnSQ.jpeg" /></figure><blockquote><strong>“OPEN THE IRON GATE” → </strong>“The gate refuses to move… Scratched around the keyhole is a single question: WHAT IS THE SECRET COMMAND?”</blockquote><p>3. When I reached this point, I spent quite a bit of time thinking about the next step. Eventually, I decided to check the robots.txt file, where I found a hint that helped me move forward.</p><p>At that moment, I remembered the <strong>Headache</strong> challenge, where the key idea was to change the HTTP method — so I started considering a similar approach here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*TCE4EZD-aH7WCwguG2fdGw.png" /></figure><blockquote><strong>hint : # Old trails answered to more than one method.</strong></blockquote><p>4. Check available methods</p><pre>curl -X OPTIONS http://167.99.34.2:5050/ -i<br><br>HTTP/1.1 200 OK<br>Server: Werkzeug/3.1.6 Python/3.11.15<br>Date: Wed, 25 Mar 2026 03:12:21 GMT<br>Content-Type: text/html; charset=utf-8<br>Allow: GET, HEAD, OPTIONS<br>Cache-Control: no-store<br>Set-Cookie: session=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Path=/<br>Content-Length: 0<br>Connection: close</pre><p>5. So, I decided to send the request using the <strong>OPTIONS</strong> method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yn5D8uQWER3-nr1TZ-tKlw.png" /></figure><blockquote>X-Trail-Head: ASK THE FOREST<br>X-Trail-Tail: FOR A FIFTH PATH</blockquote><h4>Now We have Secret Command : <strong>ASK THE FOREST FOR A FIFTH PATH</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JhQJ_vgQyCBqkVB-9V_EkA.jpeg" /></figure><blockquote>Congrats, I got the flag 🚩<br>CATF{4sk1ng_f0r_A_f1f7h_0p710n_1t_4l4w4ys_h3lpful}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad72cb22d7ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>