<?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 Jesse Freeman on Medium]]></title>
        <description><![CDATA[Stories by Jesse Freeman on Medium]]></description>
        <link>https://medium.com/@jessec.freeman?source=rss-ff027755d276------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-8y69euKVl5ktYBGBJz7Gg.jpeg</url>
            <title>Stories by Jesse Freeman on Medium</title>
            <link>https://medium.com/@jessec.freeman?source=rss-ff027755d276------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:38:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jessec.freeman/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[How I Conquered a PHP Challenge with Zero PHP Knowledge and a Hybrid AI Sidekick]]></title>
            <link>https://medium.com/@jessec.freeman/how-i-conquered-a-php-challenge-with-zero-php-knowledge-and-a-hybrid-ai-sidekick-4f89d0e0819b?source=rss-ff027755d276------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f89d0e0819b</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Jesse Freeman]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 17:02:29 GMT</pubDate>
            <atom:updated>2025-07-14T17:10:12.890Z</atom:updated>
            <content:encoded><![CDATA[<p>Every so often in cybersecurity, you hit a challenge that feels like a perfect storm of your own knowledge gaps. For me, that was ctf.l3ak.team’s CTF challenge “Certay,” a task that was wall-to-wall PHP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuWH6LYGZmerWeIQxjaUuQ.png" /></figure><p>Going in, my knowledge of the language was minimal at best. I knew this wasn’t going to be a test of what I already knew, but a test of how well I could learn on the fly and, most importantly, how well I could manage my tools.</p><p>My primary tool for this fight was a hybrid AI partner I’ve cheekily nicknamed “Gaude” — a strategic combination of Google’s Gemini and Anthropic’s Claude. My game plan was simple: feed Gaude the source code and my live results from the server, give it guard rails using my human experience, and see what attack vectors it could find.</p><p>This was an extremely fun challenge, but the initial phase felt like a brute-force operation. Gaude was spitting out ideas — some brilliant, some dead ends — and I was methodically working through them.</p><p>It became clear to me rather quickly after reading my tools analysis of the source files and playing around in the web application that I needed to construct the right dashboard URL. My basic probing revealed some errors and my instincts told me I needed to bypass the errors or make the right error appear.</p><blockquote><strong>Warning</strong>: Use of undefined constant iv — assumed ‘iv’ (this will throw an Error in a future version of PHP) in <strong>/var/www/html/dashboard.php</strong> on line <strong>20</strong></blockquote><blockquote><strong>Warning</strong>: openssl_encrypt(): IV passed is only 2 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in <strong>/var/www/html/dashboard.php</strong> on line <strong>20</strong></blockquote><blockquote><strong>Warning</strong>: openssl_encrypt(): IV passed is 24 bytes long which is longer than the 16 expected by selected cipher, truncating in <strong>/var/www/html/dashboard.php</strong> on line <strong>23</strong> Nothing to see, ask your friends for our trust key!</blockquote><p>We started with parameter fuzzing using ffuf, probing for any logical cracks in the system with a custom wordlist.</p><p>Generated bash</p><blockquote>ffuf -u ‘http://.../dashboard.php?msg=FUZZ1&amp;key=FUZZ2&amp;hash=FUZZ3&#39; \</blockquote><blockquote>-w — :FUZZ1 -w — :FUZZ2 -w — :FUZZ3 \</blockquote><blockquote>-mc 200 -fc 404 &lt;&lt; ‘EOF’</blockquote><blockquote>admin, test, null, false, yek, key, Certay, CEA</blockquote><p>The results showed some intriguing timing differences, but ultimately led nowhere. It was a classic case of an AI suggesting a logical, yet fruitless, path. What I quickly discovered was that these models, for all their power, can get stuck in a loop.</p><p>When one would fixate on a flawed theory, I developed a new tactic: I’d take the work from Claude and have Gemini review it, and vice versa. This “AI cross-examination” became my secret weapon for creating breakouts, forcing a fresh perspective when Gaude got stuck on its own logic.</p><p>One of the earliest suggestions from Gemini was to use a Python library called <a href="https://www.pycryptodome.org/"><em>pycryptodome</em></a>. It argued that the server’s encryption was fatally flawed and could be replicated locally.</p><p>Generated python snippet…</p><blockquote>import base64</blockquote><blockquote>from Crypto.Cipher import AES</blockquote><blockquote>from Crypto.Util.Padding import pad</blockquote><blockquote># … code to replicate flawed encryption …</blockquote><p>Honestly, I skipped right over it. My experience has taught me to be wary of AI overcomplication; so often, the simplest solution is the right one, and a complex external library felt like a rabbit hole. The AI was probably just overthinking it, I thought.</p><p>So, I pushed us down other paths. We spent an hour investigating TLS errors with openssl and curl, convinced the challenge name “Certay” was a hint about a certificate vulnerability.</p><p>Generated bash</p><blockquote># Probing for TLS vulnerabilities</blockquote><blockquote>curl -k — tlsv1.2 <a href="https://.../">https://.../</a></blockquote><blockquote>openssl s_client -connect … -tls1_3 -quiet</blockquote><p>But eventually, with all the simpler paths exhausted, my mind drifted back to that first suggestion. Still skeptical, I decided to use my hybrid approach. Instead of just running the code, I asked Claude to do some research <em>on</em> pycryptodome. I wanted to understand what it was and why Gemini might have suggested it with such confidence.</p><p>Claude’s analysis was the push I needed. It explained how the library could precisely mimic the specific AES-256-CBC routines used by PHP, making it the perfect tool for the job. It confirmed that Gemini’s logic was sound: the server was using a NULL key because of a typo ($yek vs yek), and the only way to solve it was to replicate that exact flaw.</p><p>It was time to trust the process. I installed the library (pip install pycryptodome) and requested a rewrite of the <em>original</em> Python script Gemini had suggested hours earlier with updated context. It was designed to trigger a failure in the server’s encryption by passing an array in the URL (&amp;key[]=) and then calculate the resulting hash.</p><p>I ran the script. It spit out a URL.</p><p><a href="http://.../dashboard.php?msg=a&amp;key%5B%5D=&amp;hash=tKXpivaBCoO99SsUroIsNw%3D%3D">http://.../dashboard.php?msg=a&amp;key%5B%5D=&amp;hash=tKXpivaBCoO99SsUroIsNw%3D%3D</a></p><p>One copy-paste later, the flag appeared on my screen.</p><p>The solution had been there all along, but it took a journey of skepticism, research, and a unique partnership with my AI tools to see it. I’m really proud to have been able to solve this without any base knowledge of the language. It proved that in modern cybersecurity, you don’t always have to be the expert. Sometimes, the real skill lies in knowing how to orchestrate your resources, when to question them, and ultimately, when to trust them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f89d0e0819b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>