<?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 Krishna Soni on Medium]]></title>
        <description><![CDATA[Stories by Krishna Soni on Medium]]></description>
        <link>https://medium.com/@Krishna_Soni?source=rss-7f6c823ca25d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KTBRMlX6SIbtfs27</url>
            <title>Stories by Krishna Soni on Medium</title>
            <link>https://medium.com/@Krishna_Soni?source=rss-7f6c823ca25d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:08:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Krishna_Soni/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[Reverse Engineering picoCTF Challenge: Bbbbloaat (Medium Difficulty)]]></title>
            <link>https://medium.com/@Krishna_Soni/reverse-engineering-picoctf-challenge-bbbbloaat-medium-difficulty-846e9f3ef870?source=rss-7f6c823ca25d------2</link>
            <guid isPermaLink="false">https://medium.com/p/846e9f3ef870</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Krishna Soni]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 16:12:11 GMT</pubDate>
            <atom:updated>2026-08-30T04:08:16.425Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Reverse engineering is a core skill in cybersecurity, especially in Capture The Flag (CTF) competitions. In this writeup, I’ll walk through the picoCTF 2022 challenge <strong>“Bbbbloaat”</strong>, categorized under reverse engineering with medium difficulty. The goal: analyze the binary, understand its logic, and extract the hidden flag.</p><p><a href="https://learn.cylabacademy.org/library?page=1&amp;search=Bbbb">https://learn.cylabacademy.org/library?page=1&amp;search=Bbbb</a></p><h3>Challenge Setup</h3><ul><li>Platform: CyLab Security Academy (picoCTF challenge library).</li><li>Tools used: <strong>Ghidra</strong> for static analysis, <strong>Kali Linux terminal</strong> for execution, and <strong>Python3</strong> for quick conversions.</li><li>Files loaded in Ghidra: bbbbloat</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WfPBHS-Y33Wa3sOzyL1XBw.png" /></figure><h3>Step 1: Binary Execution</h3><p>Running the binary ./bbbbloat prompts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*S0Obp1ul35uGCyQOBxhvIQ.png" /></figure><h3>Step 2: Static Analysis in Ghidra</h3><p>In Ghidra, I searched for the string What’s my favorite number?</p><p>By cross‑referencing the string with its function calls, I traced execution flow to the main function. This confirmed the exact location of the comparison logic before enabling the decompiler for a clearer view. This string was directly linked to the main function. <strong>Cross‑referencing strings with function calls is a standard reverse engineering technique that helps quickly locate critical logic in binaries.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*roAyG9iw4GLbn2P0I4mTFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_pAmhm-rIS0fTfuRBdLU3Q.png" /></figure><h3><strong>Step 3 Using the Decompiler</strong></h3><p>After locating the comparison instruction in the disassembly, I enabled Ghidra’s decompiler option. This provided a C‑like representation of the main function, making the program logic easier to understand. The decompiled view confirmed that the binary checks user input against the constant <strong>0x86187</strong> fore printing the flag.</p><p><strong>CMP EAX, 0x86187</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGSs5RsKgu9b9fkvDLbPpA.png" /></figure><h3>Step 4 : Why Python Was Used</h3><p>The binary expects a <strong>decimal input</strong>, but the constant is in <strong>hexadecimal</strong>. To convert quickly, I used Python:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TkHQBKTL3L9lJPIae9pSA.png" /></figure><p>Python is ideal here because:</p><ul><li>It handles hex‑to‑decimal conversion instantly.</li><li>No need to manually calculate or use external tools.</li><li>It’s available by default in most Linux environments.</li></ul><h3>Step 5: Solving the Challenge</h3><p>Re‑running the binary with the converted decimal value:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*iy83mq353eG0icxenIpv5Q.png" /></figure><p><strong>Observations &amp; Learning Outcomes:</strong></p><ul><li>Hex vs decimal confusion is common in binaries.</li><li>Ghidra helps quickly identify comparison logic.</li><li>Python scripting is invaluable for quick conversions.</li><li>Combining static analysis with dynamic testing is the most efficient workflow.</li></ul><p><strong>Conclusion:</strong> Summarize how the challenge demonstrates blending static analysis with practical problem solving. Mention that documenting the process builds both technical depth and communication skills.</p><ul><li><strong>Tools Used</strong>: Ghidra, Kali Linux, Python3</li><li><strong>Disclaimer</strong>: This writeup is for educational and research purposes only.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=846e9f3ef870" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Samsung Galaxy S10 (SM-G973F) Rooting on Android 12 Using Magisk: My Hands-On Experience]]></title>
            <link>https://medium.com/@Krishna_Soni/samsung-galaxy-s10-sm-g973f-rooting-on-android-12-using-magisk-my-hands-on-experience-977fdd0cd35c?source=rss-7f6c823ca25d------2</link>
            <guid isPermaLink="false">https://medium.com/p/977fdd0cd35c</guid>
            <category><![CDATA[android-security-testing]]></category>
            <category><![CDATA[root-android-phone]]></category>
            <category><![CDATA[magik]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <dc:creator><![CDATA[Krishna Soni]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 12:01:10 GMT</pubDate>
            <atom:updated>2026-08-24T12:01:10.971Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Disclaimer:</strong> Rooting modifies the security configuration of an Android device and can result in data loss, boot loops, or an unusable device if the wrong files are flashed. This guide is for educational and authorized testing purposes. Always verify your exact model and firmware before proceeding.</p><h3>Introduction</h3><p>Rooting an Android device is one of those processes that looks simple when you watch someone else do it.</p><p>Then you try it yourself.</p><p>And suddenly your phone decides that the Samsung logo is its new permanent wallpaper. 😅</p><p>In this article, I will document my experience rooting a <strong>Samsung Galaxy S10 (SM-G973F) running Android 12 using Magisk</strong>.</p><p>The goal was not only to get root access, but also to understand the complete process — from identifying the correct firmware and unlocking the bootloader to patching the AP file with Magisk and verifying root access.</p><p>And yes, there was a <strong>9-hour boot-loop adventure</strong> somewhere in between.</p><h3>1. Device Information</h3><p>Device Samsung Galaxy S10</p><p>Model SM-G973F</p><p>Android Version Android 12</p><p>Root Method Magisk</p><p>Firmware Method Odin</p><p>Platform Samsung One UI / Android</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qjc7Ilmp86fsQ8A-2Yucow.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pd-BzzA49l_L3nnpuZLblw.jpeg" /></figure><h3>2. What You Need</h3><p>Before starting, prepare everything first.</p><h3>Required</h3><ul><li>Samsung Galaxy S10 SM-G973F</li><li>Windows PC</li><li>Good-quality USB cable</li><li>Samsung USB drivers</li><li>Odin</li><li>Correct firmware for the exact model</li><li>Magisk APK</li><li>Sufficient battery</li><li>Backup of important data</li></ul><p>The most important point here is:</p><blockquote><strong><em>Do not blindly use firmware meant for another model.</em></strong></blockquote><p>Samsung devices can have very similar model names, but the firmware is not necessarily interchangeable.</p><h3>3. Check the Model Number and Android Version</h3><p>Before downloading anything, verify the device information.</p><p>Go to:</p><p><strong>Settings → About phone</strong></p><p>Check:</p><ul><li>Model number</li><li>Software information</li><li>Android version</li><li>One UI version</li></ul><p>For my device:</p><p><strong>Model:</strong> SM-G973F<br> <strong>Android:</strong> 12</p><p>This step looks basic, but it is one of the most important steps in the entire process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pd-BzzA49l_L3nnpuZLblw.jpeg" /></figure><h3>A4. Enable Developer Options</h3><p>To access the required Android development settings:</p><ol><li>Open <strong>Settings</strong>.</li><li>Go to <strong>About phone</strong>.</li><li>Open <strong>Software information</strong>.</li><li>Tap <strong>Build number</strong> multiple times until Developer Options are enabled.</li><li>Return to Settings.</li><li>Open <strong>Developer options</strong>.</li></ol><p>From there, USB debugging can be enabled when required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*Sela8Dlz_l9R9qQXYbbZoA.png" /></figure><h3>5. OEM Unlocking</h3><p>Bootloader unlocking is a critical part of Samsung rooting.</p><p>The <strong>OEM unlocking</strong> option needs to be available and enabled before proceeding with the bootloader unlock process.</p><p>However, Samsung’s behavior can vary depending on the device, region, firmware, and account/device state.</p><p>So don’t assume that the option will immediately appear.</p><p><strong>Important:</strong> Unlocking the bootloader can wipe user data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*KHR-8FbOXRigZl_TnqykZA.png" /></figure><h3>6. Download the Correct Firmware</h3><p>The next step is obtaining the firmware corresponding to the exact device model.</p><p>Download firmware from a reputable source and verify that the firmware matches the exact device model and required binary/bootloader version.</p><p>For my device, the target model was:</p><p><strong>SM-G973F</strong></p><p>The firmware package normally contains files such as:</p><ul><li>BL</li><li>AP</li><li>CP</li><li>CSC</li><li>HOME_CSC</li></ul><p>The <strong>AP file</strong> is particularly important because this is the file that will be patched using Magisk.</p><p>Before proceeding, verify that the firmware corresponds to the device and Android/firmware version you are working with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0J3aD56v7s5vRu04sJh5VQ.png" /></figure><h3>7. Preparing the AP File</h3><p>This is where Magisk becomes part of the process.</p><p>The AP firmware file is loaded into Magisk on the Android device and patched.</p><p>The general workflow is:</p><p><strong>Original AP → Magisk → Patched AP</strong></p><p>The patched AP contains the modifications required for the rooting process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PU5GVqUqtjaevWD_cXTPbw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*dglqnGipjmU1Bd1zoh-iCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4gDjCuEXg0EC8dvoMStwQ.jpeg" /></figure><p>After patching, Magisk generates a patched image/file that can be transferred back to the PC for the flashing stage.</p><h3>8. The Part Where Everything Went Wrong 😅</h3><p>Now comes the most important lesson from my experience.</p><p>I initially patched the AP file using Magisk and proceeded with the flashing process.</p><p>And then…</p><p><strong>Boot loop.</strong></p><p>Samsung logo.</p><p>Restart.</p><p>Samsung logo.</p><p>Restart.</p><p>Again.</p><p>And again.</p><p>At this point, the phone basically had one job:</p><blockquote><strong><em>Boot Android.</em></strong></blockquote><p>And it decided not to do it. 😂</p><p>What I thought would be a relatively straightforward process turned into approximately <strong>9 hours of troubleshooting</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*la9HEqvFpdJkgwBfH6O5-w.png" /></figure><h3>9. The 9-Hour Boot Loop Lesson</h3><p>This was probably the most useful part of the entire exercise.</p><p>The problem taught me that rooting isn’t simply:</p><p><strong>Patch AP → Flash AP → Rooted</strong></p><p>There are several variables involved:</p><ul><li>Correct firmware</li><li>Correct model</li><li>Correct bootloader state</li><li>Correct Magisk procedure</li><li>Correct flashing configuration</li><li>Correct firmware files</li><li>Correct installation sequence</li></ul><p>A small mistake can result in a boot loop.</p><p>So if you are following a rooting guide, don’t just copy commands or files blindly.</p><p>Understand <strong>what each file is doing</strong>.</p><h3>10. Recovery From the Boot Loop</h3><p>After troubleshooting, I went back through the process carefully and rechecked the firmware and patched files.</p><p>The important lesson was to avoid repeatedly flashing random combinations of firmware files.</p><p>Instead:</p><ol><li>Confirm the exact model.</li><li>Confirm the firmware version.</li><li>Verify the firmware package.</li><li>Recheck the AP patching process.</li><li>Recheck the flashing configuration.</li><li>Allow the device to complete its first boot.</li></ol><p>Once everything was corrected, the device successfully booted into Android.</p><p>And after spending nine hours staring at the Samsung logo…</p><p>Seeing the Android home screen felt like winning a CTF flag. 😂</p><h3>11. Final Root Verification</h3><p>After the device successfully booted, I installed/opened Magisk and checked the root status.</p><p>The final result confirmed that the rooting process had been successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n41-ht9NJCzCzd0ezAjeIw.jpeg" /></figure><p>This screenshot is the main proof of the final state of the device.</p><h3>12. Why I Documented the Process</h3><p>The main purpose of documenting this process was not simply to root a phone.</p><p>It was to understand the complete Android rooting workflow.</p><p>From a mobile application security perspective, having a rooted test device can be useful for authorized security testing because it provides greater visibility into the Android environment.</p><p>For example, security researchers may use rooted test devices to study:</p><ul><li>Application storage</li><li>Runtime behavior</li><li>Android permissions</li><li>Local application data</li><li>Certificate pinning</li><li>WebView behavior</li><li>Debugging</li><li>File-system access</li><li>Security controls</li></ul><p>Of course, testing should only be performed on devices and applications that you own or are explicitly authorized to test.</p><h3>13. Important Lessons Learned</h3><p>After completing the process, these were my biggest takeaways:</p><h3>1. Always verify the model</h3><p><strong>SM-G973F ≠ every other Galaxy S10 variant.</strong></p><p>Always work with firmware intended for the exact model.</p><h3>2. Keep a backup</h3><p>Bootloader unlocking and firmware operations can result in data loss.</p><h3>3. Don’t rush the flashing stage</h3><p>Read the firmware files and understand their purpose before flashing.</p><h3>4. Keep the original firmware</h3><p>Having the original firmware available can be extremely useful when troubleshooting.</p><h3>5. Boot loops are part of the learning process</h3><p>Not every failed flash means the device is permanently dead.</p><p>Sometimes it simply means:</p><p><strong>“Congratulations, you have another few hours of troubleshooting.”</strong> 😂</p><h3>14. My Final Setup</h3><p>After successfully completing the process:</p><p><strong>Device:</strong> Samsung Galaxy S10<br> <strong>Model:</strong> SM-G973F<br> <strong>Android:</strong> 12<br> <strong>Root Management:</strong> Magisk<br> <strong>Result:</strong> Successfully rooted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*TAKLZt2ZPc6r2sbyPHP_oQ.png" /></figure><h3>15. Conclusion</h3><p>Rooting the Samsung Galaxy S10 was a good hands-on learning experience.</p><p>The actual rooting process was only one part of the journey. The more valuable lesson was understanding how firmware, bootloader unlocking, AP patching, flashing, and Android’s security mechanisms work together.</p><p>The unexpected <strong>9-hour boot-loop experience</strong> was definitely frustrating at the time, but it also became the most valuable part of the learning process.</p><p>Because sometimes the best troubleshooting lesson is the one where your phone refuses to boot for nine hours. 😅</p><p>If you’re learning Android security, I would recommend practicing on your own test device and documenting every step. The process becomes much easier once you understand <strong>why</strong> each step is being performed rather than simply following a list of commands.</p><h3>Final Note</h3><p><strong>Rooting is not a one-click process, and the exact procedure can vary between Samsung models and firmware versions. Always verify your model, firmware, and bootloader state before modifying the device.</strong></p><p><strong>Educational use only-perform these steps only on devices you own or have explicit authorization to modify.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=977fdd0cd35c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>