<?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 Wajid Ahadpoor on Medium]]></title>
        <description><![CDATA[Stories by Wajid Ahadpoor on Medium]]></description>
        <link>https://medium.com/@wajidareeb?source=rss-f7a933ec5592------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*McSM6uvx15yDm5Jd3lgXZg.jpeg</url>
            <title>Stories by Wajid Ahadpoor on Medium</title>
            <link>https://medium.com/@wajidareeb?source=rss-f7a933ec5592------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:02:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wajidareeb/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 Bypassed VPN Detection, Broke Client-Side Crypto and Found Multiple IDORS]]></title>
            <link>https://medium.com/@wajidareeb/bypassed-vpn-detection-clientside-crypto-and-found-idors-5cdf0cd4ac84?source=rss-f7a933ec5592------2</link>
            <guid isPermaLink="false">https://medium.com/p/5cdf0cd4ac84</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Wajid Ahadpoor]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 06:42:20 GMT</pubDate>
            <atom:updated>2025-09-07T06:13:54.131Z</atom:updated>
            <content:encoded><![CDATA[<p>I ran a security test on a popular local mobile wallet Android App [<strong>REDACTED APP</strong>]. Using a rooted virtual Android, runtime hooks, and Flutter reversing tools, I <strong>bypassed SSL pinning and VPN checks, captured ephemeral AES keys/IVs</strong> with Frida, decrypted the app’s traffic, and discovered several <strong>business-logic IDORs that exposed other users’ transaction</strong> histories and allowed actions against arbitrary accounts.</p><h4>Introduction — why this was fun</h4><p>Security testing can be a bit like being a detective in a locked house: sometimes the locks are solid, sometimes you find the key under the mat. This time I was the detective. No contract — just curiosity and a lab environment. I set out to see how a modern Flutter wallet protects its data and whether the backend actually enforced the rules the client claimed.</p><h4>Quick overview of what I did</h4><ul><li>Environment: rooted Android or virtual Android (root required).</li><li>Tools: Magisk modules to bypass VPN and SSL Pinning, interception proxy, Radare2, Frida for dynamic instrumentation.</li><li>Goals: intercept traffic, understand the app’s crypto, and check server-side authorization for critical actions.</li></ul><h3>The story, step by step (short &amp; sweet)</h3><h4>1) Bypassing SSL pinning and VPN checks — without touching the app</h4><p>The App was sensitive against using VPN or Proxy and force the user to stop it , else a full screen VPN Detection alert.</p><p>I didn’t patch the APK. Instead I used a rooted/virtual environment and Magisk modules to neutralize the app’s runtime checks. That let me position an interception proxy between the app and the network and capture TLS traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*fzxFId7qUwLFn-phygre0w.png" /></figure><blockquote><em>If an attacker controls the device, client-side tricks alone don’t stop them.</em></blockquote><h4>2) Reversing the Flutter app</h4><p>Flutter bundles Dart code in a way that’s different from native Java/Kotlin apps, but it’s not impossible to reverse. With a reversing tool (Radare2) I analyzed the app and hunted for crypto routines. The relevant functions were easy enough to find once you know where to look.</p><p>I searched for encryption/decryption functions on libapp.so library and found two key functions: <em>genHexStr</em> and <em>decByAESArg .</em></p><blockquote><em>genHexStr: </em>It was responsible for generating HEX IV/Key.</blockquote><blockquote>decByAESArg<em>:</em> This Func Decrypt the data with generated IV/Key.</blockquote><h4>3) The crypto scheme — clever but fragile</h4><p>Here’s the high-level magic the app used:</p><ul><li>Hybrid Encryption (Asymmetric &amp; Symmetric).</li><li>For each request, the client generates a random AES key + IV.</li><li>The request body is AES-encrypted with that key/IV.</li><li>The AES key/IV are encrypted with a public key (provided by the server and stored on the device) and sent in headers.</li><li>The server uses its private key to decrypt the AES key/IV, then decrypts the payload and replies using the same AES key/IV.</li></ul><p>That sounds solid — until you can capture those ephemeral AES values before they are encrypted.</p><p><em>Encryption/Decryption mechanism Diagram:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tjlqnlWqtq1tD7wMkS8sMg.png" /><figcaption>Encryption/Decryption Diagram</figcaption></figure><h4>4) Capturing keys with Frida</h4><p>I wrote small Frida hooks that intercepted the AES key and IV right after generation (before the app wrapped them with the server’s public key). Once I had those values, decrypting live traffic became trivial. That’s why client-side key management is a big deal:</p><p>if an attacker can instrument the runtime, ephemeral keys are exposed.</p><h4>The golden part — business-logic IDORs</h4><p>With decrypted traffic in hand I started testing the API parameters. The server trusted client-supplied identifiers in multiple places. <em>Result: I could access or affect other users’ accounts simply by changing an </em><em>account_mid parameter.</em></p><p>Examples (redacted):</p><ul><li>https://[REDACTED_DOMAIN]/api/UserTransHistory — change account_mid → get that account’s full transaction history.</li><li>https://[REDACTED_DOMAIN]/api/doFundTrans — change account_mid → could initiate transfers referencing other users (4-digit PIN was required, but server-side checks were weak).</li><li>https://[REDACTED_DOMAIN]/api/doTopup — change account_mid → topups referencing arbitrary accounts.</li><li>https://[REDACTED_DOMAIN]/api/doFreeze — change account_mid → freeze/unfreeze other users’ cards.</li></ul><blockquote><strong>Impact:</strong> exposure of sensitive financial data, potential fraudulent transactions, and disruption of user accounts.</blockquote><p><strong>A sanitized proof-of-concept:</strong></p><blockquote>1. Intercept an encrypted request to getUserTransHistory.</blockquote><blockquote>2. Capture AES key/IV using Frida at runtime.</blockquote><blockquote>3. Decrypt the request body and read account_mid.</blockquote><blockquote>4. Change account_mid to another account, re-encrypt with the same AES key/IV, and replay.</blockquote><blockquote>Server returns transaction history for the supplied account_mid.</blockquote><h4>What happened after I told them</h4><p>I reported the findings privately. They patched the issues within two weeks and offered a bounty.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cdf0cd4ac84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From regular User to Admin: How I Gained Admin Panel Access]]></title>
            <link>https://medium.com/@wajidareeb/from-user-to-admin-gaining-admin-panel-access-055b1d96b6c0?source=rss-f7a933ec5592------2</link>
            <guid isPermaLink="false">https://medium.com/p/055b1d96b6c0</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Wajid Ahadpoor]]></dc:creator>
            <pubDate>Thu, 19 Oct 2023 17:10:22 GMT</pubDate>
            <atom:updated>2023-10-21T11:47:21.339Z</atom:updated>
            <content:encoded><![CDATA[<p>I am Wajid Ahadpoor, a Penetration tester and bug bounty hunter from Afghanistan 🇦🇫. This is my first article/write-up.</p><p>I will be sharing a story about a private program where I was able to gain access to an admin panel and manage the site.</p><h4>Summary:</h4><p>User credentials token save as (<strong>jw_token=user token</strong>), Admin credentials save as (<strong>storms_a_token=admin token</strong>) in browser’s ‘localStorage’.</p><blockquote><em>I changed the name of the user token item from </em><strong><em>jw_token</em></strong><em> to </em><strong><em>storms_a_token</em></strong><em> in the localstorage and gained access to the Admin panel.</em></blockquote><h4>Details:</h4><p>The site consists of two panels: <em>Users panel and Admin panel</em>.</p><p>Users can register using their phone numbers, and the credentials are saved as a JWT token in the browser’s local storage with the name jw_token.</p><p>After making efforts to find the admin panel directory, I discovered https://example.com/admin_ccr. However, accessing the admin panel required valid credentials, which I did not have.</p><p>I attempted to brute force or use default credentials, but I was unsuccessful.</p><p>I examined the source view of the admin panel login page and found a script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*389jIIPIeozA_3wyWrZNzA.jpeg" /></figure><p>that checks if a specific token (&#39;storms_a_token&#39;) exists in the browser&#39;s localStorage. If it does, the user is redirected to the &quot;admin-cci&quot; page.</p><blockquote>Suddenly, an idea struck me. Why not use my user token here?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*l_YoCvofUDbli9xdPT0hpw.gif" /></figure><p>So, I copied my user JWT token and created an item in the browser’s local storage (storms_a_token=my jwt token). Then, I refreshed the admin page.</p><blockquote>boom!!</blockquote><blockquote>I successfully gained access to the Admin panel.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=055b1d96b6c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>