<?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  Ohmkumar on Medium]]></title>
        <description><![CDATA[Stories by  Ohmkumar on Medium]]></description>
        <link>https://medium.com/@mr.ohmkumar1811?source=rss-31133eb4f3f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1tr_NwbEQ9EjyypENWQ0xw.png</url>
            <title>Stories by  Ohmkumar on Medium</title>
            <link>https://medium.com/@mr.ohmkumar1811?source=rss-31133eb4f3f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:56:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mr.ohmkumar1811/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[Rooting the Moto G06 Power (XT2535–10 / “lagos”): The Comprehensive Guide]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/rooting-the-moto-g06-power-xt2535-10-lagos-the-comprehensive-guide-d9a82e6d2496?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9a82e6d2496</guid>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 17:19:35 GMT</pubDate>
            <atom:updated>2026-09-08T17:19:35.277Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A complete, step-by-step technical walk-through on unlocking the bootloader using Kali Live, (Tanuki script) and achieving systemless root on Android 15 (GKI 2.0).</em></p><p><strong>Why I’m Writing This</strong></p><p>A few weeks ago, I picked up a Moto G06 Power (Model: XT2535–10, codename “lagos”) with a very specific goal in mind: I wanted to root it for Android VAPT (Vulnerability Assessment and Penetration Testing) work- running Frida, inspecting app internals, testing insecure storage, bypassing basic protections on test apps, and generally having the level of system access that security testing demands.</p><p>When I went looking for a proper step-by-step guide, I realized one simply didn’t exist for this exact setup. While there were scattered forum posts covering generic bootloader unlocks for the Moto G series, nothing walked through the entire end-to-end journey especially addressing bootloader unlocking via a bare-metal Kali Live environment, navigating USB connectivity nuances, and dealing with Android 15 / GKI 2.0 ramdisk architecture quirks.</p><p>So, I documented every step, dead end, and fix along the way. This guide serves as a polite, structured, and complete record so that anyone else tackling the Moto G06 Power has a reliable reference that actually works.</p><p><strong>Why Root Access Matters for VAPT Security Work:<br><em> </em></strong><em>Stock Android strictly sandboxes applications, preventing access to private app storage, system inspection, dynamic hooking, or SSL pinning bypasses. Magisk provides a controlled, revertible systemless root environment that bypasses these barriers without altering the underlying system partition, making it ideal for dedicated security test rigs.</em></p><p><strong>Disclaimer &amp; Safety Warnings:</strong></p><p>Before attempting any of the procedures outlined below, please review the following standard technical precautions:</p><p>· <strong>Data Wipe: </strong>Unlocking the bootloader automatically triggers a complete factory reset. Back up all data prior to starting.</p><p>· <strong>Warranty &amp; Bricking Risk: </strong>This procedure voids your device warranty. Flashing mismatched partition images risks permanently bricking the device.</p><p>· <strong>Environment Specificity: </strong>Commands and partition targets in this guide are validated against stock firmware build VVOB35.78–188. Always source firmware matching your exact current build.</p><p><strong>Device Hardware &amp; Firmware Specifications</strong></p><p>The testing environment was configured using the following specs, confirmed via Motorola Rescue and Smart Assistant (RSA):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*sSiP8naH0r1sDb_aU04XQw.png" /></figure><p><strong>Prerequisites &amp; Environment Setup</strong></p><p>To avoid common low-level driver and USB handshake issues, the host environment was set up as follows:</p><p><strong>• </strong>Kali Linux Live USB (Live Environment): <a href="https://www.kali.org/get-kali/#kali-live">🔗</a></p><p>Rather than running Kali within a VMware or VirtualBox virtual machine, Kali Linux was booted live directly on host hardware. Virtual machine setups frequently fail during MediaTek (MTK) low-level BROM/Preloader execution due to USB passthrough delays, reset re-negotiation glitches, and host-OS grabbing locks. Kali Live provides raw physical USB access, ensuring stable, zero-latency communication during low-level flashing operations.</p><p><strong>• </strong>Android Platform Tools (ADB &amp; Fastboot): <a href="https://dl.google.com/android/repository/platform-tools-latest-linux.zip">🔗</a></p><p>Ensure the latest platform-tools binaries are installed on Kali to support Android 15 fastboot commands.</p><p><strong>• </strong>Tanuki Bootloader Unlock Tool: <a href="https://xdaforums.com/attachments/tanuki-lagos-v1-1-0-zip.6322990/">🔗</a></p><p>A specialized unlock utility tailored for the Motorola “lagos” codename, leveraging the Penumbra and kaeru exploits to interface directly with the MediaTek preloader. Since this tool runs natively on Linux, I executed it on Kali Linux to ensure reliable exploit execution and seamless USB driver stability.</p><p><strong>• </strong>Stock Firmware Package: <a href="https://en-us.support.motorola.com/app/answers/detail/a_id/158726/~/download-software-fix-%28pc-only%29">🔗</a></p><p>Extracted directly via Motorola Rescue and Smart Assistant (RSA) matching build VVOB35.78–188, containing boot.img, init_boot.img, vbmeta.img, vendor_boot.img, and associated system binaries. <em>This process must be performed on Windows, as the RSA tool is exclusively available for Windows OS. Download the stock firmware and connect your phone in Fastboot mode to proceed.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OkzWwLZpgiE5JL-GqGmVSw.png" /></figure><p><strong>• </strong>Magisk Manager APK: <a href="https://github.com/topjohnwu/Magisk/releases/download/v30.7/Magisk-v30.7.apk">🔗</a></p><p>Latest stable release installed on the target device for ramdisk patching. (in this case, Magisk v30.7 is used as it works best for this device).</p><p><strong>Part 1: Unlocking the Bootloader</strong></p><p>Standard official bootloader unlock methods via Motorola’s developer portal often exhibit inconsistencies or lack support for specific regional variants of the G06 Power. Consequently, community-developed low-level tooling is required.</p><p><strong>Prerequisites &amp; Bootloader Reboot:</strong></p><ol><li>Enable <strong>Developer Options</strong> on your device by going to <em>Settings &gt; About Phone</em> and tapping <strong>Build Number</strong> seven times.</li><li>Inside <em>Developer Options</em>, enable <strong>USB Debugging</strong> and <strong>OEM Unlocking</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*-c3R8zUhO--PbxuXwsY3DQ.jpeg" /></figure><ol><li>Connect your device to the PC via USB and open a terminal. Put the phone into Fastboot mode using ADB:</li></ol><p>Bash</p><pre>adb reboot fastboot</pre><p><strong>Executing the Tanuki Tool on Kali Live:</strong> Boot into your Kali Live USB environment, open a terminal, navigate to the directory containing the Tanuki utility, grant execution permissions, and run the script:</p><p>Bash</p><pre>chmod +x tanuki.sh<br>./tanuki.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*YOrzsjOTm5h3RXJiTGyPQw.png" /></figure><p><strong>Step-by-step: </strong>Execution Protocol:</p><ol><li>Fully power off the Moto G06 Power.</li><li>Initiate tanuki.sh until it reaches the ‘waiting for device’ status.</li><li>Connect the powered-off device via USB-C cable.</li><li>The script automatically catches the preloader interface, dumps necessary cryptographic blocks, executes kaeru/Penumbra payload routines, and completes the bootloader unlock.</li><li>Upon completion, The boot logo will display a unlocked bootloader warning with a kaeru logo.</li></ol><p><strong>Note: <em>Post-Unlock Actions &amp; Data Wipe:</em></strong></p><p>Perform a complete data wipe via Fastboot:</p><p>Bash</p><pre>fastboot -w</pre><p>To prevent boot loops or verification issues, disable vbmeta verification using the vbmeta.img file located in your downloaded RSA stock firmware directory:</p><ul><li><strong>Firmware Path:</strong></li><li>C:\ProgramData\RSA\Download\RomFiles\lagos_g_user_15_VVOB35.78_188_d845b5_release_keys_CFC</li><li><strong>Disable Verification Command:</strong></li></ul><p>Bash</p><pre>fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img</pre><p>Reboot the device using followind command</p><p>Bash</p><pre>fastboot reboot</pre><p>The device will reboot and may take some time to start up, as the bootloader unlock process wipes the user data. Once the device boots successfully, install Magisk v30.7 to proceed with the rooting process.</p><h3>Part 2: Rooting Journey — Troubleshooting &amp; Root Cause Analysis</h3><p>Rooting modern Android 15 devices requires navigating Android Verified Boot (AVB) and revised kernel partition layouts. The following sequence details the practical roadblocks encountered and their structural causes.</p><h3>Step 1: Initial Magisk Setup &amp; The Standard Boot Patch Attempt (Failed)</h3><ol><li>Installed the <strong>Magisk App (v30.7)</strong> on the target device.</li><li>Upon opening Magisk, the home screen indicated that Magisk was <strong>Not Installed</strong>, but confirmed <strong>Ramdisk: Yes</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*lfGNpotZEXJO60DVoEIGzw.png" /></figure><p>Following traditional procedures:</p><ol><li>Extracted boot.img from the stock firmware (VVOB35.78-188).</li><li>Transferred boot.img to internal storage.</li><li>Opened Magisk, selected <strong>Install &gt; Select and Patch a File</strong>, and chose boot.img.</li><li>Transferred the generated magisk_patched_boot.img back to the PC.</li><li>Rebooted the phone to Fastboot mode and flashed the patched boot image to the active slot:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EfIaMkaWL2uOs8G09mV2uA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*6jhfbOPjoG_zV2RuDOqOqw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*T3becQz5UW8CUfTXPNvQ6w.jpeg" /></figure><p>Bash</p><pre>fastboot getvar current-slot<br># Returns: current-slot: a</pre><pre>fastboot flash boot_a magisk_patched_boot.img<br>fastboot reboot</pre><p><strong>Outcome:</strong> The device booted successfully, but opening Magisk Manager still reported <strong>“Installed: N/A”</strong>, meaning root access was absent.</p><p>Upon further investigation, the underlying cause of the failure was identified.</p><h3>Step 3: The Architectural Breakthrough (GKI 2.0 &amp; init_boot.img)</h3><p><strong>Root Cause Explanation:</strong></p><p>The <strong>Moto G06 Power running Android 15</strong> utilizes the <strong>Generic Kernel Image (GKI 2.0)</strong> architecture. On GKI 2.0 devices, the boot ramdisk no longer resides inside boot.img. Instead, it has been moved to a separate partition named init_boot.img (~8 MB).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s6AL36yMPBjIl1j8zvpVfw.png" /></figure><p>Patching boot.img is entirely ineffective because Magisk has no ramdisk target inside boot.img to inject its systemless binaries.</p><h3>Part 3: The Working Procedure (Step-by-Step Fix)</h3><p>Having identified the ramdisk relocation to init_boot.img, follow these steps to establish root access successfully:</p><p><strong>1.Restore Stock Boot Partition:</strong>Prerequisite.</p><p>Revert any modified boot partition back to factory stock state to ensure kernel cleanliness:</p><p>Bash</p><pre>fastboot flash boot_a boot.img</pre><p><em>Verification: Ensure fastboot reports </em><em>OKAY for the flash command.</em></p><p><strong>2.Extract and Patch init_boot.img:</strong>In-App Patching.</p><ol><li>Locate init_boot.img from your matching stock firmware directory (VVOB35.78-188).</li><li>Transfer init_boot.img to the device&#39;s internal storage.</li><li>Open <strong>Magisk Manager (v30.7)</strong>, tap <strong>Install -&gt; Select and Patch a File</strong>, select init_boot.img, and let Magisk process the binary.</li><li>Transfer the generated magisk_patched_init_boot.img back to your host PC.</li></ol><p><strong>3. Flash Patched init_boot Image: </strong>Fastboot Flashing.</p><p>Reboot the device to Fastboot mode and flash the patched binary directly to the active slot’s init_boot partition:</p><p>Bash</p><pre>fastboot flash init_boot_a magisk_patched_init_boot.img</pre><p><em>Verification: Ensure fastboot finishes with </em><em>Finished. Total time: ... OKAY.</em></p><p><strong>4.Reboot System &amp; Verify Root Access:</strong>Final Steps.</p><p>Reboot the device into Android:</p><p>Bash</p><pre>fastboot reboot</pre><p>Once booted:</p><ul><li>Open <strong>Magisk Manager</strong> to confirm that Magisk is now installed.</li><li>Open <strong>Root Checker</strong> (or any terminal app) to grant superuser permissions and confirm root access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*q6eoB_rpzlWkgf738FHj3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*5IZjSI0s_Zdk73msEbda-Q.png" /></figure><p><strong>Troubleshooting Summary Matrix</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*--F02YKeCOXoNl7WTCZ1Kg.png" /></figure><p><strong>Post-Rooting &amp; Operational VAPT Notes</strong></p><p><strong>• </strong>Over-The-Air (OTA) Updates:</p><p>With modified init_boot and vbmeta partitions, standard Motorola stock OTA updates will fail or cause bootloops. Firmware updates must be applied manually by flashing stock partition images before re-applying patches.</p><p><strong>• </strong>Zygisk Framework Activation:</p><p>Enable Zygisk within Magisk settings to support dynamic module injection, which is essential for running Frida server scripts and root hiding frameworks during penetration testing.</p><p><strong>• </strong>Magisk DenyList Configuration:</p><p>Utilize DenyList to selectively bypass root detection and Play Integrity checks when auditing target applications that employ anti-tamper mechanisms.</p><p><strong>Closing Remarks</strong></p><p>Navigating modern Android devices like the Moto G06 Power (XT2535–10 / lagos) requires moving beyond legacy rooting habits. Understanding that Android 15 / GKI 2.0 shifts the system ramdisk to init_boot.img saves hours of troubleshooting.</p><p>If you are working on this device and have questions, suggestions, or additional edge-case observations, feel free to share them in the response section below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9a82e6d2496" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How One Unusual Observation Changed the Way I Test Web Applications]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/how-one-unusual-observation-changed-the-way-i-test-web-applications-c0130f90acc6?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0130f90acc6</guid>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 10:00:30 GMT</pubDate>
            <atom:updated>2026-08-02T10:00:30.673Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Welcome to another article!</strong></p><p>I’m a Security Consultant with experience in <strong>Web, API, mobile, and infrastructure security assessments</strong>. In addition to application security, I’ve also worked on wireless security assessments and configuration reviews. Over the years, I’ve worked on applications across different domains, and every assessment has taught me something new. While most engagements follow a familiar pattern, every now and then, you come across an observation that quietly changes the way you think. This article is about one such experience.Early in my journey as a security tester, if someone had asked me what makes a good tester, my answer would’ve been simple. Know the common vulnerabilities, understand how web applications work, and keep testing until you find something interesting.</p><p>I still believe that’s true. 🙌 But over time, I realized that the findings you remember the most aren’t always the high or critical ones.Sometimes, it’s a small observation that doesn’t look important at first. That’s exactly what happened to me during one web application assessment. I wasn’t chasing a complex exploit or trying something out of the ordinary. I was simply testing the application the way I normally would.</p><p>Then I noticed something that made me pause.</p><p>At first, it felt like a minor inconsistency. A few minutes later, it completely changed the way I approached web application testing.</p><p>The application had a ticket booking functionality, so I naturally started with business logic testing. I tried the usual test cases like price manipulation, quantity manipulation, parameter tampering and a few other workflow-related checks.</p><p>Nothing worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*bq-TlUH8nw5SvP6YGfdeNg.gif" /></figure><p>The application handled them surprisingly well, and I was almost ready to move on.</p><p>Then I noticed something that didn’t look like a vulnerability at all. Out of curiosity, I decided to spend a little more time on it.</p><p>That decision ended up changing the rest of my assessment.</p><p>My first attempt didn’t really lead anywhere.</p><p>I intercepted one of the responses and changed the ticket price just to see how the application would behave. As expected, the change only affected the UI. The moment I refreshed the page, the original price came back.🥲</p><p>At that point, I assumed the backend was recalculating everything correctly.</p><p>Normally, that’s where I would’ve stopped. Price manipulation is usually something you test by modifying requests, not responses. Once the server sends a response, you don’t really expect it to influence anything important.</p><p>But I was curious. 🙂</p><p>Instead of treating it as a one-off experiment, I decided to follow the entire booking flow. Whenever a response contained the ticket price, I modified it before moving to the next step. I wasn’t trying to exploit anything. I was simply curious to see whether those modified values would eventually be discarded by the backend.</p><p>They weren’t. 🙅‍♂️</p><p>I wasn’t expecting the changes to survive for long. I assumed the application would eventually fetch the correct value from the server and everything would fall back into place.</p><p>But that never happened.</p><p>By the time I reached the payment page, I wasn’t expecting anything unusual anymore. I looked at the amount one more time. It wasn’t the original price. It was the value I had been carrying through the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*K9fGcVI3jgO_I3tGK_WNGw.gif" /></figure><p>At that moment, I knew I wasn’t looking at a simple UI inconsistency anymore. Something in the application’s workflow wasn’t behaving the way I expected.</p><p>I wanted to be sure I wasn’t misunderstanding what I was seeing.</p><p>At that point, I decided to stop experimenting and simply complete the booking flow. The transaction went through, and the booking was successful.</p><p>I sat there for a moment, trying to understand what had just happened.</p><p>Until then, I had always looked at price manipulation from the perspective of requests. If the requests were properly validated, I usually considered that part of the workflow secure.</p><p>This experience challenged that assumption.</p><p>It made me realize that business logic issues aren’t always about a single request. Sometimes, they’re about how trust flows through an entire application.</p><p>Looking back, I don’t think the most valuable thing I found that day was the vulnerability itself.</p><p>It was the change in my mindset.</p><p>Before this assessment, I mostly treated business logic testing as a collection of individual test cases. I’d test price manipulation, quantity manipulation, coupon abuse, parameter tampering, and if none of them worked, I’d move on.</p><p>After this experience, I stopped looking at test cases in isolation.</p><p>Instead, I started looking at workflows. I became more interested in understanding how the application carried state from one step to another, what assumptions it made along the way, and whether those assumptions could be challenged.</p><p>That shift in perspective has stayed with me ever since.</p><p>While documenting the finding, I found myself spending more time on the remediation than usual. I wanted the recommendation to address the root cause, not just the symptom.</p><p>One of the key <strong>recommendations</strong> was to eliminate the application’s dependency on client-controlled state throughout the workflow. Business-critical data should be reconstructed or validated on the server at every critical step, rather than being propagated from one stage to another based on client state.</p><p>Some stories are worth sharing. Some details aren’t.</p><p>To respect client confidentiality, I’ve intentionally omitted implementation-specific details. What matters more is the lesson this observation taught me how it continues to shape the way I test web applications today.</p><p>Today, whenever I begin a new assessment, I still test the obvious things first. But I also spend time questioning the assumptions the application makes.</p><p>That habit started with this assessment. ⭐</p><p><strong>Thanks for reading! I’ll be sharing more real-world security experiences, research, and lessons learned in future articles. See you in the next one.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0130f90acc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter SSL Pinning: How I Found a New Bypass Technique]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/flutter-ssl-pinning-how-i-found-a-new-bypass-technique-48f2c5717331?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f2c5717331</guid>
            <category><![CDATA[ssl-pinning-bypass]]></category>
            <category><![CDATA[flutter-ssl-bypass]]></category>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 08:25:55 GMT</pubDate>
            <atom:updated>2026-02-14T08:25:55.473Z</atom:updated>
            <content:encoded><![CDATA[<h3>👋 About Me</h3><p>Hi, I’m Ohm, a security researcher with hands-on experience in Web, API, Mobile (Android &amp; iOS), and Infrastructure VAPT. Over time, I’ve worked on multiple real-world applications, performed wireless assessments, reviewed source code, and tested thick clients.</p><p>But this story is about a CTF challenge that completely changed the way I think about SSL pinning bypasses.</p><h3>🎯 The Challenge</h3><p>I received a Flutter-based Android APK as part of a CTF challenge. The goal was simple on paper:</p><blockquote><em>Intercept the application’s HTTPS traffic.</em></blockquote><p>However, the moment I installed and ran the application, I realized it had SSL pinning implemented. That meant:</p><ul><li>The app would only trust its embedded certificate.</li><li>Even if Burp Suite CA was installed, the app would reject it.</li><li>Standard proxy-based interception wouldn’t work.</li></ul><p>Flutter apps are already known to be slightly different when it comes to traffic interception, so I knew this would not be a basic task.</p><h3>📱 Step 1: Preparing the Testing Environment (Root Bypass)</h3><p>Before even touching SSL pinning, I had to deal with root detection.</p><p>I was using a physical Android device that I had rooted just one day before the challenge. Many applications detect root and refuse to run — and this one did exactly that.</p><p>So first task:<br><strong>Bypass root detection.</strong></p><p><strong>Tools Used:</strong></p><ul><li>Magisk</li><li>Zygisk enabled</li><li>LSPosed module</li></ul><p>Using Magisk’s hiding capabilities and LSPosed hooks, I was able to conceal root status from the application. After tweaking configurations and rebooting the device, the app finally launched successfully.</p><p>Now the real game could begin.</p><h3>🔍 Step 2: Starting With Traditional SSL Pinning Bypass Methods</h3><p>Like any mobile security assessment, I started with the usual suspects.</p><p><strong>Methods I Tried:</strong></p><ul><li>Frida SSL bypass scripts</li><li>Objection-based runtime patching</li><li>ReFlutter binary patching</li><li>Installing custom CA certificate</li><li>VPN-based interception</li><li>Proxy configuration at system level</li><li>Basic iptables redirection attempts</li></ul><p>One by one — all failed.</p><p>The app simply refused to send traffic through Burp.</p><p>That’s when I realized something important:</p><blockquote><em>Flutter applications often do not rely on the system proxy settings.</em></blockquote><p>This explains why Burp wasn’t seeing any traffic. At this point, frustration started building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/0*vVtCOHmVGvoEXtu2.gif" /></figure><h3>🌐 Step 3: Deep Research &amp; Endless Attempts</h3><p>I spent hours researching:</p><ul><li>GitHub repositories</li><li>Security write-ups</li><li>Reddit threads</li><li>StackOverflow discussions</li><li>Mobile security blogs</li></ul><p>I even brainstormed techniques using ChatGPT. I implemented multiple suggestions, experimented with different combinations, modified approaches — but nothing worked.</p><p>There was even a funny moment when ChatGPT basically implied:</p><blockquote><em>“Maybe this one isn’t worth the effort.” </em>😂</blockquote><p>But instead of stopping, I took that as motivation. This was no longer just a CTF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*7j0k0pobPWk7Ir5mEyX3sA.jpeg" /><figcaption>It became personal</figcaption></figure><h3>🧠 Step 4: The Last Weapon — DNSChef</h3><p>After multiple failed attempts, frustration was real.<br> Standard proxy methods were ignored by the app.</p><p>At that moment, I thought:</p><blockquote><em>“There’s one last weapon left.”</em></blockquote><p><strong>DNSChef.</strong></p><p>If SSL pinning blocks certificate manipulation…<br> If Flutter ignores system proxy…</p><p>Then maybe I shouldn’t attack the SSL layer.</p><p>Maybe I should influence how the application resolves its backend domain.</p><p>That was the turning point.</p><h3>⚙️ Step 5: Configuring the Environment for DNSChef</h3><p>After deciding to try DNSChef as my last approach, I knew that proper environment configuration was critical.<br> DNS-based interception doesn’t work unless the device is correctly aligned with your testing machine.</p><p>So before starting DNSChef, I applied the following network configuration changes.</p><h3>📱 Mobile Network Configuration</h3><p>Instead of using a traditional HTTP proxy in Wi-Fi settings (which the Flutter app was ignoring), I modified the IP configuration manually.</p><p><strong>What I Did:</strong></p><ul><li>Switched the Wi-Fi configuration from <strong>DHCP to Static IP</strong></li><li>Assigned the device a fixed local IP address</li><li>Manually configured DNS entries</li><li>Pointed DNS resolution toward my testing machine (Windows system)</li></ul><p>The goal here was simple:</p><blockquote><em>Ensure that all DNS queries generated by the app would pass through a controlled environment.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*XwiCshUj7DEecbgwsPeogg.png" /><figcaption>Window’s IP</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*Z8KByQtrEG9DQZmZXT8iJg.png" /><figcaption>Window’s IP in DNS1 and DNS2</figcaption></figure><p>This step ensured that when the app tried to resolve its backend domain, I could observe and manipulate the resolution process.</p><h3>🖥️ Burp Proxy Configuration</h3><p>On the testing machine, I prepared Burp Suite to properly receive redirected traffic.</p><p>I configured:</p><ul><li>Proxy listener bound to the machine’s local IP</li><li>Listening on all interfaces (not just localhost)</li><li>Enabled <strong>Invisible Proxy mode</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*hL12YrPSOvfaERCCNYFILw.png" /><figcaption>Setting up Burp Proxy, listening on All interfaces</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*_ItwBIiayk7Z9kGlR7R5rw.png" /><figcaption>Enabling Invisible Proxy mode in Burp Suite</figcaption></figure><h3>🌐 Starting DNSChef</h3><p>Once the mobile and Burp configurations were aligned, I started DNSChef.</p><p>The purpose at this stage was not to bypass SSL immediately.</p><p>My initial objective was:</p><ul><li>Capture DNS queries generated by the application</li><li>Identify the exact API domain being used</li><li>Later modify or redirect the resolution accordingly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Mzy96gWi8bXxfEQGOhKEw.png" /><figcaption>DNSChef capturing live DNS resolution requests</figcaption></figure><p>At this point, I was simply expecting to observe DNS requests and map out the backend communication flow, although it wasn’t able to capture the actual API requests of the application.</p><p>But something unexpected happened next.</p><h3>🔥 The Surprise</h3><p>When I opened Burp Suite after starting DNSChef…</p><p>I saw application traffic.</p><p>Without modifying the APK.<br>Without using Frida.<br>Without patching SSL validation.</p><p>That was the breakthrough moment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*hvKdkZaq2DDPQsYQruQ18w.png" /><figcaption>Application UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6zYkS1sisqU0WhYh0G13w.png" /><figcaption>Application traffic in BurpSuite</figcaption></figure><h3>🔎 Investigating the Breakthrough</h3><p>When I saw application traffic in Burp, my first reaction wasn’t excitement — it was confusion.</p><p>I hadn’t:</p><ul><li>Patched the APK</li><li>Hooked SSL validation</li><li>Modified certificate pinning logic</li></ul><p>So how was traffic flowing?</p><p>To investigate further, I immediately opened an ADB shell and began inspecting the device’s networking configuration.</p><p>That’s when I noticed something critical.</p><p>There were active <strong>iptables rules set on the device.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BmmigM7drad-MWyZEpZNqQ.png" /><figcaption>IPtables</figcaption></figure><p>These rules were performing traffic redirection at the system level.</p><p>At that moment, everything started making sense.</p><h3>⚙️ What the iptables Rule Was Actually Doing</h3><p>During investigation, I observed an active NAT rule configured in the OUTPUT chain of iptables.</p><p>Conceptually, the rule was:</p><ul><li>Working inside the <strong>NAT table</strong></li><li>Targeting <strong>outbound TCP traffic</strong></li><li>Filtering traffic based on application UID range</li><li>Redirecting that traffic to my Windows machine where Burp was listening</li></ul><p><strong><em>iptables -t nat -A OUTPUT -p tcp -m owner — uid-owner 10000–99999 -j DNAT — to-destination 192.168.29.64:8080</em></strong></p><p>Let’s break down what this type of rule does at a networking level.</p><p>🔹 -t nat</p><p>This indicates that the rule operates in the <strong>NAT (Network Address Translation) table</strong>.</p><p>The NAT table is responsible for modifying packet destination or source addresses.</p><p>In simple terms:</p><blockquote><em>It allows traffic redirection before packets leave the device.</em></blockquote><p>🔹 OUTPUT Chain</p><p>The OUTPUT chain processes packets generated <strong>locally by the device itself</strong>.</p><p>This is critical.</p><p>Because instead of modifying incoming traffic, this rule was targeting traffic generated by applications running on the phone.</p><p>Meaning:</p><blockquote><em>Any app making outbound TCP requests could be affected.</em></blockquote><p>🔹 -p tcp</p><p>This ensures only TCP traffic is targeted.</p><p>Since HTTPS runs over TCP, this includes encrypted web traffic generated by the Flutter app.</p><p>🔹 -m owner --uid-owner 10000-99999</p><p>Android assigns unique UIDs to installed applications.</p><p>This match condition ensures that:</p><ul><li>Only traffic generated by application UIDs (not system services) is intercepted.</li><li>Core Android system processes remain unaffected.</li></ul><p>This makes the redirection more controlled and targeted.</p><p>🔹 -j DNAT --to-destination &lt;Windows-IP&gt;:8080</p><p>This is the most important part.</p><p>DNAT (Destination NAT) rewrites the packet’s destination address. Instead of going to:</p><p>Original Backend Server → e.g., api.targetapp.com</p><p>The packet’s destination was rewritten to: Windows Machine IP → Port 8080 (Burp)</p><p>So effectively:</p><p>App thinks it is sending traffic to the real backend. But at kernel level, the destination is modified before the packet leaves the device.</p><h3>🧠 Why This Was Powerful</h3><p>Because this redirection happens:</p><ul><li>At kernel level</li><li>Before the packet exits the device</li><li>Below the application layer</li></ul><p>The Flutter app had no awareness that its traffic was being rerouted. It wasn’t relying on system proxy. It wasn’t configured to trust Burp. But the traffic path itself was altered.</p><h3>🔗 How It Combined With DNS &amp; Static IP</h3><p>Now connect this with earlier steps:</p><ol><li>Static IP ensured consistent routing behavior.</li><li>DNS settings ensured domain resolution aligned with interception setup.</li><li>iptables rewrote outbound traffic destination.</li><li>Burp (in invisible proxy mode) accepted the redirected traffic.</li></ol><p>So the effective traffic flow became:</p><p>App → Kernel (OUTPUT chain) →<br>Destination rewritten →<br>Windows Machine (Burp) →<br>Actual Backend: That combination is what enabled interception.</p><h4><strong>🧪 Why This Worked (Technical Insight)</strong></h4><ul><li>Control DNS resolution.</li><li>Align routing behavior.</li><li>Configure interception environment properly.</li><li>Let the network layer do the heavy lifting.</li></ul><p>This challenge taught me something important:</p><blockquote><em>When application-layer attacks fail, shift perspective to the network layer.</em></blockquote><p>Security bypasses are not always about breaking encryption, sometimes they are about influencing the path traffic takes.</p><h3>😄 The Funny Part</h3><p>I immediately went back to ChatGPT and said:</p><blockquote><em>“Hey, this method is working!”</em></blockquote><p>And for once, even it seemed surprised.</p><p>There was a moment earlier when it hinted that maybe I should move on.</p><p>But this time…</p><p>It was like:</p><blockquote><em>“I never thought of that approach. You found something new.”</em></blockquote><p>That moment felt incredibly rewarding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*Hdn9EcFLh8Ojusx0.gif" /></figure><h3>🛡️ <strong>Mitigation — What Can Be Done</strong></h3><p>1️⃣ Move beyond relying only on SSL pinning and adopt a <strong>layered security approach</strong>.</p><p>2️⃣ Implement <strong>strict certificate validation</strong>, proper hostname verification, full chain validation, and prefer <strong>public key hash pinning</strong> enforced at runtime.</p><p>3️⃣ Add checks to detect <strong>network manipulation</strong>, such as proxy environments, abnormal DNS behavior, or unexpected IP resolution.</p><p>4️⃣ Strengthen <strong>runtime protection</strong> through root detection, debugging detection, and tamper monitoring.</p><p>5️⃣ Ensure the <strong>backend enforces strict TLS configuration</strong> and monitors anomalies independently of client-side checks.</p><p>✅ Security should be built in layers across client, network, and server — not dependent on a single control.</p><h3>🎯 <strong>Closing Lines</strong></h3><p>Security is all about perspective. Sometimes it’s not about breaking encryption — it’s about understanding how systems actually behave behind the scenes.</p><p>I hope you picked up something new from this write-up and saw how thinking differently can change the whole game.</p><p>More interesting techniques, bypass concepts, and deep dives are coming soon.</p><p>Until then — stay curious, stay sharp, and never stop questioning assumptions. 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f2c5717331" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wi-Fi Pentesting Part 2: MITM Attacks with Bettercap & Wireshark]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/welcome-back-cc47ad25c90f?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc47ad25c90f</guid>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Sun, 03 Aug 2025 15:22:04 GMT</pubDate>
            <atom:updated>2025-08-03T15:29:34.427Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back! In this post, we’re continuing our journey into Wi-Fi pentesting by exploring one of the most common and powerful threats in wireless networks — <strong>Man-in-the-Middle (MITM) attacks</strong>. These attacks work by silently placing an unauthorized actor between two communicating devices, allowing them to intercept, read, or even modify the data being exchanged. In the world of Wi-Fi, this can lead to serious consequences like stolen credentials, session hijacking, or malicious redirection all without the user ever realizing something is wrong. Let’s dive into how this can be set up in a real-world scenario..</p><p>To carry out these attacks, the first step is to acquire the Wi-Fi password. This is crucial because gaining access to the network allows us to position ourselves as the man in the middle, enabling us to intercept and manipulate the data flowing between connected devices.</p><p>The methods mentioned above can help us obtain the password for any Wi-Fi network, but there’s another way to become the man in the middle, which I’ll demonstrate in this article.</p><p>To become the man in the middle, I’ll create a fake replica of an access point that will appear as an open network. I’ll use my own network to provide internet access, and whenever a client connects to this fake network, their traffic will flow through my network, allowing me to intercept and manipulate their data as the man in the middle.</p><p>To create an access point I used a GUI tool WIFI Hotspot in Kali Linux. You can download it from here:</p><p><a href="https://github.com/lakinduakash/linux-wifi-hotspot">GitHub - lakinduakash/linux-wifi-hotspot: Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFSLhuTJr_V3EB9qGxR8KA.png" /></figure><p>In the image, you can see that I set up a fake access point by entering a custom SSID. I selected wlan0 for the Wi-Fi interface and used eth0 to provide internet access from the system. After enabling the hotspot, the new network appeared on the right side. I attempted to connect to this network with my phone, and it is now visible in the connected devices list, showing its name, IP address, and MAC address.</p><p>In this article, I will demonstrate how I used this method to hook a Windows machine and perform various MiTM attacks. For these attacks, I used the powerful tool Bettercap, which facilitates becoming the man-in-the- middle and executing various advanced attacks. I’ll aim to cover everything in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ng3yVKU-OQu2wZB84SXulA.png" /></figure><p>This tool is very easy to operate you can install just type: apt install bettercap To run this tool, type the following command</p><p><strong>Ø <em>bettercap -iface wlan0</em></strong></p><p><strong><em>-iface:</em></strong><em> </em>Specifies the interface</p><p><strong><em>wlan0:</em></strong><em> </em>Specifies the interface name which is connected to the network.</p><p>Next, we need to start network scanning and monitoring by typing:</p><p><strong>Ø <em>net.probe on</em></strong></p><p>As I mentioned, it’s very easy to use and understand. Turning on <em>net.probe </em>will automatically enable</p><p><em>net.recon</em>. Now, to become the man-in-the-middle, we need to perform an <em>ARP spoofing attack</em>.</p><p>First, let’s understand what ARP is and what ARP spoofing means.</p><p>ARP (Address Resolution Protocol) is a communication protocol used in computer networks to map a network address, such as an IP address, to a physical address, like a MAC (Media Access Control) address. This mapping is necessary because devices on a local network communicate using MAC addresses, while higher-level protocols (like IP) use IP addresses.</p><p>How ARP Works:</p><p>Request: When a device wants to communicate with another device on the same network, it needs to know the MAC address of the destination device. If it doesn’t already have this information, it sends out an ARP request, which is a broadcast message containing the IP address of the target device.</p><p>Response: The device on the network that owns the IP address specified in the ARP request replies with an ARP response. This response includes its MAC address, allowing the requesting device to update its ARP table (a local cache that maps IP addresses to MAC addresses).</p><p>Communication: Once the requesting device has the MAC address, it can send data directly to the destination device on the local network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hex47W56Chv8jIi9rV25jg.png" /></figure><p>This picture is showing the ARP table of the victim machine where it has IP Address corresponding to their MAC Addresses. In ARP spoofing, an attacker sends fake ARP messages onto a local network to manipulate the ARP tables of other devices. The goal is to associate the attacker’s MAC address with the IP address of a legitimate device, such as a gateway or another network device. This deception allows the attacker to intercept, modify, or disrupt the network traffic intended for the legitimate device.</p><p>The ARP table in Windows/Linux can be checked using the command: <em>arp -a</em>. In this image, the MAC address corresponding to the gateway’s IP address of the victim’s Windows machine is displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6OPK-kw4MxapLPEAtSY0yA.png" /></figure><p>After enabling <em>net.probe</em>, it’s time to initiate the ARP spoofing mechanism. To do this, I used the following commands:</p><p><strong>Ø <em>set arp.spoof.fullduplex true</em></strong></p><p><strong>Ø <em>set arp.spoof.targets IP_of_Victim</em></strong></p><p><strong>Ø <em>arp.spoof on</em></strong></p><p>As shown above, we can capture the IP and MAC addresses of anyone connected to our network. With this information, it becomes straightforward to target specific devices using these commands. Let’s breakdown how these commands working actually.</p><p><strong><em>set arp.spoof.fullduplex true:</em></strong><em> </em>This command configures the ARP spoofing to operate in full-duplex mode. In full-duplex mode, the ARP spoofing attack will send spoofed ARP replies to both the victim and the gateway (or any other target), ensuring that both devices have incorrect ARP mappings. This makes the attack more effective because it maintains the deception in both directions:</p><p>To the Victim: The attacker’s MAC address is associated with the IP address of the gateway. To the Gateway: The attacker’s MAC address is associated with the IP address of the victim.</p><p><strong><em>set arp.spoof.targets IP_of_Victim:</em></strong><em> </em>This command specifies the IP address of the target victim.</p><p><strong><em>arp.spoof on:</em></strong><em> </em>This command activates the ARP spoofing attack. When you turn on ARP spoofing, Bettercap begins sending forged ARP replies to the network. These replies will contain:</p><p>Fake ARP Responses: The attacker’s MAC address is falsely associated with the IP addresses of the</p><p>legitimate devices (like the gateway) in the ARP tables of both the victim and the gateway. Continuous Operation: Bettercap continuously sends these spoofed ARP packets to maintain the deception, as ARP tables are regularly updated and might otherwise revert to correct mappings over time.</p><p>After this, we become the man-in-the-middle. Now it’s time to leverage some attacks. In this article, I will cover the <em>DNS sniffing </em>attack, where I will attempt to intercept data passing through the network on both unencrypted and encrypted sites.</p><p>As we know, data on unencrypted websites that use HTTP for communication flows in plain text, making it easy to capture and view. Let’s see how we can achieve this using Bettercap.</p><p>Before running any commands, if you need help with any attack in Bettercap, simply type:</p><p><strong><em>help [tool name]</em></strong></p><p><em>For example, to learn about the requirements for starting ARP spoofing, type: </em><strong><em>help arp.spoof</em></strong></p><p>Okay, now moving ahead, as discussed, to perform the DNS sniffing attack, enter:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-EI8W7nVmdCgYlw7zZ0cgQ.png" /></figure><p><strong>Ø <em>dns.sniff on</em></strong></p><p>This command will start sniffing DNS traffic on the network.</p><p>After starting the sniffing, I tried opening an <em>HTTP </em>website to check if the data was being captured. I visited the testhtml5.vulnweb.com and, on the login section, entered “user” as the username and “passwd” as the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E0yX306P5VxMrii-wjReCw.png" /></figure><p>You can see that the website is running on <em>http </em>and the mentioned credentials entered in the <em>login </em>field.</p><p>Just after clicking the login button, I captured the following data in Bettercap, as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THV120fHlHqaGzoGtOhRBA.png" /></figure><p>The captured credentials are highlighted in the terminal. I then opened Wireshark and searched for the packet containing this login information, and here’s what I found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALc2OViRYtzsdyEY3W__XQ.png" /></figure><p>In <em>Wireshark</em>, with so many packets, it can be challenging to locate the desired one. To simplify this, I used a filter and typed <em>http </em>since it was an <em>HTTP </em>communication. After filtering, only <em>HTTP </em>packets were displayed, among which there was a packet with the <em>POST </em>method. As we know, clients usually send data using the <em>POST </em>method. I opened this packet and found the same credentials, which are highlighted in the image.</p><p>Capturing credentials from an <em>HTTP </em>website is relatively straightforward. Now, let’s see how to sniff data flowing through encrypted <em>HTTPS </em>websites.</p><p>To achieve this, I will first try to disable SSL on the websites and force them to use <em>HTTP </em>instead. This will make the data transfer in plain text, allowing us to capture it more easily.</p><p>There is a <em>caplet </em>in bettercap <em>hstshijack/hstshijack </em>which will allow you to disable https as well as <em>HSTS</em>.</p><p>To run this type <em>hsts </em>and press ‘<em>tab’ </em>button to autocomplete and press enter. Now whenever you try to visit any <em>https </em>enabled website it will force it to open on <em>http.</em></p><p>The caplet modifies the HTTP responses from the target website to include headers or content that forces the client to use HTTP instead of HTTPS. Specifically, it tries to bypass or neutralize HSTS by injecting responses that redirect the client to HTTP. By manipulating the responses, the caplet aims to trick the client into connecting over HTTP, which is not encrypted.</p><p>After running this caplet, I visited stackoverflow.com, which normally uses HTTPS. However, the site opened in HTTP and after submitting my credentials, I was able to view them in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*JoSKe7ggMdicRLqPG1beDw.png" /></figure><p>You can see the website is opened in <em>http, </em>here I entered credentials and clicked on login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RU3uF37Ev2xfe_xxinycUQ.png" /></figure><p>The credentials I entered was ‘<a href="/service/mailto:email@stack.com"><strong>email@stack.com</strong></a>’ in email and ‘passwd’ in the password box. And in <em>Wireshark </em>I which are highlighted as <strong>email%40stack.com</strong> and ‘<strong>passwd</strong>’.</p><p>Here ‘<strong>%40</strong>’ is the url-encoded version of ‘<strong>@</strong>’ which is not very difficult to understand.</p><p>As wee saw here even after using <em>https </em>several attacks can be performed by downgrading it to run on <em>http.</em></p><p>As we have seen, even when using HTTPS, various attacks can still be performed if the connection is downgraded to HTTP. This can lead to several security issues, including:</p><p>·<strong> <em>Data Interception:</em></strong></p><p><strong>· <em>Session Hijacking:</em></strong></p><p><strong>· <em>Man-in-the-Middle (MiTM) Attacks.</em></strong></p><p><strong>· <em>Phishing and Redirect Attacks:</em></strong></p><p>So, let’s talk about the mitigation:</p><p>Try to avoid using public or open Wi-Fi networks. If you must use them, always connect through a VPN. A VPN provides a secure tunnel and encrypts your data, making it much more difficult for attackers to intercept and access your information</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc47ad25c90f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hey everyone!]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/hey-everyone-9bd68288c527?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bd68288c527</guid>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Thu, 20 Feb 2025 09:01:25 GMT</pubDate>
            <atom:updated>2025-02-20T09:01:25.931Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone! I’m back with another write-up, and this time, we’re diving into <strong>container image security</strong>. Before we get started, just a quick note — I’m still a beginner, so don’t focus too much on my mistakes. Instead, take what’s useful, and hopefully, this article will help many who are just starting in this field!</p><p>I got this container security as a task, and after completing it, I thought I should write an article on it to share my experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*8yrGlmlOUQLQXIYQU2JIGA.jpeg" /></figure><p><strong>Introduction</strong></p><p>Hi, I’m Ohm, a cybersecurity enthusiast exploring the exciting world of penetration testing. I have hands-on experience with web, mobile, and network vulnerability assessments, and I thrive on uncovering security flaws and enhancing defences. Today, I want to share my journey in <strong>container security</strong> and why it’s an important aspect of modern cybersecurity.</p><p><strong>Why Container Security Matters</strong></p><p>Containers have revolutionized software deployment by providing a lightweight, scalable, and portable solution for applications. They allow developers to package applications with all their dependencies, ensuring consistency across different environments. However, while containers bring numerous advantages, they also introduce new security challenges that organizations must address.</p><p>One of the primary concerns is <strong>vulnerabilities within container images</strong>. Since many containers are built using publicly available base images, they often inherit security flaws that can be exploited by attackers. A single outdated dependency or misconfiguration in an image can create an entry point for cyber threats, leading to <strong>privilege escalation, data breaches, and system compromise</strong>.</p><p>Additionally, improper access control and insecure configurations can expose containers to external threats. Without robust security measures, attackers can take advantage of misconfigured permissions, unpatched software, or leaked credentials to gain unauthorized access. Given the rapid adoption of containerized environments, securing them should be a top priority for any organization utilizing them in production.</p><p>Implementing container security best practices ensures <strong>compliance with security standards, protects sensitive data, and minimizes attack surfaces</strong>. By proactively securing containers, organizations can prevent potential threats before they impact business operations, making container security a critical component of modern cybersecurity strategies.</p><p>I will try my best to keep this article beginner friendly, easy to understand and very straight forward.</p><p>Here, I’m going to use <strong>Docker</strong>, an open-source platform designed to automate the deployment of applications inside lightweight, portable containers. It enables developers to package applications along with their dependencies, ensuring consistency across different environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*7reevlA-tz9W1gfJmoWHQg.jpeg" /></figure><p>For this demonstration, I will use the <strong>web/dvwa</strong> container image, which is intentionally vulnerable and made for security scanning purposes. Additionally, I will be using security scanning tools like <strong>Trivy</strong> and <strong>Grype</strong> to identify vulnerabilities within the container image. Well there are lot more tools for same purposes like:</p><p>· <strong>Clair</strong> (by Red Hat): Static vulnerability scanning tool for container images.</p><p>· <strong>Snyk Container</strong>: Security scanning for container images and code dependencies.</p><p>· <strong>Docker Scout</strong>: Built-in vulnerability scanner for Docker.</p><p>· <strong>Prisma Cloud (by Palo Alto Networks)</strong>: Enterprise-grade container security platform.</p><p>I have used Trivy and Grype for static vulnerability analysis not just because they are easy to use but also because they are lightweight.</p><p><strong>What are Trivy and Grype?</strong></p><ul><li><strong>Trivy</strong>: Trivy is a simple and comprehensive vulnerability scanner for containers, filesystems, and Git repositories. It helps in identifying security risks in container images by detecting vulnerabilities in installed packages and software dependencies.</li><li><em>Official Documentation: </em><a href="https://aquasecurity.github.io/trivy/"><em>https://aquasecurity.github.io/trivy/</em></a></li><li><em>Download: </em><a href="https://github.com/aquasecurity/trivy"><em>https://github.com/aquasecurity/trivy</em></a></li><li><strong>Grype</strong>: Grype is another powerful vulnerability scanner that identifies known security issues in container images and file systems. It integrates well with other tools and provides detailed security insights.</li><li><em>Official Documentation: </em><a href="https://github.com/anchore/grype"><em>https://github.com/anchore/grype</em></a></li><li><em>Download: </em><a href="https://github.com/anchore/grype"><em>https://github.com/anchore/grype</em></a></li></ul><p>Till now, it is clear why container security matters, as it commonly includes vulnerabilities such as:</p><ul><li>Outdated software dependencies</li><li>Known CVEs in base images</li><li>Misconfigurations in Dockerfiles</li><li>Hardcoded credentials</li></ul><p><strong>Let’s Get Practical!</strong></p><p>Without wasting any time, let’s jump straight into the practical part! Fire up your Linux machine — I’m using <strong>Kali Linux</strong> for this demonstration. We will begin by setting up our environment, pulling a vulnerable container, and running security scans using <strong>Trivy</strong> and <strong>Grype</strong>.</p><p><strong>Step 1: Installing Docker on Kali Linux</strong></p><p>To scan container images for vulnerabilities, the first step is to install Docker. Fortunately, installing Docker on Kali Linux is straightforward. Follow these steps to set up Docker:</p><p><em>Note: All the images shown below do not include </em><strong><em>sudo</em></strong><em> command as I have already logged in as root user.</em></p><p><strong>Install Dependencies</strong></p><p>Before installing Docker, ensure that your system has the necessary dependencies:</p><p>· sudo apt install -y apt-transport-https ca-certificates curl software-properties-common</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*8xcZhnifFlSL5NRRCDZwmQ.png" /></figure><p>These packages enable secure downloads and provide additional features required for managing repositories.</p><p><strong>Add the Docker Repository &amp; Install Docker</strong></p><p>Since Kali Linux is based on Debian, we will use Docker’s official repository for Debian-based distributions:</p><p>· curl -fsSL <a href="https://download.docker.com/linux/debian/gpg">https://download.docker.com/linux/debian/gpg</a> | gpg — dearmor | sudo tee /etc/apt/trusted.gpg.d/docker.gpg &gt; /dev/null</p><p>This command retrieves Docker’s GPG key and adds it to the system’s trusted keyring, ensuring secure package installation.</p><p><strong>Now, add the Docker repository</strong>:</p><p>· echo “deb [arch=amd64] <a href="https://download.docker.com/linux/debian">https://download.docker.com/linux/debian</a> bullseye stable” | sudo tee /etc/apt/sources.list.d/docker.list</p><p>This step informs the package manager where to fetch Docker-related packages.</p><p><strong>Next, update the package index and install Docker:</strong></p><p>· sudo apt update</p><p>· sudo apt install -y docker-ce docker-ce-cli containerd.io</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*amswi7Yw0zn-_acUrfcTqw.png" /></figure><p>Here, we install <strong>docker-ce</strong> (Community Edition), the Docker command-line interface (<strong>docker-ce-cli</strong>), and <strong>containerd.io</strong>, which manages container runtime.</p><p><strong>Verify Docker Installation</strong></p><p>To confirm that Docker is installed successfully, check the installed version:</p><p>· docker — version</p><p><strong>Start and Enable Docker</strong></p><p>To start the Docker service and ensure it runs on system boot, use:</p><p>· sudo systemctl start docker</p><p>· sudo systemctl enable docker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*aVzGXsBsRphOgTMHgUSfUQ.png" /></figure><p>Now docker has been successfully installed and also these commands ensures that Docker is active and automatically starts when the system boots.</p><p><strong>Step 2: Pulling and Running a Vulnerable Container</strong></p><p>Now that Docker is installed and running, let’s pull a <strong>deliberately vulnerable</strong> container that we can scan for security weaknesses. For this demonstration, we will use <strong>DVWA (Damn Vulnerable Web Application)</strong>, a web application designed for security testing.</p><p><strong>Pull the DVWA Image</strong></p><p>To download the <strong>DVWA</strong> image from Docker Hub, run:</p><p>·docker pull vulnerables/web-dvwa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*79L9EkFA6bKlqmQ6CrnXgw.png" /></figure><p>This command fetches the latest version of <strong>DVWA</strong> from the public Docker repository.</p><p><strong>Run the DVWA Container</strong></p><p>Once the image is downloaded, we can launch the container:</p><p>·docker run -d — name dvwa -p 80:80 vulnerables/web-dvwa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*BBsOPGk1LYCeVmlzPq0KUQ.png" /></figure><p>The -d flag runs the container in detached mode (in the background).</p><p>The — name dvwa assigns a custom name to the container.</p><p>The -p 80:80 maps <strong>port 80</strong> on the container to <strong>port 80</strong> on the host, allowing access via a web browser.</p><p><strong>Verify the Running Container</strong></p><p>To check if the <strong>DVWA</strong> container is running, execute:</p><p>· docker ps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*FOGR8SAyxsHmNJgFLDbl4A.png" /></figure><p>This lists all active containers. Here you can see the image running on the port 80 on localhost that can be accessed on browser.</p><p>Well the the default credentials to log in are:</p><ul><li><em>Username: admin</em></li><li><em>Password: password</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*IkjBch0IdteG14H9mnDLuQ.png" /></figure><p>But we are not going to do this as our topic is different right,</p><p><strong>Next Step: Scanning the Image</strong></p><p>Once the image is pulled, we will analyze it for security vulnerabilities using <strong>Trivy</strong> and <strong>Grype</strong> before running it. Let’s move on to scanning the image to uncover potential risks.</p><p>One of the most popular and efficient tools for this purpose is <strong>Trivy</strong>, an open-source vulnerability scanner for container images, file systems, and code repositories.</p><p>To install <strong>Trivy</strong> on Kali Linux, simply run:</p><p>· sudo apt install -y trivy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*VW8DjfO9HHQ5nJgTDMaU_Q.png" /></figure><p>This command will fetch and install <strong>Trivy</strong> along with its dependencies.</p><p><strong>Verify Installation</strong></p><p>Once the installation is complete, verify that <strong>Trivy</strong> is installed correctly by checking its version:</p><p>· trivy –version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*5pZA2HB26q7y8Cbivj0-cA.png" /></figure><p>This confirms that <strong>trivy</strong> has been installed successfully now its time to scan the image.</p><p>· trivy image vulnerables/web-dvwa:latest</p><p>It will take some time to scan the image based on the size of image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*GJP57WMmcPThgIP-lIVgvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ouzGQ_ZpmTMy9MKoZ1gcQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Ih0LyfzD3TZ8er0o3jWi_Q.png" /></figure><p>I couldn’t include all the images since the list is quite long, but I’ve added the beginning, middle, and end sections to give an idea of how <strong>Trivy</strong> scans for vulnerabilities and lists them.</p><p>We can also generate report of scan in json or text format using <strong>trivy.</strong></p><p>· trivy image — format table — output trivy-report.txt vulnerables/web-dvwa:latest</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*wXUha-BhUrD9Cd7ATyFE5w.png" /></figure><p>— format table: Generates the report in a human-readable table format.</p><p>— trivy-report.txt: Saves the output to a trivy-report.txt file instead of displaying it in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*wXUha-BhUrD9Cd7ATyFE5w.png" /></figure><p>Similarly, the output can be exported in json format.</p><p>Now its time to use <strong>Grype</strong> for our scanning purpose.</p><p>Starting with the installation we will scan the image using <strong>Grype.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*mBBw-nMTu0cEib3zb1Y7uQ.png" /></figure><p>Now we have to move grype in /usr/local/bin so that we can use it from anywhere.</p><p>· mv ./bin/grype /usr/local/bin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*NBQieEKC2f6-HgZIxdeiYw.png" /></figure><p>This command for showing version confirms the successful installation of <strong>grype.</strong></p><p>Now its time to scan dvwa.</p><p>· grype docker:vulnerables/web-dvwa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*Arp9o53Jc2nrh8eJmCB_Yg.png" /></figure><p>In the same way we can export the result in text format as report.</p><p>· grype docker:vulnerables/web-dvwa -o table &gt; grype_report.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*Y8yJYoEXQ0r2v5qG5_nn3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*n0h9k_aDugM7N3boBjz9lg.png" /></figure><p>While scanning tools like <strong>Trivy</strong> and <strong>Grype</strong> help identify vulnerabilities in container images, it’s equally important to apply mitigation strategies to reduce security risks.</p><p>So, lets talk about about some mitigation steps that can be applied on all container images.</p><p>ü <strong>Use Minimal and Official Base Images</strong></p><ul><li>Choose <strong>lightweight base images</strong> like distroless, alpine, or scratch to reduce the attack surface.</li><li>Prefer <strong>official and verified images</strong> from trusted registries (docker.io/library/, ghcr.io/, etc.).</li></ul><p><strong>Example:</strong><br> Instead of using a full Ubuntu image, opt for:</p><p>FROM alpine:latest</p><p>ü <strong>Regularly Update Images and Dependencies</strong></p><ul><li>Update images frequently to patch known vulnerabilities.</li><li>Use the latest tag cautiously; instead, pin versions and update them periodically.</li></ul><p><strong>Example:</strong></p><p>docker pull nginx:1.25 # Instead of using nginx:latest</p><p>ü <strong>Remove Unnecessary Packages and Tools</strong></p><ul><li>Avoid keeping debugging tools like curl, wget, bash, and compilers in production images.</li><li>Use the — no-install-recommends flag when installing dependencies to avoid extra packages.</li></ul><p><strong>Example:</strong></p><p>RUN apt-get install — no-install-recommends -y ca-certificates</p><p>ü <strong>Enable Image Signing and Verification</strong></p><p>Use <strong>Docker Content Trust (DCT)</strong> or <strong>Sigstore Cosign</strong> to ensure images are from trusted sources.</p><p><strong>Enable Docker Content Trust (DCT)</strong> before pulling images:</p><p>export DOCKER_CONTENT_TRUST=1</p><p>docker pull nginx:1.25</p><p><strong>Sign an image using Cosign:</strong></p><p>cosign sign — key mykey.pem myimage:latest</p><p>ü <strong>Implement User Privileges and Rootless Containers</strong></p><ul><li>Avoid running containers as root (default behavior).</li><li>Create a dedicated non-root user inside the image.</li></ul><p><strong>Example:</strong></p><p>RUN useradd -m appuser</p><p>USER appuser</p><p><strong>My Final Thoughts</strong></p><p>Container security is not just about identifying vulnerabilities — it’s about implementing proactive strategies to <strong>mitigate risks</strong> and <strong>harden images</strong> against potential threats. While tools like <strong>Trivy</strong> and <strong>Grype</strong> help uncover security flaws, the real strength lies in <strong>applying best practices</strong>, such as:</p><p>✅ Using <strong>minimal, trusted base images</strong><br> ✅ Regularly <strong>updating</strong> dependencies<br> ✅ Enforcing <strong>least privilege principles</strong><br> ✅ Integrating <strong>scanning into CI/CD pipelines</strong><br> ✅ <strong>Signing images</strong> and tracking SBOMs for compliance</p><p>Security is an <strong>ongoing process</strong>, not a one-time fix. By continuously scanning, monitoring, and improving container security, we can <strong>reduce attack surfaces</strong> and build a <strong>resilient containerized environment</strong>.</p><p>🔹 <strong>A secure container is not just scanned — it’s hardened, monitored, and maintained!</strong></p><p>That’s all for this article will be back with new and interesting stuff. 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bd68288c527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WiFi Pentesting]]></title>
            <link>https://medium.com/@mr.ohmkumar1811/wifi-pentesting-98a4a4d44874?source=rss-31133eb4f3f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/98a4a4d44874</guid>
            <dc:creator><![CDATA[ Ohmkumar]]></dc:creator>
            <pubDate>Wed, 18 Sep 2024 12:39:46 GMT</pubDate>
            <atom:updated>2024-09-18T12:39:46.615Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, I’m Ohm, a cybersecurity enthusiast on a mission to explore the exciting world of penetration testing. With hands-on experience in web, mobile, and network vulnerability assessments, I thrive on uncovering security flaws and enhancing defenses. Along my journey, I’ve also learned Wi-Fi pentesting, which has been a fantastic addition to my skill set.</p><p>Join me as I document my experiences and insights in cybersecurity, sharing the lessons I’ve learned along the way!</p><p>In this article, I will discuss Wi-Fi pentesting — its importance and how to perform basic tests to check the security of a network. With the increasing reliance on Wi-Fi, ensuring network security is crucial. I will cover what Wi-Fi pentesting is, why it matters, and simple steps you can take to identify and fix security issues before they are exploited. Additionally, I will explain some Man-in-the-Middle (MITM) attacks that can occur if someone gains access to the Wi-Fi password. These attacks can be dangerous, allowing an attacker to intercept and manipulate data flowing through your network. Understanding these attacks highlights the importance of securing your Wi-Fi and what steps you can take to protect yourself.</p><p>To begin pentesting, you need a Wi-Fi pentesting lab. Setting up this lab is straightforward but requires a few essentials. First, you’ll need a Linux OS, such as Kali Linux, equipped with all the necessary pentesting tools. You can install it on your computer or run it as a virtual machine; I recommend installing it on VMware.</p><p>Next, you’ll need a Wi-Fi adapter that supports monitor mode and packet sniffing. Monitor mode allows the adapter to capture all wireless traffic in the area, while packet sniffing enables the capture and analysis of data packets transmitted over the network. Ensure the adapter is compatible with Linux. If it’s not working, you may need to download and install the appropriate driver for the chipset used in the Wi-Fi adapter.</p><p>Here are some commonly used Wi-Fi chipsets/adapters that support monitor mode:</p><p><strong>Atheros Chipset List:</strong></p><ul><li>Atheros AR5000</li><li>Atheros AR5001A-AR5007EG</li><li>Atheros AR5000-AR5007EG</li><li>Atheros AR5005U (AR5523)</li><li>Atheros AR9001U (AR9170)</li><li>Atheros AR2427+AR5008+AR900x</li><li>Atheros AR9002U (AR9271, AR7010)</li></ul><p><strong>Broadcom Chipset List:</strong></p><ul><li>Broadcom BCM4301, BCM4307, BCM4306r2</li><li>Broadcom BCM4306r3, BCM4311, BCM4312, BCM4309, BCM4318(E), BCM4321, BCM4322</li><li>Broadcom BCM43224, BCM43225, BCM4331</li></ul><p><strong>Intel Chipset List:</strong></p><ul><li>Intel PRO/Wireless 2100B</li><li>Intel PRO/Wireless 3945ABG</li><li>Intel Wireless WiFi Link 4965AGN</li><li>Intel WiFi Link 5100, 5150, 5300, 5350 — Centrino 100, 130, 1000, 1030, 6150, 6200, 6250, 6300</li></ul><p><strong>Ralink Chipset List:</strong></p><ul><li>Ralink RT2460</li><li>Ralink RT2560</li><li>Ralink RT2561, RT2561S, RT2661</li><li>Ralink RT2571, RT2572</li><li>Ralink RT2571W, RT2573, RT2671</li><li>Ralink RT2760, RT2790, RT2860, RT2880, RT2890, RT3052, RT3090, RT3091, RT3092, RT3390, RT3060, RT3062, RT3562, RT3592, RT5390, RT3290</li><li>Ralink RT2770, RT2870, RT2070, RT3070, RT3071, RT3072, RT3370, RT3572, RT5370, RT5572, RT8070</li></ul><p><strong>Realtek Chipset List:</strong></p><ul><li>Realtek RTL8180L, RTL8185L, RTL8187SE (3.15+)</li><li>Realtek RTL8187L, RTL8187B</li><li>Realtek RTL8188SU, RTL8191SU, RTL8192SU</li><li>Realtek RTL8188CUS, RTL8192CU, RTL8188RU</li></ul><p>Finally, you’ll need an access point to target. This could be your home Wi-Fi router or any other network you have permission to test.</p><p>To start pentesting, open Kali Linux in VMware and ensure your Wi-Fi adapter is connected to the virtual machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KBYo1L0uMYv0w6h0hmPNlw.png" /></figure><p>The next thing is to check whether the wireless adapter is connected successfully or not. For that open a terminal and type the following command.</p><p>. <strong><em>iwconfig</em></strong></p><p>This command shows all the wireless network interfaces connected to the machine as well as the current status of the network interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fTLs7C_OMjqRGNp_-XSNBw.png" /></figure><p>In this picture it is clearly visible that the network interface we are going to use is wlan0 and its now in managed mode. Here I’d like to add few words.</p><p>These adapters can be used in multiple ways and for each case it has different modes. Like here <strong>Managed</strong> mode which is the default mode of an adapter also called as client mode where WIFI adapter acts as a client to connect with an access point.</p><p><strong>Monitor</strong> <strong>mode: </strong>In this mode the adapter can capture all wireless traffic in the air even those which is not addressed to it or any packet can be captured which is having different source or destination.</p><p><strong>Master mode</strong>: In this mode, the adapter acts as a wireless access point can be used in various ways will cover this later in this article.</p><p>There are other modes such as Promiscuous, Ad-Hoc, Mesh, and Repeater modes, but these will not be discussed here.</p><p>In my case the driver is already installed in my Linux machine so it is working well now it’s time to put it in monitor mode so that the adapter can listen to all packets being transmitted on the network.</p><p>To enable monitor mode, we have two commands:</p><p>· <strong><em>sudo iwconfig wlan0 mode monitor</em></strong></p><p>· <strong><em>sudo airmon-ng start wlan0</em></strong></p><p>Before going ahead I’d recommend you to use your terminal as root or login as root user so that not every time you have to append <strong>sudo</strong> in every command.</p><p>In this article, we will use<strong> the Aircrack-ng suite</strong> throughout the article so it would be better if you use the commands of Aircrack-ng suite. It is a is a powerful set of tools used in WIFI pentesting.</p><p>Before enabling monitor mode, it is necessary to kill all the running processes, which can be done using another command:</p><p>· <strong><em>airmon-ng check kill</em></strong></p><p>It is used to terminate processes that could interfere with setting up a wireless interface in monitor mode, ensures that these interfering processes are stopped, allowing you to set your wireless interface to monitor mode without issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fwfboTxBjgKq2o-QDfyzRw.png" /></figure><p>Proceeding to the next phase we need to discover all the networks in our area. The tool that we will use is <strong>airodump-ng </strong>which is used to identify<strong> </strong>all the WIFI network around us including encryption type, on which channels they are currently operating on, etc.</p><p>· <strong><em>airodump-ng wlan0</em></strong></p><p>Here you can see it discovered the networks around including encryption type that is WPA2, their name and MAC Address that is named as BSSID and ESSID etc.</p><p>· <strong>BSSID</strong>: — Basic Service Set Identifier, typically the MAC address of the access points.</p><p>· <strong>ESSID</strong>: — Extended Service Set Identifier, name of a Wi-Fi network that is broadcasted by access points</p><p>· <strong>WPA2</strong>: — Wi-Fi Protected Access 2, security protocol designed to protect wireless networks.</p><p>Let’s talk little about this encryption: -</p><p>For authentication, WPA2 uses two methods: in personal networks (WPA2-Personal), it relies on a Pre-Shared Key (PSK), which is hashed into a key used by both the client device and access point to secure communications; in enterprise networks (WPA2-Enterprise), it utilizes 802.1X authentication with a RADIUS server, requiring unique credentials for each user and offering a higher level of security.</p><p>WPA2 manages keys through a four-way handshake process that establishes a secure connection between the client device and the access point. This process begins with an initial exchange of messages to confirm that both parties possess the correct network credentials. They then generate a unique session key that will be used for encrypting the data during that session. Finally, after the handshake is complete, a secure communication channel is established using this session key to ensure that all transmitted data remains protected. We will discuss more about the handshake later in this article.</p><p>Once the information is gathered, we can start the pentesting process on this target network which is selected in the picture above.</p><p>BSSID: 64:29:43:9F: 55:27</p><p>ESSID: 2nd floor</p><p>Channel: 5</p><p>ENC: WPA2</p><p><strong><em>Things to remember</em></strong><em>:</em></p><p>Ø <em>As mentioned previously I am not using sudo in every command as I logged in as root.</em></p><p>Ø <em>Check the name of the interface after enabling the monitor mode. In my case its wlan0, sometimes it can be wlan0mon, mon0, or something like that so while using any command where you need to specify your interface name it accordingly.</em></p><p>Before we proceed, let me outline what I’ll cover in this article. I’ll walk you through my approach to performing a WIFI network penetration test, starting with cracking the password of the selected network. Everything will be explained step by step.</p><p>With the target selected, my next step is to disconnect the clients currently connected to the network. When they attempt to reconnect, I will capture the handshake, which I will then use to extract the password.</p><p>Let’s initiate this procedure. I will use two commands in two separate terminals simultaneously. In the first terminal, I’ll run a command to discover the clients connected to our targeted access point. In the second terminal, I’ll attempt to disconnect one of the clients by sending deauthentication packets. Once the client reconnects, the handshake will be captured and saved into a file.</p><p>These are the following commands that will be used in two separate terminals:</p><p>Ø <strong><em>airodump-ng -c 5 — bssid 64:29:43:9F: 55:27 -w test wlan0</em></strong></p><p>Ø <strong><em>aireplay-ng — deauth 10 -a 64:29:43:9F: 55:27 -c B0:DC:EF:15:72:AA wlan0</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9djvWlMOqMRrEOIsGHDZyQ.png" /></figure><p>Let’s break the commands:</p><p>In the first terminal, the command running is:</p><p><strong><em>airodump-ng -c 5 — bssid 64:29:43:9F: 55:27 -w test wlan0</em></strong></p><p>o <strong><em>airodump-ng:</em></strong> A tool of the Aircrack-ng suite used to monitor networks and capture packets.</p><p>o <strong><em>-c 5:</em></strong> The network is operating on channel 5.</p><p>o <strong><em>— bssid 64:29:43:9F: 55:27:</em></strong> Specifies the MAC address of the access point.</p><p>o <strong><em>-w test:</em></strong> Specifies the file name where the handshake file will be captured and stored.</p><p>o <strong><em>wlan0:</em></strong> Network interface in monitor mode.</p><p><em>To disconnect a client connected to this network the following command is used</em><strong><em>:</em></strong></p><p><strong><em>aireplay-ng –deauth 10 -a 64:29:43:9F: 55:27 -c B0:DC:EF:15:72:AA wlan0</em></strong></p><p><strong><em>aireplay-ng: </em></strong>Another powerful tool of Aircrack-ng suite used in various ways for various attacks but here it is used for deauthenticating a client from the network.</p><p>o <strong><em>— deauth 10: </em></strong>Species how many deauth packets it goanna inject in the network.</p><p>o <strong><em>-a (MAC): </em></strong>Specifies MAC address of the access point.</p><p>o <strong><em>-c (MAC): </em></strong>Specifies the MAC address of client who will get deauthentication packets<strong><em>.</em></strong></p><p>o <strong><em>wlan0: </em></strong>Interface in monitor mode.</p><p>So far, we’ve understood that in the second terminal, the client gets disconnected, and each time they attempt to reconnect, the handshake is captured, as seen in the picture above. But how does this process actually work?</p><p>The interface first changes its MAC address to that of the client and sends a request to the access point to disconnect the client. It then switches its MAC address to that of the access point and sends deauthentication packets to the client.</p><p>When the client automatically reconnects to the network through a four-way handshake, the handshake is captured by the ‘airodump-ng’ tool and saved in the specified file. During this process, the client initially sends an Association Request to the access point (AP). This request is part of the connection process and includes details such as the client’s capabilities, supported data rates, and other information required for the AP to accept the client.</p><p><strong>Flow of Handshake in brief:</strong></p><p>Message 1: AP to Client</p><p>The AP sends an Authentication Request to the client.</p><p>Message 2: Client to AP</p><p>The client responds with an Authentication Response.</p><p>Message 3: AP to Client</p><p>The AP sends an Authentication Confirmation.</p><p>Message 4: Client to AP</p><p>The client sends an Acknowledgment to confirm the receipt of the AP’s confirmation.</p><p>The authentication process between a client and an access point (AP) using the four-way handshake involves exchanging information such as the AP address, client address, AP nonce, client nonce, and EAPOL payloads. The combined data and the entered password are used to generate a Message Integrity Code (MIC). This MIC is then compared to the MIC included in the handshake; if they match, the password is verified successfully.</p><p>In simple terms, the handshake itself doesn’t include the password. Instead, it contains information such as the AP address, client address, nonces, and an integrity code called ‘MIC’. To verify the password, the system combines the handshake information with the password to generate a MIC, which is then compared to the MIC in the handshake. If they match, the password is confirmed.</p><p>While capturing the handshake, multiple files may be generated with names like ‘test-01’. However, the file with a ‘.cap’ extension contains the handshake data that will be used to extract the password. This `.cap` file can be opened in Wireshark for packet analysis.</p><p>Now, Aircrack-ng will come into play, as it is used to extract passwords from the handshake using a dictionary attack.</p><p>Here we need a dictionary or a list of common passwords that we can generate or download and the tool will try each password in the wordlist against the captured handshake to find a match.</p><p>Ø <strong><em>aircrack-ng -w /path/pass.txt -b MAC /path/handshake.cap</em></strong></p><p>The tool will compare the MIC (Message Integrity Code) from the captured handshake with the MIC generated by combining the password from the wordlist with the handshake data, such as the addresses, nonce, and EAPOL payload. If the MICs match perfectly, the tool will identify the correct Password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGbj1vArwBrSblcQIGbshA.png" /></figure><p>The command is quite simple: `-w` is used to specify the path of the wordlist, `-b` is for the MAC address of the access point, and then comes the `handshake.cap` file.</p><p>Okay, the password has been cracked successfully now if we talk about the solution or mitigation, we can observe here the weakness is the <strong>password </strong>which is very easy to guess.</p><p><strong>Mitigation:</strong></p><p>· <strong>Use Strong, Unique Passwords:</strong> Employ a complex, lengthy passphrase for your WPA2 network. Avoid common passwords and use a combination of letters, numbers, and special characters that cannot be easily brute-forced.</p><p>· <strong>Enable WPA3: </strong>Upgrade to WPA3. WPA3 offers enhanced security features, including stronger encryption and protection against offline dictionary attacks.</p><p>This is just one method for Wi-Fi pentesting; stay tuned for more exciting techniques in the future!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98a4a4d44874" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>