<?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 Rahul Chandan on Medium]]></title>
        <description><![CDATA[Stories by Rahul Chandan on Medium]]></description>
        <link>https://medium.com/@r00t7h3ll?source=rss-7a96ced313c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*e2Fr4cqRYvyv_-CcnjKUhA.jpeg</url>
            <title>Stories by Rahul Chandan on Medium</title>
            <link>https://medium.com/@r00t7h3ll?source=rss-7a96ced313c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 20:33:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r00t7h3ll/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[Exploiting URL-Based Access Control: A Lab Analysis]]></title>
            <link>https://medium.com/@r00t7h3ll/exploiting-url-based-access-control-a-lab-analysis-61acf755fe2a?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/61acf755fe2a</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[web-hacking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[portswigger-lab]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 10:37:49 GMT</pubDate>
            <atom:updated>2023-08-15T10:37:49.186Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong> Greetings, infosec researchers!</p><p>Today, we’re delving into a lab provided by PortSwigger Academy that falls within the realm of access control vulnerabilities. Specifically, we’ll be discussing how URL-based access control can be circumvented, shedding light on the mechanisms behind this vulnerability.</p><p><strong>Access-Control Vulnerability Defined:</strong> Before we proceed, let’s clarify what an access control vulnerability entails. An access control vulnerability occurs when a user gains unauthorized access to resources and performs actions for which they lack the necessary permissions.</p><p><strong>Exploring the Lab:</strong> In this exploration, we’re focusing on a practical exercise that simulates a scenario involving access control vulnerabilities. The objective is to gain access to an admin panel and subsequently delete a user named Carlos. Before we dive in, it’s crucial to thoroughly understand the lab’s description to lay the groundwork for our investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oFKmSN6Ez7XAJ-nGwyhbgQ.png" /></figure><p>T<strong>he Role of X-Original-URL Header: </strong>According to the lab’s description, it supports the utilization of the X-Original-URL header. But what exactly is the X-Original-URL header? Some web applications permit the use of non-standard HTTP headers, and the X-Original-URL header falls under this category. When this header is enabled, it allows us to overwrite the existing URL, potentially granting access to critical resources, such as a web application’s admin panel.</p><p><strong>Lab Execution:</strong> With this knowledge in hand, we attempt to access the admin panel from the web application’s graphical user interface (GUI), only to encounter an “Access denied” error. Undeterred, our next step involves intercepting and capturing the request for the aforementioned page using Burp Proxy. Subsequently, we analyze the request’s details in the Repeater tool to gain insight into the web application’s backend operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q8QRXS9Hbj3rSsHce-4oMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-yqewFMJcvUHNrVEs2SsA.png" /></figure><p><strong>Header Manipulation</strong>: Within the Repeater tool, a new header named “X-Original-header” is introduced with the value “/admin.” The intention is to bypass the admin panel. Crucially, the GET request path is modified from “/admin” to “/” to ensure the manipulation takes effect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DWrCJh_qsRpg7Rk9FjfVow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5FPc93JWP9UETExi0468g.png" /></figure><p><strong>Response Observation</strong>: After implementing the header manipulation, successful access to the admin panel is achieved. However, the presence of a user named “Carlos” is noted. Attempting to delete “Carlos” from the front-end would result in an “Access Denied” error. Consequently, an alternative approach is adopted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gk2w4DTYIECEI01MfkX5Q.png" /></figure><p><strong>User Deletion</strong>: Utilizing Burp Suite’s Repeater module, the GET request path is adapted to “/?username=carlos,” and the value of “X-Original-header” is set to “/delete/admin.”</p><p><strong>Successful Exploitation</strong>: Following the user deletion request, success is attained. “Carlos” is successfully deleted, and access to the admin panel is secured, thereby accomplishing the ultimate goal.</p><p>That’s all for today. Keep going and never stop researching.</p><p>Until next time,</p><p>Rahul Nilesh Chandan</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61acf755fe2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unmasking Diva.apk: Exploiting Input Validation]]></title>
            <link>https://medium.com/@r00t7h3ll/unmasking-diva-apk-exploiting-input-validation-eb322efc5620?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb322efc5620</guid>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[security-research]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 18:29:58 GMT</pubDate>
            <atom:updated>2023-08-08T18:29:58.492Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, my infosec folks!</p><p>Today, we are going to take a deep dive into an issue called “Input validation” within the application known as Diva.apk.</p><p><strong>Things required to exploit this vulnerability:</strong></p><ul><li>Diva.apk. You can get it here: <a href="https://github.com/payatu/diva-android">https://github.com/payatu/diva-android</a></li><li>An Android emulator (I personally use Nexus 6 with Android 11)</li><li>adb shell (for analyzing logs via logcat)</li></ul><p>Before we proceed, what is Diva.apk? Diva stands for “Damn Insecure and Vulnerable App.” Diva.apk is a vulnerable Android application that simulates OWASP Top 10 vulnerabilities.</p><p><strong>What is Input Validation?</strong> Input validation occurs when the inputs supplied to an application are not properly sanitized, which increases the risk of both client-side and server-side attacks, such as SQL injection.</p><p>In the Diva application, there are over 13 test cases, and we’ll be focusing on testing the input validation in Part 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zqn2GgP4NNb3XQZGdzh8g.png" /></figure><p>Now, let’s begin by testing for SQL injection using our standard single-quote injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_kT1-pT4fq5qlrXhMM4mFA.png" /></figure><p>Let’s analyze the logs in logcat. Open the adb shell in the terminal and enter the command “logcat.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZIpRfTGdXBZcrbBtzaxakg.png" /></figure><p>As we can see, there is an SQLite error in the logs, indicating that the application is potentially vulnerable to SQL injection.</p><p>Let’s inject our payload to retrieve the list of users. By default, there are three users, and our task is to retrieve all user data with a single malicious payload.</p><p>Use the following payload: &#39;or 1=1--</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3G3cM0hgxDXLyoSHzRoYg.png" /></figure><p>We were successfully able to retrieve all user data with a single malicious query. Mission accomplished!</p><p>That’s it for today. Keep grinding, my fellow infosec warriors, and <em>always </em>stay true to yourself and your goals.</p><p>Until next time, signing out.</p><p>Rahul Nilesh Chandan.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb322efc5620" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking In: Bypassing Sieve.apk’s Authentication]]></title>
            <link>https://medium.com/@r00t7h3ll/bypassing-login-screen-in-android-application-4277ec5b4c17?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4277ec5b4c17</guid>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[authentication-bypass]]></category>
            <category><![CDATA[android-security]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 18:14:19 GMT</pubDate>
            <atom:updated>2023-07-26T18:17:53.271Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, security researchers!</p><p>Today, we will learn how to circumvent or bypass the authentication of an Android application called “Sieve.apk.” Get the Sieve.apk file from here: <a href="https://github.com/tanprathan/sievePWN">https://github.com/tanprathan/sievePWN</a></p><p>Before we proceed, I’d like to share my preferred setup for Android pentesting:</p><ul><li>Operating System: Ubuntu 20.04</li><li>IDE: Android Studio</li><li>Emulator: Nexus 6 with Android version 11.0</li><li>Text Editor: Visual Studio Code</li></ul><p>What is Sieve.apk? It is a password manager app with common Android vulnerabilities. In this article, we will focus on bypassing the login screen of the application without authentication. So, let’s get started!</p><p>Fire up your emulator in the terminal. Since I’m using Nexus 6, I’ll be using the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DV64-a-nLigKEV_7dkjwNg.png" /></figure><p>Now, it’s time to install the Sieve application on our terminal with the help of Android Debug Bridge (ADB). Use the command “adb install sieve.apk”.</p><p>Let us understand the basic functionality of the app:</p><ul><li>The app has multiple screens, which means multiple activities.</li><li>It requires at least a 16-digit password.</li><li>It requires a 4-digit PIN.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_iA31P91T3Ft3nMlScZoA.png" /></figure><p>After browsing around, we are pretty sure that this is a password manager app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ukXYHKoJIzSokEExkMyUQ.png" /></figure><p>Now, let’s begin our analysis by reverse-engineering the application. We’ll be using apktool to decompile the application. After decompiling the application, open the AndroidManifest.xml file with VScode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9daEz6eOfQmpieI7Rr6Zw.png" /></figure><p>Use the word wrap option in VSCode for a better viewing experience of the code. Now, focus on the activities. Notice that the 1st activity “FileSelectActivity” has “exported” set to “true.” This means we can access this activity from the outside world. We can even write our own malicious application with an intent to access this activity, or we can use the adb shell to exploit this. In this article, I’ll be using adb shell to demonstrate this vulnerability. Notice another activity called “PWlist” is also set to “exported” as “true</p><p>Let’s trigger the activity “PWlist” with adb. The weapon of choice we’ll be using is “am” (activity manager). Go to adb shell and enter the following command to trigger this activity:</p><p>generic_x86:/ $ am start-activity -n com.mwr.example.sieve/.PWList</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLREAtOLFJyHCu2KuZ2eBA.png" /></figure><p>And here we were able to trigger the activity “PWList,” and we have successfully bypassed the login screen without entering credentials. We are able to enter another activity called “settingsActivity,” even though it is not set to “exported” as “true.” This is because we have entered the secure application context after getting access to “PWList.” An attacker can even delete the entire database now at this point if they choose to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OS4kC7MOtQiYftBylLVzAQ.png" /></figure><p>Findings:</p><ol><li>We were able to bypass the authentication with the help of activity manager.</li><li>We were able to delete the entire database.</li></ol><p>This was possible because the activity “PWlist” was exported as “true”. A malicious app can also be created to demonstrate the same vulnerability.</p><p>That’s all for today. Stay on your grind. Stay true to yourself.</p><p>Until next time,</p><p>Your Infosec Warrior,</p><p>Rahul.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4277ec5b4c17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Android Manifest Security]]></title>
            <link>https://medium.com/@r00t7h3ll/understanding-android-manifest-security-883e66a58804?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/883e66a58804</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[android-static-analysis]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Tue, 25 Jul 2023 15:35:53 GMT</pubDate>
            <atom:updated>2023-07-25T15:39:52.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings infosec warriors!</p><p>Today, we are going to conduct a static analysis of the app “diva.apk”.</p><p>Requirements:</p><ol><li>Diva.apk: Download the apk file from <a href="https://github.com/0xArab/diva-apk-file">https://github.com/0xArab/diva-apk-file</a>.</li><li>apktool (For reversing the application).</li><li>Visual Studio Code.</li></ol><p>What is AndroidManifest.xml? This file acts as a bridge between an Android developer and the Android platform. It helps us understand the application’s structure and functionality. It starts and ends with the &lt;manifest&gt;&lt;/manifest&gt; tags. The important tags in the file that we need to look out for are &lt;activity&gt;, &lt;application&gt;, &lt;provider&gt;, and &lt;action&gt;. All four crucial elements of an Android application (activity, service, broadcast receiver, content provider) are present in the Android manifest file.</p><p>Let’s decompile the apk file with the help of apktool.</p><p>Use the command “apktool d Divapplication.apk” in your terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*96HMvsFcHjC6dGwa6rRRNQ.png" /></figure><p>Now navigate to the directory called “DivaApplication” and open the AndroidManifest.xml file. If you have Visual Studio Code, use the command “code AndroidManifest.xml” in your terminal to open the file. Alternatively, you can use any other code editor like Leafpad, Nano, Vim, or even Notepad to analyze the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cj4rdo-2zS-GpvCxVG2APQ.png" /></figure><p>Analyzing security issues in the manifest file:</p><ol><li>Backup mode: Notice the 5th line in the code android:allowBackup=&quot;true&quot;. This is set to true. If this is enabled as true, then an attacker can take a backup or steal your confidential app data. This should be set to false.</li><li>Debug mode: Notice the 5th line in the code android:debuggable=&quot;true&quot;. This should be set to false, or an attacker might debug the application and expose the internal architecture of the application.</li><li>Permissions: Pre-existing permissions like READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE are dangerous. Communicate with the developer if these permissions are genuinely required in the application.</li><li>Exported tag: Notice in the 34th line android:exported=&quot;true&quot;. If the Android application is private and you don&#39;t want another app to access the data, this should be set to false.</li></ol><p>That’s all for today. Until next time, peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=883e66a58804" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Privilege Escalation in Owasp Juice Shop]]></title>
            <link>https://medium.com/@r00t7h3ll/privilege-escalation-in-owasp-juice-shop-52b2d5bedbc9?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/52b2d5bedbc9</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[owasp-juice-shop]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 15:29:15 GMT</pubDate>
            <atom:updated>2023-07-06T15:29:15.757Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, Infosec warriors!</p><p>Today, we are going to learn about privilege escalation, and we’ll be using OWASP’s Juice Shop to demonstrate this vulnerability practically.</p><p>Things we’ll be needing:</p><ul><li>OWASP Juice Shop. You can get it from GitHub: <a href="https://github.com/juice-shop/juice-shop">https://github.com/juice-shop/juice-shop</a></li><li>Our good old trusted friend, BurpSuite!</li><li>Docker (optional)</li></ul><p>What is OWASP Juice Shop? OWASP Juice Shop is a modern vulnerable application that uses Node.js.</p><p>How to install OWASP Juice Shop? The quickest way to deploy OWASP Juice Shop is by installing it locally using Docker. Make sure you have Docker installed. Here is an excellent resource for installing Docker on Ubuntu/Kali Linux: <a href="https://www.youtube.com/watch?v=O2Ec0iFD__o">https://www.youtube.com/watch?v=O2Ec0iFD__o</a></p><p>After installing Docker, run the following command in the terminal to boot up OWASP Juice Shop:</p><p>docker pull bkimminich/juice-shop<br>docker run — rm -p 3000:3000 bkimminich/juice-shop</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XxhJ9nxBy-uhkE5ixVfAWQ.png" /></figure><p>Then, open Mozilla Firefox and go to <a href="http://localhost:3000/">http://localhost:3000</a>.</p><p>Now, let’s start by creating a normal user with the following credentials in OWASP Juice Shop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wTKxQX-qsExHR9v9vWHmDQ.png" /></figure><p>Next, let’s turn on intercept in BurpSuite and capture the request. Send it to the repeater for analyzing what’s actually going on behind the scenes of the web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-JJ9QCOA12f_kn2ubPbTUQ.png" /></figure><p>The parameters are being sent in JSON format to the server. Notice in the response that there is a parameter called “role” with the value “customer.” This parameter seems to be passed automatically to the web server. What if we overwrite this parameter and change its value to “admin”? Let’s create a new user with the email “<a href="/service/mailto:spartan@spartan2.com">spartan@spartan2.com</a>” and resend the request to the server by adding “role”:”admin” at the end of the JSON.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pV3ml041q3EKR0dBb_G0Cw.png" /></figure><p>After forwarding the request with our newly injected parameter, we notice that the web server returns a successful response, and our new user is created with administrative privileges! Head back to the registration page, and you’ll see the message confirming that we were able to successfully elevate privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLh8Kd1TNQbXoy1eljjLgA.png" /></figure><p>We have successfully solved this CTF challenge. That’s it for today, folks!</p><p>See you next time. Stay true to yourself and your mission!</p><p>Your Infosec warrior,</p><p>Rahul.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52b2d5bedbc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling Mass Assignment in VAPI | API Pentesting]]></title>
            <link>https://medium.com/@r00t7h3ll/unveiling-mass-assignment-in-vapi-api-pentesting-bf7272aea49a?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf7272aea49a</guid>
            <category><![CDATA[api-pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-research]]></category>
            <category><![CDATA[owasp-api-security-top-10]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Sun, 02 Jul 2023 13:39:24 GMT</pubDate>
            <atom:updated>2023-07-02T13:48:22.251Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, security researchers!</p><p>Today, we are going to learn about another interesting vulnerability called “mass assignment.” Mass assignment is a critical API security risk that occurs when there is an input and authorization flaw. Attackers are able to manipulate and alter sensitive parameters that they are not authorized to modify.</p><p>Let’s learn about this vulnerability with a hands-on example. We will need specific tools for this demonstration:</p><ol><li>VAPI</li><li>Postman</li><li>And our good old friend… Burpsuite.</li></ol><p>I hope you already have VAPI installed if you’ve been following my previous article. If not, you can get it from GitHub here: <a href="https://github.com/roottusk/vapi">link to GitHub page</a>.</p><p>To begin, let’s fire up VAPI, Postman, and Burpsuite in Kali Linux!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jbf7n8DOgCNC2LzVkcOBNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U6P5dQXCKcacW9S8p7eLMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f6XgJwt-Q5I9BR0jqK_mMw.png" /></figure><p>Open your Firefox browser and go to <a href="http://localhost/vapi">http://localhost/vapi</a>. Then, navigate to API No 6. Now, let’s explore the functionality of this API by sending a POST request to create a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eyMD8nctCxujPvXFCIoag.png" /></figure><p>We have successfully created a user. Now, let’s send a GET request to the API endpoint to see what we get in return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGlw3pFah3TBLrSfGVjUSw.png" /></figure><p>The following parameters are returned: id, name, username, and a new parameter called “credit” with a value of 0. I am interested in tampering with the value of the “credit” parameter. Let’s create another new user and pass the “credit” parameter in the POST request using Burpsuite to see if we can inject and manipulate the value of this parameter.</p><p>To do this, turn on the Burp Proxy to intercept Postman requests. Go to the “create user” endpoint and capture the request. We will create a new user with the following parameters:</p><p>{</p><p>“name”:”Batman1000”,</p><p>“username”:”BelikeBatman1000”,</p><p>“password”: “IAmBatman1000”,</p><p>“credit”: “1000”</p><p>}</p><p>Notice that we are injecting an extra parameter called “credit” with the value “1000”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5j7Qtwb2O8y2O5_T_QNFGw.png" /></figure><p>Now after forwarding the request, go back to Postman and send a GET request. This is what we get in return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXk8uI42Ut-I44Xiap-uxg.png" /></figure><p>{</p><p>id”: 22,</p><p>“name”: “Batman1000”,</p><p>“username”: “BeLikeBatman1000”,</p><p>“credit”: “1000”,</p><p>“flag”: flag{some random flag value}</p><p>}</p><p>We have successfully changed the default credit value from “0” to “1000”, and we have even managed to capture the flag!</p><p>That’s all for today. See you later, my infosec companions! Keep grinding and stay true to yourself and your purpose!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf7272aea49a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unmasking Broken Level Authorization | API Pentesting]]></title>
            <link>https://medium.com/@r00t7h3ll/unmasking-broken-level-authorization-api-pentesting-8add019db79?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8add019db79</guid>
            <category><![CDATA[postman-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[api-pentesting]]></category>
            <category><![CDATA[security-research]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 13:08:47 GMT</pubDate>
            <atom:updated>2023-06-30T13:08:47.584Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, my cyber-warriors!</p><p>One of my favorite vulnerabilities in API pen-testing is broken-level authorization.</p><p>Broken-level Authorization falls under the OWASP API Security Top 10 category, and it refers to exploiting resources that the user does not have permission for. We will be using the following tools to exploit this type of vulnerability:</p><ol><li>VAPI</li><li>POSTMAN</li></ol><p>VAPI is a vulnerable API that you can download from GitHub.<a href="https://github.com/roottusk/vapi">https://github.com/roottusk/vapi</a>. It is a self-hosted API lab that helps us practice OWASP&#39;s Top 10 security categories.</p><p>The next tool we’ll be using is called POSTMAN. It is a tool that allows us to send requests and receive responses from API endpoints.</p><p>In BurpSuite, we usually perform penetration tests by intercepting and modifying requests, but in POSTMAN, we don’t do any of that. We simply send requests and receive responses. It is a crucial tool for creating and testing APIs. You can download POSTMAN from here: <a href="https://www.postman.com/downloads/">https://www.postman.com/downloads/</a></p><p>Before we begin this lab, let’s refresh our basics of GET and POST requests. When we send data to a server or endpoint, we use a POST request. If we are trying to retrieve information from the API, we generally use GET requests.</p><p>Now, it’s time to get our hands dirty. Fire up the VAPI GUI and POSTMAN GUI. Configure the settings of POSTMAN and make sure it works correctly with VAPI.</p><p>Go to API level 1, where it says Broken Level Authorization. Let’s explore the functionality first by creating a user called “Batman” using the create user functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDtvpuYNmOi2tuVZsJqwGQ.png" /></figure><p>After creating the user “Batman,” we notice that the value 9 is assigned to the id parameter in the body.</p><p>Now, let’s see how the get user functionality works. After sending the GET request, we receive the following response from the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udJB4ss0a8FsPFMqPpoicg.png" /></figure><p>Now, where is the vulnerability? Everything seems to be working correctly. The API is functioning as expected, and we are able to create users and receive correct responses. However, this is not entirely the case. Let’s try changing the api id parameter in the GET request to 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vJaViDBArNqJfbiG_-araw.png" /></figure><p>As you can see in the response body, we are able to retrieve the usernames of another user called “Michael Scott,” and we have even managed to capture the flag! This is because the id and authorization token were not checked and validated. We were able to obtain Michael Scott’s credentials using the authorization token of the newly created user, “Batman.”</p><p>If this were a real API, we could have created a new user and, with that user’s authorization, obtained details of all the users. This is not secure. The API should have checked the user id against the authorization token and should not have provided this response.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8add019db79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Content Provider Exploitation in Diva: A Practical Approach]]></title>
            <link>https://medium.com/@r00t7h3ll/content-provider-exploitation-in-diva-a-practical-approach-e9cab9517a4d?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9cab9517a4d</guid>
            <category><![CDATA[security-research]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 18:38:01 GMT</pubDate>
            <atom:updated>2023-06-07T03:31:42.002Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, my savvy hackers.</p><p>Today, we will explore the process of exploiting the content provider in a vulnerable application called “Diva.” Before we begin, let’s refresh our understanding of the basics. What exactly is a content provider in an Android application? A content provider is one of the fundamental components of an Android application that enables data sharing between different apps. It serves as a structured interface to manage and share data with other applications or provide data access to external entities. Content providers offer a standardized way to store, retrieve, and manipulate data, ensuring secure and controlled access to shared information.Now that we have a grasp of what a content provider is, allow me to demonstrate how we can exploit Diva’s content provider using a tool called “drozer.”</p><p>Here are the steps to follow:</p><p>Download Diva from GitHub: Visit the following link to download Diva: <a href="https://github.com/payatu/diva-android">https://github.com/payatu/diva-android</a>.</p><p>Install the APK file on your Android emulator: Use the command line to install the APK file on your Android emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3g2CB7KA8pF94P9HCBdmUw.png" /></figure><p>Install drozer: Download the APK file and Drozer agent, and then install them on your emulator.</p><p>Open the Drozer agent on your emulator and activate the embedded server. To use port forwarding with ADB, execute the following command, ensuring that the port number matches the one provided in the drozer agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJsSfXlBLBu1YsRB1aZoug.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eN6xfbZGEdCw7UGK9_Zatw.png" /></figure><p>Connect to Drozer’s console.Find the package name of Diva using the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jy-esoawc5fc1YbdJlyNQg.png" /></figure><p>With the package name of Diva identified as “jakhar.aseem.diva,” let’s gather information about its content providers using the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*Nx5e5_1cw5AtXr2MDK1SiQ.png" /></figure><p>Note the name of the content provider: “Jakhar.Aseem.Diva.NotesProvider.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*0ICGOzqy_se9b1eJhvSe_g.png" /></figure><p>Find content URIs with the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*2bsLTS8TftjG6E-PFAeKcQ.png" /></figure><p>Scan for SQL injection vulnerabilities using the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*QnD0cWsuNi5rCbC_CJOLcg.png" /></figure><p>Based on the output, we can observe that the following content URI is vulnerable to SQL injection:content://jakhar.aseem.diva.provider.notesprovider/notes</p><p>Let’s check for SQL injection in this specific content URI. The output confirms that we are receiving an “SQLITE_ERROR,” indicating that this content URI is indeed susceptible to SQL injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zyzWl8GWCdujdZ0iK-e5Sw.png" /></figure><p>Finally, let’s obtain a list of tables and their metadata using the following payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxnXlhAxJma4H0hCllDKAw.png" /></figure><p>From the output, we can identify a table named “notes.” It’s time to extract valuable data from the “notes” table using the following payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGuQku31HIUjyRbdgLWddg.png" /></figure><p>Please note that the provided steps are intended for educational purposes only, and any form of unauthorized access or exploitation is strictly prohibited. Always ensure that you have proper authorization and adhere to legal and ethical guidelines when conducting security assessments.</p><p>Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9cab9517a4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting a Simple Admin Flaw in an Android Application]]></title>
            <link>https://medium.com/@r00t7h3ll/exploiting-a-simple-admin-flaw-in-an-android-application-7984d4ff8919?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7984d4ff8919</guid>
            <category><![CDATA[mobile-pentesting]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Fri, 26 May 2023 17:52:10 GMT</pubDate>
            <atom:updated>2023-05-26T17:56:29.101Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction: In this article, we will delve into the inner workings of Android applications and shed light on a critical vulnerability known as the admin flaw. By understanding this vulnerability and its potential consequences, we can better appreciate the importance of implementing robust security measures. Additionally, we will explore effective mitigation strategies to protect applications from such vulnerabilities.</p><p>Understanding the Admin Flaw Vulnerability: The admin flaw vulnerability is a common weakness that can expose sensitive functionalities and data within an Android application. It often arises due to inadequate authentication controls, allowing unauthorized access to administrative privileges. Exploiting this vulnerability can lead to severe consequences, such as unauthorized access to user accounts, exposure of confidential information, and potential misuse of application features.</p><p>Step 1: Downloading the Vulnerable Application and Setting Dependencies: To demonstrate the admin flaw vulnerability, we will utilize a vulnerable application called “Insecure Bank v2.” Before proceeding, it is necessary to install Python 2.7.18 as a dependency for running the application.</p><ol><li>Download and install Python 2.7.18, ensuring compatibility with the application.</li><li>Enable USB debugging on your device or emulator to facilitate the installation process.</li><li>Use the command prompt and the “adb install” command to install the “Insecure Bank v2” application on your device or emulator.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjRqqnd2zTxLFjebjWMNGA.png" /></figure><p>Step 2: Starting the AndroLab Server: To facilitate the reverse engineering process, we will utilize the AndroLab server. Follow these steps to set it up:</p><ol><li>Launch Kali and open a new terminal.</li><li>Start the AndroLab server by executing the appropriate command.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GbfVOttjbE7VIPpelEtO1Q.png" /></figure><p>Step 3: Decompiling the Application: In this step, we will reverse engineer the “Insecure Bank v2” application to identify the admin flaw vulnerability.</p><ol><li>Open the terminal in Kali and navigate to the desired location.</li><li>Use the jadx tool to decompile the “Insecure Bank v2” application, enabling access to its source code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*8kFimz3fW2SVR-Bk_Zighw.png" /></figure><ol><li>Once the decompilation process is complete, browse to the specified decompiling path and locate the “sources” directory.</li><li>Within the “sources” directory, you will find the “com” folder. Proceed to the “res” directory to access the project’s source code files.</li><li>Open the file named “DoLogin.java” and search for occurrences of the term “admin.”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1uojMo6enbWUNm_yJ7guzw.png" /></figure><p>4. One instance of interest is “devadmin,” suggesting the existence of a user account with administrative privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lh95uFL6wxaLvhx0VY4t7g.png" /></figure><p>Step 4: Exploiting the Admin Flaw: Having identified the admin flaw vulnerability, we can now exploit it to gain unauthorized access to the application.</p><ol><li>Launch the “Insecure Bank v2” application.</li><li>Log in using the username “devadmin” and leave the password field blank.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FBIplGndxz5rsHmdJn2yQ.jpeg" /></figure><p>3. Astonishingly, the application allows access without requiring any credentials, thus exemplifying the admin flaw vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AowRvuxktOt-Qgvs0xQmsg.jpeg" /></figure><p>Mitigation Strategies: While understanding the admin flaw vulnerability is essential, it is equally crucial to implement robust security measures to prevent such vulnerabilities from being exploited. Here are several effective mitigation strategies:</p><ol><li>Strong Authentication Mechanisms: Implement a robust authentication system that enforces unique and strong credentials, such as complex passwords or multifactor authentication (MFA). This significantly reduces the risk of unauthorized access.</li><li>Secure Coding Practices: Follow secure coding practices, including input validation, output encoding, and secure storage of sensitive information. Avoid hard-coded credentials and ensure the proper handling of user data.</li><li>Regular Security Audits and Testing: Perform routine security audits and penetration testing to identify and address potential vulnerabilities within the application. Regular testing helps uncover flaws before malicious actors exploit them.</li><li>Timely Updates and Patch Management: Keep the application and its dependencies up to date with the latest security patches. Regularly update the application to mitigate known vulnerabilities and improve overall security.</li></ol><p>Conclusion: Understanding and mitigating the admin flaw vulnerability is crucial for ensuring the security and integrity of Android applications. By grasping the underlying causes and potential consequences of this vulnerability, developers can adopt robust security measures during the application development process. Through strong authentication mechanisms, secure coding practices, regular security audits, and timely updates, the risk of admin flaw vulnerabilities can be significantly reduced. By prioritizing security, we can protect user data, maintain user trust, and fortify the overall security posture of Android applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7984d4ff8919" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Firewall Filters for SQL Injection (SQLi)]]></title>
            <link>https://medium.com/@r00t7h3ll/bypassing-firewall-filters-for-sql-injection-sqli-9c47c0dbea4d?source=rss-7a96ced313c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c47c0dbea4d</guid>
            <dc:creator><![CDATA[Rahul Chandan]]></dc:creator>
            <pubDate>Thu, 25 May 2023 05:00:37 GMT</pubDate>
            <atom:updated>2023-05-25T05:12:59.826Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Bypassing Firewall Filters for SQL Injection (SQLi)</strong></p><p>Introduction: In this article, we will explore how to bypass firewall filters using SQL injection (SQLi) techniques. We’ll walk through the process step by step, starting from setting up the necessary environment to extracting sensitive information from the database. Please note that this article is for educational purposes only, and any unauthorized use of these techniques is strictly prohibited.</p><p>Setting up the Environment:</p><ol><li>Launch Kali Linux and start DVWA (Damn Vulnerable Web Application).</li><li>Set the security level of DVWA to medium.</li></ol><p>Locating the Payload File:</p><ol><li>Use the ‘locate’ command in Kali Linux to search for the file containing SQLi payloads.</li><li>Locate the file named “sqlinjection.txt” using the command.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FkjcUjiRpVFPfux1gR-JTg.png" /></figure><p>It’s worth noting that the file “sqlinjection.txt” mentioned in this article was created by me as a reference. This file contains a collection of SQL injection payloads specifically designed to bypass firewall filters. These payloads can be used to test the vulnerability of a target application to SQL injection attacks. It is important to exercise caution and ensure that any usage of these payloads complies with ethical guidelines and legal boundaries. Unauthorized or malicious use of these techniques is strictly prohibited.</p><p>Testing for SQL Injection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kKkd-ItbbYbjwtN57WHxdw.png" /></figure><ol><li>Test the userID field with a standard quote injection to check for SQLi vulnerabilities.</li><li>Use the payload &#39; and 1&#39; and observe the response. If no error is displayed, it does not necessarily mean the application is secure.</li><li>Try the following payloads without adding any quotes to bypass potential firewall detection:</li></ol><ul><li>1 AND 1=1#</li><li>1 OR 1=1#</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JemSIkjiKuXMP_E5-6qzhg.png" /></figure><p>4. If the usernames are enumerated successfully, it indicates the presence of blind SQLi.</p><p>Finding the Number of Columns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jIoJsBoWcxgLEn5JLxvZw.png" /></figure><ol><li>Use the UNION SELECT command to determine the number of columns.</li><li>Execute the payload 1 UNION SELECT 1# and observe the response.</li><li>If no response is received, try 1 UNION SELECT 1,2#. A valid response indicates two columns.</li></ol><p>Reconnaissance and Database Name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kp6dra9Z_wez3f8g7L3GxQ.png" /></figure><ol><li>Inject the payload 1 UNION SELECT database(),2# to determine the database name.</li><li>If the first column is injectable, the database name can be extracted.</li></ol><p>Finding Table Names:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C18GHMP2UyoCHdv6UYHc9g.png" /></figure><ol><li>Execute the payload 1 UNION SELECT table_name,2 FROM information_schema.tables WHERE table_schema=&#39;dvwa&#39;# to find table names in the &#39;dvwa&#39; database.</li><li>If a blank page is returned, it suggests that the text “dvwa” is being filtered.</li><li>Convert the text ‘dvwa’ to its hexadecimal representation using tools like Burp Decoder.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2FVqjVdLs65pqR_ZO9cNw.png" /></figure><p>4. Use the payload 1 UNION SELECT table_name,2 FROM information_schema.tables WHERE table_schema=0x64767761# to bypass the filter and retrieve the table names.</p><p>Finding the Number of Columns in a Specific Table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHZKQIMjVMKcBegDJ-aMNA.png" /></figure><ol><li>Use the payload 1 UNION SELECT column_name,2 FROM information_schema.columns WHERE table_name=&#39;users&#39;# to determine the number of columns in the &quot;users&quot; table.</li><li>If no results are fetched, convert the text “users” to hexadecimal.</li><li>Use the payload 1 UNION SELECT column_name,2 FROM information_schema.columns WHERE table_name=0x7573657273# to bypass the filter and retrieve the column names.</li></ol><p>Extracting Juicy Information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLrvbFB1B3Tbnw7VzSfABA.png" /></figure><ol><li>Enumerate the list of all users using the payload 1 UNION SELECT user,2 FROM users#.</li><li>Extract sensitive information from the “passwords” column in the “users” table using the payload 1 UNION SELECT password,2 FROM users#.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_QZENhsWTnO2IqEZTRg9A.png" /></figure><p>Conclusion: In this article, we have demonstrated how to bypass firewall filters using SQL injection techniques. By carefully crafting payloads and bypassing filters, we were able to extract sensitive information from the database. It is essential to understand that these techniques should only be used ethically and with proper authorization to ensure the security of systems and data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c47c0dbea4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>