<?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 Ali Jujara on Medium]]></title>
        <description><![CDATA[Stories by Ali Jujara on Medium]]></description>
        <link>https://medium.com/@alijujara?source=rss-e15a6b5eb63d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hMjLUa2WCzT4VO2E</url>
            <title>Stories by Ali Jujara on Medium</title>
            <link>https://medium.com/@alijujara?source=rss-e15a6b5eb63d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:56:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alijujara/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[Supercharging Mobile Application Penetration Testing with Android Containers]]></title>
            <link>https://alijujara.medium.com/supercharging-mobile-application-penetration-testing-with-android-containers-d618cf108b94?source=rss-e15a6b5eb63d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d618cf108b94</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[mobile-app-security]]></category>
            <category><![CDATA[android-app-security]]></category>
            <dc:creator><![CDATA[Ali Jujara]]></dc:creator>
            <pubDate>Sat, 14 Oct 2023 12:28:31 GMT</pubDate>
            <atom:updated>2023-10-14T12:28:31.669Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever used browser containers in your penetration tests? If not, I’d like to shed some light on them. Containers allow users to create sandboxes within the same browser which comes in handy during a pentest when you need two separate accounts logged into a browser at the same time (mostly for authorization-related test cases). Cookies are separated by the container, allowing you to use the same web browser with multiple accounts. This is fairly easy when it comes to a web application pentest, but things become a little more complicated when you need something like this when you are performing a penetration test on a Mobile Application.</p><p>What if I tell you that it is possible to create containers with mobile applications using which you can be logged in using two separate accounts on the same Android device at the same time. This can help speed up a penetration test when you need two separate accounts with different privileges to be logged in at the same time. This article demonstrates my entire experience on how I-Landed this idea to execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*OZRQOL6Tbe8pEA_cSc_RkA.gif" /></figure><p><strong>What is Island?</strong></p><p>Island is an application that helps users create a sandboxed environment inside an Android device. It uses the “managed profile feature” or “Android for work” to create an isolated sandbox for installed applications.</p><p>This application helps users create a dedicated work profile on their device in which applications can be cloned using Island and can run parallel alongside the original application. After installing this application, you will see a separate tab called “Work”. This tab represents the isolated space created by the Island. Once installed successfully, there will be two user spaces within the Android device.</p><p><strong>Main Land</strong> — Contains all the applications present on the Android device.</p><p><strong>Island </strong>— A dedicated environment provided by the application that facilitates the installation of apps within a secure sandbox. The user has the flexibility to choose which applications they want installed within this isolated space.</p><blockquote>Pre-requisite: To proceed, ensure that Shizuku is installed and running on your device. This article does not cover the installation process for Shizuku, so please refer to online tutorials for instructions on how to install it.</blockquote><p>The picture below shows a visual representation of the segregation of user space provided by the Island Application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*WHjcae5dwKBomGA0Bl0l9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*1OlZ2N0p-0Mew0WBQgBqow.png" /></figure><p>For the sake of the article, I will be using the words “Island”, “Work Profile”, and “Isolated Space” interchangeably, you can assume that they mean the same thing. To sum it up briefly, Island is an Android application that we can use to create an “Isolated Space” or a “Work Profile” within our Android device. Now, let’s proceed with the configuration of the application.</p><p><strong>Setting up the Island:</strong></p><ol><li>Once you have successfully installed the application, you will be able to a something like this. Tap on the “Accept” button to proceed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*WMeQs9p_nfyS2LBajZwwwQ.png" /></figure><p>2. Once you tap the “Accept &amp; Continue button”, the application will create a work profile for your device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*CFghlI5B8TzdTVO3XvVwQg.png" /></figure><p>3. This process will take some time and configure a separate isolated space called the “Island” on the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*64W5g_8fa93xBxBY3v9Pbg.png" /></figure><p>4. From here, users can start cloning or installing applications in the new isolated space that we created. Now let’s try to clone an existing application into our Island. Select the application that you want to clone, and tap on the icon in the bottom right corner as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*3-JyFF8pYeH8bvZOduuxbQ.png" /></figure><p>5. You can clone it via any of the shown options (Shizuku or Playstore).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*a0hMF6Y6wx-L1cZNvDDCVw.png" /></figure><p>6. Once the process is completed, you will be able to see the application cloned into the Island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*VONAyAMnJWBCEyFShgA-iQ.png" /></figure><p>Now that we have created the isolated space, let’s navigate to the certificate store on the device. You will see that the certificates are segregated into two separate profiles: one for the System Store and another for the User Store. In this instance, we already have the Portswigger certificate installed in the User Store. However, you can see that there are no certificates available for the isolated space (Work Profile) that we created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*haW0xz7K_WsDgXozxltDiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*-xdfVp7iXoXO9B9yEV_tIQ.png" /></figure><p>Installing a user-supplied certificate is not as straightforward. In order to achieve this, we will need to clone the certificate that is already present in the Mainland profile via ADB. Before we dive into that, let’s explore the directory where Android stores the certificates. The above image demonstrates the directory of the user before we created the island.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*X-Hh454F9Z1ZJFCrJ7YLFw.png" /></figure><p>The /cacerts-added/ directory contains the list of user-installed certificates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*GGA7Bbk88yqyXhsTrTwJ1A.png" /></figure><p>Navigate to the /cacerts-added/ directory and you will be able to see the installed certificates in this directory. We will be copying this certificate to the new user’s space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*c7eXWa5VUr6olVePes3XMg.png" /></figure><p>The below image shows a new directory that is present under the /data/misc/user. For this instance, `12` folder belongs to the isolated space and we will be copying our CA Certificate into this directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*C_Ya8Um--PVH8vP84vawCw.png" /></figure><h3>Installing User Certificates into the Work Profile:</h3><ol><li>Access the shell of the device via adb and move to the following directory.</li></ol><pre>/data/misc/user/0/cacerts-added</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*t3tWDJsYLxKXtlJVwWGGwg.png" /></figure><p>2. Let’s create a similar folder in the second user’s directory using this command.</p><pre>mkdir cacerts-added</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*hxhmilVQ1A34VXao_ZKpnw.png" /></figure><p>3. Now copy the certificate from User 0’s Directory to User 12’s Directory using the CP command.</p><p><em>Note — You will need elevated privileges to perform this action, please ensure you are performing this operation with SU privileges. If for some reason this does not work, you can do it using any file explorer that allows access to the root partition.</em></p><pre>cp /data/misc/user/0/&lt;ca-certs-added&gt; /data/misc/user/&lt;user_id&gt;/cacerts-added</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*tbSix-9LLI3I4dfsJts4xw.png" /></figure><p>4. Let’s go to the Certificate Store and check if the certificate has been installed successfully or not.</p><p><em>Note — If you are unable to see a certificate under the work profile, please ensure that you go back to Step 1 of the certificate installation.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*Bfmm9vs3fdSAbLy5YxvjGQ.png" /></figure><p>Now that we have successfully installed the Certificate into our Work Profile, let’s go ahead with a sample application. The application is successfully cloned into the work profile, let’s proceed with the interception. You can use any application of your choosing for this. For the sake of this example, we will be considering the Chrome Application, the scenario in scope here is an application that does not have SSL Pinning and respects certificates from the User Store.</p><p>At this point, if the voice in your head goes -</p><ul><li>What if the application I want to test only accepts certificates from the System Store?</li><li>What if there is SSL Pinning Implemented?</li></ul><p>To that, I shall respond with a promise of a blog solely devoted to the subject! But for now, let’s kindly ask the inner voice to simmer down and join us in this whimsical journey into the simple scenario ahead.</p><p><strong>Intercepting Traffic for Both Profiles</strong></p><ol><li>Launch the application from the Mainland and try to visit any URL.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*ThdBONw9bXnfs4vAyTGJyw.png" /></figure><p>2. We are able to intercept the request since Chrome respects the User Certificate Store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*mIPPKNmcB96ZvRJy817aHg.png" /></figure><p>3. Now if you want to intercept requests that are sent by the application installed within the work profile, just launch the application from the work profile tab and start sending requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*aOcRbldF6vC9qIlPYYnsCA.png" /></figure><p>4. If everything is configured properly, you should be able to intercept the requests from the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*flU3J3Cs6KVbRK7m_Pq9Bw.png" /></figure><p>This nifty trick can come to the rescue during those daring pentests, where you require not one, but two distinct accounts to be logged in on a single mobile device. I hope this is useful to you sometime in your next Mobile Application Pentest.</p><p>Before we part ways, I’m thrilled to tease what’s coming up in our next blog. Get ready for more exciting Island adventures, where we’ll explore how to make this tool play nice with applications that implement SSL Pinning. Plus, we’ll uncover some intriguing scenarios where isolation is your secret weapon! Stay tuned!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*zUbpKpgh2o_c7UCo" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d618cf108b94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proxying Traffic on Android Flutter Applications]]></title>
            <link>https://alijujara.medium.com/proxying-traffic-on-android-flutter-applications-d3f70655df66?source=rss-e15a6b5eb63d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3f70655df66</guid>
            <category><![CDATA[ssl-pinning]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[frida]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Ali Jujara]]></dc:creator>
            <pubDate>Sun, 16 May 2021 14:50:27 GMT</pubDate>
            <atom:updated>2021-05-16T14:50:27.438Z</atom:updated>
            <content:encoded><![CDATA[<p>This article explains how to intercept traffic on Flutter based Android Applications. Flutter is a new open-source mobile development framework that allows developers to write a single code base for iOS, Android, Web Applications and thick clients. Flutter applications are written in Dart which is not proxy aware on Android. The applications developed using this framework are known as proxy-unaware applications. These applications don’t use the system CA store, instead it uses the list of CA’s that are compiled into the application.</p><p>To get started with this you will require a few prerequisites, so let’s jump straight to it !!</p><p><strong><em>Prerequisites:</em></strong></p><ul><li>Rooted Physical Device</li><li>Android Debug Bridge (ADB)</li><li>ProxyDroid</li><li>Basic knowledge on Frida</li></ul><p>There are other ways in which this task can be achieved but for this article, we will be focusing on two methods that I primarily use to bypass the restrictions and get the traffic into the proxy tools for Dynamic Analysis.</p><ol><li>Using ProxyDroid <em>(Applications that use the HTTP protocol)</em></li><li>Using iptables + SSL Unpinning using Frida<em> (Applications that use the HTTPS protocol)</em></li></ol><p><strong><em>Scenario 1: Intercepting traffic for Applications that use the HTTP Protocol</em></strong></p><p>For this scenario, we would be installing ProxyDroid on our testing device to route the HTTP traffic to our proxy tool. The procedure for that is fairly simple to follow, here it goes.</p><p><strong><em>Step 1: </em></strong>After installing ProxyDroid, set the Local IP and Port of the target machine where Burpsuite has been installed and set the proxy type to “HTTP”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*WZPGPIh2CaeYJ4Zelo5_bA.jpeg" /></figure><p><strong><em>Step 2: </em></strong>Go to “Individual Proxy” and select the Flutter application. Once the target application is selected, you can now enable the “Proxy Switch”.</p><blockquote>Individual Proxy is used to apply the proxy settings to a specific application, this feature can also be utilized when you only want the traffic for a specific application to show up in Burpsuite.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*z4LJDqMfgMbwE8wgyQY-Ag.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*rp76nkMIc6ANlYjc9tVoZw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*nvbZ_NF4Wi1zH7ZG2IBepQ.jpeg" /><figcaption>Setting the individual proxy for the Flutter Application</figcaption></figure><p><strong><em>Step 3: </em></strong>Configure Burpsuite to listen on all interfaces and enable the “Invisible Proxying” from the options menu as shown above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzRvF0XbVAL3wZccCxj_fw.jpeg" /><figcaption>Enabling “Invisible Proxying” in Burpsuite</figcaption></figure><p><strong><em>Step 4:</em></strong> Start the target Flutter Application and perform any action, you will be now able to intercept the HTTP requests now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pPVXexWRVJ4LqViYng9_g.jpeg" /><figcaption>Request intercepted for Flutter Application</figcaption></figure><p><strong><em>Scenario 2: Using iptables + SSL Unpinning using Frida (Applications that use the HTTPS protocol)</em></strong></p><p>For this scenario, we would be using iptables and Frida to bypass SSL Pinning on a Flutter Based Android Application.</p><p>To begin with the process, it is required to configure iptables on the testing device.</p><p><strong><em>Step 1: </em></strong>Access the device via adb shell and grant superuser access using the su command (iptables require superuser privileges). Use the following commands to create the rules to reroute all the traffic to <em>127.0.0.1:8080</em> on the target device.</p><pre>iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:8080</pre><pre><br>iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*aIMwYmhPqwbZmPLnjKIEug.jpeg" /><figcaption>Routing the traffic via iptables</figcaption></figure><p><strong><em>Step 2: </em></strong>Use the following command to verify if the required rules have been created on our testing device. The highlighted text represents that the routing rules have been created on the device.</p><pre>iptables -t nat -L</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*PwL-Kzo-2xzpm3nT4RKxag.jpeg" /><figcaption>Rules for rerouting the traffic created on the device</figcaption></figure><p><strong><em>Step 3:</em></strong> Configure Burpsuite to listen on all interfaces and enable the “Invisible Proxying” from the options menu as shown above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ToDgbovFAzDuNeZdr8IHEg.jpeg" /><figcaption>Enabling “Invisible Proxying” in Burpsuite</figcaption></figure><p><strong><em>Step 4: </em></strong>Here we noticed that there was SSL Pinning implemented in the target application as shown in the image above. Therefore, we need to bypass SSL Pinning so that we can intercept the requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hV3nq3OHDXjw6IMqK7PcUg.jpeg" /><figcaption>Certificate error shown because of SSL Pinning implemented in the application</figcaption></figure><p><strong><em>Step 5: </em></strong>We can bypass SSL Pinning in the application by using Frida. Use the following command to run the frida script (can be downloaded from the link mentioned above).</p><pre>frida -U -f &lt;package_name_app&gt; -l &lt;path_to_frida_script_on_local_system&gt; --no-paus</pre><blockquote><a href="https://github.com/m0bilesecurity/Frida-Mobile-Scripts/tree/master/Android">https://github.com/m0bilesecurity/Frida-Mobile-Scripts/tree/master/Android</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*pTypl8QI8c5gAmLRs2U01Q.jpeg" /><figcaption>Pinner logic found and hooked by Frida on the Flutter Application</figcaption></figure><p><strong><em>Step 6:</em></strong> Now access the application and open Burpsuite, we are now able to intercept the HTTPS requests for the Flutter Application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Ky7413O_XqC2CEaVwovHg.jpeg" /><figcaption>HTTPS requests intercepted in Burpsuite for Flutter based Android Application</figcaption></figure><p>Thank you for reading my article today!</p><p>If you have any queries, feel free to mention them in the comments below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3f70655df66" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>