<?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 Sanatsu on Medium]]></title>
        <description><![CDATA[Stories by Sanatsu on Medium]]></description>
        <link>https://medium.com/@ari5ti?source=rss-614e5a7bce8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uTzz4c17GKaaSp47mMSkgw.jpeg</url>
            <title>Stories by Sanatsu on Medium</title>
            <link>https://medium.com/@ari5ti?source=rss-614e5a7bce8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 17:03:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ari5ti/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[Introduction to Symbolic Execution: How It Works, Tools & a Practical Angr Walkthrough]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/introduction-to-symbolic-execution-how-it-works-tools-a-practical-angr-walkthrough-0acd3e30ab62?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/1400/0*h6wUXZ6PpOvFOIEX" width="1400"></a></p><p class="medium-feed-snippet">Imagine a bug in a large codebase that only shows up when two variables meet in a rare condition&#x200A;&#x2014;&#x200A;you never hit it through fuzzing or&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/introduction-to-symbolic-execution-how-it-works-tools-a-practical-angr-walkthrough-0acd3e30ab62?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/introduction-to-symbolic-execution-how-it-works-tools-a-practical-angr-walkthrough-0acd3e30ab62?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0acd3e30ab62</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Thu, 02 Oct 2025 17:35:59 GMT</pubDate>
            <atom:updated>2026-05-01T12:19:31.143Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Exploiting Android’s Task Hijacking]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/android-task-hijacking-6a3a8848f16e?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/600/1*uejmkc_uyVw6Z8cLlYE2qw.png" width="600"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/android-task-hijacking-6a3a8848f16e?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/android-task-hijacking-6a3a8848f16e?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a3a8848f16e</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[task-hijacking]]></category>
            <category><![CDATA[task-hijack]]></category>
            <category><![CDATA[android-task-hijacking]]></category>
            <category><![CDATA[exploiting-task-hijacking]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 08:12:15 GMT</pubDate>
            <atom:updated>2025-07-25T05:55:07.583Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Deep Link Exploitation: Introduction & Open/unvalidated Redirection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/deep-link-exploitation-introduction-open-unvalidated-redirection-b8344f00b17b?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/600/1*hqpprD4Ns76Z1pvrlaCcTA.png" width="600"></a></p><p class="medium-feed-snippet">Exploiting open/unvalidated Redirection.</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/deep-link-exploitation-introduction-open-unvalidated-redirection-b8344f00b17b?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/deep-link-exploitation-introduction-open-unvalidated-redirection-b8344f00b17b?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8344f00b17b</guid>
            <category><![CDATA[exploiting-deeplinks]]></category>
            <category><![CDATA[mobis3c]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[deeplink-exploitation]]></category>
            <category><![CDATA[deep-link-android]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Tue, 20 Jul 2021 11:15:56 GMT</pubDate>
            <atom:updated>2021-07-20T11:35:38.994Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Exploiting Android WebView Vulnerabilities]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/exploiting-android-webview-vulnerabilities-e2bcff780892?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/1217/1*eQE5lyBsWVyCRy2uIg6AHA.png" width="1217"></a></p><p class="medium-feed-snippet">What is WebView?</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/exploiting-android-webview-vulnerabilities-e2bcff780892?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/exploiting-android-webview-vulnerabilities-e2bcff780892?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2bcff780892</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[exploiting-webviews]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[stealing-tokens]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Sun, 04 Apr 2021 05:12:00 GMT</pubDate>
            <atom:updated>2021-04-26T11:28:39.944Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Exploiting Apps vulnerable to Janus (CVE-2017–13156)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/exploiting-apps-vulnerable-to-janus-cve-2017-13156-8d52c983b4e0?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/698/0*NRAdiAHwAC1yKO-O.png" width="698"></a></p><p class="medium-feed-snippet">Android Janus Vulnerability CVE-2017&#x2013;13156</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/exploiting-apps-vulnerable-to-janus-cve-2017-13156-8d52c983b4e0?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/exploiting-apps-vulnerable-to-janus-cve-2017-13156-8d52c983b4e0?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d52c983b4e0</guid>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[janus-vulnerability]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[android-cve-2017-13156]]></category>
            <category><![CDATA[android-security]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Fri, 26 Mar 2021 10:16:18 GMT</pubDate>
            <atom:updated>2021-03-26T10:16:18.546Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Insecure Data Storage: Insecure Logging & Storage]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/insecure-data-storage-insecure-logging-storage-bf50db1c4879?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/900/0*35mJaLH5jFWd-JHx.jpg" width="900"></a></p><p class="medium-feed-snippet">Before we get started, make sure you have genymotion setup ready. if not follow this guide to setup &amp; configure the genymotion in Linux.</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/insecure-data-storage-insecure-logging-storage-bf50db1c4879?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/insecure-data-storage-insecure-logging-storage-bf50db1c4879?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf50db1c4879</guid>
            <category><![CDATA[insecure-logging]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[insecure-data-storage]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 04:12:36 GMT</pubDate>
            <atom:updated>2021-02-12T04:12:36.275Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Web Cache Poisoning]]></title>
            <link>https://medium.com/webappsec/web-cache-poisoning-29d7dcd7bd2c?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/29d7dcd7bd2c</guid>
            <category><![CDATA[web-cache-poisoning]]></category>
            <category><![CDATA[web-pentesting]]></category>
            <category><![CDATA[web-cache]]></category>
            <category><![CDATA[webappsec]]></category>
            <category><![CDATA[appsec]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Sat, 06 Feb 2021 15:46:37 GMT</pubDate>
            <atom:updated>2021-02-06T15:46:37.619Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U2pPeXGxPO_D5CF0.png" /><figcaption>source: KeyCDN</figcaption></figure><h3>Web Cache</h3><p>If a server had to send a new response to every single HTTP request separately, this would likely overload the server, resulting in latency issues and a poor user experience, especially during busy periods. Caching is primarily a means of reducing such issues.</p><p>The cache sits between the server and the user, where it saves (caches) the responses to particular requests, usually for a fixed amount of time.</p><p>If another user then sends an equivalent request, the cache simply serves a copy of the cached response directly to the user, without any interaction from the back-end.</p><p>This greatly eases the load on the server by reducing the number of duplicate requests it has to handle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gVdpuGo4XhaqJVc_L3_27g.jpeg" /><figcaption>Caching</figcaption></figure><h3>Types of Caches</h3><p><strong>Client side Cache: </strong>It’s a cache system that’s built into a browser to store files and contents on your computer and are grouped with other files associated with the browser you use.</p><p><strong>DNS Cache: </strong>DNS cache refers to the temporary storage of information about previous DNS lookups on a machine’s OS or web browser. Keeping a local copy of a DNS lookup allows your OS or browser to quickly retrieve it and thus a website’s URL can be resolved to its corresponding IP much more efficiently.</p><p><strong>Web Cache: </strong>Data that your device stores when visiting a website for the first time includes images, scripts or other media files such as gifs.</p><h3>Cache keys</h3><p>When the cache receives an HTTP request, it first has to determine whether there is a cached response that it can serve directly, or whether it has to forward the request for handling by the back-end server.</p><p>Caches identify equivalent requests by comparing a predefined subset of the request’s components, known collectively as the “cache key”. Typically, this would contain the request line and <strong>host</strong> header.</p><p>Components of the request that are not included in the cache key are said to be &quot;unkeyed&quot;.</p><p>If the cache key of an incoming request matches the key of a previous request, then the cache considers them to be equivalent. As a result, it will serve a copy of the cached response that was generated for the original request.</p><p>This applies to all subsequent requests with the matching cache key, until the cached response expires.</p><p>Crucially, the other components of the request are ignored altogether by the cache. We’ll explore the impact of this behavior in more detail later.</p><h3>Web Cache Poisoning</h3><p>Web cache poisoning is an advanced technique whereby an attacker exploits the behavior of a web server and cache so that a harmful HTTP response is served to other users.</p><p>Basically, web cache poisoning involves two phases. First, the attacker must work out how to obtain a response from the back-end server that inadvertently contains some kind of dangerous payload.</p><p>Once successful, they need to make sure that their response is cached and subsequently served to the intended victims.</p><p>A poisoned web cache can potentially be a devastating means of distributing numerous different attacks, exploiting vulnerabilities such as XSS, JavaScript injection, open redirection, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_KHxM1pgVEr8xduSxnHBGg.jpeg" /><figcaption>web cache poisoning</figcaption></figure><p><strong>Ways of Cache Poisoning</strong></p><p>There are many ways to do Cache Poisoning and are mentioned below</p><ul><li>Unkeyed port</li><li>Unkeyed query string</li><li>Unkeyed query parameters</li><li>Cache parameter cloaking</li><li>Normalized cache keys</li><li>Cache key injection</li><li>Internal cache poisoning</li></ul><p>Other ways can also be used to do cache poisoning like http request smuggling and http response splitting.</p><h3>Impact of a web cache poisoning attack</h3><p>The impact of web cache poisoning is heavily dependent on two key factors:</p><ul><li><strong>What exactly the attacker can successfully get cached</strong><br>As the poisoned cache is more a means of distribution than a standalone attack, the impact of web cache poisoning is inextricably linked to how harmful the injected payload is. As with most kinds of attack, web cache poisoning can also be used in combination with other attacks to escalate the potential impact even further.</li><li><strong>The amount of traffic on the affected page</strong><br>The poisoned response will only be served to users who visit the affected page while the cache is poisoned. As a result, the impact can range from non-existent to massive depending on whether the page is popular or not. If an attacker managed to poison a cached response on the home page of a major website, for example, the attack could affect thousands of users without any subsequent interaction from the attacker.</li></ul><p>Note that the duration of a cache entry doesn’t necessarily affect the impact of web cache poisoning. An attack can usually be scripted in such a way that it re-poisons the cache indefinitely.</p><h3>Methodology</h3><p>We’ll use the following methodology to find cache poisoning vulnerabilities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*RpMaPBMW8HvWPukFTjZo8g.png" /><figcaption>web cache poisoning methodology</figcaption></figure><p>The first step is to identify unkeyed inputs by guessing header/cookie names, and observing whether they have an effect on the application’s response.</p><p>After finding an unkeyed input, the next steps are to assess how much damage you can do with it, then try and get it stored in the cache.</p><p>If that fails, you’ll need to gain a better understanding of how the cache works and hunt down a cacheable target page before retrying.</p><p>Whether a page gets cached may be based on a variety of factors including the file extension, content-type, route, status code, and response headers.</p><p>Cached responses can mask unkeyed inputs, so if you’re trying to manually detect or explore unkeyed inputs, a cache-buster is crucial.</p><p>When auditing a live website, accidentally poisoning other visitors is a perpetual hazard.</p><h3>Prevent web Cache Poisoning Vulnerabilities</h3><p>The definitive way to prevent web cache poisoning would clearly be to disable caching altogether. While for many websites this might not be a realistic option, in other cases, it might be feasible.</p><p>For example, if you only use caching because it was switched on by default when you adopted a CDN, it might be worth evaluating whether the default caching options really do reflect your needs.</p><p>Even if you do need to use caching, restricting it to purely static responses is also effective, provided you are sufficiently wary about what you class as “static”.</p><p>For instance, make sure that an attacker can’t trick the back-end server into retrieving their malicious version of a static resource instead of the genuine one.</p><p>This is also related to a wider point about web security. Most websites now incorporate a variety of third-party technologies into both their development processes and day-to-day operations.</p><p>No matter how robust your own internal security posture may be, as soon as you incorporate third-party technology into your environment, you are relying on its developers also being as security-conscious as you are.</p><p>On the basis that you are only as secure as your weakest point, it is vital to make sure that you fully understand the security implications of any third-party technology before you integrate it.</p><p>Specifically in the context of web cache poisoning, this not only means deciding whether to leave caching switched on by default, but also looking at which headers are supported by your CDN, for example.</p><p>Several of the web cache poisoning vulnerabilities discussed above are exposed because an attacker is able to manipulate a series of obscure request headers, many of which are entirely unnecessary for the website’s functionality.</p><p>Again, you may be exposing yourself to these kinds of attacks without realizing, purely because you have implemented some technology that supports these unkeyed inputs by default. If a header isn’t needed for the site to work, then it should be disabled.</p><p>You should also take the following precautions when implementing caching:</p><ul><li>If you are considering excluding something from the cache key for performance reasons, rewrite the request instead.</li><li>Don’t accept fat GET requests. Be aware that some third-party technologies may permit this by default.</li><li>Patch client-side vulnerabilities even if they seem unexploitable. Some of these vulnerabilities might actually be exploitable due to unpredictable quirks in your cache’s behavior. It could be a matter of time before someone finds a quirk, whether it be cache-based or otherwise, that makes this vulnerability exploitable.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29d7dcd7bd2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webappsec/web-cache-poisoning-29d7dcd7bd2c">Web Cache Poisoning</a> was originally published in <a href="https://medium.com/webappsec">WebAppS3c</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up an Android Pentesting Environment]]></title>
            <link>https://medium.com/mobis3c/setting-up-an-android-pentesting-environment-29991aa0c3f1?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/29991aa0c3f1</guid>
            <category><![CDATA[environment-setup]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[android-security-setup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Thu, 04 Feb 2021 16:51:09 GMT</pubDate>
            <atom:updated>2021-09-12T13:04:09.259Z</atom:updated>
            <content:encoded><![CDATA[<p>Android pentesting requires a dedicated environment which provides access to a rooted android device and let us see how to setup easily by using free tools.</p><h3>Android Virtual Device</h3><p>We will be using AVD which is the default emulator provided by the <a href="https://developer.android.com/studio">android studio</a>. Download and perform default installation, once you arrive at this screen, select more actions and click on AVD Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*FCJ1GpaE8XaqYeCtsJJCXg.png" /></figure><p>In avd manager, select the device and android version 10 i.e. api 29 and create the device and close the android studio and emulator.</p><p>In terminal, run ~/Android/Sdk/emulator/emulator @Android_10 -writable-system -selinux permissive -qemu -enable-kvm to launch the device.</p><p>In new tab, run the below commands to root the device.</p><pre>adb root<br>git clone <a href="https://github.com/0xFireball/root_avd">https://github.com/0xFireball/root_avd</a><br>cd root_avd<br>adb shell &quot;mount -t tmpfs -o size=15M tmpfs /system/xbin&quot;<br>adb shell &quot;cat /proc/mounts | grep /system/xbin&quot;<br>cd SuperSU/x86<br>adb push chattr chattr.pie libsupol.so su supolicy  /system/xbin/<br>cd ../../<br>adb install SuperSU/common/Superuser.apk<br>adb shell &quot;nohup /system/xbin/su 0 su --daemon &amp;&quot;<br>adb shell &quot;ps -ef | grep daemonsu&quot;</pre><p>Supersu will be installed in the device to manage root access, if you would like to know why we need to run the above commands check this <a href="https://anthony-f-tannous.medium.com/android-10-emulation-of-magisk-supersu-on-an-aosp-avd-de93ed080fad">detailed blog.</a></p><h3>Genymotion</h3><p>When starting out learning, android emulators are the great way to get experience with a variety of devices having different API levels without costing much and Genymotion provides exactly that with great User Experience and easy to configure nature for free.</p><blockquote><strong><em>Note:</em></strong><em> VirtualBox is used as a core by genymotion to virtualize Android operating systems. So please install VirtualBox in your system in order to proceed: </em><a href="https://www.virtualbox.org/wiki/Downloads"><em>link</em></a></blockquote><p>Genymotion requires user registration to use its dashboard and for that first you need to create an account: <a href="https://www.genymotion.com/account/create/">link</a></p><p>After completing your registration process download its installer from <a href="https://www.genymotion.com/download/">here</a> and install it in your host computer.</p><pre>#make it executable<br>chmod +x genymotion-3.2.X-linux_x64.bin</pre><pre>#specify installation path<br>./genymotion-3.2.X-linux_x64.bin -d &lt;Genymotion_install_path&gt;<br>cd &lt;Genymotion_install_path&gt;</pre><pre>#run from the installed path<br>./genymotion</pre><p>Once Genymotion is installed, you can sign in using your credentials specified in the registration process.</p><p>you can install a new device by clicking on plus icon at the top right corner and selecting your desired template and keep network mode Bridged</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*GDSLH64dvsK0Pww0xiEq8A.png" /></figure><blockquote>If some app contains ARM native code, then Genymotion will not be able to run the app as it consists of x86 (32-bit) architecture and will throw an error. You can avoid this problem by installing ARM translation library into emulated device: <a href="https://github.com/m9rco/Genymotion_ARM_Translation">link</a></blockquote><blockquote><strong><em>Note: </em></strong><em>At this point of time this library only supports up to android version 8.0 so download right package according to your emulated device’s specifications.</em></blockquote><p>Once the device is started, select wifi from genymotion options and select wifi to enable network emulation.</p><p>select OpenGapps to install Google apps Or in the case of <strong>Archive Error</strong> download gapps file manually from their official <a href="https://www.opengapps.org/">site</a> to your PC.</p><p>Before downloading, check the architecture of mobile, in the terminal run:</p><pre>sudo apt update<br>sudo apt install adb<br>adb shell<br>getprop | grep abi</pre><pre>#architecture can be found in []</pre><p>Download the exact gapps for the architecture from their site and extract the files in your system and then drag and drop the files to the device.</p><h3>Burp Suite</h3><p>Open Burpsuite and navigate to Proxy -&gt; Options. In proxy listeners section, click on add and in Binding section give the binding port and set bind to address to “all interfaces” and click ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*-qpQwcbxCLBcfePdhgzjxQ.png" /></figure><p>goto proxy and export the certificate as shown</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HshTDfiz_Y10wO2aKkvRhA.png" /><figcaption>cert export</figcaption></figure><pre>#check if device is connected<br>adb devices -l</pre><pre>#check for ip address<br>ip a</pre><p>In Android device, Go to Settings → Network &amp; Internet → WiFi and then Click on gear icon next to AndroidWifi. Now, Click on Edit button → Advanced Options → Proxy → Manual.</p><p>Add your system ip address in proxy hostname and bind port as port number and Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*1Z6ZdRJsZJ_lASBWO_fsgg.png" /></figure><p>Traditional way of installing burp cert wont work in recent android versions.</p><p>So we need to install the burp cert as system level cert to work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*XR6EhUgRkzMiyMTZd5v-VQ.png" /><figcaption>convert the ca</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*QctwUcawgpemoBKG98-qTA.png" /><figcaption>puch ca to device</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*SJUL9FcSTBfAQhJy7zTd1w.png" /><figcaption>install ca as system &amp; reboot</figcaption></figure><h3>APKTool</h3><p>A tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications. It also makes working with an app easier because of the project like file structure and automation of some repetitive tasks like building apk, etc.</p><ol><li>Download Linux <a href="https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool">wrapper script</a> (Right click, Save Link As apktool)</li><li>Download apktool-2 (<a href="https://bitbucket.org/iBotPeaches/apktool/downloads/">find newest here</a>)</li><li>Rename downloaded jar to apktool.jar</li><li>Move both files (apktool.jar &amp; apktool) to /usr/local/bin (root needed)</li><li>Make sure both files are executable (chmod +x)</li><li>Try running apktool via cli</li></ol><h3>APKSigner</h3><pre>sudo apt install -y apksigner</pre><h3>Jadx</h3><p>Command line and GUI tools for producing Java source code from Android Dex and Apk files</p><pre>git clone https://github.com/skylot/jadx.git<br>cd jadx<br>./gradlew dist<br>alias jadx-gui=&quot;~/jadx/build/jadx/bin/jadx-gui&quot;</pre><h3>PID Cat</h3><p><strong>Process ID (PID) Cat </strong>is a logcat script which only shows log entries for processes from a specific application package.</p><p>Installing PID Cat:</p><pre>#Download pidcat &amp; make it executable<br>sudo wget -O /usr/local/bin/pidcat <a href="https://raw.githubusercontent.com/JakeWharton/pidcat/master/pidcat.py">https://raw.githubusercontent.com/JakeWharton/pidcat/master/pidcat.py</a> &amp;&amp; sudo chmod +x /usr/local/bin/pidcat</pre><p>Check out <a href="https://medium.com/mobis3c/insecure-data-storage-clear-text-storage-of-sensitive-information-hard-coded-strings-fb7b056c0d0">Insecure Data Storage: Hardcoded secrets</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29991aa0c3f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobis3c/setting-up-an-android-pentesting-environment-29991aa0c3f1">Setting up an Android Pentesting Environment</a> was originally published in <a href="https://medium.com/mobis3c">mobis3c</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insecure Data Storage: Clear Text Storage of Sensitive Information (Hard-coded strings…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mobis3c/insecure-data-storage-clear-text-storage-of-sensitive-information-hard-coded-strings-fb7b056c0d0?source=rss-614e5a7bce8------2"><img src="https://cdn-images-1.medium.com/max/1280/1*3cDLNfzWrV5aUr-4UlamFQ.png" width="1280"></a></p><p class="medium-feed-snippet">Before we get started, we need to have the apk which can be extracted from the device by installing the application through the play store&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/mobis3c/insecure-data-storage-clear-text-storage-of-sensitive-information-hard-coded-strings-fb7b056c0d0?source=rss-614e5a7bce8------2">Continue reading on mobis3c »</a></p></div>]]></description>
            <link>https://medium.com/mobis3c/insecure-data-storage-clear-text-storage-of-sensitive-information-hard-coded-strings-fb7b056c0d0?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb7b056c0d0</guid>
            <category><![CDATA[insecure-data-storage]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[hardcoded-in-apk]]></category>
            <category><![CDATA[android-security]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Thu, 04 Feb 2021 16:49:04 GMT</pubDate>
            <atom:updated>2021-03-24T07:33:30.295Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Introduction to Android Security]]></title>
            <link>https://medium.com/mobis3c/introduction-to-android-security-64609edeb18c?source=rss-614e5a7bce8------2</link>
            <guid isPermaLink="false">https://medium.com/p/64609edeb18c</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[mobis3c]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sanatsu]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 10:47:21 GMT</pubDate>
            <atom:updated>2021-02-04T16:54:40.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*NVdFlOeUhKB8EfHP.jpg" /><figcaption>Android Security</figcaption></figure><h3><strong>Overview of Android Architecture</strong></h3><p>Android is an open source, Linux-based software stack created for a wide array of devices and form factors. The following diagram shows the major components of the Android platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tRnHxuNNHER6LoZC.png" /><figcaption>Android Software Stack</figcaption></figure><p><strong>The Linux Kernel</strong></p><p>The foundation of the Android platform is the Linux kernel. For example, the Android Runtime (ART) relies on the Linux kernel for underlying functionalities such as threading and low-level memory management.</p><p>Using a Linux kernel allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.</p><p><strong>Hardware Abstraction Layer (HAL)</strong></p><p>The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or Bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.</p><p><strong>Android Runtime</strong></p><p>For devices running Android version 5.0 (API level 21) or higher, each app runs in its own process and with its own instance of the Android Runtime (ART). ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format designed specially for Android that’s optimized for minimal memory footprint. Build toolchains, such as Jack, compile Java sources into DEX bytecode, which can run on the Android platform.</p><p>Some of the major features of ART include the following:</p><ul><li>Ahead-of-time (AOT) and just-in-time (JIT) compilation</li><li>Optimized garbage collection (GC)</li><li>On Android 9 (API level 28) and higher, conversion of an app package’s Dalvik Executable format (DEX) files to more compact machine code.</li><li>Better debugging support, including a dedicated sampling profiler, detailed diagnostic exceptions and crash reporting, and the ability to set watchpoints to monitor specific fields</li></ul><p>Prior to Android version 5.0 (API level 21), Dalvik was the Android runtime. If your app runs well on ART, then it should work on Dalvik as well, but the reverse may not be true.</p><p>Android also includes a set of core runtime libraries that provide most of the functionality of the Java programming language, including some Java 8 language features, that the Java API framework uses.</p><p><strong>Native C/C++ Libraries</strong></p><p>Many core Android system components and services, such as ART and HAL, are built from native code that require native libraries written in C and C++. The Android platform provides Java framework APIs to expose the functionality of some of these native libraries to apps. For example, you can access OpenGL ES through the Android framework’s Java OpenGL API to add support for drawing and manipulating 2D and 3D graphics in your app.</p><p>If you are developing an app that requires C or C++ code, you can use the Android NDK to access some of these native platform libraries directly from your native code.</p><p><strong>Java API Framework</strong></p><p>The entire feature-set of the Android OS is available to you through APIs written in the Java language. These APIs form the building blocks you need to create Android apps by simplifying the reuse of core, modular system components and services, which include the following:</p><ul><li>A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an embeddable web browser</li><li>A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files</li><li>A Notification Manager that enables all apps to display custom alerts in the status bar</li><li>An Activity Manager that manages the lifecycle of apps and provides a common navigation back stack</li><li>Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their own data</li></ul><p>Developers have full access to the same framework APIs that Android system apps use.</p><p><strong>System Apps</strong></p><p>Android comes with a set of core apps for email, SMS messaging, calendars, internet browsing, contacts, and more. Apps included with the platform have no special status among the apps the user chooses to install. So a third-party app can become the user’s default web browser, SMS messenger, or even the default keyboard (some exceptions apply, such as the system’s Settings app).</p><p>The system apps function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don’t need to build that functionality yourself — you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify.</p><h3><strong>Android Security Features</strong></h3><p>Below are the security features provided by Android to make the Android devices you develop as secure as possible.</p><p><strong>App sandbox</strong></p><p>The Android platform takes advantage of the Linux user-based protection to identify and isolate app resources. To do this, Android assigns a unique user ID (UID) to each Android app and runs it in its own process. Android uses this UID to set up a kernel-level App Sandbox.</p><p><strong>App signing</strong></p><p>App signing allows developers to identify the author of the app and to update their app without creating complicated interfaces and permissions. Every app that runs on the Android platform must be signed by the developer.</p><p><strong>Authentication</strong></p><p>Android uses the concept of user-authentication-gated cryptographic keys that requires cryptographic key storage and service provider and user authenticators.</p><p>On devices with a fingerprint sensor, users can enroll one or more fingerprints and use those fingerprints to unlock the device and perform other tasks. The Gatekeeper subsystem performs device pattern/password authentication in a Trusted Execution Environment (TEE).</p><p>Android 9 and higher includes Protected Confirmation, which gives users a way to formally confirm critical transactions, such as payments.</p><p><strong>Biometrics</strong></p><p>Android 9 and higher includes a BiometricPrompt API that app developers can use to integrate biometric authentication into their apps in a device- and modality-agnostic fashion. Only strong biometrics can integrate with BiometricPrompt.</p><p><strong>Encryption</strong></p><p>Once a device is encrypted, all user-created data is automatically encrypted before committing it to disk and all reads automatically decrypt data before returning it to the calling process. Encryption ensures that even if an unauthorized party tries to access the data, they won’t be able to read it.</p><p><strong>Keystore</strong></p><p>Android offers a hardware-backed Keystore that provides key generation, import and export of asymmetric keys, import of raw symmetric keys, asymmetric encryption and decryption with appropriate padding modes, and more.</p><p><strong>Security-Enhanced Linux</strong></p><p>As part of the Android security model, Android uses Security-Enhanced Linux (SELinux) to enforce mandatory access control (MAC) over all processes, even processes running with root/superuser privileges (Linux capabilities).</p><p><strong>Trusty Trusted Execution Environment (TEE)</strong></p><p>Trusty is a secure Operating System (OS) that provides a Trusted Execution Environment (TEE) for Android. The Trusty OS runs on the same processor as the Android OS, but Trusty is isolated from the rest of the system by both hardware and software.</p><p><strong>Verified Boot</strong></p><p>Verified Boot strives to ensure all executed code comes from a trusted source (usually device OEMs), rather than from an attacker or corruption. It establishes a full chain of trust, starting from a hardware-protected root of trust to the bootloader, to the boot partition and other verified partitions.</p><h3>APK File Structure</h3><p>An APK file is an archive that usually contains the following files and directories:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*Nol1NP4-wjTLc8nN.png" /><figcaption>APK File Structure</figcaption></figure><p><strong>Manifest file: </strong>An additional Android manifest file, describing the name, version, access rights, referenced library files for the application. This file may be in Android binary XML that can be converted into human-readable plaintext XML with tools such as AXMLPrinter2, apktool, or Androguard.</p><p><strong>Signatures (META-INF): </strong>It contains the Certificates and the signatures.</p><p><strong>Assets: </strong>A directory containing applications assets, which can be retrieved by AssetManager.</p><p><strong>Compiled resources(resources.arsc): </strong>A file containing precompiled resources, such as binary XML for example.</p><p><strong>Native Libraries(lib): </strong>The directory containing the compiled code that is platform dependent; the directory is split into more directories within it:</p><ul><li>armeabi-v7a: compiled code for all ARMv7 and above based processors only</li><li>arm64-v8a: compiled code for all ARMv8 arm64 and above based processors only</li><li>x86: compiled code for x86 processors only</li><li>x86_64: compiled code for x86 64 processors only</li></ul><p><strong>Dalvik bytecode(class.dex): </strong>The classes compiled in the dex file format understandable by the Dalvik virtual machine and by the Android Runtime.</p><p><strong>Resources(res):</strong> the directory containing resources not compiled into resources.arsc</p><p>Check out <a href="https://medium.com/mobis3c/setting-up-an-android-pentesting-environment-29991aa0c3f1">Setting environment for android</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64609edeb18c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobis3c/introduction-to-android-security-64609edeb18c">Introduction to Android Security</a> was originally published in <a href="https://medium.com/mobis3c">mobis3c</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>