<?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 Amjad Ali on Medium]]></title>
        <description><![CDATA[Stories by Amjad Ali on Medium]]></description>
        <link>https://medium.com/@amjadali110?source=rss-c43200c46a6c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JvZHoeBMKmdzGtvn0Kv_EA.jpeg</url>
            <title>Stories by Amjad Ali on Medium</title>
            <link>https://medium.com/@amjadali110?source=rss-c43200c46a6c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:15:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amjadali110/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[How I Exploited an Auth0 Misconfiguration to Bypass Login Restrictions]]></title>
            <link>https://amjadali110.medium.com/how-i-exploited-an-auth0-misconfiguration-to-bypass-login-restrictions-c5d8c20d5505?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5d8c20d5505</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Sat, 27 Apr 2024 11:34:50 GMT</pubDate>
            <atom:updated>2024-04-30T06:45:15.483Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone 👋,</p><p>I recently found an interesting bug while hunting on a program, and I’m excited to share it with you all. I am sharing this write-up after a very long time because I was too busy with my job, college, learning new stuff, and so on personally 😅. But now, finally, I am making time to share this with you, so I hope you’ll show some love and encouragement to inspire me to write more. Moreover, I believe this write-up will definitely help you learn something new.</p><p>So, without further delay, let’s delve into the details of my discovery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xt4_OsUUDbYbIBvtP9bLbA.png" /></figure><p>I found a login panel where users can only log in; there is no signup page. The registration/signup option is disabled in the system, as it is designed to be accessible only to authorized parties.<br>I decided to do some fuzzing to see if I could uncover any hidden signup pages or sensitive endpoints. Unfortunately, my efforts came up empty-handed 🥲. But then, I randomly put in an email and password on the login page and intercepted the request using Burp.</p><p>While intercepting requests with Burp Suite, A following type of POST request was generated:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hI87i3lXGoV2XWu2RAZdiA.png" /></figure><p>When I saw the request body structure, it struck me that this web app is using Auth0 because I had recently read a cool write-up by Nauman Khan about Auth0 misconfigurations (<a href="https://naumankh4n.medium.com/a-click-can-cause-1600-auth0-misconfig-9234aedad55c">https://naumankh4n.medium.com/a-click-can-cause-1600-auth0-misconfig-9234aedad55c</a>), which explains how attackers could create accounts using Auth0’s API by sending a POST request to the <em>/dbconnections/signup</em> endpoint, even if the website doesn’t have a sign-up option. So, I thought, maybe this website’s sign-up is disabled, but Auth0 might still let us create accounts.</p><p>So I quickly sent the intercepted request to Burp repeater and modified the request to:</p><pre>POST /dbconnections/signup HTTP/2<br>Host: xyz.web.example.com<br>Content-Length: 198<br>Content-Type: application/json<br>Origin: https://xyz.web.example.com<br>Referer: https://xyz.web.example.com/<br><br>{&quot;client_id&quot;:&quot;&lt;id&gt;&quot;,&quot;email&quot;:&quot;admin@attacker.com&quot;,&quot;password&quot;:&quot;Admin@123&quot;,&quot;connection&quot;:&quot;&lt;value&gt;&quot;,&quot;credential_type&quot;:&quot;http://auth0.com/oauth/grant-type/password-realm&quot;}</pre><ul><li>I added <em>/dbconnections/signup</em> endpoint instead of <em>/co/authenticate</em>.</li><li>Secondly, I changed the name of the <em>username</em> parameter to <em>email</em> and <em>realm</em> to <em>connection</em>.</li></ul><p><strong>This endpoint requires specific parameters:</strong></p><ul><li>client_id: A unique identifier for the application requesting access to Auth0 services.</li><li>connection: Specifies the identity provider for authentication.</li><li>email: The user’s email address.</li><li>password: The desired password adhering to the configured password policy.</li></ul><p>After modifying the request, I just sent the modified request to create an account. And guess what happened — I got a 200 OK response with the body {“_id”:”&lt;id&gt;”,”email”:”<a href="/service/mailto:admin@attacker.com">admin@attacker.com</a>”,”email_verified”:false}. It means I successfully signed up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0RE9H4o3UHAF8AvkhmdBdQ.png" /><figcaption>Performing Successful Registration to the System via the Auth0 API</figcaption></figure><p>By following these steps, an attacker can exploit the misconfiguration in Auth0 and bypass the intended registration mechanism, creating an unauthorized account and gaining access to the application.</p><p>After that, I simply used the newly created credentials to log in to the application, and I was successfully logged into the web application.</p><h4>Now, let’s shed some light on Auth0:</h4><p>What is Auth0?</p><p>Auth0 serves as an authentication platform widely adopted by websites and applications for managing user identities and ensuring secure access to their services. It offers various workflows to seamlessly integrate login and registration processes.</p><p>The Misconfiguration:</p><p>By default, Auth0 enables the registration option when creating a new application. However, if this setting isn’t configured properly, it can pose a significant security risk. Even if a system disables registration but implements Auth0, there’s a chance of bypassing this restriction.</p><p>Mitigation:</p><p>So, what can you do if you find yourself in a similar predicament? Clear Gate recommends the following steps to mitigate the risk and prevent unauthorized access:</p><p>To thwart such exploits, ensure that the “Disable Sign Ups” feature is activated in the application database settings. You can achieve this by navigating to the authentication tab =&gt; Database Connections =&gt; {YourApplicationDatabaseName} =&gt; Disable Sign-Ups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WXuVMV-JqjaRV18zV-qJ7A.png" /><figcaption>Disable Sign Ups Feature is Enabled</figcaption></figure><p>With this feature enabled, any attempt to register via the Auth0 API will result in a clear message indicating that public sign-up is disabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nvS6E6oW4ocGigwBCLaT7A.png" /><figcaption>Creating New Users Via Auth0 API is Not Possible</figcaption></figure><p>And that’s it, folks! I hope this write-up offers you valuable insights. Thank you for taking the time to read. If you have any thoughts or questions, please feel free to share them in the comments section.<br>Thank you again, and happy bug hunting!</p><p>My Linkedin: <a href="https://www.linkedin.com/in/amjadali110/">https://www.linkedin.com/in/amjadali110/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5d8c20d5505" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Easy Vertical Privilege Escalation via Session Storage]]></title>
            <link>https://amjadali110.medium.com/a-easy-vertical-privilege-escalation-via-session-storage-cfa9f558c94?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfa9f558c94</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Fri, 15 Sep 2023 11:11:16 GMT</pubDate>
            <atom:updated>2023-09-15T11:11:16.724Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone 👋,</p><p>I hope all is well. After a gap of one month, I’m back with another write-up. If you missed my previous story, “A High-Impact Payment Bypass on a Government Website — A Tale of Business Logic Flaw Exploitation” you can catch up on it here:- <a href="https://amjadali110.medium.com/a-high-impact-payment-bypass-on-government-website-a-tale-of-business-logic-flaw-exploitation-b158feb7826a">https://amjadali110.medium.com/a-high-impact-payment-bypass-on-government-website-a-tale-of-business-logic-flaw-exploitation-b158feb7826a</a><br>In this write-up, I want to share the story of my recent discovery, Vertical Privilege Escalation via Session Storage, which I discovered on a private program and got 3($$$) digits bounty. So, without further more delay, let’s dive into the details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ruBr4xJ2cd9hUNXbAp7FBg.png" /></figure><p>This was a CRM portal, and it had two different user roles: Normal User and Admin. As part of my testing, I logged in using a Normal User account to explore the functionalities of the web app. Normal Users had only limited resources and features access and couldn’t modify data within the portal. While surfing through the website, I checked the Local Storage and Session Storage. In the Session Storage, I saw the <em>“userPermissionsList”</em> object, which contains a JSON array of user permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0w4taPrApcm8GtUQVpZGQ.png" /></figure><p>So, I quickly logged in as an admin account. Admins had complete access to resources and features and could modify data within the portal. I also checked the Session Storage within the admin account and compared the admin and normal user <em>“userPermissionsList”</em> objects, which contained JSON arrays of user permissions.</p><p>The initial permissions for a normal user look like this:</p><pre>[<br>  {&quot;permissionId&quot;: 1, &quot;permissionName&quot;: &quot;CanGetApplicants&quot;},<br>  {&quot;permissionId&quot;: 5, &quot;permissionName&quot;: &quot;CanGetUsers&quot;},<br>  {&quot;permissionId&quot;: 8, &quot;permissionName&quot;: &quot;CanGetApplications&quot;},<br>  {&quot;permissionId&quot;: 9, &quot;permissionName&quot;: &quot;CanResendEmails&quot;},<br>  {&quot;permissionId&quot;: 18, &quot;permissionName&quot;: &quot;CanGetCustomers&quot;},<br>  {&quot;permissionId&quot;: 22, &quot;permissionName&quot;: &quot;CanGetUserActivity&quot;}<br>]</pre><p>The initial permissions for a admin look like this:</p><pre>[<br>  {&quot;permissionId&quot;: 1, &quot;permissionName&quot;: &quot;CanGetApplicants&quot;},<br>  {&quot;permissionId&quot;: 2, &quot;permissionName&quot;: &quot;CanCreateApplicants&quot;},<br>  {&quot;permissionId&quot;: 3, &quot;permissionName&quot;: &quot;CanUpdateApplicants&quot;},<br>  {&quot;permissionId&quot;: 4, &quot;permissionName&quot;: &quot;CanManageAccounts&quot;},<br>  {&quot;permissionId&quot;: 5, &quot;permissionName&quot;: &quot;CanGetUsers&quot;},<br>  {&quot;permissionId&quot;: 6, &quot;permissionName&quot;: &quot;CanCreateUsers&quot;},<br>  {&quot;permissionId&quot;: 7, &quot;permissionName&quot;: &quot;CanUpdateUsers&quot;},<br>  {&quot;permissionId&quot;: 8, &quot;permissionName&quot;: &quot;CanGetApplications&quot;},<br>  {&quot;permissionId&quot;: 9, &quot;permissionName&quot;: &quot;CanResendEmails&quot;},<br>  {&quot;permissionId&quot;: 10, &quot;permissionName&quot;: &quot;CanGetDocuments&quot;},<br>  {&quot;permissionId&quot;: 11, &quot;permissionName&quot;: &quot;CanUploadDocuments&quot;},<br>  {&quot;permissionId&quot;: 12, &quot;permissionName&quot;: &quot;CanCreateIndividualInvitations&quot;},<br>  {&quot;permissionId&quot;: 14, &quot;permissionName&quot;: &quot;CanQueryIndividualInvitations&quot;},<br>  {&quot;permissionId&quot;: 15, &quot;permissionName&quot;: &quot;CanGetBulkInvitations&quot;},<br>  {&quot;permissionId&quot;: 16, &quot;permissionName&quot;: &quot;CanUploadBulkInvitationsFile&quot;},<br>  {&quot;permissionId&quot;: 17, &quot;permissionName&quot;: &quot;CanUpdateFormStatus&quot;},<br>  {&quot;permissionId&quot;: 18, &quot;permissionName&quot;: &quot;CanGetCustomers&quot;},<br>  {&quot;permissionId&quot;: 19, &quot;permissionName&quot;: &quot;CanResendInvitations&quot;},<br>  {&quot;permissionId&quot;: 20, &quot;permissionName&quot;: &quot;CanResendEvaluations&quot;},<br>  {&quot;permissionId&quot;: 21, &quot;permissionName&quot;: &quot;CanResendManualReviews&quot;},<br>  {&quot;permissionId&quot;: 22, &quot;permissionName&quot;: &quot;CanGetUserActivity&quot;},<br>  {&quot;permissionId&quot;: 23, &quot;permissionName&quot;: &quot;CanGetDeliveredDocuments&quot;},<br>  {&quot;permissionId&quot;: 24, &quot;permissionName&quot;: &quot;CanGetBillingTables&quot;},<br>  {&quot;permissionId&quot;: 25, &quot;permissionName&quot;: &quot;CanGetBillingTableHistoricalRecords&quot;},<br>  {&quot;permissionId&quot;: 26, &quot;permissionName&quot;: &quot;CanGetBillingTableDraftUpdateRecords&quot;},<br>  {&quot;permissionId&quot;: 27, &quot;permissionName&quot;: &quot;CanGetFeedbacks&quot;},<br>  {&quot;permissionId&quot;: 28, &quot;permissionName&quot;: &quot;CanUpdateBillingTables&quot;},<br>  {&quot;permissionId&quot;: 29, &quot;permissionName&quot;: &quot;CanUpdateUserEmail&quot;},<br>  {&quot;permissionId&quot;: 30, &quot;permissionName&quot;: &quot;CanGetTemplates&quot;},<br>  {&quot;permissionId&quot;: 31, &quot;permissionName&quot;: &quot;CanResendApplicationEmail&quot;},<br>  {&quot;permissionId&quot;: 32, &quot;permissionName&quot;: &quot;CanDeleteUpcomingUpdates&quot;},<br>  {&quot;permissionId&quot;: 33, &quot;permissionName&quot;: &quot;CanCreatePolls&quot;},<br>  {&quot;permissionId&quot;: 34, &quot;permissionName&quot;: &quot;CanGetPolls&quot;},<br>  {&quot;permissionId&quot;: 35, &quot;permissionName&quot;: &quot;CanUpdatePolls&quot;},<br>  {&quot;permissionId&quot;: 36, &quot;permissionName&quot;: &quot;CanNotifyIndividualInvitations&quot;},<br>  {&quot;permissionId&quot;: 37, &quot;permissionName&quot;: &quot;CanSendInvitationEmail&quot;}<br>]</pre><p>Upon reviewing these <em>“userPermissionsList”</em> objects, I discerned a potential vulnerability. To test it, I returned to the Normal User account.</p><h4>Understanding Local Storage and Session Storage</h4><p>Before diving into the vulnerability exploitation, it’s essential to grasp the concept of Local Storage and Session Storage.</p><p><strong>What is Local Storage &amp; Session Storage?”</strong></p><p>LocalStorage and SessionStorage are browser storage features introduced in HTML5. It allows saving data in key-value pairs in web browsers via JavaScript. Usually, most of the browsers support up to 5MB browser storage and will enable us to save more data efficiently.</p><h3><strong>Attempting to Exploit the Vulnerability</strong></h3><p>With the collected information, I proceeded to the Normal User account and navigated to the “Session Storage” section. Inside Session Storage, I located the <em>“userPermissionsList”</em> object, containing a JSON array of user permissions. I modified the Admin Account “<em>userPermissionsList”</em> object to Normal User in the Session Storage to gain admin-level access. After making these changes, I refreshed the page, and to my amazement, I gained unauthorized access to administrative-level resources and features, achieving an effortless Vertical Privilege Escalation.<br>I promptly reported this issue, and after two days, I received a response from the program managers, along with a three-digit bounty ($$$).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FnwjPpq245GnB6Wy3kxwqQ.jpeg" /></figure><p>It’s worth noting that many Bug Bounty Hunters overlook Local Storage and Session Storage. I strongly recommend always checking these storage mechanisms, as they may contain sensitive information such as JWT token, Email/Password, as well as PII etc.</p><p>I hope this write-up offers you valuable insights and aids you in your future endeavors. Thank you for taking the time to read about my experience. If you have any thoughts or questions, please feel free to share them in the comments section.</p><p><strong>My Linkedin: </strong><a href="https://www.linkedin.com/in/amjadali110/">https://www.linkedin.com/in/amjadali110/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfa9f558c94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A High-Impact Payment Bypass on Government Website - A Tale of Business Logic Flaw Exploitation]]></title>
            <link>https://amjadali110.medium.com/a-high-impact-payment-bypass-on-government-website-a-tale-of-business-logic-flaw-exploitation-b158feb7826a?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b158feb7826a</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Thu, 10 Aug 2023 13:33:15 GMT</pubDate>
            <atom:updated>2023-08-10T13:33:15.279Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>Greetings, fellow cybersecurity enthusiasts! I am Amjad Ali, a VAPT Analyst, bug hunter, and pentester, excited to share one of my recent findings with you. In this write-up, I will walk you through how I discovered and exploited a business logic flaw to bypass the payment process on a government website (let’s call it xyz.gov.in). The impact of this vulnerability was significant, potentially leading to unauthorized transactions and financial losses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sKUxzvuXqtjEW8QhE7dltA.jpeg" /></figure><p>I began my assignment by creating an account on xyz.gov.in and conducting both active and passive reconnaissance. However, I don’t get any juicy information/endpoint.</p><h3>Discovering the Payment Option:</h3><p>While surfing through the website, I stumbled upon a Payment Option, prompting me to investigate further. I clicked on the “Pay Now” button and was redirected to the CheckoutPage.aspx (<a href="https://www.xyz.gov.in/CheckoutPage.aspx">https://www.xyz.gov.in/CheckoutPage.aspx</a>). There, I entered a nominal amount (5 rupees for demonstration purposes) and initiated the payment.</p><h3>Payment Redirection to Payu Payment Gateway:</h3><p>After filling in the payment amount, the web application redirected me to the <a href="https://payu.in/">Payu Payment Gateway</a> for further payment processing. The <a href="https://payu.in/">Payu Payment Gateway</a> is a third-party service used to securely handle payment transactions. At this stage, users are typically required to provide their payment details, such as credit card information, net banking credentials, or UPI details, to complete the payment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-jh12U0ekry0ZGZzSDp7w.png" /><figcaption>Payu Payment Gateway</figcaption></figure><h3>First Attempt at Bypassing the Payment:</h3><p>As a seasoned bug hunter, I attempted to bypass the payment process by clicking the “Back” button during the redirection to the <a href="https://payu.in/">Payu Payment Gateway</a>. A pop-up appeared, requesting confirmation to cancel the payment. I clicked “Yes” and intercepted the request being sent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZI41T8AJpU9n3apg7NwTpg.png" /></figure><p>The intercepted POST request looked like this:</p><pre>POST /PayFail.aspx HTTP/1.1<br>Host: www.xyz.gov.in<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 925<br>Origin: null<br>Connection: close<br>Upgrade-Insecure-Requests: 1<br><br>mihpayid=17797357055&amp;mode=&amp;status=failure&amp;unmappedstatus=userCancelled&amp;key=dTA6xR&amp;txnid=17917&amp;amount=5.00&amp;discount=0.00&amp;net_amount_debit=0.00&amp;addedon=2023-07-24+11%3A13%3A45&amp;productinfo=Type+Rent+Client+C363+Demand+36246+ReceiptNo+17917+LoginId+Test1&amp;firstname=Tester&amp;lastname=&amp;address1=&amp;address2=&amp;city=&amp;state=&amp;country=&amp;zipcode=&amp;email=test%40gmail.com&amp;phone=1234567890&amp;udf1=183721.00&amp;udf2=129G%2F09&amp;udf3=7%2F1%2F2017+12%3A00%3A00+AM-9%2F30%2F2017+12%3A00%3A00+AM&amp;udf4=8527.00&amp;udf5=4884.00%2C170310.00%2CAjit+Exports&amp;udf6=&amp;udf7=&amp;udf8=&amp;udf9=&amp;udf10=&amp;hash=56c3763f3b737116730e420b2004a4b699f485e98ccc3e887aa63afee3c49ce3f9780c375fe08bf6f36df76497463f1ca47c7fa4587541b88a1b99cc1823515c&amp;field1=&amp;field2=&amp;field3=&amp;field4=&amp;field5=&amp;field6=&amp;field7=&amp;field8=&amp;field9=Cancelled+by+user&amp;payment_source=payu&amp;PG_TYPE=&amp;bank_ref_num=&amp;bankcode=&amp;error=E1605&amp;error_Message=Transaction+failed+due+to+customer+pressing+cancel+button.</pre><h4>Realizing the Potential for Bypass:</h4><p>Based on my experience, I realized that the payment process could be potentially bypassed through response manipulation. To confirm this hypothesis, I decided to make some changes to the intercepted request and send it to the server.</p><h4>Attempting the Payment Bypass:</h4><p>Without wasting any time, I made the following changes in the intercepted request:</p><ul><li>Changed POST /PayFail.aspx HTTP/1.1 to POST /PayPaid.aspx HTTP/1.1.</li><li>Modified the body as follows:</li><li>Changed status=failure to status=success.</li><li>Changed unmappedstatus=userCancelled to unmappedstatus=userPaid.</li><li>Changed net_amount_debit=0.00 to net_amount_debit=5.00.</li><li>Changed field9=Cancelled+by+user to field9=Paid+by+user.</li><li>Removed the content of error=E1605&amp;error_Message=Transaction+failed+due+to+customer+pressing+cancel+button. and replaced it with error=&amp;error_Message=.</li></ul><p>With the modified request in hand, I sent it to the server, hoping for a successful payment bypass. Unfortunately, my attempt was not successful, and I received a response indicating “Your Payment is failure !!”</p><h3>Understanding Payu Payment State Explanations:</h3><p>After the initial attempt failed, I turned to Google and searched for “Payu Payment State Explanations.” and conducted extensive research to understand the Payu API and payment process better. I referred to several documentation sources, including:</p><ul><li><a href="https://devguide.payu.in/api/miscellaneous/status-explanations/">Payu Miscellaneous Status Explanations</a></li><li><a href="https://devguide.payu.in/api/miscellaneous/error-codes/">Payu Error Codes</a></li><li><a href="https://www.payumoney.com/pdf/PayUMoney-Technical-Integration-Document.pdf">PayUMoney Technical Integration Document</a></li><li><a href="https://devguide.payu.in/api/payments/transaction-details-apis/get_transaction_details/">Payu Transaction Details APIs</a></li><li><a href="https://devguide.payu.in/api/payments/transaction-verification-apis/check_payment-api/">Payu Transaction Verification APIs</a></li></ul><p>In my research, I make it a habit to thoroughly grasp the fundamental workings and primary objectives of any organization. This approach significantly helps me in discovering and exploiting vulnerabilities related to how the business processes information and transactions. By understanding the core business practices, I can identify potential weaknesses and find innovative ways to navigate the system effectively.</p><p>After investing two hours in understanding Payu’s API and payment process, I gained insights into the relevant parameters and their significance:</p><ul><li>mihpayid: Unique ID generated for a transaction by PayU.in</li><li>mode: The mode of payment (e.g., UPI)</li><li>status: Status of payment (success, failure, or pending)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KJI7hihAIudYbwSk4N-_3g.png" /><figcaption>Payment State Explanations</figcaption></figure><ul><li>unmappedstatus: Unmapped Status representing the payment status</li><li>key: Merchant key provided by PayU</li><li>txnid: Your transaction ID/order ID</li><li>amount: The payment amount (5.00 rupees in this case)</li><li>discount: Any applicable discount (none in this scenario)</li><li>net_amount_debit: The net amount debited from the account (5.06 rupees)</li><li>addedon: Timestamp of the transaction</li><li>productinfo: Additional information about the product or service (e.g., &quot;Type Other&quot;)</li><li>firstname, lastname, address1, address2, city, state, country, zipcode, email, phone: Customer details</li><li>udf1, udf2, ..., udf10: User-defined fields</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3yrWswHxrTfNhcCzX-dxw.png" /><figcaption>Description of transaction_details JSON Fields</figcaption></figure><ul><li>hash: Checksum to ensure data integrity</li><li>field1, field2, field3, ..., field9: Additional fields for specific transaction information</li><li>payment_source: Indicates the payment source (PayU for transactions made with PayU)</li><li>PG_TYPE: The payment gateway used for the transaction</li><li>bank_ref_num: Bank reference number provided for successful transactions</li><li>bankcode: Code indicating the payment option used</li><li>error: Error code in case of transaction failure (reference for error codes)</li><li>error_Message: Error message for the transaction</li></ul><h4>Second Attempt at Bypassing the Payment:</h4><p>Armed with this newfound knowledge, I made another attempt to bypass the payment by crafting a new request for a 5 rupees payment and manipulating the request content based on the collected information. Unfortunately, despite multiple attempts, the payment bypass was not successful.</p><p>Acknowledging the need for a fresh perspective, I decided to take a break and continue my testing the next day.</p><h3>Next Day:</h3><p>Next day, I decided to gain a deeper understanding of the web application’s response to a successful payment. So, I went ahead and made a genuine payment of 5 rupees and captured the response after a successful transaction. The response looked like this:</p><pre>POST /PayCallBack.aspx HTTP/1.1<br>Host: www.xyz.gov.in<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 874<br>Origin: null<br>Connection: close<br>Upgrade-Insecure-Requests: 1<br><br>mihpayid=17779380833&amp;mode=UPI&amp;status=success&amp;unmappedstatus=captured&amp;key=dTA6xR&amp;txnid=50b8ce88&amp;amount=5.00&amp;discount=0.00&amp;additionalCharges=0.06&amp;net_amount_debit=5.06&amp;addedon=2023-07-21+13%3A36%3A06&amp;productinfo=Type+Other&amp;firstname=Hunter&amp;lastname=&amp;address1=&amp;address2=&amp;city=&amp;state=&amp;country=&amp;zipcode=&amp;email=test%40gmail.com&amp;phone=1234567890&amp;udf1=&amp;udf2=&amp;udf3=&amp;udf4=&amp;udf5=&amp;udf6=&amp;udf7=&amp;udf8=&amp;udf9=&amp;udf10=&amp;hash=9128be32f6731ae571a0f2e6116d5d67b8e1d2d5895a8f605d2375ec45e77ead766b88ffdd0f9324d5f4c6c362666b68a21c72e4eb95744b4bd6e1b31c8f7120&amp;field1=my_upi%40icici&amp;field2=&amp;field3=my_upi%40icici&amp;field4=Name+On+UPI&amp;field5=AXI7ce6182749ed4048ae09b8f2be343dae&amp;field6=&amp;field7=APPROVED+OR+COMPLETED+SUCCESSFULLY%7C00&amp;field8=generic&amp;field9=Success%7CCompleted+Using+Callback&amp;payment_source=payu&amp;PG_TYPE=UPI-PG&amp;bank_ref_num=320219965266&amp;bankcode=UPI&amp;error=E000&amp;error_Message=No+Error</pre><p>After comparing the responses for both successful and failed payments, I noticed that they were different. For failed payments, we were redirected to “/PayFail.aspx,” while successful payments redirected to “/PayCallBack.aspx.” Additionally, I observed an extra parameter, “additionalCharges,” present in the successful payment response, which was not included in the failed payment response. There were also other significant parameters like “mode=UPI,” “net_amount_debit=5.06,” and various “field” values containing specific payment-related information.</p><h3>Final Attempt to Bypassing the Payment:</h3><p>With this newfound knowledge, I decided to attempt bypassing the payment again. I repeated the previous steps of making a 5 rupees payment and then trying to cancel the payment. In the payment cancellation request, I replaced the entire content with the response I received after a successful payment.</p><p>Here’s how the modified request looked:</p><pre>POST /PayCallBack.aspx HTTP/1.1<br>Host: www.xyz.gov.in<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 874<br>Origin: null<br>Connection: close<br>Upgrade-Insecure-Requests: 1<br><br>mihpayid=17779380833&amp;mode=UPI&amp;status=success&amp;unmappedstatus=captured&amp;key=dTA6xR&amp;txnid=50b8ce88&amp;amount=5.00&amp;discount=0.00&amp;additionalCharges=0.06&amp;net_amount_debit=5.06&amp;addedon=2023-07-21+13%3A36%3A06&amp;productinfo=Type+Other&amp;firstname=Hunter&amp;lastname=&amp;address1=&amp;address2=&amp;city=&amp;state=&amp;country=&amp;zipcode=&amp;email=test%40gmail.com&amp;phone=1234567890&amp;udf1=&amp;udf2=&amp;udf3=&amp;udf4=&amp;udf5=&amp;udf6=&amp;udf7=&amp;udf8=&amp;udf9=&amp;udf10=&amp;hash=9128be32f6731ae571a0f2e6116d5d67b8e1d2d5895a8f605d2375ec45e77ead766b88ffdd0f9324d5f4c6c362666b68a21c72e4eb95744b4bd6e1b31c8f7120&amp;field1=my_upi%40icici&amp;field2=&amp;field3=my_upi%40icici&amp;field4=Name+On+UPI&amp;field5=AXI7ce6182749ed4048ae09b8f2be343dae&amp;field6=&amp;field7=APPROVED+OR+COMPLETED+SUCCESSFULLY%7C00&amp;field8=generic&amp;field9=Success%7CCompleted+Using+Callback&amp;payment_source=payu&amp;PG_TYPE=UPI-PG&amp;bank_ref_num=320219965266&amp;bankcode=UPI&amp;error=E000&amp;error_Message=No+Error<br></pre><p>In this modified request, I only kept the parameters “mihpayid,” “txnid,” “addedon,” and “hash” unchanged from the successful payment request. After forwarding the request, to my great delight, the payment was successful without actually paying any money! The payment bypass via response manipulation worked like a charm, and I was so happy about it, like saying, “Yeah, man, you did it!” It was a moment of sheer joy for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*kB3CNtHup8mwURejAnwiew.gif" /></figure><p>To confirm its effectiveness, I repeated this process two more times, and it worked flawlessly each time.</p><h3>Conclusion:</h3><p>I want to share an important lesson I learned from this experience — it’s crucial to understand how the application works and what happens behind the scenes. When you gain this understanding, it opens up new possibilities and helps you identify potential vulnerabilities.</p><p>Always remember to keep exploring and learning about web applications and payment gateways in the field of cybersecurity. By doing so, you can find and fix security issues, making the digital world safer for everyone. Keep pushing your knowledge boundaries, and happy bug hunting!</p><p>Thank you for taking the time to read about my experience. If you have any thoughts or questions, please feel free to share them in the comments section.</p><ul><li><strong>My Linkedin:</strong> <a href="https://www.linkedin.com/in/amjadali110/">https://www.linkedin.com/in/amjadali110/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b158feb7826a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling Access Control Flaws: How a Viewer Became an Editor]]></title>
            <link>https://amjadali110.medium.com/unveiling-access-control-flaws-how-a-viewer-became-an-editor-b4aa83a5a0ec?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4aa83a5a0ec</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 15:40:37 GMT</pubDate>
            <atom:updated>2023-07-10T15:40:37.688Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone 👋,</p><p>Hope all are good and fine. I’m back with another write-up. If you missing the previous write-up stories you can check it out from here: <a href="https://amjadali110.medium.com/hyperlink-injection-726d8151b216">https://amjadali110.medium.com/hyperlink-injection-726d8151b216</a>. In this write-up i want to share with you the story of a recent finding I discovered during a Gray Box testing of a web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*sb9nxjHF9Y2RGoXg.jpeg" /></figure><p>During my assessment, I came across a web application called test.com, which served as a data management portal. The website had three different user roles: Viewer, Editor, and Admin. As part of my testing, I logged in using an Editor account to explore the functionalities of the web app. Editors had complete access to modify the data within the portal.</p><p>While making modifications to an entry, I captured the corresponding HTTP request and analyzed its structure. The request was sent as a POST method to the endpoint “/dir/mis/update?queryid=9361” and contained the data in JSON format. Here’s an example of the request:</p><pre>POST /dir/mis/update?queryid=9361 HTTP/2<br>Host: test.com<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0<br>Accept: application/json, text/plain, */*<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate<br>Authorization: Bearer &lt;token&gt;<br>Content-Type: application/json<br>Content-Length: 392<br>Origin: http://test.com<br>Connection: close<br>Referer: http://test.com/dir/<br>Cookie: JSESSIONID=&lt;value&gt;<br><br>{<br>  &quot;STATE CODE&quot;:&quot;ALL&quot;,<br>  &quot;STATE GST CODE&quot;:&quot;0&quot;,<br>  &quot;FILING DATE&quot;:&quot;2017-12-01 00:00:00.0&quot;,<br>  &quot;LAST DATE&quot;:&quot;2018-02-10 00:00:00.0&quot;,<br>  &quot;RETURN YEAR&quot;:&quot;2017-18&quot;,<br>  &quot;TARGET DATE&quot;:&quot;2018-01-10&quot;,<br>  &quot;GSTNOT&quot;:&quot;72/2017  Central Tax#2017-12-29&quot;,<br>  &quot;NOTIFICATION DATE&quot;:&quot;2017-12-29&quot;,<br>  &quot;PERIOD&quot;:&quot;122017&quot;,<br>  &quot;GST NOTIFICATION&quot;:&quot;72/2017  Central Tax&quot;,<br>  &quot;STATE NAME&quot;:&quot;ALL&quot;,<br>  &quot;TYPE&quot;:&quot;GSTR1&quot;,<br>  &quot;PREFERENCE&quot;:&quot;N&quot;,<br>  &quot;REMARK&quot;:&quot;Test Data&quot;,<br>  &quot;dataKeyEdit&quot;:6<br>}</pre><p>Upon further analysis, I discovered several vulnerabilities within the application’s access control mechanisms. Notably, the website relied heavily on weak cookie implementation for user authentication, and the only check performed was on the presence of the “Authorization: Bearer &lt;token&gt;” header in the request. Strikingly, the “Authorization: Bearer &lt;token&gt;” contained minimal information, such as the username, expiration time, and issuance time.</p><p>Exploiting these vulnerabilities, I devised a plan to bypass the access controls. After logging out from the Editor account, I logged in as a Viewer. Although Viewers had restricted permissions and couldn’t modify data, they could still view it. Armed with the knowledge of the HTTP request structure, I crafted a new request identical to the one I observed earlier. However, this time, I used the Viewer’s “Authorization: Bearer &lt;token&gt;” and corresponding cookies.</p><p>In the crafted request, I replaced the “REMARK” parameter with a malicious payload, “Hello.” To my surprise, when I sent the request, I received a 200 OK response, indicating that the modifications were successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*aJZtNAhdzOid1NOl.png" /></figure><p>It became apparent that the website only checked the presence of the “Authorization: Bearer &lt;token&gt;” header in the request. Regardless of whether it belonged to a privileged user or a non-privileged user, the server processed the request without proper authorization. This vulnerability existed on all the endpoints, meaning the entire web app was vulnerable to unauthorized data modification.</p><p>This vulnerability allowed a lower-level user, such as a Viewer, to modify data even though they lacked the necessary permissions. It exposed a significant flaw in the application’s access control mechanism and could potentially lead to unauthorized modifications or data tampering.</p><p>Thank you for taking the time to read about my experience. If you have any thoughts or questions, please feel free to share them in the comments section. You can also connect with me on LinkedIn: <a href="https://www.linkedin.com/in/amjadali110/">https://www.linkedin.com/in/amjadali110/</a></p><p>Happy Bug Hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4aa83a5a0ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup an Android Pen Testing Lab with Frida-Tools, Objection, Frida Server, and Bypass SSL Pinning]]></title>
            <link>https://amjadali110.medium.com/setup-an-android-pen-testing-lab-bypass-ssl-pinning-17897f6abaf3?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/17897f6abaf3</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Sun, 02 Jul 2023 07:48:31 GMT</pubDate>
            <atom:updated>2023-07-02T13:58:48.972Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone 👋,</p><p>Amjad Ali here, a passionate cybersecurity enthusiast and a Pen Tester. Today, I’m thrilled to present an article co-authored by my friend <a href="https://www.linkedin.com/in/sahil-choudhary-94b3b3229/">Sahil Choudhary</a>, where we will guide you through the exciting journey of setting up an Android Pen Testing Lab. If you’re eager to enhance your skills as a Bug Hunter or Pen Tester, this is the right place for you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_sZXdq5tpDXRZGU407pBQ.png" /><figcaption>Setup an Android Pen Testing Lab with Frida-Tools, Objection, Frida Server, and Bypass SSL Pinning</figcaption></figure><p><strong>&gt;&gt; Introduction:</strong><br>Android penetration testing involves assessing the security of Android applications and devices. In this article, we will guide you through setting up an Android Pen Testing lab using Frida-Tools, Objection, and Frida server. We will also cover how to bypass SSL pinning, a common security measure used in Android apps.</p><p><strong>&gt;&gt; Requirements To Set-Up Android Lab in Windows:</strong><br>Before we begin, make sure you have the following requirements in place:</p><ul><li>Python: Install Python on your Windows machine.</li><li>Burp Suite: Download and install Burp Suite, a popular web application security testing tool.</li><li>Nox Player: Install Nox Player, an Android emulator for Windows.</li><li>Frida-Tools: Install Frida-Tools using the pip package manager.</li><li>Objection: Install Objection using the pip package manager.</li><li>Frida server: Download the appropriate Frida server based on your Android architecture.</li></ul><p><strong>&gt;&gt; Understanding Frida-Tools:</strong><br>Frida is a dynamic instrumentation toolkit that allows developers and security researchers to inject JavaScript or other scripting languages into running processes on various platforms. Frida-Tools provides a comprehensive set of powerful tools built on top of the Frida framework, enabling dynamic analysis, reverse engineering, and penetration testing of Android applications.</p><p><strong>&gt;&gt; Introducing Objection:</strong><br>Objection is an open-source runtime mobile exploration toolkit specifically designed for Android application security testing and penetration testing. It leverages Frida’s dynamic instrumentation capabilities to inject scripts into running Android processes, enabling security researchers to analyze, manipulate, and interact with Android apps on a dynamic level.</p><p><strong>&gt;&gt; Understanding Frida-Server:</strong><br>Frida-Server is a crucial component of the Frida framework designed specifically for Android devices. It acts as a background service running on an Android device, facilitating the injection and execution of Frida scripts into Android applications. By injecting scripts, Frida-Server allows security analysts to monitor and manipulate the runtime behavior of Android apps, including intercepting method calls, analyzing network traffic, and bypassing security controls.</p><p><strong>&gt;&gt; Step-by-Step Guide:</strong></p><ul><li>Check Python Installation: Open PowerShell and type the following command to check if Python is installed:</li></ul><pre>$ python --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*XTQyH43j_lWusPm68Lo4kg.png" /><figcaption>Check Python Installation</figcaption></figure><ul><li>Install Frida-Tools: Open PowerShell and install Frida-Tools using pip:</li></ul><pre>$ pip install frida-tools</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xa2ohAfjsu54Pds2dlb-ew.png" /><figcaption>Install Frida-Tools</figcaption></figure><ul><li>Install Objection: Open PowerShell and install Objection using pip:</li></ul><pre>$ pip install objection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qlX4g_vxrFCOjUCoHCswFw.png" /><figcaption>Install Objection</figcaption></figure><ul><li>Find Installed Package Paths: To find the path where the installed packages are stored, use the following commands:</li></ul><pre>$ pip show frida-tools<br>$ pip show objection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-ckRqJmO5hVvvD7KTPDMA.png" /></figure><p><strong>&gt;&gt; Modify System Environment Variables:</strong></p><p>To set up the correct path for the Python Scripts directory, follow these steps:</p><ul><li>In your case, the frida-tools package is stored in the following path: c:\users\dell\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages</li><li>Navigate to the &quot;Scripts&quot; folder, which is one level above the current location. In your case, the path would be: c:\users\dell\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\scripts</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LaI0c4rb-Fi6fJb5pFl9IQ.png" /></figure><ol><li>Now, let&#39;s modify the system&#39;s environment variables to add this path:</li><li>Open the Start menu and search for “Environment Variables.” Select “Edit the system environment variables.” In the System Properties window, click on the “Environment Variables” button.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*ghZichmIq2gHxllHIGO6_Q.png" /><figcaption>Environment Variables</figcaption></figure><ul><li>In the “System variables” section, select the “Path” variable and click the “Edit” button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*qV0jhRk_bpUqgBPtj73xRA.png" /><figcaption>System variables</figcaption></figure><ul><li>In the “Edit Environment Variable” window, add the path to the Python Scripts directory:</li><li>For example: <em>C:\Users\Dell\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*LJekIF0z7WZh3G6q7WL6xA.png" /><figcaption>Edit Environment Variable</figcaption></figure><ul><li>Click “OK” to close all windows.</li></ul><p>The reason we modify the system’s environment variables, specifically the “Path” variable, is to ensure that the command-line tools and executables associated with Python and its packages can be easily accessed from any directory in PowerShell or the command prompt.</p><p>When you add the path to the Python Scripts directory “<em>C:\Users\Dell\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts</em><strong>”</strong> to the system’s “Path” variable, it allows the system to locate and execute the Python-related commands and tools, such as frida, without specifying the full path every time.</p><p>By adding the Python Scripts directory to the “Path” variable, you ensure that the PowerShell or command prompt can locate the frida command and any other Python-related commands from any directory. This allows for a more convenient and streamlined development experience, as you can use these tools directly without having to navigate to their specific installation directory.</p><p><strong>&gt;&gt; Verify Frida-Tools and Objection Installation:</strong><br>Open PowerShell and type the following commands to check if Frida-Tools and Objection are installed and working properly:</p><pre>$ frida ps<br>$ objection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foQAYzpjrN70GSTKTUYAiw.png" /><figcaption>frida ps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*9MM-1n8OCjdlEixAV65hvg.png" /><figcaption>objection</figcaption></figure><p><strong>&gt;&gt; Getting the Android architecture:</strong></p><ul><li>Right-click on Nox Player and select “Open File Location” to navigate to the Nox Player/bin folder.</li><li>Open CMD on the Nox/bin path.</li><li>Type:</li></ul><pre>$ adb shell<br>and then<br>$ getprop ro.product.cpu.abi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PmNcd5rCqipWnRYdqfGSkQ.png" /></figure><ul><li>Note down the architecture (e.g., x86 or arm64).</li></ul><p><strong>&gt;&gt; Download and Configure Frida Server:</strong></p><ul><li>Go to the Frida GitHub repository (<a href="https://github.com/frida/frida/releases">https://github.com/frida/frida/releases</a>).</li><li>Search for the appropriate Frida server version based on your Android architecture.</li><li>Like in my case it is “x86” so i will download “frida-server-16.1.1-android-x86.xz”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MopLBsAhYYvpiplZOI_u_A.png" /><figcaption><a href="https://github.com/frida/frida/releases">https://github.com/frida/frida/releases</a></figcaption></figure><ul><li>Download the Frida server file.</li><li>Extract the file and put it into the Nox Player/bin folder.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*-eV3ypaPk3HHbRRodWghuw.png" /><figcaption>Frida server file</figcaption></figure><ul><li>Right-click on Nox Player and select “Open File Location” to navigate to the Nox Player/bin folder.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GErcSn8DTOI26WmMzdnOAw.png" /></figure><ul><li>Open CMD in the Nox Player/bin path.</li><li>Run the following commands:</li></ul><pre>$ adb push &lt;frida-server-file&gt; /data/local/tmp<br>$ adb shell<br>$ cd /data/local/tmp<br>$ chmod 777 &lt;frida-server-file&gt;<br>$ ./&lt;frida-server-file&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPMEeUlu-VwBgxTL6CQZTw.png" /></figure><p>At that time we don’t need to start the frida server so we stop the frida server by using <em>“Ctrl+C”</em></p><p><strong>&gt;&gt; Configure Burp Suite:</strong></p><ul><li>Open Burp Suite and go to Proxy &gt; Options.</li><li>Add a new proxy listener with a specific address (e.g., 192.168.116.1) and port (e.g., 8080).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWCA0ymDBBm8KVL-MsIVBA.png" /></figure><ul><li>In Nox Player, open the browser and enter the address and port (e.g., 192.168.116.1:8080).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97d-daz_gMqWf1r4gxGpTg.png" /></figure><ul><li>Download the Burp CA Certificate.</li><li>In the File Manager of Nox Player, locate the downloaded Burp CA Certificate (cacert.der).</li><li>Rename the certificate to cacert.cer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*00_BVqeruLNMT2L5ovgEdQ.png" /></figure><ul><li>Go to Settings &gt; Install Certificates and import the certificate.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpbiuQ9LKA8QwEw2z0irHg.png" /></figure><p><strong>&gt;&gt; Verify Burp Suite Configuration:</strong><br>To verify if Burp Suite is successfully configured, turn on the Intercept feature and search for something on Google within the Nox Player browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVeYzhytS9EO6Hz_VlW0sw.png" /></figure><p><strong>&gt;&gt; Bypass SSL Pinning:</strong></p><ul><li>Download an Android app (e.g., Quip App) for demonstration purposes.</li><li>Install the app in Nox Player.</li><li>Open PowerShell and run the following command to list all installed app package names:</li></ul><pre>$ frida-ps -Uai</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*xUtMJF_A1pdlSy7MBDSj0g.png" /><figcaption>frida-ps -Uai</figcaption></figure><ul><li>Start the Frida server in Nox Player by following the previous steps.</li></ul><pre>$ adb shell<br>$ cd /data/local/tmp<br>$ ./&lt;frida-server-file&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ey7UEZlHNNdv826iUUNIuA.png" /><figcaption>frida server start</figcaption></figure><ul><li>Use the following command to perform runtime changes using Objection:</li></ul><pre>$ objection -g com.quip.quip explore</pre><ul><li>To bypass SSL pinning, execute the following command within Objection:</li></ul><pre>$ android sslpinning disable</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FomyNWwTzybasrf4K9Juug.png" /><figcaption>SSL Pinning Bypass</figcaption></figure><ul><li>Now, you can intercept the app’s traffic.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jga_SOotcbwi2pnz61u4IQ.png" /></figure><p><strong>&gt;&gt; Conclusion:</strong><br>Congratulations! You’ve successfully set up your own Android Pen Testing Lab using Frida-Tools, Objection, Frida Server, and learned how to bypass SSL pinning. With these powerful tools in your arsenal, you are now equipped to explore, analyze, manipulate, and interact with Android applications on a whole new dynamic level.</p><p>Thank you for reading this article. We hope this article has provided you with valuable insights and practical knowledge to fuel your passion for cybersecurity.</p><p>If you have any questions, thoughts, or want to share your own experiences, please feel free to leave a comment below. Let’s continue supporting and inspiring each other as we embark on this fascinating cybersecurity adventure.</p><p>Keep hacking, stay secure, and happy hunting!</p><ul><li><strong>My Linkedin:</strong> <a href="https://www.linkedin.com/in/amjadali110/">https://www.linkedin.com/in/amjadali110/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17897f6abaf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hyperlink Injection Earned Me $200 within 10 minutes]]></title>
            <link>https://amjadali110.medium.com/hyperlink-injection-726d8151b216?source=rss-c43200c46a6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/726d8151b216</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Amjad Ali]]></dc:creator>
            <pubDate>Thu, 11 May 2023 16:04:37 GMT</pubDate>
            <atom:updated>2023-05-30T06:26:56.570Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone 👋,</p><p>My name is Amjad Ali, and I’m a cybersecurity enthusiast. Recently, I found a hyperlink injection vulnerability within 10 minutes of testing and reported it to the Bugcrowd program. Within 6 hours, I received a $200 bounty, 5 points, Hall Of Fame and a P4 rating for my finding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Q1uhrCIO7HIUNf4Lpis5g.jpeg" /></figure><p>Since the program only allowed testing on the main domain, so i skipped the reconnaissance process and created an account directly. I tried to upload an SVG file on my profile picture for XSS, but I was unsuccessful and did not try to bypass the file upload.</p><p>However, I noticed a Discussions feature on the website where users could write their thoughts about products and discuss them. I noticed that the website did not display hyperlinks when a link was entered in the discussion section. Any link input, such as <a href="http://www.evil.com/">www.evil.com</a>, would appear as plain text. Then I put a simple HTML payload like &lt;h1&gt;hi&lt;/h1&gt;, which also appeared as plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*o7LCfBnzYimW4DEZfPU2UQ.jpeg" /></figure><p>However, when I tried the markdown payload <strong>[Click on me to claim 100$ vouchers](</strong><a href="https://evil.com/"><strong>https://evil.com</strong></a><strong>)</strong>, the hyperlink became active.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*HoZp5gCSHUyKsQCFIUXhwA.jpeg" /></figure><p>Initially, I thought that my finding might not be valid and considered it as P5 informational. Therefore, I decided to leave without reporting the issue. After a few hours, I was casually talking to one of my friends, and he asked me if I was doing bug hunting or not. I told him that I had hunted on a Bugcrowd program that day but didn’t find any valid issues. However, I did find a hyperlink injection and shared all the details with him. He advised me to report the issue. After discussing it with my friend, I was encouraged to report the vulnerability, which I did under <strong>VRT:- Unvalidated Redirects and Forwards &gt; Open Redirect</strong>.</p><p>Within five hours, I received an email that my finding was triggered as P4, and I was rewarded with $200 and 5 points.</p><p>“I learned that one should never ignore reporting issues and should not get demotivated, rather keep hunting and have patience.”</p><p>Thank you for taking the time to read about my experience with Bugcrowd program. I hope my story has inspired you to keep hunting and reporting vulnerabilities, no matter how small they may seem. Remember, every finding counts, and it’s essential to have patience and persistence in this field.</p><p>Please feel free to share your thoughts or ask any questions in the <strong>comments</strong> section. Thank you again, and happy bug hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=726d8151b216" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>