<?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 Shomi Nanwani on Medium]]></title>
        <description><![CDATA[Stories by Shomi Nanwani on Medium]]></description>
        <link>https://medium.com/@shominanwani?source=rss-4321badd0514------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NAgmNJp7IGOyVfBWzZDqvQ.jpeg</url>
            <title>Stories by Shomi Nanwani on Medium</title>
            <link>https://medium.com/@shominanwani?source=rss-4321badd0514------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 16:28:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shominanwani/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[Saving yourself from getting Hacked & Hacking the scammer as a return gift]]></title>
            <link>https://shominanwani.medium.com/saving-yourself-from-getting-hacked-hacking-the-scammer-as-a-return-gift-8f6931c82ca?source=rss-4321badd0514------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f6931c82ca</guid>
            <category><![CDATA[scammer]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[python-scripting]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[payment-gateway]]></category>
            <dc:creator><![CDATA[Shomi Nanwani]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 10:13:49 GMT</pubDate>
            <atom:updated>2020-06-23T10:13:49.046Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding how to identify fake payment pages. And using an automated script for Blind SQL Injection with 3xx redirects.</h4><p>This blog is mainly divided into two parts:</p><ol><li>How to identify fake payment pages and prevent from leaking your payment data such as internet banking credentials, credit/debit card number, CVV, etc.</li><li>An automated approach to fetch database information if you get 3xx redirect response code on a successful blind SQL injection.</li></ol><h3>How to identify fake payment pages and prevent from leaking your payment data</h3><p>So, on a lockdown afternoon, I was learning and watching some advanced concepts on Web Application Testing, I got a call from a friend.</p><p>Friend: “Bro I got a call from a Consultancy, there is an opening in XYZ company and I fit in their selection criteria. However, to schedule an interview, I need to pay Rs. 10 on their website for one-time registration charges. Since Rs. 10 is not a huge sum, I went for registration. However, the payment page seems fishy to me. Can you check once?”</p><p>Me: “Let me see. What’s the web page where you did your registration?”</p><p>Friend: “Website is <a href="https://xyz.co/">https://xyz.co</a> but you would require agent id and password after registration to proceed for payment.”</p><p>Since my friend had already warned me that this looks like a fake page, I registered on the website with dummy information. After registration, the website required agent login credentials which felt something odd.</p><p>Me: “Okay, I have now registered, what’s the Agent Id and password?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*3yXae9oFaFiTZGRh8EU6Gw.png" /><figcaption>Image (a). Agent Login Page</figcaption></figure><p>Friend: “Agent ID is ‘jobs’ and password is ‘2021’. Check and tell if its working”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*5cAL1zKoA5DmJh4wtOMUaQ.png" /><figcaption>Image (b). Fake payment page hosted on the website</figcaption></figure><p>Me: “Okay, it&#39;s working, and yes the payment page is fake.”</p><p><strong>Reason to why the payment page looks fake</strong>: When doing a financial transaction online, always look for the following things:</p><h4>1. The website should be accessible on HTTPS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*2PcaagccJwvvSt8hgxbsWw.png" /></figure><blockquote>A website which is accessible on HTTPS is end to end encrypted and no one in the middle can see your data except you and the application server.</blockquote><p>To see if the connection is secured, check for green colour or lock icon on the URL address bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VEBGoIEKxrFG8CayekT1Kw.png" /><figcaption>Image (c.1). A secured HTTPS connection to a website which is not susceptible to MITM Attacks.</figcaption></figure><h4>2. Look for security tags on payment pages to verify its integrity.</h4><p>a. Logo’s that denotes that the payment page is verified to be secured by antivirus companies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*S5Lib8grvEsQiovyIAxFIA.png" /><figcaption>Image (c.2.1). Badges denoting the payment page is verified and secure.</figcaption></figure><p>b. Below logo means that the payment page was verified as secured by Visa and Master Card and those credit/debit cards can be used for payment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*DMc61LuV0BREt_vj9T393g.png" /><figcaption>Image (c.2.2). Visa and MasterCard verifying that the page is secured and can be used for transactions.</figcaption></figure><h4>3. Check for PCI/DSS compliance</h4><p>The Payment Card Industry Data Security Standard is an information security standard for organizations that handle branded credit cards from the major card schemes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*3qW0Cx6gH0hnDqlm_q8jDA.png" /><figcaption>Image (c.3). PCI-DSS badges assigned to payment websites compliant with standards.</figcaption></figure><p>As you can observe in above Image (b), the payment page screenshot does not contain any such security logo.</p><p>You can also try inserting dummy data instead of actual data to check if the website accepts it. If dummy data is accepted by the application, the payment page is fake.</p><h3>An automated approach to fetch database information if you get 3xx redirect response code on a successful blind SQL injection</h3><p>So, after confirming my friend not to pay on the website as the hackers will steal his banking credentials from the fake payment page, I thought, what if I use my skills here to hack the scammers?</p><p>I began searching the page for vulnerabilities through which I can compromise the website.</p><p>Through <a href="http://whois.domaintools.com/">whois</a> search, the website was found to be hosted on <a href="https://godaddy.com/">GoDaddy</a>. I sent an e-mail to the GoDaddy team and reported this website hosting fake payment pages.</p><p>Again, I continued scanning the website for subdomains, open ports and their vulnerabilities.</p><blockquote>Interesting Ports 21, 22, 443, 3306 were found to be open.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*16KTN_HSAfMDc2qFuD69Dw.png" /><figcaption>Image (d). NMap tool output for the malicious website</figcaption></figure><p>I immediately checked for anonymous FTP login and brute-forcing default SSH credentials using Metasploit. Tried the same for MySQL database but no success.</p><p>But as I couldn’t get anything in output, I realized, since this website is hosted on godaddy.com, their SSH and FTP configurations will be secure. The only way to compromise them would be through vulnerabilities in web application.</p><p>I continued analysing the web pages by submitting dummy data. I tried inserting SQL injections but no progress.</p><p>After a few minutes of browsing, I found blind SQL injection on login.php page. The issue here was after successful blind SQL injection, I was getting <strong>302 Moved Temporarily</strong> response code. Whereas, on every other request, the application was accepting whatever input I was giving, either malformed SQLi payload or any other special characters.</p><p>As I went for compromising the website, I knew as I have submitted a report to GoDaddy, the website now can go down any minute so I have very less time to compromise the database.</p><p>The payment pages could be getting input from users and instead of saving it in a database, they could be saving it in a text file. (I got this approach as I had experience in deploying phishing pages and saving the user creds to a txt file so the attacker can open and check them without logging in to DB.)</p><p>Now, the only way to compromise is to perform blind SQL Injection on the login page.</p><p>I copied the request in a txt file and gave it as input to sqlmap (automated SQL injection tool). Sqlmap detected the 302 Moved Temporarily redirections, but failed to validate it as an output of a working SQLi payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DmD6wvCPkmFMyPV5O7JsVA.png" /><figcaption>Image (e). SQLMap detecting the 302 Redirection but failing to consider as output to a successful SQLi.</figcaption></figure><p>After searching online, I couldn’t find any script or tool which can verify 302 Moved Temporarily redirection, as a positive response to working SQLi payload.</p><p>Having experience in python scripting, I thought of writing the script myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*7dwScHG4xJG2oQXC2H4s8A.png" /><figcaption>Image (f). Python script output data in the console.</figcaption></figure><p>Using the script, I was able to get the database name, table names, column names but didn’t get positive results from table data. Not sure what the issue was.</p><p>As I was not able to get much from DB, I inserted payload to delete all the tables and made the application unusable for some time until GoDaddy team takes them down.</p><blockquote>Update: As thought, GoDaddy team has taken the website offline and more research cannot be done now. You can use the script to automate getting database data from blind SQLi where you are getting 302 Moved Temporarily redirection response for a working SQL Injection.</blockquote><p>You can find the script <a href="https://github.com/0p71mu5/redirected-blind-sqli">here</a>. The script is not developed professionally and will require some configuration updates and tweaks before using it.</p><p>Feel free to provide any update on the script or any latest detection techniques for the above scenario.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f6931c82ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>