<?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 Maung Khant on Medium]]></title>
        <description><![CDATA[Stories by Maung Khant on Medium]]></description>
        <link>https://medium.com/@maungkhant.sec?source=rss-dfd24e8b1501------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JX-fJJP8ElIA8Wr8EEDGrA.jpeg</url>
            <title>Stories by Maung Khant on Medium</title>
            <link>https://medium.com/@maungkhant.sec?source=rss-dfd24e8b1501------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 05 Nov 2026 11:20:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maungkhant.sec/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[From GET to CRUD: What HackTheBox’s Web Requests Module Taught Me]]></title>
            <link>https://medium.com/@maungkhant.sec/from-get-to-crud-what-hacktheboxs-web-requests-module-taught-me-e4607e991098?source=rss-dfd24e8b1501------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4607e991098</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Maung Khant]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 03:16:17 GMT</pubDate>
            <atom:updated>2026-10-27T03:16:17.056Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*jOU7zkUzFXUoxzezool_hA.png" /></figure><p><em>HTTP fundamentals, authentication mechanics, and API interaction — for engineers who want to understand web apps from the wire up.</em></p><p>Most of us interact with web applications through abstractions. We click buttons, fill forms, and trust that the browser is doing something sensible underneath. But when you’re assessing an application — whether for a pentest, a bug bounty, or just to understand a system you inherited — those abstractions become liabilities. You need to see the raw conversation between client and server.</p><p><a href="https://academy.hackthebox.com/module/details/35">HackTheBox’s Web Requests module</a> is a compact, hands-on tour of that conversation. It walks through HTTP methods, authentication mechanisms, cookies, and REST-style APIs, all by having you replay and manipulate real requests using cURL and browser devtools. Here is what stuck with me.</p><h3>GET vs. POST: Where Your Data Lives</h3><p>The most useful mental model I took away is this: the HTTP method determines where your data lives, and that placement has consequences.</p><p>GET puts data in the URL (/search.php?search=le). It&#39;s logged, cached, and visible in browser history. It is fine for search terms, but terrible for sensitive data.</p><p>POST puts data in the body (username=admin&amp;password=admin). When replaying a login request, the response included a Set-Cookie: PHPSESSID=... header. From then on, using curl -b &#39;PHPSESSID=...&#39; authenticated me without a password. That’s also why session hijacking is so dangerous: a stolen cookie is a stolen identity.</p><p>One gotcha: the application’s search endpoint expected JSON ({&quot;search&quot;:&quot;london&quot;}). Replaying it required -H &#39;Content-Type: application/json&#39;. Without that header, the server parsed the body as form data, found no search= key, and failed silently. The body&#39;s format is meaningless without the label that declares it.</p><h3>Basic Auth: Encoding Is Not Encryption</h3><p>The unauthenticated request returned a 401 with WWW-Authenticate: Basic realm=&quot;Access denied&quot;. Supplying admin:admin via cURL produced this header:</p><pre>Authorization: Basic YWRtaW46YWRtaW4=</pre><p>That base64 string decodes to admin:admin. There is no cryptography here. It is simply a permission slip written in a language anyone can read. Basic auth is only safe over TLS, and even then, it should be treated as a minimum bar.</p><h3>CRUD APIs: The Verb Is the Instruction</h3><p>The final section reframed everything. The application exposed a clean API where the URL acted as the noun (/api.php/city/london), and the HTTP method acted as the verb:</p><ul><li>POST (Create)</li><li>GET (Read)</li><li>PUT (Update)</li><li>DELETE (Delete)</li></ul><p>The capstone exercise chained them together: rename a city to flag with PUT, delete another city with DELETE, then GET flag to retrieve the reward.</p><p>The real finding wasn’t the commands — it was what was missing. No cookie, no token, and no auth header were required for <em>any</em> of those operations. Anyone who could reach the endpoint could read, create, modify, or destroy data. That is Broken Access Control, a critical finding in a real assessment. The takeaway: when you find one working request, test every verb against the same URL. The gap between GET /resource and DELETE /resource is one word — and sometimes one missing authorization check.</p><h3>Practical Takeaways</h3><ol><li>The Network tab is a specification. Clear it, perform the action, and read the request. Method, path, headers, cookies, and body format — that is the full contract. “Copy as cURL” is faster than reverse-engineering.</li><li>Cookies are credentials. Treat them with the same care as passwords.</li><li>Content-Type is load-bearing. Mismatches cause silent failures that look like server bugs.</li><li>Test every verb. A protected GET doesn&#39;t mean PUT and DELETE are.</li><li>jq is not optional. It turns unreadable JSON blobs into structures you can actually reason about.</li></ol><h3>Closing Thoughts</h3><p>The module is short but dense. The progression — GET, POST, auth, cookies, JSON, CRUD — mirrors how apps are built and how assessments unfold: read the visible request, learn the contract, test the boundaries. Every concept came with a command you could run, which is why it sticks. Theory about Set-Cookie is abstract; watching your cookie authenticate you after you&#39;ve logged out is not.</p><p>If you want to try these exercises yourself in a safe, authorized environment, you can find the module <a href="https://academy.hackthebox.com/module/details/35">here on HackTheBox Academy</a>.</p><p><em>All exercises were performed in HackTheBox’s authorized lab environment. The techniques described are for educational purposes and should only be applied to systems you have explicit permission to test.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4607e991098" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Bypassed Myanmar’s ISP Censorship Using Python, Tor, and Bash]]></title>
            <link>https://medium.com/@maungkhant.sec/how-i-bypassed-myanmars-isp-censorship-using-python-tor-and-bash-42d266d9d785?source=rss-dfd24e8b1501------2</link>
            <guid isPermaLink="false">https://medium.com/p/42d266d9d785</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tor-network]]></category>
            <category><![CDATA[cyber-security-solutions]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Maung Khant]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 02:03:25 GMT</pubDate>
            <atom:updated>2026-10-30T01:52:49.299Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How I Bypassed Myanmar’s ISP Censorship Using Python, Tor, and Bash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpKJ8D7aBKHMdSyPPpUYDg.png" /></figure><p>A real-world case study on defeating Deep Packet Inspection (DPI) with obfs4 bridges and automating the entire process.</p><p>Living in a region with strict internet censorship is a daily exercise in frustration. In Myanmar, Internet Service Providers (ISPs) have deployed aggressive Deep Packet Inspection (DPI) technologies. They don’t just block specific websites; they actively hunt and throttle privacy-enhancing tools like the Tor network.</p><p>If you try to open the standard Tor browser, the connection is dropped instantly. The ISP sees the Tor handshake and slams the door shut.</p><p>I decided to build a reliable, system-wide censorship bypass on my Ubuntu 24.04 laptop. But instead of just following a standard tutorial, I had to engineer a solution that could survive the specific DPI blocks of my ISP.</p><p>Here is the story of how I used AnonSurf, obfs4 bridges, Bash, and Python to take my internet freedom back — and how you can do it too.</p><h3>The Concept: Hiding in Plain Sight</h3><p>To understand how we beat DPI, we have to understand how it works.</p><p>Standard Tor traffic is encrypted, but the initial “knock on the door” (the handshake) has a recognizable signature. DPI looks for this signature and blocks it.</p><p>To bypass this, we use Pluggable Transports, specifically obfs4. Think of obfs4 as a disguise. It takes your Tor traffic and scrambles it so that it looks like a normal, harmless HTTPS connection to a regular website. To the ISP, you are just reading the news. In reality, you are entering the Tor network.</p><p>But to connect to Tor using obfs4, you can’t use the public Tor entry nodes (they are all blocked). You must use Bridges — unlisted, secret entry points provided by the Tor Project.</p><p>Here is the architecture I built:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAElKd6dONB--lQv82QKqw.png" /></figure><blockquote>Diagram: How traffic flows from the laptop, through the obfs4 disguise, past the ISP’s DPI, and into the Tor network.</blockquote><h3>The Setup: AnonSurf and the Disguise</h3><p>I chose AnonSurf to manage my connection. Unlike the Tor Browser (which only anonymizes the browser), AnonSurf uses iptables to route <em>every single packet</em> leaving my laptop through Tor. It prevents leaks from other apps like Telegram or my terminal.</p><ol><li>I compiled AnonSurf from source for Ubuntu 24.04.</li><li>I requested obfs4 bridges using the Tor Project’s official Telegram bot (@GetBridgesBot).</li><li>I injected these bridges into AnonSurf’s configuration file.</li></ol><p>Once connected, I verified my identity using check.torproject.org. Seeing {&quot;IsTor&quot;:true} and a German IP address pop up on my screen was a massive win. I was officially invisible to my ISP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eKvbvHRWh9aUPueAsQm-wA.png" /></figure><blockquote>Success! The ISP is bypassed, and traffic is routing through Europe.</blockquote><h3>Problem #1: The DNS Breakage (and the Bash Solution)</h3><p>Everything worked perfectly until I tried to turn it off.</p><p>When I ran sudo anonsurf stop, my internet completely broke. I kept getting Temporary failure in name resolution.</p><p>I realized that AnonSurf hijacks the system’s DNS file (/etc/resolv.conf) to force all traffic through Tor. But when it stops, it fails to restore Ubuntu 24.04&#39;s default systemd-resolved symlink. It leaves the system in a broken state.</p><p>To fix this, I wrote a custom Bash automation script (anonsurf-toggle.sh).</p><p>Instead of just turning Tor on and off, this script acts as a manager. When I tell it to stop, it:</p><ol><li>Safely kills AnonSurf.</li><li>Deletes the broken DNS file.</li><li>Recreates the correct system symlink.</li><li>Restarts the DNS service.</li><li>Pings Google to confirm the clearnet connection is restored.</li></ol><p>Now, switching between my normal internet and the Tor network is a single, flawless command.</p><h3>Problem #2: When the ISP Blocks the API (Enter Python)</h3><p>To make the project portfolio-ready, I wanted to automate the most tedious part: fetching new bridges. Bridges get blocked frequently, so you constantly need fresh ones.</p><p>I wrote a Python script that queried the official Tor Project MOAT API, requested new obfs4 bridges, and automatically injected them into my configuration file.</p><p>There was just one problem: My ISP blocked the API.</p><p>When I ran the script, it threw a [Errno 101] Network is unreachable error. My ISP had successfully identified and blocked bridges.torproject.org via DPI.</p><p>But in Cybersecurity, failure isn’t the end; it’s just a prompt to pivot.</p><p>I updated the Python script to include graceful error handling. Instead of crashing, the script now specifically catches the ConnectionError. It prints a clear, human-readable message explaining that the ISP is blocking the API and automatically advises the user to use the Telegram Bot fallback method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kI2q0cAlUMqmT_WRqTrz1Q.png" /></figure><blockquote>The Python script correctly identifying ISP DPI blocking and advising the fallback.</blockquote><p>This highlights a crucial lesson in network security: APIs can be blocked, but humans will always find a backdoor. The Telegram bot cannot be easily blocked by the ISP without breaking normal communications, making it the ultimate fallback.</p><h3>The Result: A Resilient Censorship Bypass</h3><p>By combining Bash for system automation and Python for network resilience, I created a highly robust tool.</p><p>This project isn’t just about installing Tor; it’s about building a resilient infrastructure that survives a hostile network environment. It proved that while ISPs can block standard traffic and APIs, a combination of obfuscation (obfs4) and fallback planning can defeat them.</p><p>If you are facing censorship or want to see the exact code, scripts, and troubleshooting logs I used, I have open-sourced the entire project on GitHub.</p><p>👉 <a href="https://github.com/maung-khant/tor-obfs4-dpi-bypass">Check out the GitHub Repository here</a></p><p><em>Have you ever had to bypass DPI or fight ISP censorship? Let me know your strategies in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42d266d9d785" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>