<?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 amr hamza on Medium]]></title>
        <description><![CDATA[Stories by amr hamza on Medium]]></description>
        <link>https://medium.com/@AmrHamzaAli?source=rss-35434c1ad560------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ksQ65HgqHjNLrLQRoKSvBw.jpeg</url>
            <title>Stories by amr hamza on Medium</title>
            <link>https://medium.com/@AmrHamzaAli?source=rss-35434c1ad560------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 12:02:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AmrHamzaAli/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[Arab Cyber War Games NoSQL Challenge (Doctor X).]]></title>
            <link>https://medium.com/@AmrHamzaAli/arab-cyber-war-games-nosql-challenge-doctor-x-f442e43cc39c?source=rss-35434c1ad560------2</link>
            <guid isPermaLink="false">https://medium.com/p/f442e43cc39c</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <dc:creator><![CDATA[amr hamza]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 15:52:31 GMT</pubDate>
            <atom:updated>2022-08-08T15:52:31.044Z</atom:updated>
            <content:encoded><![CDATA[<p>In this CTF I developed a Nosql challenge that needs the penetration tester to Inject in many forms to find the flag.</p><p>First you need to register and login the web site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*zVOXP2eDAR3nq05OsRcJEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*XN8xyQaupBwxONG9M0q8MQ.png" /></figure><p>After accessing to the security tab we found update password functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*6_CCgxwx9sQkl1xgpjoLBQ.png" /></figure><p>so we intercept this request using burpsuite tool. we found user id is sent into the parameters so we tried to change the id parameter to test if there is any IDOR and voila it responds normally but as if the password were wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0mwpgoltS9BmqukV2NodA.png" /></figure><p>then we would try to bypass this old password validation by this payload we found on hack tricks <a href="https://book.hacktricks.xyz/pentesting-web/nosql-injection">https://book.hacktricks.xyz/pentesting-web/nosql-injection</a></p><pre>{<br>&quot;id&quot;:&quot;1&quot;,<br>&quot;password&quot;:{“$ne”:0},<br>&quot;newpassword&quot;:&quot;87654321&quot;<br>}</pre><p>which gives true upon comparing passwords</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLNMYzZ3tw08PJnuniOPpA.png" /></figure><p>Again we changed the id=1 User. but we still don’t know his user name.</p><p>now let’s try to bypass authentication using our new password and injection true to bypass user name check. so we injected this payload {“$regex”:”Ad”}</p><pre>{<br>&quot;name&quot;:{&quot;$regex&quot;:&quot;Ad&quot;},<br>&quot;password&quot;:{“$ne”:0},<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mVk9PynP4DTT2pZQX1SAMQ.png" /></figure><p>Wow we got Admin credentials and user name was revealed. after accessing the admin we will navigate to admin-search page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SnbD9gaqoNJemGvxejwLwA.png" /></figure><p>After searching for a user we intercepted the request using burpsuite tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*FlAd9UmPTGmwJpayqf-IfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MszoQZlztmcbr-OUFIRgeg.png" /></figure><p>here another fields that didn’t show up in the browser. we could view it using burpsuit proxy.</p><p>now we will try to inject another payload to exfiltrate the database.</p><p>so now we will inject the data base to get any data greater than null or zero as below:</p><pre>{<br>&quot;name&quot;:{&quot;$gte&quot;:0}<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvMA0cbMX_FFoigznYacaQ.png" /></figure><p>voila we had all data in the database we found another user called ZXWQ_Admin_Hidden_Flag who has flag in his description field.</p><p>there was another un intended way to pass the challenge after review the client side code, which was changing the local storage userID to userID=1 and we could access directly to admin-search which then we can exfiltrate the database directly without bypass login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*FTr683UTxrB5S-V-uWwTig.png" /></figure><p>now if we changed the userID we reached admin-panel. then continue to get other users. as previous.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*ULM38_mo8eMhLFJmjY-m3Q.png" /></figure><p>Here it ends the the challenge. I wish you get benefits from it and had fun solving them.</p><p>I also helped Engineer Abdelrahman kamel regarding those challenges, he had writeups, for more reading:</p><ul><li><a href="https://4bdoz.medium.com/exploit-sql-injection-and-bypass-captcha-with-sqlmap-81e6fa1d4cd8">Exploit SQL Injection and bypass captcha with SQLMAP</a></li><li><a href="https://4bdoz.medium.com/cyber-wargames-web-challenges-d3b25459b99b">Cyber wargames web challenges</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f442e43cc39c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>